Skip to content

AI & Automation

FoldNotes' CLI (fn) outputs structured JSON, making it a natural bridge between your notes and AI tools. An MCP server and Ollama chat client are planned for connecting AI models to your FoldNotes knowledge base.

Coming soon

The MCP server and Ollama chat client will be available when FoldNotes enters beta. Setup instructions will be published here at that time.

Philosophy

FoldNotes deliberately keeps AI outside the editor. The writing surface is distraction-free — no inline suggestions, no auto-complete, no AI nudges while you think. When you want AI assistance, you reach for it explicitly through external tools.

MCP Server (Model Context Protocol)

The FoldNotes MCP server will wrap the fn CLI as a set of tools that any MCP-compatible client can call — Claude Desktop, Claude Code, or third-party MCP clients.

Planned Tools

Tool CLI Command Description
list_notes fn list List and filter notes (by tag, favourites, tasks, dates, archived)
show_note fn show Read a note's content, properties, tasks, or backlinks
create_note fn create Create a new note with content, tags, and properties
edit_note fn edit Append, prepend, replace content; set properties; favourite/archive
search_notes fn search Full-text search with regex, tag filter, titles-only mode
list_tasks fn tasks List tasks (by status, priority, project, due date)
add_task fn tasks add Add a task to a note with due date and priority
complete_task fn tasks complete Mark a task as done
cancel_task fn tasks cancel Cancel a task
start_task fn tasks progress Mark a task as in-progress
reset_task fn tasks reset Reset a task to not-started
list_projects fn tasks projects List all projects
list_tags fn tags List tags with counts, or show notes for a tag
backlinks fn backlinks Find notes referencing a target (with optional context)
daily_note fn daily Show or create a daily note
daily_append fn daily append Append text to a daily note
delete_note fn delete Soft-delete or permanently delete a note
empty_trash fn delete --empty-trash Empty the trash
rename_note fn rename Rename a note
collection_info fn collection info Collection stats and cache status
list_collections fn collections List all registered collections
switch_collection fn collection switch Switch the active collection
open_note fn open Open a note in FoldNotes
version Show MCP server and fn CLI versions

Requirements

  • fn CLI installed (FoldNotes > Install Command Line Tool)
  • Python 3.10+
  • mcp Python package (pip install mcp)

Ollama Chat Client

An interactive chat client will connect local Ollama models to your FoldNotes collection. All queries run locally — no data leaves your machine.

Model Size Speed Tool Calling
qwen2.5:7b 7B Fast (~30 tok/s) Strong (default)
llama3.1:8b 8B Fast Good
qwen2.5:14b 14B Medium Very strong
qwen2.5:32b 32B Slower Excellent (needs 32GB+ RAM)

For tool-calling tasks (structured JSON dispatch), smaller models perform nearly as well as large ones. Use 7B for speed, step up to 14B if you need better reasoning.

Building Your Own Integration

Any tool that can run shell commands can interact with FoldNotes:

# Every command supports --json for structured output
fn list --json
fn show "Note Title" --body --json
fn tasks --overdue --json
fn search "query" --json

# Write operations
fn create "Title" --content "Body" --tag idea
fn edit "Title" --append "New paragraph"
fn daily append "Quick capture"

# Task management
fn tasks add "Review PR" --note "Sprint Tasks" --due tomorrow --priority high
fn tasks complete "Review PR" --note "Sprint Tasks"

The --json flag on every command ensures reliable parsing. The CLI reads and writes .md files directly — changes are immediately visible to the app via iCloud sync.

See Shortcuts & Automation for Apple Shortcuts, Python, and Raycast examples.