{"_id":"mindbase-mcp","_rev":"6-7c71728ec73eaa29475ecaea4d6e001b","name":"mindbase-mcp","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.1":{"name":"mindbase-mcp","version":"0.1.1","keywords":["mcp","modelcontextprotocol","mindbase","knowledge-base","claude","cursor","windsurf","ai","wiki","karpathy"],"author":{"name":"Haobing Chu","email":"haobing0304@gmail.com"},"license":"MIT","_id":"mindbase-mcp@0.1.1","maintainers":[{"name":"chuhaobing","email":"haobing0304@gmail.com"}],"homepage":"https://github.com/frankchu91/mindbase#readme","bugs":{"url":"https://github.com/frankchu91/mindbase/issues"},"bin":{"mindbase-mcp":"dist/cli.js"},"dist":{"shasum":"59b21f09ac73f51bf880b612c74201a23d6a86d0","tarball":"https://registry.npmjs.org/mindbase-mcp/-/mindbase-mcp-0.1.1.tgz","fileCount":6,"integrity":"sha512-barfraBoewSMsAKSTxtG17gXGBOEllz7gpafet2QUIgXF/5Xi4IRgB2hb4/5PIqHWg+1iJ5oLsFFylqNAVnIIw==","signatures":[{"sig":"MEUCIAlES3XOslU8TK+Qabg/nx5+TrhrwRXhRo9HnP0bd+LgAiEA7E3mf6KJQolEvOGIOytUFxjEIePT8Ndpklp3C0gF2gQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2432079},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"gitHead":"80f305046fb86ea57182cb06983f991b07382a62","private":false,"scripts":{"dev":"tsx watch src/cli.ts","test":"node test/full-smoke.mjs && node test/tools-call.mjs","build":"tsup","typecheck":"tsc --noEmit","prepublishOnly":"pnpm build"},"_npmUser":{"name":"chuhaobing","email":"haobing0304@gmail.com"},"deprecated":"Upgrade to 0.1.2 — first-run fixes","repository":{"url":"git+https://github.com/frankchu91/mindbase.git","type":"git","directory":"apps/mcp"},"_npmVersion":"10.9.2","description":"MCP server for MindBase — query and write to your wiki from Claude Desktop, Cursor, Windsurf, Cline, or any MCP-compatible AI client.","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^3.23.0","rss-parser":"^3.13.0","better-sqlite3":"^11.10.0","proper-lockfile":"^4.1.2","@modelcontextprotocol/sdk":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","tsup":"^8.5.1","vitest":"^2.1.4","typescript":"^5.6.3","@types/node":"^22.9.0","@mindbase/core":"workspace:*","@types/proper-lockfile":"^4.1.4"},"optionalDependencies":{"@xenova/transformers":"^2.17.2"},"_npmOperationalInternal":{"tmp":"tmp/mindbase-mcp_0.1.1_1784395118362_0.4041262420426315","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"mindbase-mcp","version":"0.1.2","keywords":["mcp","modelcontextprotocol","mindbase","knowledge-base","claude","cursor","windsurf","ai","wiki","karpathy"],"author":{"name":"Haobing Chu","email":"haobing0304@gmail.com"},"license":"MIT","_id":"mindbase-mcp@0.1.2","maintainers":[{"name":"chuhaobing","email":"haobing0304@gmail.com"}],"homepage":"https://github.com/frankchu91/mindbase#readme","bugs":{"url":"https://github.com/frankchu91/mindbase/issues"},"bin":{"mindbase-mcp":"dist/cli.js"},"dist":{"shasum":"bb0cb3d4197d0a67e5a973c1f115fd513ddedc08","tarball":"https://registry.npmjs.org/mindbase-mcp/-/mindbase-mcp-0.1.2.tgz","fileCount":6,"integrity":"sha512-xRRt10SPK02RMRFjHW/HpE6bO39pUqWzHQv04G8hs+NXH2WUTZgfoDjSi8nCnLE9AxW9sQ8kbD3yyxgIgu6lzg==","signatures":[{"sig":"MEUCIBuGoova21FNUyU6zcECcB6yHLfAMPpdNSpG59mTphb5AiEAyaEoeFqKJuU1/L1UXJpcHc0n1ru6TTBuW8gaiAxugV8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2437045},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"gitHead":"6b474ede37fd4ac1b16bbc4a0983ac543df141c9","mcpName":"io.github.frankchu91/mindbase","private":false,"scripts":{"dev":"tsx watch src/cli.ts","test":"node test/full-smoke.mjs && node test/tools-call.mjs","build":"tsup","typecheck":"tsc --noEmit","prepublishOnly":"pnpm build"},"_npmUser":{"name":"chuhaobing","email":"haobing0304@gmail.com"},"repository":{"url":"git+https://github.com/frankchu91/mindbase.git","type":"git","directory":"apps/mcp"},"_npmVersion":"10.9.2","description":"MCP server for MindBase — query and write to your wiki from Claude Desktop, Cursor, Windsurf, Cline, or any MCP-compatible AI client.","directories":{},"_nodeVersion":"23.11.0","dependencies":{"zod":"^3.23.0","rss-parser":"^3.13.0","better-sqlite3":"^11.10.0","proper-lockfile":"^4.1.2","@modelcontextprotocol/sdk":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","tsup":"^8.5.1","vitest":"^2.1.4","typescript":"^5.6.3","@types/node":"^22.9.0","@mindbase/core":"workspace:*","@types/proper-lockfile":"^4.1.4"},"optionalDependencies":{"@xenova/transformers":"^2.17.2"},"_npmOperationalInternal":{"tmp":"tmp/mindbase-mcp_0.1.2_1784613237806_0.7639849270807","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"mindbase-mcp","version":"0.1.3","description":"MCP server for MindBase — query and write to your wiki from Claude Desktop, Cursor, Windsurf, Cline, or any MCP-compatible AI client.","private":false,"type":"module","main":"./dist/index.js","bin":{"mindbase-mcp":"dist/cli.js"},"scripts":{"build":"tsup","dev":"tsx watch src/cli.ts","test":"node test/full-smoke.mjs && node test/tools-call.mjs","typecheck":"tsc --noEmit","prepublishOnly":"pnpm build"},"dependencies":{"@modelcontextprotocol/sdk":"^1.0.0","better-sqlite3":"^11.10.0","pdfjs-dist":"^5.6.205","proper-lockfile":"^4.1.2","rss-parser":"^3.13.0","zod":"^3.23.0"},"optionalDependencies":{"@xenova/transformers":"^2.17.2"},"devDependencies":{"@mindbase/core":"workspace:*","@types/node":"^22.9.0","@types/proper-lockfile":"^4.1.4","tsup":"^8.5.1","tsx":"^4.19.2","typescript":"^5.6.3","vitest":"^2.1.4"},"engines":{"node":">=20"},"publishConfig":{"access":"public"},"keywords":["mcp","modelcontextprotocol","mindbase","knowledge-base","claude","cursor","windsurf","ai","wiki","karpathy"],"repository":{"type":"git","url":"git+https://github.com/frankchu91/mindbase.git","directory":"apps/mcp"},"homepage":"https://github.com/frankchu91/mindbase#readme","bugs":{"url":"https://github.com/frankchu91/mindbase/issues"},"author":{"name":"Haobing Chu","email":"haobing0304@gmail.com"},"license":"MIT","mcpName":"io.github.frankchu91/mindbase","_id":"mindbase-mcp@0.1.3","gitHead":"9591d84f46f04900b590f5b4df431ae83c120aeb","types":"./dist/index.d.ts","_nodeVersion":"23.11.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-oX4yv94GZ+oK8i/qj8TXS22Y4tXeT+wNwqqO8QWnc4AwtEWetMg/syrcWStxV+1+bvDKjkwtLf8WOuxyWNal+Q==","shasum":"509ea36f94d4f473adc27e35ecf0fb651e331250","tarball":"https://registry.npmjs.org/mindbase-mcp/-/mindbase-mcp-0.1.3.tgz","fileCount":6,"unpackedSize":2452325,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICbCSXDqspAE3+IBZoal6u8g0zi7q7jnvCgjjoUjkzNgAiEAq4chKmco0jIPWf3xBm7U5kdd70tB1mz4h12WUE+QTw4="}]},"_npmUser":{"name":"chuhaobing","email":"haobing0304@gmail.com"},"directories":{},"maintainers":[{"name":"chuhaobing","email":"haobing0304@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mindbase-mcp_0.1.3_1784945914846_0.33598281445214817"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-15T16:27:12.650Z","modified":"2026-07-25T02:18:35.169Z","0.1.0":"2026-07-15T16:27:13.126Z","0.1.1":"2026-07-18T17:18:38.568Z","0.1.2":"2026-07-21T05:53:57.998Z","0.1.3":"2026-07-25T02:18:35.032Z"},"bugs":{"url":"https://github.com/frankchu91/mindbase/issues"},"author":{"name":"Haobing Chu","email":"haobing0304@gmail.com"},"license":"MIT","homepage":"https://github.com/frankchu91/mindbase#readme","keywords":["mcp","modelcontextprotocol","mindbase","knowledge-base","claude","cursor","windsurf","ai","wiki","karpathy"],"repository":{"type":"git","url":"git+https://github.com/frankchu91/mindbase.git","directory":"apps/mcp"},"description":"MCP server for MindBase — query and write to your wiki from Claude Desktop, Cursor, Windsurf, Cline, or any MCP-compatible AI client.","maintainers":[{"name":"chuhaobing","email":"haobing0304@gmail.com"}],"readme":"# mindbase-mcp\n\n> **Turn your MindBase wiki into the long-term memory of every AI agent you use.**\n\nA [Model Context Protocol](https://modelcontextprotocol.io) server that lets Claude Desktop, Claude Code, Cursor, Windsurf, Cline, and any other MCP-compatible client read, write, and reason about your local MindBase wiki.\n\nBuilt for the engineer who wants their AI tools to *actually know what they know*.\n\n---\n\n## What you get\n\n- **49 tools** — project scaffolding, contribute, build, search, read, ingest, save chat excerpts, run graph health, find orphans, suggest links, deep-research save…\n- **5 resource feeds** — *recent activity*, *top hubs*, *orphans*, *insights*, plus per-page (`mindbase://wiki/<slug>`) and per-chat (`mindbase://chats/<id>`) resources\n- **7 prompts** — `daily-digest`, `brainstorm`, `audit`, `connect`, `explain`, `quiz`, `write` (surface as slash commands in clients that support MCP prompts)\n- **Graph-aware retrieval** — `ask_wiki` doesn't just keyword-match; it traverses your wikilink graph so the AI sees the surrounding cluster\n- **Audit trail** — anything an AI writes is tagged `created_via: mcp` with the client/tool, so you always know what's human and what's machine\n- **Standalone process** — runs on stdio against your wiki on disk; the MindBase web app does not need to be running\n- **Multi-vault** — one config can connect Claude to a personal wiki and a work wiki simultaneously\n- **Privacy-first** — everything stays local, no telemetry, no outbound calls except the LLM you've configured\n\n---\n\n## Install\n\nNo clone, no build — npm has everything:\n\n```bash\nnpx -y mindbase-mcp --help\n```\n\nEvery client config below uses the same two lines: `command: \"npx\"`, `args: [\"-y\", \"mindbase-mcp\"]`.\n\n<details>\n<summary>Prefer building from source?</summary>\n\n```bash\ngit clone https://github.com/frankchu91/mindbase\ncd mindbase\npnpm install\npnpm -F mindbase-mcp build\n# binary at apps/mcp/dist/cli.js — use `node /absolute/path/to/apps/mcp/dist/cli.js`\n# in place of the npx command in the configs below\n```\n\n</details>\n\n---\n\n## Connect your AI client\n\nPick your client. Each section is copy-paste.\n\n### Claude Code (CLI)\n\nOne command:\n\n```bash\nclaude mcp add mindbase --scope user npx -- -y mindbase-mcp\n```\n\nVerify:\n\n```bash\nclaude mcp list\n# mindbase: npx -y mindbase-mcp - ✓ Connected\n```\n\nRestart your Claude Code session. Tools appear as `mcp__mindbase__search_wiki`, `mcp__mindbase__list_recent`, etc.\n\n> **Tip:** the full MindBase Claude Code plugin (slash commands like `/mb:contribute`, sub-agents, auto-context hook) is a superset of this MCP server. See the [main repo](https://github.com/frankchu91/mindbase#claude-code-flagship-experience).\n\n### Claude Desktop\n\nEdit `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\\Claude\\claude_desktop_config.json` (Windows):\n\n```json\n{\n  \"mcpServers\": {\n    \"mindbase\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"mindbase-mcp\"]\n    }\n  }\n}\n```\n\nQuit Claude Desktop fully (`Cmd+Q`), reopen. The MindBase tools and prompts are now available.\n\n### Cursor\n\nEdit `~/.cursor/mcp.json` (global) or `<project>/.cursor/mcp.json` (project-scoped):\n\n```json\n{\n  \"mcpServers\": {\n    \"mindbase\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"mindbase-mcp\"]\n    }\n  }\n}\n```\n\nRestart Cursor.\n\n### Windsurf\n\nSettings → MCP → add server with command `npx` and args `[\"-y\", \"mindbase-mcp\"]`. Or edit `~/.codeium/windsurf/mcp_config.json` directly with the same shape as Cursor.\n\n### Cline (VS Code extension)\n\nCline reads `mcp_config.json` at the path it shows in its settings UI. Use the same config shape as Claude Desktop.\n\n### MCP Inspector (testing without a real client)\n\n```bash\nnpx @modelcontextprotocol/inspector npx -y mindbase-mcp\n```\n\nOpens a browser GUI where you can click any tool, fill the input form, and see real responses against your wiki. Best place to debug.\n\n---\n\n## First things to try\n\nOnce connected, paste these into your AI client:\n\n- *\"Run a wiki health check on my MindBase and tell me the three most important things to clean up.\"*\n- *\"What's been added to my wiki in the last 7 days? Group by topic.\"*\n- *\"Find pages related to `<your-top-hub-slug>` and summarize the cluster in five bullets.\"*\n- *\"Save this conversation as a wiki excerpt titled 'MCP testing notes'.\"*\n- *\"Quiz me on what I've added this week.\"*\n\nThe AI will pick the right tools (`run_wiki_health`, `list_recent`, `find_related`, `save_chat_excerpt`, the `quiz` prompt) on its own.\n\n---\n\n## Multi-vault\n\nRun two servers, each pointing at a different data directory:\n\n```json\n{\n  \"mcpServers\": {\n    \"mindbase-personal\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"mindbase-mcp\", \"--data-dir\", \"/Users/you/mindbase-personal\"]\n    },\n    \"mindbase-work\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"mindbase-mcp\", \"--data-dir\", \"/Users/you/mindbase-work\"]\n    }\n  }\n}\n```\n\nTools from each are namespaced (e.g. `mcp__mindbase-personal__search_wiki`).\n\n---\n\n## CLI flags\n\n```\nmindbase-mcp [options]\n\n  --data-dir <path>    Data directory (default: ~/mindbase-data)\n  --version, -v        Print version\n  --help, -h           Show help\n```\n\nEnvironment variables (used by the underlying LLM adapter — only when calling tools that require an LLM, e.g. `ingest_source`, `ask_wiki`, `run_wiki_health`):\n\n- `OPENAI_API_KEY` — for OpenAI models\n- `ANTHROPIC_API_KEY` — for Anthropic models\n- `MINDBASE_MODEL` — overrides the model from `mindbase.config.json`\n\nRead-only tools (`search_wiki`, `read_wiki_page`, `find_related`, `find_orphans`, `get_graph_insights`, `list_recent`, `list_chats`, `recall_chat`) require **no LLM key** — they run entirely on local indexes.\n\n---\n\n## Tools reference\n\n49 tools, grouped by purpose. Highlights below — connect [MCP Inspector](#mcp-inspector-testing-without-a-real-client) for the full list with schemas.\n\n### Project lifecycle (wiki v2)\n\n| Tool | What it does |\n|---|---|\n| `mindbase_init_project` | Scaffold a new project: `README.md` + `context.md` + `index.yaml` + `sources/` + `logs/` + `artifacts/`. Sets it as current. |\n| `mindbase_load_project` | Load README + context + index for a project (read-only by default; `persist: true` switches the current project). |\n| `mindbase_contribute` | Append a thought / source summary to today's contributor file (append-only). Accepts `projectId` for cross-project routing. |\n| `mindbase_gather_sources` | List contributor + research files modified since the last build. |\n| `mindbase_atomic_write_context` | Write a new `context.md` with snapshot-first rollback safety. |\n| `mindbase_rebuild_index` | Regenerate `index.yaml` from disk. |\n| `mindbase_status` | Dashboard: line counts, contributors, sources, logs, artifacts. |\n| `mindbase_validate_structure` | Check a project's layout matches the v2 contract. |\n| `mindbase_append_log` | Append an operation record to `logs/<date>.md`. |\n| `mindbase_research_save` | Save deep-research output to `sources/research/<slug>.md`. |\n| `mindbase_migrate` | One-time legacy v1 → v2 layout conversion (snapshot + recovery archive). |\n| `mindbase_export` | Bundle a project as markdown-bundle or zip-archive. |\n\n### Read\n\n| Tool | What it does |\n|---|---|\n| `search_wiki` | Full-text search across page titles, one-liners, and slugs. Ranked, with snippets. |\n| `read_wiki_page` | Full markdown body + frontmatter + incoming/outgoing wikilinks for a slug. |\n| `list_recent` | Pages added or updated within the past N days, newest first. |\n| `find_related` | Pages connected via wikilinks, shared tags, or shared sources, with rationale. |\n| `semantic_search` | Embedding-based search; falls back to keyword if embeddings unavailable. |\n| `search_in_project` | Search restricted to pages tagged with a specific project (`project` frontmatter). |\n| `ask_wiki` | Natural-language Q&A with **graph-aware retrieval**: top hits + 1-hop neighbors as context. |\n\n### Write\n\n| Tool | What it does |\n|---|---|\n| `ingest_source` | Save a new source (URL, paste, file) → run LLM compile → create/update wiki pages → cross-link. |\n| `quick_capture` | Save to inbox without triggering compile. For batch-processing later. |\n| `save_chat_excerpt` | Save a fragment of the current AI conversation as a new wiki page (LLM auto-titles). |\n| `append_to_page` | Append content to a section of an existing page (creates section if missing). |\n| `update_note_section` | Replace the content under a section heading on an existing page. |\n| `tag_note` | Add or replace tags on a page. |\n| `set_visibility` | Set `public` / `internal` / `pii` — controls inclusion in semantic search and Q&A. |\n\n### Chat history\n\n| Tool | What it does |\n|---|---|\n| `list_chats` | Recent saved chat sessions, newest first. |\n| `recall_chat` | Search past saved chats by content. |\n\n### Graph & maintenance\n\n| Tool | What it does |\n|---|---|\n| `get_graph_insights` | Top hubs, orphans, broken links, fragmented tag clusters. |\n| `find_orphans` | Pages with no incoming links. |\n| `suggest_links` | Wikilinks that should be added to a specific page (review mode — does not modify). |\n| `run_wiki_health` | Full pipeline: graph → insights → auto cross-link → L2 lint. Writes `_insights.md`. |\n| `export_subgraph` | Export a page + its N-hop neighbors as a self-contained markdown bundle. |\n\n### Write-tool safety\n\nTools that modify human-edited pages refuse by default and require `force: true`. Every AI-written page or section is tagged in frontmatter:\n\n```yaml\ncreated_via: mcp\nmcp_client: claude-desktop\nmcp_tool: save_chat_excerpt\n```\n\nSo you can always tell which content came from a person vs. an AI.\n\n---\n\n## Resources reference\n\n| URI | Content |\n|---|---|\n| `mindbase://recent` | Markdown digest of the last 7 days of wiki updates |\n| `mindbase://hubs` | Most-linked-to pages |\n| `mindbase://orphans` | Pages with no incoming links |\n| `mindbase://insights` | Latest structural analysis report |\n| `mindbase://wiki/<slug>` | A specific wiki page (one resource per page) |\n| `mindbase://chats/<id>` | A specific saved chat session |\n\nResources are read-only and cheap — clients can subscribe to them as standing context without burning tool calls.\n\n---\n\n## Prompts reference\n\nSurface as slash commands in clients that support MCP prompts (Claude Desktop, Claude Code, Cursor, etc.) — the exact prefix depends on your client and server key (e.g. `/mindbase:daily-digest`):\n\n| Prompt | What it does |\n|---|---|\n| `daily-digest` | Summarize what was added today, grouped by topic |\n| `brainstorm <topic>` | Brainstorm a topic, grounded in your wiki |\n| `audit` | Audit wiki health and propose fixes |\n| `connect` | Surface surprising cross-cluster connections |\n| `explain <slug>` | Re-explain a wiki page from first principles |\n| `quiz` | Quiz you on what you've recently learned |\n| `write <topic>` | Write a long-form piece grounded in your wiki |\n\nThese are just composed prompts — they instruct the AI to call the right combination of tools above. You can also write your own.\n\n---\n\n## How it works\n\n```\n┌─────────────────────┐    stdio (JSON-RPC)    ┌──────────────────────┐\n│  Claude / Cursor /  │  ◄───────────────────► │  mindbase-mcp-server │\n│  Windsurf / etc.    │                        │  (this package)      │\n└─────────────────────┘                        └──────────┬───────────┘\n                                                          │ direct\n                                                          ▼\n                                        ┌────────────────────────────────┐\n                                        │  ~/mindbase-data/              │\n                                        │  ├─ config.json                │\n                                        │  └─ projects/<id>/             │\n                                        │      ├─ README.md  context.md  │\n                                        │      ├─ index.yaml             │\n                                        │      ├─ sources/{contributors, │\n                                        │      │    research, raw}/      │\n                                        │      ├─ logs/  artifacts/      │\n                                        │      └─ state/                 │\n                                        └────────────────────────────────┘\n```\n\n- **Transport:** stdio (the MCP standard for local servers).\n- **Storage:** reads and writes the same file-based MindBase data directory the web app uses (`FileStore` from `@mindbase/core`).\n- **No web server needed:** the MCP process talks to your wiki directly. You can have the MindBase web app running or not — they don't conflict (writes use atomic file locks).\n- **LLM calls:** only the few tools that need them (`ingest_source`, `ask_wiki`, `run_wiki_health`) actually call your configured LLM. The rest run on local indexes.\n\n---\n\n## Privacy\n\n- Everything runs locally. No telemetry. No analytics.\n- The only outbound network calls are to the LLM endpoint you've configured (OpenAI, Anthropic, or your own via the LLM adapter).\n- Read-only tools never call the LLM.\n- Pages marked `visibility: internal` or `visibility: pii` are excluded from semantic search and `ask_wiki` by default — they're still readable by `read_wiki_page` if you ask explicitly.\n\n---\n\n## Troubleshooting\n\n**\"Server failed to connect\" / shows red in Claude Desktop**\n\nRun the binary by hand and watch stderr:\n\n```bash\nnode /absolute/path/to/mindbase/apps/mcp/dist/cli.js\n# expect: [mindbase-mcp] connected · dataDir=… · client=…\n```\n\nIf that prints fine, the issue is in your client's config (wrong path, malformed JSON).\n\n**\"Cannot find module\" or \"ERR_MODULE_NOT_FOUND\"**\n\nThe `dist/` directory is missing. Rebuild:\n\n```bash\npnpm -F mindbase-mcp build\n```\n\n**Tools return empty results**\n\nCheck `--data-dir` points at a real MindBase data directory. The default is `~/mindbase-data`. Verify with:\n\n```bash\nls ~/mindbase-data/projects\ncat ~/mindbase-data/config.json    # should contain currentProjectId\n```\n\n**\"No current project\"**\n\nAsk your AI client to *\"create a new mindbase project called <name>\"* (calls `mindbase_init_project`), or set one manually:\n\n```bash\necho '{\"currentProjectId\": \"my-project\"}' > ~/mindbase-data/config.json\n```\n\n**Need to confirm the protocol works**\n\nUse Inspector for a visual UI:\n\n```bash\nnpx @modelcontextprotocol/inspector npx -y mindbase-mcp\n```\n\n---\n\n## Development\n\n```bash\n# from monorepo root\npnpm -F mindbase-mcp dev        # tsx watch on src/cli.ts\npnpm -F mindbase-mcp build      # tsup bundle to dist/\npnpm -F mindbase-mcp typecheck  # tsc --noEmit\npnpm -F mindbase-mcp test       # vitest\n```\n\nSource layout:\n\n```\nsrc/\n├── cli.ts              # bin entry — flag parsing, then start server\n├── index.ts            # createServer() — wires SDK + tools + resources + prompts\n├── context.ts          # FileStore + adapter + config loading\n├── lib/\n│   ├── error.ts        # consistent MCP error envelope\n│   ├── safe-write.ts   # human-edit guard + audit-trail tagging\n│   └── markdown-bundle.ts\n├── tools/              # one file per tool (49 tools)\n├── resources/index.ts  # resource handlers for the 6 schemes\n└── prompts/            # one file per prompt (7 files)\n```\n\n`tsup` bundles `@mindbase/core` inline, so the published package has no workspace dependencies at runtime.\n\n---\n\n## License\n\nMIT\n","readmeFilename":"README.md"}