# receipts evidence 008 # kind: run # represents: cairn-mcp, built from the public repo, on a throwaway vault: its seven tools (none edits or deletes), a prefix search for switchb, an append, and the note read back with the new line # name: mcp-session # at: 2026-11-17T01:47:08Z # cwd: ~/ry-ops/lab # cmd: sh -c 'cat mcp-session.sh; echo "--- output ---"; ./mcp-session.sh "$HOME/Projects/cairn/src-tauri/target/debug/cairn-mcp" vault' # exit: 0 # redacted: 1 local path(s) replaced with ~/ry-ops/lab # --- #!/bin/sh # Drive cairn-mcp over stdio: initialize, list its tools, search, append, read back. BIN="$1"; VAULT="$2" { echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"receipts","version":"1"}}}' echo '{"jsonrpc":"2.0","method":"notifications/initialized"}' echo '{"jsonrpc":"2.0","id":2,"method":"tools/list"}' echo '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"cairn_search","arguments":{"query":"switchb"}}}' echo '{"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"cairn_append","arguments":{"note":"Ridge loop","text":"Nov 17: dry and fast."}}}' echo '{"jsonrpc":"2.0","id":5,"method":"tools/call","params":{"name":"cairn_read","arguments":{"note":"Ridge loop"}}}' } | "$BIN" --vault "$VAULT" --- output --- {"id":1,"jsonrpc":"2.0","result":{"capabilities":{"tools":{}},"instructions":"The user's Cairn notebooks: markdown notes in pocket-notebook folders. Search before answering questions about their notes, cite notes by title and notebook, and link notes with [[Note title]] (or [[Notebook/Note title]]) when writing. Writing only adds: start a note or append to one.","protocolVersion":"2025-06-18","serverInfo":{"name":"cairn","title":"Cairn notes","version":"0.14.1"}}} {"id":2,"jsonrpc":"2.0","result":{"tools":[{"annotations":{"readOnlyHint":true},"description":"List the user's Cairn notebooks with their ids and note counts.","inputSchema":{"properties":{},"type":"object"},"name":"cairn_notebooks","title":"List notebooks"},{"annotations":{"readOnlyHint":true},"description":"List one notebook's notes (title and file), newest first.","inputSchema":{"properties":{"notebook":{"description":"Notebook title or folder name.","type":"string"}},"required":["notebook"],"type":"object"},"name":"cairn_notes","title":"List notes in a notebook"},{"annotations":{"readOnlyHint":true},"description":"Full-text search across every notebook. Every word must appear; the last can be a prefix; \"quote\" a phrase. Returns titles, notebooks and snippets, best first.","inputSchema":{"properties":{"limit":{"default":10,"maximum":50,"minimum":1,"type":"integer"},"query":{"type":"string"}},"required":["query"],"type":"object"},"name":"cairn_search","title":"Search notes"},{"annotations":{"readOnlyHint":true},"description":"Read a note's full markdown (frontmatter included).","inputSchema":{"properties":{"note":{"description":"The note's title (as shown in Cairn) or file name.","type":"string"},"notebook":{"description":"Notebook title or folder name. Optional: without it, every notebook is searched.","type":"string"}},"required":["note"],"type":"object"},"name":"cairn_read","title":"Read a note"},{"annotations":{"readOnlyHint":true},"description":"Notes that link to this one with [[wikilinks]], each with the linking line.","inputSchema":{"properties":{"note":{"description":"The note's title (as shown in Cairn) or file name.","type":"string"},"notebook":{"description":"Notebook title or folder name. Optional: without it, every notebook is searched.","type":"string"}},"required":["note"],"type":"object"},"name":"cairn_backlinks","title":"Notes linking here"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"readOnlyHint":false},"description":"Start a new note in a notebook (today's date, the title as its heading), optionally with a markdown body. Use [[Note title]] to link other notes.","inputSchema":{"properties":{"body":{"description":"Markdown to put under the title.","type":"string"},"notebook":{"description":"Notebook title or folder name.","type":"string"},"title":{"type":"string"}},"required":["notebook","title"],"type":"object"},"name":"cairn_create_note","title":"Start a note"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"readOnlyHint":false},"description":"Append markdown to the end of an existing note. Never replaces what's there.","inputSchema":{"properties":{"note":{"description":"The note's title or file name.","type":"string"},"notebook":{"description":"Notebook title or folder name (optional).","type":"string"},"text":{"description":"Markdown to add.","type":"string"}},"required":["note","text"],"type":"object"},"name":"cairn_append","title":"Add to a note"}]}} {"id":3,"jsonrpc":"2.0","result":{"content":[{"text":"- Ridge loop — Trail Log (notebook: 0001-trail-log, file: 2026-11-16-ridge-loop.md)\n Ridge loop Up the switchbacks before sunrise.\n","type":"text"}],"isError":false}} {"id":4,"jsonrpc":"2.0","result":{"content":[{"text":"Appended to Ridge loop (0001-trail-log/2026-11-16-ridge-loop.md).","type":"text"}],"isError":false}} {"id":5,"jsonrpc":"2.0","result":{"content":[{"text":"Notebook: Trail Log (0001-trail-log)\nFile: 2026-11-16-ridge-loop.md\n\n---\ntitle: \"Ridge loop\"\n---\n\n# Ridge loop\n\nUp the switchbacks before sunrise.\n\nNov 17: dry and fast.\n","type":"text"}],"isError":false}}