Skip to main content
Glama

KSJ MCP Server

Knowledge Synthesis Journal v2.0 — AI companion

Current release: ksj-mcp v3.9.2 · built on the official Python MCP SDK 2.x

Turn your handwritten journal photos into a searchable, AI-powered knowledge base — privately, on your own machine.

Get the journal: Knowledge Synthesis Journal v2.0 on Amazon


Contents


Related MCP server: recall-mcp

What it does

Some thoughts only show up when you pick up a pen. Writing by hand is slower than typing, and research suggests it engages the brain differently: you have to choose, compress and shape each idea as you form it. That is where insight tends to happen, and it's why the Knowledge Synthesis Journal is made of paper.

The KSJ MCP server is the other half. It connects what you wrote by hand to an AI assistant, so those insights don't stay buried in a notebook. Photograph a page and your assistant can search it, link it to your other pages, and help you see the patterns across them. The connection runs through the Model Context Protocol (MCP), an open standard for linking AI models to local tools and data, and everything stays on your own machine. The server is free and open source (MIT), so you can read exactly what it does with your pages.

Physical journal → knowledge base

Photograph a journal page, show it to your AI assistant, and it can:

  • Search across everything you've ever written

  • Find connections between ideas (shared tags, @ references)

  • Surface your open questions, key insights, and breakthroughs

  • Export your knowledge base as Markdown or JSON

How pages get in — two paths:

  1. Assistant vision (recommended). Share the photo in chat, let your assistant read the handwriting, confirm the transcription, and it stores the page with manual_capture. Modern AI vision is dramatically more accurate on handwriting than traditional OCR — this is the normal workflow.

  2. Local OCR (optional). upload_capture and bulk_upload run Tesseract on your machine. Fully offline, but Tesseract struggles badly with cursive handwriting — best for printed or very neat text.

Either way, a bad read is never permanent: correct_ocr replaces a stored capture's text and re-runs parsing, tags, and connections, while the original read is preserved. And nothing you upload is ever rejected — a page that can't be filed normally lands in Wild Art for review instead.

AI research sessions → structured insights

Spend an hour going deep on a topic with an AI assistant and most of that thinking vanishes when the chat ends. extract_insights fixes that — paste or pipe a session transcript and the server extracts what matters:

  • Novel hypotheses and seed ideas

  • Unexpected connections between concepts

  • Open questions worth pursuing

  • Decisions made and action items

Each insight is confidence-scored (🟢 Seed / 🔴 Developing / 🟡 Strong) and shown to you for review before anything is written to the database. Approved entries are stored alongside your journal captures with full tag support, so AI-extracted insights surface in searches, connection graphs, and synthesis suggestions alongside your handwritten notes.

AI companions — an independent check on what you already wrote

Three pairs of tools go a step further than search and connections: each runs an independent AI pass against a page you've already written by hand, then walks you through what it found before anything gets stored. Same shape every time — scan → structured dialogue → your approval → a separate AI-Extracted entry. Your original page is never rewritten.

  • Synthesis. surface_connections re-derives connections across the RC cluster behind a SYN page — blind to what the page itself says — then compares its independent read against yours: what you both found, what it caught that you missed, what you saw that no tag overlap could have surfaced. commit_distillation stores what the comparison revealed once you approve it, linked to the SYN page with a distills edge.

  • Review. audit_knowledge_status checks a claimed Knowledge Status (Solid / Mastered) against real evidence still sitting in the journal — open questions and uncited insights on that topic. commit_assessment records the outcome with an assesses edge; your REV page's claimed status is never rewritten — a real status change only ever happens on a future hand-written page.

  • Dream Capture. Dreams have a way of picking up whatever you've been turning over by day: the problem you can't put down, the conversation you keep replaying. dream_correlation finds those echoes, the dream pages that share a tag with something you wrote in the days around them. It shows its work: how many days it looked across, how many matches it found, and how often that tag turns up anyway, so a real echo stands out from a lucky coincidence. bridge_dream_research takes a single dream and talks it through with you: what its symbols mean to you, and where they touch your waking work. commit_observation saves what you noticed, linked to the dream with an observes edge. It's kept as an observation, never a verdict, because the dream is yours to interpret.

Every one of these runs after the physical page exists, never before — running the check first would let the AI perform the thinking the physical practice exists to force. None has an override flag for that precondition, and the dialogues themselves are built to ask, not propose: a question makes you think; a suggested answer makes the AI think, in your place.

Local by default. Storage, search, and connections all live in a SQLite database on your machine — nothing is synced or hosted anywhere. When your AI assistant reads a journal photo with vision, that image is handled by your assistant's platform like any other chat attachment; the local Tesseract OCR path keeps everything on-machine. Optional cloud OCR for bulk imports exists but is off unless you explicitly enable it with your own key.


AI platform support

This server uses MCP (Model Context Protocol), an open standard with growing support across AI platforms and developer tools.

Tested:

  • Claude Desktop (free) — full MCP support, recommended for getting started

  • Claude Code — terminal and IDE (setup)

  • Google Antigravity CLI (agy) (setup)

Other MCP-compatible clients should work with the same "ksj" config block but are untested — check your client's MCP documentation for where its config lives.

Using ChatGPT, Gemini, or another platform? Use the export_captures tool to dump your knowledge base as Markdown or JSON, then paste it into your AI assistant of choice. Full native MCP support for additional platforms is on the roadmap as the ecosystem grows.

Protocol compliance: ksj-mcp runs on the official Python MCP SDK 2.x (2.0.0 or later) over the stdio transport. The server is dual-era: it answers the classic initialize handshake (negotiated up to protocol revision 2025-11-25), and a client that opens with the 2026-07-28 per-request envelope gets the modern era, including server/discover. Which era is used is the client's choice. Since v3.7.0 the server answers the handshake before it opens your knowledge base, so startup time no longer grows with the size of your journal. Since v3.9.0 the ksj-mcp command is a small launcher that answers the handshake from a cache written by the previous run (handshake-cache.json in the data directory) while the full server loads, so ksj connects even on a slow or busy machine; the first start after an install or upgrade fills the cache. Through this launcher ksj speaks the classic era only: since v3.9.1 it declines the server/discover probe itself, so a client that probes first (Claude Code does) connects classic instead of ending up with a server in one era and a client in the other. Set KSJ_FAST_HANDSHAKE=0 to run the server directly, with both eras. (MCP is versioned by dated spec release, not semantic version — "MCP SDK 2.x" above refers to the SDK package's own version number, not the protocol revision.)


Setup

The KSJ server runs on your own computer. Your AI assistant reads your journal photos, so no OCR software is needed. (For fully offline OCR, see Optional: offline OCR after setup.)

Prerequisites

Before you install the KSJ server, complete the following requirements:

  1. Install an MCP client. The fastest way to start is Claude Desktop, free at claude.ai/download. The server is also tested with Claude Code and Google Antigravity CLI. For any other client, see its documentation on registering a local MCP server.

  2. Install Git. uv uses Git to download the server. On Windows, install Git for Windows. macOS and most Linux distributions include Git.

  3. Install uv, the Python package manager that installs and runs the server:

    Platform

    Command

    Windows

    winget install astral-sh.uv or download from astral.sh/uv

    macOS/Linux

    curl -LsSf https://astral.sh/uv/install.sh | sh

  4. Open a new terminal and run uv --version to confirm that uv is installed.

Note: On Windows 11, Smart App Control or Microsoft Defender SmartScreen can block a program it doesn't recognize, such as a downloaded installer or the ksj-mcp.exe that uv creates. If you see Windows protected your PC, select More info, confirm the file is the one you expect, and then select Run anyway. Smart App Control has no per-app exception: if it blocks ksj-mcp.exe, the only fix is to turn it off in Windows Security > App & browser control > Smart App Control settings. That's a security setting, so it's your call.

Step 1 — Install the KSJ server

  1. Run the install command in a terminal:

    uv tool install --compile-bytecode --from git+https://github.com/ChavezAILabs/ksj-mcp ksj-mcp

    This installs ksj-mcp as a persistent command on your machine. --compile-bytecode precompiles the server and its libraries, so the first launch isn't slowed by compiling them.

  2. Verify the install. Run uv tool list. The output lists ksj-mcp with a version number.

Step 2 — Configure your MCP client

The configuration examples use the following placeholder:

  • YOUR_USERNAME: your user name on this computer, the folder name under C:\Users\ (Windows) or /Users/ (macOS).

Use the full path to the ksj-mcp program that uv installed. MCP clients launch servers with a limited PATH, so a bare "ksj-mcp" often fails even though it works in a terminal.

Platform

Full path to ksj-mcp

Windows

C:\Users\YOUR_USERNAME\.local\bin\ksj-mcp.exe

macOS

/Users/YOUR_USERNAME/.local/bin/ksj-mcp

Linux

/home/YOUR_USERNAME/.local/bin/ksj-mcp

Claude Desktop

  1. Open the config file. In Claude Desktop, select Settings > Developer > Edit Config. Or open the file directly:

    Platform

    Path

    Windows

    %APPDATA%\Claude\claude_desktop_config.json

    Windows (Microsoft Store install)

    %LOCALAPPDATA%\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\claude_desktop_config.json

    macOS

    ~/Library/Application Support/Claude/claude_desktop_config.json

  2. Quit Claude Desktop fully. On Windows, also quit it from the system tray. Claude Desktop saves its own settings to this file when it quits, and can overwrite changes you made while it was running.

  3. Add the ksj entry. Windows example (use your platform's path from the table above):

    {
      "mcpServers": {
        "ksj": {
          "command": "C:\\Users\\YOUR_USERNAME\\.local\\bin\\ksj-mcp.exe"
        }
      }
    }

    If the file already has an mcpServers block, add the "ksj": { … } entry inside it rather than adding a second block.

  4. Save the file and start Claude Desktop.

  5. Verify that ksj is connected. ksj appears under Settings > Developer with status running. Ask your assistant to run get_version.

Claude Code

  1. Register ksj for all your projects:

    claude mcp add --scope user ksj -- C:\Users\YOUR_USERNAME\.local\bin\ksj-mcp.exe

    On macOS or Linux, use the full path from the table above.

  2. Verify that ksj is connected. Run claude mcp get ksj. The output says Connected.

Google Antigravity CLI

  1. Open the config file ~/.gemini/config/mcp_config.json (Windows: C:\Users\YOUR_USERNAME\.gemini\config\mcp_config.json).

  2. Add the ksj entry, the same block shown for Claude Desktop.

  3. Save the file as plain UTF-8 without a byte-order mark.

    Note: Windows Notepad and PowerShell's Set-Content can add a byte-order mark invisibly. Antigravity then rejects the whole file and loads no MCP servers at all.

  4. Restart agy.

  5. Verify that ksj is connected. Run /mcp in agy.

Note: The first start after an install or update is slow. The server loads its libraries from scratch and saves its handshake answers for next time. If it times out, quit and reopen your client once more (see Troubleshooting). Every start after that connects in seconds.

Update the server

  1. Quit your AI client fully. On Windows, also quit Claude Desktop from the system tray, not just the window. The client keeps the ksj-mcp program open, and the update then fails with "Failed to install entrypoint … being used by another process (os error 32)".

  2. Run the update command:

    uv tool install --reinstall --compile-bytecode --from git+https://github.com/ChavezAILabs/ksj-mcp ksj-mcp

    --reinstall matters: a plain uv tool install silently does nothing when the version number hasn't changed.

  3. Reopen your AI client and ask it to run get_version.

Optional: offline OCR (Tesseract)

Only needed if you want upload_capture / bulk_upload to read photos fully on-machine instead of via your assistant's vision. Fair warning: Tesseract performs poorly on cursive handwriting — printed or very neat text works best.

Platform

Command

Windows

Download the installer from UB-Mannheim/tesseract — check "Add to PATH" during install

macOS

brew install tesseract

Linux

sudo apt install tesseract-ocr

After installing, restart your AI client so the updated PATH is picked up.

Windows note: If you skip "Add to PATH", the server will still auto-detect Tesseract at the default install location (C:\Program Files\Tesseract-OCR\).

Optional: cloud OCR for bulk imports

Off by default — nothing leaves your machine unless you turn this on.

Importing a whole folder of handwritten pages with bulk_upload is the one place local Tesseract really hurts: cursive comes out as noise, page after page. If you have a large backlog, you can point the server at your own Azure Document Intelligence resource (~9% word error rate on handwriting vs ~95% for Tesseract):

{
  "mcpServers": {
    "ksj": {
      "command": "C:\\Users\\YOUR_USERNAME\\.local\\bin\\ksj-mcp.exe",
      "env": {
        "KSJ_OCR_BACKEND": "azure",
        "KSJ_AZURE_ENDPOINT": "https://<your-resource>.cognitiveservices.azure.com",
        "KSJ_AZURE_KEY": "<your-key>"
      }
    }
  }
}

(Use the command path from Step 2 for your platform.)

What this means for your data: each uploaded image is sent to your own Azure resource (your subscription, your key, Azure's data terms) for text extraction. Nothing else is sent anywhere, and your knowledge base stays local either way. Every upload's output states plainly when cloud OCR is active. Remove KSJ_OCR_BACKEND to return to fully local processing.

For a handful of pages, skip all of this — sharing the photo in chat and letting your assistant read it is free and just as accurate.


Usage

Once connected, talk to your AI assistant naturally.

Capturing pages (recommended flow):

[share a photo of the page in chat] "Read this journal page and add it to my knowledge base"

"Here's RC-007 — transcribe it, show me what you read, then store it"

Capturing via local OCR (optional, needs Tesseract):

"Upload my journal photo from /Users/me/Desktop/RC-001.jpg"

"Process all the photos in my /Desktop/journal-scans folder"

Fixing a bad read:

"Capture #12's text is wrong — here's the corrected transcription: …"

Searching & browsing:

"Search my notes for ideas about spaced repetition"

"Show me everything tagged #machine-learning"

"What are my open questions about calculus?"

"Show me everything connected to RC-015"

Synthesis & review:

"Which topics am I ready to synthesize into a SYN page?"

"Show me my breakthrough timeline"

"How is my understanding of #linear-algebra progressing?"

"Run surface_connections on SYN-004" → independent scan of the RC cluster behind it, then a dialogue comparing what it found against what you wrote

"Audit REV-008 against the evidence" → checks its claimed Knowledge Status against open questions and uncited insights still sitting on that topic

Dream Capture:

"What symbols and themes keep appearing in my dreams?"

"Show me all my dream entries from this month"

"Does #flying show up near any of my waking entries?" → plain co-occurrence counts, always with the window, match count, and base rate shown

"Bridge DC-005 to my research" → checks for cross-domain echo, then asks what the dream's symbols mean to you (never proposes an interpretation)

Export & health:

"Export all captures tagged #ai as Markdown"

"Generate a study deck from my open questions"

"How's my journal practice looking?"

"Give me a browsable view of my whole knowledge base" → writes a self-contained .html file — timeline (with date-range search and a 25-at-a-time load-more), tag/entity index, per-capture connection lists, and an ego-centric connection graph (click a tag cluster or a capture to see its local neighborhood, click any neighbor to recenter) — you can open in any browser, no server or install required. Both the in-page ← Back button and your browser's Back button step back through the views you visited, and a reload reopens the same view.

Wild Art & loose captures:

[share a photo of a napkin sketch] "Add this napkin sketch as a loose capture"

"What's waiting in Wild Art?" → list_by_tag(entry_type="WA")

"WA-003 is actually RC-021 — file it" → promote_capture

"SYN-006 develops the napkin idea in WA-004 — link them"


Available tools

37 tools. All of them were exercised against a real 1,000-capture journal (real-data and bad-input cases) in the 3.7 test pass on 2026-09-25; the fixes it led to shipped in 3.8 and 3.9.

How connections work. Captures are linked four ways: an @RC-012-style reference written on the page, a named entity they share, a relationship you asserted by hand (assert_connection), or shared topic tags. Tag links are kept useful by two rules: tags that name the kind of note ($insight, ?question, !priority) never create links on their own, and each capture keeps at most its 25 best tag links — links through a rare tag first, then the strongest, then the nearest in time.

Journal tools

Tool

What it does

get_version

Report the running ksj-mcp, mcp, pydantic, and Python versions — confirms an install or upgrade actually took effect

manual_capture

Store a page your assistant transcribed with vision — the primary capture path. Never rejects: a page it can't file lands in Wild Art. Also takes 3-D isometric pages (ISO-001) and loose captures (wa_reason="loose_capture")

upload_capture

OCR a journal photo locally (Tesseract), parse the template, store it, highlight strongest connection — never rejects (see Wild Art)

promote_capture

File a Wild Art entry under its proper type (RC / SYN / REV / DC / ISO). Refuses an occupied page ID instead of overwriting or renumbering; keeps the WA history

correct_ocr

Replace a stored capture's text with a corrected transcription — re-parses tags and connections, preserves the original

identify_capture

Assign or fix a stored capture's template ID (for a Wild Art entry it runs promote_capture)

bulk_upload

Process a whole folder of photos at once (local OCR) — pages it can't file are kept as Wild Art, not skipped

set_volume

Multiple journals: set which book new captures go into and which books search sees

assert_entity

Link a named entity (person, place, work, dream symbol) to a capture

assert_connection

Assert that one capture supersedes / refutes / narrows / supports / distills / assesses / observes / develops another (develops: a journal entry that works out an idea first scribbled in a loose capture) — superseded claims are kept in history but leave current search

rebuild_connections

Re-derive the connection graph from current tags and text, and report the link counts by type (asserted edges are never touched). Seconds, even on a large journal

find_path

Shortest chain of connections between two captures

neighborhood

Everything within N hops of a capture — its local knowledge cluster

lint

Health check: orphan captures, un-closed superseded claims, unresolved contradictions, stale open questions, fragmented tags

export_backup

Full knowledge base to a versioned JSONL file (format doc)

import_backup

Restore a JSONL backup — additive, nothing overwritten

export_html

Self-contained, offline HTML view — timeline with date search and load-more, tag/entity index, per-capture connection lists, and an ego-centric connection graph; in-page and browser Back both step through views; footer records versions, export time, and counts. Opens in any browser

search_captures

Full-text search with optional tag, date, entry type, and Wild Art reason filters

list_by_tag

Browse captures by tag or prefix — or by entry type / Wild Art reason, e.g. the whole Wild Art queue

find_connections

Show a capture's connections, ranked: asserted relationships, @ references, shared entities, then its best tag links

get_stats

Overview: counts, top tags, open questions, insights, date range, Wild Art split into "needs attention" and loose captures

export_captures

Dump your knowledge base as Markdown or JSON

suggest_synthesis

Find RC topic clusters ready to become a SYN entry

surface_connections

Independently scan the RC cluster behind a SYN page you've already written, then run a structured comparison dialogue — runs after the page exists, never before; no DB write

commit_distillation

Store the confirmed outcome of a surface_connections dialogue as an AIEX entry, linked to its SYN page with an asserted distills edge

export_study_deck

Export ? questions as a portable CSV study deck (Anki, Quizlet, Notion, etc.)

journal_health

KPI dashboard + coaching: velocity, synthesis ratio, review cadence, open questions

get_breakthroughs

All SYN entries chronologically — your complete breakthrough timeline

dream_patterns

Recurring symbols, emotions, motifs, and themes across DC pages

dream_correlation

Find waking-life echoes in your dreams: DC pages that share a tag with RC/REV entries written within a few days of them. Shows the window, match count, and how often the tag turns up anyway, so a real echo stands out from coincidence

knowledge_progress

Track Needs Work → Solid → Mastered progression from REV entries

audit_knowledge_status

Independently check a REV page's claimed status against evidence (open questions, uncited insights), then run a structured dialogue over anything that doesn't line up — runs after the page exists, never before; no DB write

commit_assessment

Store the confirmed outcome of an audit_knowledge_status dialogue as an AIEX entry, linked to its REV page with an asserted assesses edge — never changes the REV page's own claimed status

bridge_dream_research

Talk a single dream through with you: looks for its echoes in your waking work (via dream_correlation), then asks what its symbols mean to you. Only for a dream you've already written down; saves nothing on its own

commit_observation

Save what you noticed in a bridge_dream_research conversation, once you approve it, as an AIEX entry linked to the dream with an observes edge. Your dream as written is never changed

AI session tools

Tool

What it does

extract_insights

Prepare an AI research session for insight extraction — loads knowledge-base context, no DB write

commit_aiex

Store the reviewed, confirmed insights as AIEX entries after your approval


Schema tag system

Use these prefixes anywhere on your journal pages — the server extracts them automatically.

RC, SYN, REV pages:

Prefix

Meaning

Example

#

Topic / domain

#machine-learning

@

Source / reference

@RC-012

!

Priority / urgency

!deadline

?

Open question

?why-does-this-work

$

Key insight

$breakthrough

A→B

Cause / effect

study→retention

Write A→B compactly (study→retention) or on your tags line. An arrow inside an ordinary sentence ("Euclid 300 BCE -> infinite primes") is just writing, not a tag. A tag needs at least one letter, so #768 or $24 stay plain text.

DC (Dream Capture) pages use a dream-specific variant:

Prefix

Meaning

Example

#

Dream theme

#flying

@

Symbol or character

@the-old-house

!

Recurring motif

!falling

*

Sensory detail

*cold-wind

Three things the server does with these automatically:

  • Roles. The same character means different things on DC pages than on RC/SYN/REV (! is priority on RC, a recurring motif on DC). The server stores the meaning alongside the character, so browsing by tag can distinguish them — ask for "priority items" vs "dream motifs".

  • Entities. An @ value that isn't a template ID (@Veronica, @the-old-house) becomes a named entity — searchable across every capture and every journal volume. Dream symbols and story characters are the same kind of object.

  • Tag bubbles. Anything written inside the printed tag bubbles counts as a tag, with or without the #. DOG MAN, Dog-Man, and DOG-MAN all normalize to the same tag.

  • Connections. Topic tags (#), entities (@), dream motifs and sensory details link captures. $, ? and ! on RC/SYN/REV pages mark what kind of note something is, so they're searchable and counted but don't link two captures by themselves.

Page layout. Write field labels the way the page prints them — on their own line or with the content after a colon (Key Points: …) both work, as do extra headings of your own (Action Items:, NEXT STEPS). Each section runs until the next label.


Wild Art: nothing is ever rejected

Any page the server can't file normally is stored as a Wild Art (WA) entry (WA-001, WA-002, …) instead of being rejected. Its text, tags, photo, and connections are kept exactly as for any other page, and the reason is recorded:

Reason

When

id_conflict

The page ID is already taken in that volume. The existing page is untouched, and the WA entry records the ID it was read as and which capture holds it

unrecognized_template

No template ID could be read

ocr_low_confidence

The ID was only read loosely from a low-confidence OCR pass

validation_error

E.g. an explicit template ID that doesn't parse

loose_capture

On purpose: anything off-journal, like a napkin sketch, sticky note, whiteboard photo, or the back of a receipt. No volume or page ID needed

manual / other

Filed as Wild Art by hand / anything else

  • Review: list_by_tag(entry_type="WA"), optionally with wa_reason=…. get_stats and journal_health report real failures ("needs attention") separately from loose captures ("no action needed").

  • File it: promote_capture(capture_id, "RC", "RC-021") moves it to its proper type and keeps promoted_from and the original reason. If the page ID is already taken, nothing changes: you choose a different ID or volume. IDs are never renumbered automatically.

  • Link a scribble: when a journal entry develops a loose capture's idea, assert_connection(entry, scribble, "develops") links them and keeps the scribble as the source.

3-D isometric pages (not dot-grid) have their own type, ISO (ISO-001, …). Store them with manual_capture(template_id="ISO-001"), transcribing the subject line, labels, and notes around the drawing. They show up under their own type in search, Index, and the Timeline filters.


Multiple journals (volumes)

Finished a journal and started a second one? The new book starts over at RC-001 — that's expected. Each physical journal is a volume, and volume 2 continues volume 1's knowledge base: search spans all volumes and cross-volume connections are normal.

When you start a new book, say so once:

"I'm starting my second journal" → the assistant runs set_volume(current_volume=2)

Or write the volume on the page itself (e.g. V2 next to the template ID), or pass volume=2 on a single upload. If an upload collides with an existing page ID, it's kept as Wild Art (id_conflict) and the assistant asks what it is: a page from a new journal (promote_capture(…, volume=2)), a misread ID (promote_capture with the right ID), or a cleaner re-capture of the same page (re-upload with force=True). Nothing is ever silently overwritten, and a page is never filed into the wrong volume to get around a conflict.

Which printing a page came from. From Rev C on, every template page of the journal carries a small edition mark under its template ID (v2.0 · Rev C). When the assistant transcribes it, the server records it with the page and shows it on upload (Edition : v2.0 · Rev C). Rev A and Rev B pages have no mark.


Troubleshooting

"Tesseract OCR is not installed" You called upload_capture/bulk_upload, which need the optional local OCR engine. Either install Tesseract (Optional: offline OCR) and restart your AI client — or skip it entirely: share the photo in chat and ask your assistant to read and store the page instead.

"Stored as Wild Art … unrecognized_template" (or UNIDENTIFIED, for pages stored before v3.7) The template ID couldn't be read from the photo, but the page and its text were stored anyway, so nothing is lost. Tell your assistant the correct ID ("that's RC-007") and it will file it with promote_capture (or identify_capture for a pre-3.7 UNIDENTIFIED page). Sloppy or unpadded IDs (RC-7, RC-OO2, a stray letter after the number) are read automatically with a confirmation note.

OCR got the text wrong Ask your assistant to fix it with correct_ocr — give it the capture number and the corrected text. The original read is preserved, and tags and connections are rebuilt from the correction.

"Stored as Wild Art … id_conflict — RC-001 already exists" The page ID is already taken, so the new page was kept as Wild Art and the original is untouched. If it's a cleaner retake of the same page and you want it to replace the original, upload with force=True:

"Upload /path/to/RC-001.jpg with force=True"

If it's a page from a new journal, or its ID was misread, file it with promote_capture instead.

"ksj didn't respond within a minute" / "Couldn't start … Request timed out" The server took too long to start. This is expected once, right after an install or update: the server loads its libraries from scratch and saves its handshake answers for next time. Quit and reopen your AI client once more and it should connect in seconds. If it keeps timing out:

  • Check how busy the machine is. On a low-power laptop, cloud-sync catch-up (OneDrive, Google Drive), a heavy background job, or right after a reboot can push startup past the client's limit. Let it settle and restart the client.

  • Some antivirus products scan every Python file on each start. Excluding the uv tools folder from real-time scanning (Windows: %APPDATA%\uv\tools; macOS: ~/.local/share/uv/tools) can cut startup sharply. That's a security setting — your call.

  • Read the server log (below) for the actual error.

Where the logs are (Claude Desktop):

Platform

Log file

Windows

%LOCALAPPDATA%\Claude\logs\mcp-server-ksj.log (older versions: %APPDATA%\Claude\logs\)

macOS

~/Library/Logs/Claude/mcp-server-ksj.log

"Failed to install entrypoint … being used by another process (os error 32)" Windows, during an install or update: your AI client still has the server open. Fully quit it (including from the system tray) and run the command again. The library part of the update may already have succeeded, so the next start can run the new version anyway, but re-run the command so uv's own record of the install is correct.

"Windows protected your PC" / "Smart App Control blocked an app" Windows, during install or the first start: Windows 11 doesn't recognize a newly installed program.

  • SmartScreen ("Windows protected your PC"): select More info, confirm the file is the one you expect, and then select Run anyway.

  • Smart App Control: it has no per-app exception. To run ksj-mcp.exe, turn it off in Windows Security > App & browser control > Smart App Control settings. That's a security setting, so it's your call.

"Server transport closed unexpectedly" / server not starting Run uv tool list in a terminal — it should list ksj-mcp with a version number. If it's missing, re-run the install command from Step 1. If it's installed, the issue is likely the Claude Desktop config — double-check it is valid JSON and that command is the full path to the ksj-mcp binary (see Step 2), not just "ksj-mcp".

Server not appearing in tools panel Confirm uv tool list shows ksj-mcp installed, verify the config file is valid JSON, and restart Claude Desktop after saving any config changes. Once it's connected, ask your assistant to use the get_version tool — that confirms the server is actually running and reachable, not just installed.


Data location

All your captures are stored locally in ~/.ksj-mcp/:

Platform

Path

Windows

C:\Users\YOUR_USERNAME\.ksj-mcp\

macOS/Linux

~/.ksj-mcp/

Files:

~/.ksj-mcp/captures.db             (SQLite database — all your captures and tags)
~/.ksj-mcp/images/                 (copies of uploaded journal photos)
~/.ksj-mcp/handshake-cache.json    (saved startup answers; safe to delete — rebuilt on the next start)
~/.ksj-mcp/captures.db.bak-v*      (automatic backups made before upgrades — see below)

Your data is never sent anywhere and persists across updates. Schema upgrades run automatically in the background right after the server starts, and tools wait for them to finish. Before an upgrade changes your stored data, your database is backed up in the same folder: to captures.db.bak-v3 before the first 3.0 start, captures.db.bak-v37 before the first 3.7 start, and captures.db.bak-v38 before the first 3.8 start (which re-reads hand-written pages with the improved parser and rebuilds the connection graph). Once you've checked the upgraded journal, old backups can be deleted.

Custom location: Set the KSJ_DATA_DIR environment variable in your config to store data elsewhere:

{
  "mcpServers": {
    "ksj": {
      "command": "C:\\Users\\YOUR_USERNAME\\.local\\bin\\ksj-mcp.exe",
      "env": {
        "KSJ_DATA_DIR": "C:\\Users\\you\\Documents\\ksj-data"
      }
    }
  }
}

(Use the command path from Step 2 for your platform.)


License

MIT — free to use, modify, and share.

Created by Chavez AI Labs LLC paul@chavezailabs.com

Get the journal: Knowledge Synthesis Journal v2.0 (Amazon)

Available Tools

37 tools
assert_connectionA
Assert a typed, directional relationship between two captures by hand.

Relations (source → target):
  supersedes — source replaces target. Target is closed out (kept in
               history, hidden from current-slice search — never deleted).
  refutes    — source contradicts target.
  narrows    — source restricts target's claim without overturning it.
  supports   — source is evidence for target.
  distills   — source (an AIEX distillation entry) is derived from
               target (a SYN page). Normally set automatically by
               commit_distillation(); asserting it by hand is for
               fixing or adding a link that tool didn't create.
  assesses   — source (an AIEX assessment entry) audits target (a REV
               page)'s claimed knowledge status. Normally set
               automatically by commit_assessment().
  observes   — source (an AIEX observation entry) notes target (a DC
               page)'s cross-domain echo or confirmed symbol meaning.
               Normally set automatically by commit_observation().
  develops   — source (a journal entry, e.g. a SYN page) develops the
               idea first scribbled in target (typically a loose Wild Art
               capture — a napkin sketch or sticky note). The scribble
               stays as the source; nothing is closed out.

Automatic contradiction detection is deliberately not offered — it
cannot be done reliably. Supersession is either asserted here by a
human or not recorded. Re-asserting between the same pair replaces the
previous assertion.

Args:
    source_id: The newer / asserting capture (numeric ID).
    target_id: The capture being superseded / refuted / supported / distilled / assessed / observed / developed.
    relation:  supersedes | refutes | narrows | supports | distills | assesses | observes | develops
    note:      Optional one-line reason, stored on the edge.

Inputs: relation (required), source_id (required), target_id (required), note. Returns: result

assert_entityA
Manually link a named entity (person, place, work, organization, dream
symbol...) to a capture.

Entities are first-class objects: '@' tags that aren't template IDs
create them automatically (e.g. @Veronica, @the-old-house), and this
tool covers what extraction missed or mis-typed. Entities are global
across volumes — a character in book 1 and book 3 is one entity.

Args:
    capture_id: The capture the entity appears in.
    name:       The entity's name as written (display form).
    kind:       person | place | work | org | symbol | other

Inputs: name (required), capture_id (required), kind. Returns: result

audit_knowledge_statusA
Independently check a Review page's claimed Knowledge Status against
evidence in the journal, then prepare a dialogue over anything that
doesn't line up — e.g. a topic marked Mastered that still has open
questions attached to it.

This runs AFTER a REV page exists — never before; there's nothing to
audit until a status has actually been claimed. If no REV page is
found, the tool declines. This tool does NOT write to the database —
it prepares the audit and dialogue instructions for Claude to run in
this conversation. Call `commit_assessment()` after the user reviews
the outcome, to persist it. Never changes the REV page's own claimed
status — that stays physical-authority, exactly like
surface_connections never rewrites a SYN page.

A "Needs Work" claim isn't checked against evidence — it doesn't claim
completeness, so there's nothing to hold it to. Only Solid and
Mastered claims get audited.

Trigger phrases: "Audit REV-008", "Check my knowledge status claims
against the evidence".

Args:
    rev_template_id: The REV page's template ID (e.g. "REV-008").
                     Required — the tool declines if no REV page with
                     this ID exists.
    depth:           "brief" | "standard" (default) | "deep" — how many
                     follow-up questions per flagged topic to plan for.
                     The user can also say "more on this one" for any
                     single topic regardless of depth.

Returns the claimed statuses, evidence findings per topic, and audit +
dialogue instructions for Claude to execute.

Inputs: rev_template_id (required), depth. Returns: result

bridge_dream_researchA
Independently check a Dream Capture entry for cross-domain echo — RC/REV
entries sharing a theme within a few days of the dream — and prepare a
dialogue over what, if anything, the dream's symbols mean to you.

This runs AFTER a DC page exists — never before; there's nothing to
bridge until a dream has actually been recorded. If no DC page is
found, the tool declines. Reuses dream_correlation()'s co-occurrence
data (chain 1: composed, not reimplemented) for the cross-domain-echo
half, so the same non-negotiable guardrails apply here too: these are
plain co-occurrence counts, never "correlation," always reported with
window_days, match count, and base rate.

This tool does NOT write to the database — it prepares the findings
and dialogue instructions for Claude to run in this conversation. Call
`commit_observation()` after the user reviews the outcome, to persist
it. Never changes the DC page's own dream narrative — that stays
physical-authority, exactly like surface_connections never rewrites a
SYN page. The artifact this tool exists to produce is a *noticing*,
not a conclusion — at journal scale this dialogue cannot support
calling its output an inference — and never a restatement of the
dream (already stored) or an asserted claim about what a symbol means
(that's the user's call, always asked, never proposed).

Trigger phrases: "Bridge DC-005 to my research", "What does this dream
connect to?".

Args:
    dc_template_id: The DC page's template ID (e.g. "DC-005").
                    Required — the tool declines if no DC page with
                    this ID exists.
    window_days:    How many days apart counts as "near," for the
                    cross-domain-echo check (default 3).
    depth:          "brief" | "standard" (default) | "deep" — how many
                    follow-up questions per topic to plan for. The
                    user can also say "more on this one" for any
                    single topic regardless of depth.

Returns the dream's own content, cross-domain echoes, and dialogue
instructions for Claude to execute.

Inputs: dc_template_id (required), depth, window_days. Returns: result

bulk_uploadA
Process all journal page photos in a folder at once.

Finds every image file (JPG, PNG, TIFF, BMP, WebP) in the folder and runs
the full upload pipeline on each one. Non-image files are skipped silently.
Accept-by-default: no page is skipped. Pages without a readable template
ID, or whose page ID is already taken, are stored as Wild Art (WA)
entries with the reason recorded — review them afterwards with
list_by_tag(entry_type="WA") and promote_capture(). Pass volume=N when
importing a second (or later) journal.

Note: by default this path uses local Tesseract OCR, which performs
poorly on cursive handwriting. For a handful of pages, share photos in
chat and store them via manual_capture instead. For large handwritten
imports, the user can enable cloud OCR with their own key
(KSJ_OCR_BACKEND=azure — see README); it is off by default and every
run states when it is active.

Args:
    folder_path: Absolute path to the folder containing journal photos.
    force:       Set to True to REPLACE existing captures with matching
                 template IDs (default False — the new page is filed as
                 WA with reason id_conflict; the existing one is untouched).

Returns a summary table of all processed images.

Inputs: folder_path (required), force, volume. Returns: result

commit_aiexA
Write confirmed AIEX insights to the knowledge base.

Takes a JSON string conforming to the AIEX-001 schema and stores each
confirmed insight as a separate AIEX-NNN entry. IDs are assigned
sequentially at write time. All entries are tagged as AI-Extracted.

Call this after the user has reviewed and approved the output from
extract_insights().

Args:
    session_json: JSON string with fields: entry_type, date,
                  source_platform, session_focus, insights (list),
                  open_questions (list), action_items (list).
                  Each insight must have: text, confidence_tier, tags,
                  connections.

Returns a confirmation listing every AIEX ID assigned.

Inputs: session_json (required). Returns: result

commit_assessmentA
Store the confirmed outcome of an audit_knowledge_status() dialogue.

Call this after the dialogue concludes and the user has reviewed the
assessment. Only the assessment — what the audit found and what came
of the dialogue, not a re-listing of every open question — is stored
as the entry's text.

Never changes the audited REV page's own claimed status — that stays
physical-authority, exactly like commit_distillation never rewrites a
SYN page. Stores with source='ai_extract' (excluded from journal_health
KPIs) using the AIEX sequence, and links to the REV page with an
asserted 'assesses' edge.

Args:
    assessment_json: JSON string with fields:
      rev_template_id (required) — the REV page this assesses.
      assessment       (required) — 2-5 sentences: what the audit found
                       and what came of the dialogue. This is the artifact.
      reaffirmed, revised — lists of topic strings (both optional,
                       default empty).
      tags             — optional list of "#topic"/"@source"/etc strings.
      date             — optional ISO date; defaults to today.

Returns a confirmation with the assigned AIEX ID and the assesses edge.

Inputs: assessment_json (required). Returns: result

commit_distillationA
Store the confirmed outcome of a surface_connections() dialogue.

Call this after the Phase 2 dialogue concludes and the user has
reviewed the revised connection map. Only the distillation — what the
comparison revealed, not the connection list or the dialogue
transcript itself — is stored as the entry's text; the four categories
are kept as supporting detail alongside it.

Never creates a SYN template ID — SYN numbers belong to physical
pages. Stores with source='ai_extract' (excluded from journal_health
KPIs, distinguishable in get_breakthroughs()/export_html()) using the
AIEX sequence, and links to the SYN page with an asserted 'distills'
edge (source: the new AIEX entry, target: the SYN page).

Args:
    distillation_json: JSON string with fields:
      syn_template_id (required) — the SYN page this distills.
      distillation     (required) — 2-5 sentences: what the comparison
                       revealed and what it means. This is the artifact.
      confirmed, retired, deferred, missed, beyond_scan — lists of
                       strings, one per connection-map entry (all
                       optional, default empty).
      tags             — optional list of "#topic"/"@source"/etc strings.
      date             — optional ISO date; defaults to today.

Returns a confirmation with the assigned AIEX ID and the distills edge.

Inputs: distillation_json (required). Returns: result

commit_observationA
Store the confirmed outcome of a bridge_dream_research() dialogue.

Named "observation," not "inference": at journal scale (routinely a
handful of DC entries, sometimes one), what this dialogue produces is
a noticing, not a conclusion the data could support calling an
inference. Call this after the dialogue concludes and the user has
reviewed the observation. Only the observation — what the dialogue
revealed, not a restatement of the dream or an asserted symbol
meaning — is stored as the entry's text.

Never changes the bridged DC page's own dream narrative — that stays
physical-authority, exactly like commit_distillation never rewrites a
SYN page. Stores with source='ai_extract' (excluded from journal_health
KPIs) using the AIEX sequence, and links to the DC page with an
asserted 'observes' edge.

Args:
    observation_json: JSON string with fields:
      dc_template_id (required) — the DC page this observes.
      observation      (required) — 2-5 sentences: what the dialogue
                       revealed. This is the artifact.
      confirmed_echoes, symbol_notes — lists of strings (both
                       optional, default empty).
      tags             — optional list of "#topic"/"@source"/etc strings.
      date             — optional ISO date; defaults to today.

Returns a confirmation with the assigned AIEX ID and the observes edge.

Inputs: observation_json (required). Returns: result

correct_ocrA
Replace a stored capture's transcription with corrected text.

Use this when a capture's OCR came out wrong — for example a Tesseract
read of handwriting, or a transcription typo. The original OCR text is
preserved in the database; the corrected text becomes what search, tag
extraction, and connection detection use from now on.

Re-runs template parsing, tag extraction, and connection detection on the
corrected text.

Args:
    capture_id: The numeric capture ID (shown as #N in upload output and
                search results). Not the template ID.
    text:       The full corrected transcription of the page, including
                field labels and all schema tags.

Returns a summary of the re-parsed capture and rebuilt connections.

Inputs: text (required), capture_id (required). Returns: result

dream_correlationA
Report co-occurrence between Dream Capture entries and RC/REV entries
sharing #tag, within window_days of each other. Descriptive only.

This deliberately never uses the word "correlation" in its own output
(window size is a free parameter, and with a small journal, trying a
few window widths will surface something that looks meaningful — the
same researcher-degrees-of-freedom failure mode your own experimental
methodology is built to defeat). Every result reports window_days, the
match count, and the base rate of #tag in each population, so a
coincidence and a pattern don't read the same on the page.

Args:
    tag:         The # topic/theme tag to check (e.g. "resilience").
                 Matched against DC's #theme tags and RC/REV's #topic
                 tags — same prefix, same normalized value, different
                 template role.
    window_days: How many days apart counts as "near" (default 3).
                 Symmetric — checks both before and after each dream.

Inputs: tag (required), window_days. Returns: result

dream_patternsA

Analyze recurring patterns across all Dream Capture (DC) entries.

Aggregates symbols, emotions, and themes from every DC page to surface what appears most frequently in your dreams — recurring characters, objects, emotional states, and topic clusters. The more DC pages you upload, the more meaningful the patterns become.

Inputs: no named parameters. Returns: result

export_backupA
Write the entire knowledge base to a versioned JSONL file (ksj-export-v1)
— a real backup with a matching import path, not a one-way dump.

Contains captures (all fields), tags, entities, and connections. The
format is documented in docs/EXPORT_FORMAT.md in the ksj-mcp repo, so
anything can consume it.

Args:
    file_path: Where to write. Default: ksj-export-<date>.jsonl in the
               KSJ data directory.

Inputs: file_path. Returns: result

export_capturesA
Export all captures (or a tag-filtered subset) as Markdown or JSON.

Args:
    format:     "markdown" (default) or "json"
    tag_filter: Optional tag value — only include captures with this tag
                (e.g. "machine-learning")

Returns the full export as a string (no file is written).

Inputs: format, tag_filter. Returns: result

export_htmlB
Write a self-contained HTML view of the knowledge base — a bird's-eye
browser for the whole journal that opens in any web browser, works
offline, and needs no install.

Three tabs, plus connections on every card:
  Timeline    — every capture chronologically, with live search and
                type / Wild Art reason / volume / journal-vs-AI filters
                (WA and ISO are always in the type filter); superseded
                captures hidden behind a toggle. Each card lists its
                typed connections — click one to jump to that capture.
                Wild Art cards show their reason, the page ID they were
                read as, and a link to the capture they conflict with.
  Index       — tags grouped by meaning (topics, dream themes, open
                questions, insights, motifs, sensory details) plus the
                entity register; every entry click-filters the timeline.
  Graph       — an ego-centric local graph (no rotating globe, no
                physics). The landing view groups captures into bubbles
                by tag, theme, or entity (size = capture count). Click a
                bubble, or "view in graph" on any card, to drill into a
                fixed radial layout: the item centered, its direct
                connections (or a cluster's members) around it. Click a
                neighbor to recenter; "+N more" expands a busy ring.

Navigation: every view change is a browser history step mirrored in the
URL hash, so the in-app "← Back" button AND the browser's Back button
step back through views inside the page (the browser's leaves the page
only from the first view), and reloading reopens the same view.

The footer records the ksj-mcp, mcp, pydantic, and Python versions, the
export time, and capture / entity / connection counts.

All data is inlined in the file: sharing or archiving the file shares a
snapshot of the knowledge base.

Args:
    file_path: Where to write. Default (recommended, and required on
               Windows): leave empty — writes ksj-view.html in the KSJ
               data directory.

Inputs: file_path. Returns: result

export_study_deckA
Export your open questions as a portable study deck (tab-separated CSV).

Turns every ? question in your journal into a flashcard:
  Front — the question (from the ? tag)
  Back  — connected $ insight captures; falls back to the capture summary
  Tags  — the # topic tags on that capture

The output is a standard tab-separated CSV compatible with:
  - Anki (File → Import → Tab-separated)
  - Quizlet (Import → Tab between terms, newline between cards)
  - Obsidian, Notion, Google Sheets, or any CSV-aware tool
  - Print as a plain study sheet — no app required

Args:
    tag_filter: Optional # topic tag to limit the export
                (e.g. "machine-learning"). Leave blank for all questions.

Returns a tab-separated text block. No file is written to disk.

Inputs: tag_filter. Returns: result

extract_insightsA
Prepare an AI research session for insight extraction.

Loads knowledge base context (existing tags, potentially related entries)
and returns it alongside the session text and extraction instructions.
Claude then performs the extraction in its response to the user.

This tool does NOT write to the database. After the user reviews the
extracted insights, call commit_aiex() to store confirmed entries.

Trigger phrases: "Extract insights from this session", "Run AIEX on this
conversation", "Generate insight extraction report".

Args:
    session_text:    Full or partial transcript of the research session.
    source_platform: Platform where session occurred (e.g. "Claude Desktop",
                     "Claude Mobile"). Leave blank if unknown.

Returns a context block + extraction instructions for Claude to process.

Inputs: session_text (required), source_platform. Returns: result

find_connectionsA
Show connections for a capture: @-references first (deliberate
assertions, both directions), then tag overlap ranked by IDF-weighted
strength — shared rare tags count for much more than shared common ones.

Args:
    capture_id:   The numeric ID returned by upload_capture or search_captures.
    min_strength: Minimum strength for tag-overlap edges (default 2.0 ≈
                  two ordinary shared tags or one rare one). References
                  are always shown. Lower it to see weaker links.
    limit:        Maximum connections listed (default 20). The total is
                  always reported.

Inputs: capture_id (required), limit, min_strength. Returns: result

find_pathB
Find the shortest chain of connections between two captures — how one
idea reaches another through references, shared entities, asserted
relations, and strong tag overlap.

Args:
    from_id: Starting capture (numeric ID).
    to_id:   Destination capture (numeric ID).

Inputs: to_id (required), from_id (required). Returns: result

get_breakthroughsA

Return all Synthesis (SYN) entries in chronological order — your complete breakthrough timeline.

Shows the breakthrough field, patterns identified, $ insight tags, and topic tags for each SYN page. Use this to see how your thinking has evolved and which ideas led to the biggest discoveries.

Inputs: no named parameters. Returns: result

get_statsB
Return an overview of your knowledge base: capture counts, top tags,
open questions, key insights, and date range.

Inputs: no named parameters. Returns: result

get_versionA

Report the running ksj-mcp version and key dependency versions (mcp, pydantic, python). Use this to confirm an install or upgrade actually took effect.

Inputs: no named parameters. Returns: result

identify_captureA
Assign or fix the template ID of a stored capture.

Use this for pages stored as UNIDENTIFIED (no readable template ID at
upload time) or when the ID was misread. Re-parses the stored text with
the correct template's parser and rebuilds tags and connections.

Args:
    capture_id:  The numeric capture ID (#N in upload output).
    template_id: The correct template ID, e.g. "RC-007" or "DC-003".
    volume:      Optionally move the capture to this volume (0 = keep).

Inputs: capture_id (required), template_id (required), volume. Returns: result

import_backupA
Restore a ksj-export-v1 JSONL backup into the knowledge base.

Additive and non-destructive: captures that collide with an existing
(volume, template ID) are skipped, nothing is overwritten. User-asserted
edges are restored; derived connections are rebuilt over the merged base.

Args:
    file_path: Path to a file produced by export_backup.

Inputs: file_path (required). Returns: result

journal_healthA
KPI dashboard and coaching recommendations for your journal practice.

Tracks:
  - Capture velocity (captures/week over last 4 weeks)
  - Insight velocity ($ insights/week)
  - Days since last Review entry
  - Unanswered open questions and their age
  - Synthesis activity (digitized SYN pages — descriptive only)
  - Template balance (which template types are unused)

All KPIs count hand-written journal captures only; AI-extracted (AIEX)
entries are excluded so they don't inflate your practice metrics.

Returns a health score and specific, actionable recommendations.

Inputs: no named parameters. Returns: result

knowledge_progressA
Track Knowledge Status progression across your Review (REV) entries.

Shows how topics move through Needs Work → Solid → Mastered over time,
based on the Knowledge Status field on each REV page.

Args:
    topic: Optional # topic tag to filter (e.g. "calculus"). Leave blank
           to show all topics across all REV entries.

Inputs: topic. Returns: result

lintA
Knowledge base health check. Catches the ways a knowledge base silently
rots: orphan captures nothing links to, superseded claims not closed
out, unresolved contradictions, open questions going stale, and
fragmented tags from normalization failures.

Run it occasionally — a base that is never linted entrenches errors
instead of correcting them.

Args:
    stale_question_days: Age at which an unanswered ? question is
                         flagged (default 30).

Inputs: stale_question_days. Returns: result

list_by_tagA
Browse all captures that carry a specific tag — no text query required.
Also browses by entry type, which is how to review the Wild Art queue.

Use this to find every note related to a topic, source, question, or insight:
  list_by_tag("machine-learning")           → all captures with that tag
  list_by_tag("machine-learning", prefix="#") → only # topic tags
  list_by_tag("RC-012", prefix="@")          → captures referencing @RC-012
  list_by_tag("deadline", prefix="!")        → priority items
  list_by_tag("falling", role="motif")       → DC recurring motifs only
  list_by_tag(entry_type="WA")               → every unresolved Wild Art entry
  list_by_tag(entry_type="WA", wa_reason="id_conflict") → page-ID conflicts
  list_by_tag(entry_type="WA", wa_reason="loose_capture") → napkins, sticky notes…
  list_by_tag(entry_type="ISO")              → 3-D isometric grid pages

The same prefix character means different things on Dream Capture pages
(# theme, @ symbol, ! motif) than on RC/SYN/REV (# topic, @ reference,
! priority). Use *role* to select by meaning rather than character:
topic, theme, reference, entity, priority, motif, question, insight,
causal, sensory.

Args:
    tag:        Tag value to look up (without the prefix character).
                May be empty when entry_type or wa_reason is given.
    prefix:     Optional prefix character: #  @  !  ?  $  *  ->
    role:       Optional semantic role — the precise way to disambiguate
                DC vs RC/SYN/REV meanings.
    entry_type: Optional type filter: RC, SYN, REV, DC, ISO, WA, AIEX.
    wa_reason:  Optional Wild Art reason: id_conflict,
                unrecognized_template, ocr_low_confidence,
                validation_error, loose_capture, manual, other.

Inputs: tag, role, prefix, wa_reason, +1 more. Returns: result

manual_captureA
Store a journal capture from transcribed text. This is the PRIMARY path
for handwritten pages: the user shares a photo of the page, YOU (the
assistant) read it with vision, confirm the transcription with the user,
then call this tool with the text. Assistant vision is far more accurate
on handwriting than local OCR — prefer this over upload_capture whenever
the user can show you the page.

Transcribe faithfully: keep field labels (First Impressions, Key Points,
Tags, etc.) as written, include every schema tag (#topic @source !priority
?question $insight *sensory), and treat content inside tag bubbles as tags.

Accept-by-default: the capture is always stored. A template ID that
can't be parsed or found, or a page ID already taken in that volume,
files it as a Wild Art (WA) entry with the reason recorded — nothing is
rejected and nothing is overwritten.

3-D isometric grid pages have their own type: pass template_id="ISO-001"
(etc.) — transcribe the subject line, labels, and notes around the drawing.

Args:
    text:        The transcribed content of the journal page (all fields
                 you can read — First Impressions, Key Points, Tags, etc.).
    template_id: Template ID (e.g. "RC-001", "ISO-002"). If omitted, the
                 server will try to detect it from the text automatically.
                 Pass "WA" to file the capture as Wild Art by hand.
    force:       Set to True to REPLACE an existing capture with the same
                 template ID in the same volume (default False — the new
                 capture is filed as WA with reason id_conflict instead).
    volume:      Which journal/book this page belongs to. 0 = automatic:
                 a volume written on the page/text wins, otherwise the
                 stored current_volume setting (default 1).
    wa_reason:   File as Wild Art on purpose. Use "loose_capture" for
                 anything off-journal — a napkin sketch, sticky note,
                 whiteboard photo, back of a receipt (no volume or page ID
                 needed). Other values: manual, other.
    wa_detail:   Free-text note for a WA entry, e.g. "napkin", "sticky note".

Returns the same summary as upload_capture, including any connections
detected to existing captures.

Inputs: text (required), force, volume, wa_detail, +2 more. Returns: result

neighborhoodA
Everything within N hops of a capture in the connection graph — its
local knowledge cluster.

Args:
    capture_id: Center capture (numeric ID).
    depth:      How many hops out to walk (default 2, max 4).

Inputs: capture_id (required), depth. Returns: result

promote_captureA
Move a Wild Art (WA) entry to its proper type after review — RC, SYN,
REV, DC, or ISO (3-D isometric grid page).

The capture keeps its #id, text, image, and asserted links; it is
re-parsed as the target type. Its WA history is preserved on the
promoted entry: promoted_from (the WA-NNN ID), wa_reason, and wa_detail.

If the target page ID is already taken in that volume, NOTHING changes:
the conflict is reported and you choose — a different page ID, a
different volume (a page from a new journal), or force=True. Page IDs are
never renumbered automatically.

Args:
    capture_id:     The WA entry's numeric ID (#N).
    target_type:    RC | SYN | REV | DC | ISO.
    target_page_id: The page ID to file it under, e.g. "RC-014". Optional
                    when the page was read with an ID (claimed_page_id)
                    of the target type — that ID is used.
    volume:         Journal volume to file it in (0 = the volume the WA
                    entry already has, else the current writing volume).
    force:          DANGEROUS. Take the page ID even though another
                    capture holds it. The current holder is not deleted —
                    it is moved to Wild Art itself (reason id_conflict,
                    conflicts_with pointing here) — but every @reference
                    to that page ID from now on resolves to THIS capture.
                    Only use it when you are sure the current holder is
                    the misfiled one.

Inputs: capture_id (required), target_type (required), force, volume, +1 more. Returns: result

rebuild_connectionsA
Re-derive the entire connection graph from current tags and text.

Run this after correcting OCR text, identifying previously-unidentified
pages, or uploading pages out of order — a page that referenced @RC-015
before RC-015 existed gets its edge on rebuild. Idempotent: running it
twice produces the same graph.

Inputs: no named parameters. Returns: result

search_capturesA
Search all journal entries by concept, keyword, or phrase — across every
template type (RC, SYN, REV, DC, ISO, WA, AIEX) at once.

This is the primary way to find entries by idea rather than tag. Use it
whenever the user asks to find notes, recall something they wrote, or
explore a topic. Natural language queries work well.

Examples:
  "neural networks"        → entries mentioning neural networks
  "why does attention"     → entries with that question or phrase
  "spaced repetition"      → concept search across all templates
  "dream flying"           → DC entries with flying imagery

Args:
    query:      The concept, keyword, or phrase to search for.
    tag_filter: Optional tag value to narrow results (e.g. "machine-learning").
    date_from:  Optional ISO date lower bound (e.g. "2025-09-01").
    date_to:    Optional ISO date upper bound (e.g. "2025-12-31").
    entry_type: Optional type filter: RC, SYN, REV, DC, ISO, WA, AIEX.
    wa_reason:  Optional Wild Art reason filter (id_conflict,
                unrecognized_template, ocr_low_confidence,
                validation_error, loose_capture, manual, other).

Note: search matches terms that appear in the journal text. For tag-only
browsing without a text query, use list_by_tag instead.

Inputs: query (required), date_to, date_from, wa_reason, +2 more. Returns: result

set_volumeA
Configure journal volumes: which book new captures go into, and which
books are visible to search and browsing.

Volumes model multiple physical journals: volume 2 continues volume 1's
knowledge base (cross-volume connections are normal and expected). Set
current_volume once when starting a new book.

Args:
    current_volume: Volume for NEW captures (0 = leave unchanged).
    active_volumes: Read scope for search/list/connections tools:
                    "*" for all volumes, or a comma list like "2,3".
                    Empty = leave unchanged. journal_health and
                    knowledge_progress always see all volumes —
                    longitudinal KPIs over a truncated history would
                    mislead.

Call with no arguments to just see the current settings.

Inputs: active_volumes, current_volume. Returns: result

suggest_synthesisB
Scan your Rapid Capture entries and identify topic clusters ready to be
synthesized into a SYN page.

Args:
    min_captures: Minimum number of RC entries on a topic to flag it
                  (default 3).

Inputs: min_captures. Returns: result

surface_connectionsA
Independently scan the Rapid Capture cluster behind a Synthesis page you
have ALREADY written and photographed, then prepare a structured
dialogue comparing what the scan found against what the page found.

This runs AFTER a SYN page exists for the cluster — never before.
Running it before the page is written would let the AI perform the
cognitive act synthesis is meant to force (see
ksj2_documents/SYN_companion_decision_optionB_2026-08-03.md). There is
no override flag for this precondition — if no SYN page is found, the
tool declines and points to suggest_synthesis() instead.

The scan itself never reads the SYN page's own content before producing
its connection map, so the Phase 2 comparison is meaningful rather than
confirmatory. This tool does NOT write to the database — it prepares
the scan data and dialogue instructions for Claude to run in this
conversation. Call `commit_distillation()` after the user approves the
dialogue's outcome, to persist it.

Trigger phrases: "Run surface_connections on SYN-004", "Compare my
synthesis against an independent scan".

Args:
    syn_template_id: The SYN page's template ID (e.g. "SYN-004").
                     Required — the tool declines if no SYN page with
                     this ID exists.
    entry_ids:       Optional comma-separated RC template IDs (e.g.
                     "RC-001,RC-047,RC-083") to scan explicitly.
                     Required when the SYN page's RC cluster can't be
                     resolved automatically — no matching tag cluster,
                     or more than one candidate cluster.
    days:            Optional — narrow the resolved cluster to RC
                     entries created in the last N days. 0 = no filter.
    depth:           "brief" | "standard" (default) | "deep" — how many
                     follow-up questions per tier to plan for in the
                     dialogue. The user can also say "more on this one"
                     for any single connection regardless of depth.

Returns the RC cluster data, gap candidates, and full scan + dialogue
instructions for Claude to execute.

Inputs: syn_template_id (required), days, depth, entry_ids. Returns: result

upload_captureA
Process a journal page photo: run OCR, parse the template, extract schema
tags, store the capture, copy the image to the knowledge base, and detect
connections to existing captures.

Accept-by-default: the page is always stored. If it can't be filed
normally — no readable template ID, an ID too doubtful to trust, or a page
ID that is already taken — it is stored as a Wild Art (WA) entry with the
reason recorded, never rejected and never overwriting anything. Review
WA entries with list_by_tag(entry_type="WA") and move them to their
proper type with promote_capture().

Args:
    image_path: Absolute path to the image file (JPG, PNG, TIFF, etc.)
    force:      Set to True to REPLACE an existing capture with the same
                template ID in the same volume (default False — the new
                page is filed as WA with reason id_conflict instead).
    volume:     Which journal/book this page belongs to. 0 = automatic:
                a volume written on the page (e.g. "V2 RC-001") wins,
                otherwise the stored current_volume setting (default 1).
    wa_reason:  File the image as Wild Art on purpose. Use "loose_capture"
                for anything off-journal — a napkin sketch, sticky note,
                whiteboard, back of a receipt (no volume or page ID
                needed). Other values: manual, other.
    wa_detail:  Free-text note for a WA entry, e.g. "napkin", "whiteboard".

Returns a summary of what was found and stored, including the strongest
connection detected.

Inputs: image_path (required), force, volume, wa_detail, +1 more. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 37 tools

    Disambiguation4/5

    Most tools have distinct purposes, but a few clusters risk confusion: upload_capture/manual_capture/bulk_upload all ingest captures, and find_connections/neighborhood/find_path all explore graph relationships. Descriptions clarify inputs and preconditions, so selection is usually unambiguous, but the overlaps prevent a perfect score.

    Naming Consistency4/5

    Tools consistently use snake_case, and most follow a verb_noun pattern (get_stats, search_captures, commit_aiex). Minor deviations include noun phrases (knowledge_progress, journal_health) and adjective_noun forms (manual_capture, bulk_upload), but the scheme remains readable and predictable overall.

    Tool Count2/5

    At 37 tools, the server is well above the 25-tool threshold where the set becomes unwieldy for agent selection. Many specialized analysis, AI-dialogue prep, and export tools could be consolidated or made optional, so the count is heavy for the apparent journal-knowledge-base scope.

    Completeness5/5

    The surface covers capture ingestion, OCR/text correction, type promotion, volume configuration, entity/connection assertion, graph rebuild, search/browse, pathfinding, health metrics, AI extraction/audit/observation, and multiple export/backup paths. No obvious lifecycle dead ends exist for the core journal domain, and non-deletion is explicitly by design.

    Maintenance

    ActivityActive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Turns a local folder of notes and documents into a searchable knowledge base for AI assistants via MCP, enabling semantic search, reading, and adding notes entirely on-device.
      4
      9
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      A local MCP server for journaling, organizing, and recalling your work. It captures entries as plain markdown files, indexes them for full-text and structured search, and enables querying via natural language.
      32 PyPI
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Privacy-first personal knowledge database for your AI that ingests data exports (Google Takeout first) and exposes them via MCP tools like search and list items. Runs locally with no cloud or telemetry.
      MIT