🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

mindbase-mcp

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mindbase-mcp

MCP server for MindBase — query and write to your wiki from Claude Desktop, Cursor, Windsurf, Cline, or any MCP-compatible AI client.

latest
Source
npmnpm
Version
0.1.3
Version published
Maintainers
1
Created
Source

mindbase-mcp

Turn your MindBase wiki into the long-term memory of every AI agent you use.

A Model Context Protocol 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.

Built for the engineer who wants their AI tools to actually know what they know.

What you get

  • 49 tools — project scaffolding, contribute, build, search, read, ingest, save chat excerpts, run graph health, find orphans, suggest links, deep-research save…
  • 5 resource feedsrecent activity, top hubs, orphans, insights, plus per-page (mindbase://wiki/<slug>) and per-chat (mindbase://chats/<id>) resources
  • 7 promptsdaily-digest, brainstorm, audit, connect, explain, quiz, write (surface as slash commands in clients that support MCP prompts)
  • Graph-aware retrievalask_wiki doesn't just keyword-match; it traverses your wikilink graph so the AI sees the surrounding cluster
  • 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
  • Standalone process — runs on stdio against your wiki on disk; the MindBase web app does not need to be running
  • Multi-vault — one config can connect Claude to a personal wiki and a work wiki simultaneously
  • Privacy-first — everything stays local, no telemetry, no outbound calls except the LLM you've configured

Install

No clone, no build — npm has everything:

npx -y mindbase-mcp --help

Every client config below uses the same two lines: command: "npx", args: ["-y", "mindbase-mcp"].

Prefer building from source?
git clone https://github.com/frankchu91/mindbase
cd mindbase
pnpm install
pnpm -F mindbase-mcp build
# binary at apps/mcp/dist/cli.js — use `node /absolute/path/to/apps/mcp/dist/cli.js`
# in place of the npx command in the configs below

Connect your AI client

Pick your client. Each section is copy-paste.

Claude Code (CLI)

One command:

claude mcp add mindbase --scope user npx -- -y mindbase-mcp

Verify:

claude mcp list
# mindbase: npx -y mindbase-mcp - ✓ Connected

Restart your Claude Code session. Tools appear as mcp__mindbase__search_wiki, mcp__mindbase__list_recent, etc.

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.

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "mindbase": {
      "command": "npx",
      "args": ["-y", "mindbase-mcp"]
    }
  }
}

Quit Claude Desktop fully (Cmd+Q), reopen. The MindBase tools and prompts are now available.

Cursor

Edit ~/.cursor/mcp.json (global) or <project>/.cursor/mcp.json (project-scoped):

{
  "mcpServers": {
    "mindbase": {
      "command": "npx",
      "args": ["-y", "mindbase-mcp"]
    }
  }
}

Restart Cursor.

Windsurf

Settings → 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.

Cline (VS Code extension)

Cline reads mcp_config.json at the path it shows in its settings UI. Use the same config shape as Claude Desktop.

MCP Inspector (testing without a real client)

npx @modelcontextprotocol/inspector npx -y mindbase-mcp

Opens a browser GUI where you can click any tool, fill the input form, and see real responses against your wiki. Best place to debug.

First things to try

Once connected, paste these into your AI client:

  • "Run a wiki health check on my MindBase and tell me the three most important things to clean up."
  • "What's been added to my wiki in the last 7 days? Group by topic."
  • "Find pages related to <your-top-hub-slug> and summarize the cluster in five bullets."
  • "Save this conversation as a wiki excerpt titled 'MCP testing notes'."
  • "Quiz me on what I've added this week."

The AI will pick the right tools (run_wiki_health, list_recent, find_related, save_chat_excerpt, the quiz prompt) on its own.

Multi-vault

Run two servers, each pointing at a different data directory:

{
  "mcpServers": {
    "mindbase-personal": {
      "command": "npx",
      "args": ["-y", "mindbase-mcp", "--data-dir", "/Users/you/mindbase-personal"]
    },
    "mindbase-work": {
      "command": "npx",
      "args": ["-y", "mindbase-mcp", "--data-dir", "/Users/you/mindbase-work"]
    }
  }
}

Tools from each are namespaced (e.g. mcp__mindbase-personal__search_wiki).

CLI flags

mindbase-mcp [options]

  --data-dir <path>    Data directory (default: ~/mindbase-data)
  --version, -v        Print version
  --help, -h           Show help

Environment variables (used by the underlying LLM adapter — only when calling tools that require an LLM, e.g. ingest_source, ask_wiki, run_wiki_health):

  • OPENAI_API_KEY — for OpenAI models
  • ANTHROPIC_API_KEY — for Anthropic models
  • MINDBASE_MODEL — overrides the model from mindbase.config.json

Read-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.

Tools reference

49 tools, grouped by purpose. Highlights below — connect MCP Inspector for the full list with schemas.

Project lifecycle (wiki v2)

ToolWhat it does
mindbase_init_projectScaffold a new project: README.md + context.md + index.yaml + sources/ + logs/ + artifacts/. Sets it as current.
mindbase_load_projectLoad README + context + index for a project (read-only by default; persist: true switches the current project).
mindbase_contributeAppend a thought / source summary to today's contributor file (append-only). Accepts projectId for cross-project routing.
mindbase_gather_sourcesList contributor + research files modified since the last build.
mindbase_atomic_write_contextWrite a new context.md with snapshot-first rollback safety.
mindbase_rebuild_indexRegenerate index.yaml from disk.
mindbase_statusDashboard: line counts, contributors, sources, logs, artifacts.
mindbase_validate_structureCheck a project's layout matches the v2 contract.
mindbase_append_logAppend an operation record to logs/<date>.md.
mindbase_research_saveSave deep-research output to sources/research/<slug>.md.
mindbase_migrateOne-time legacy v1 → v2 layout conversion (snapshot + recovery archive).
mindbase_exportBundle a project as markdown-bundle or zip-archive.

Read

ToolWhat it does
search_wikiFull-text search across page titles, one-liners, and slugs. Ranked, with snippets.
read_wiki_pageFull markdown body + frontmatter + incoming/outgoing wikilinks for a slug.
list_recentPages added or updated within the past N days, newest first.
find_relatedPages connected via wikilinks, shared tags, or shared sources, with rationale.
semantic_searchEmbedding-based search; falls back to keyword if embeddings unavailable.
search_in_projectSearch restricted to pages tagged with a specific project (project frontmatter).
ask_wikiNatural-language Q&A with graph-aware retrieval: top hits + 1-hop neighbors as context.

Write

ToolWhat it does
ingest_sourceSave a new source (URL, paste, file) → run LLM compile → create/update wiki pages → cross-link.
quick_captureSave to inbox without triggering compile. For batch-processing later.
save_chat_excerptSave a fragment of the current AI conversation as a new wiki page (LLM auto-titles).
append_to_pageAppend content to a section of an existing page (creates section if missing).
update_note_sectionReplace the content under a section heading on an existing page.
tag_noteAdd or replace tags on a page.
set_visibilitySet public / internal / pii — controls inclusion in semantic search and Q&A.

Chat history

ToolWhat it does
list_chatsRecent saved chat sessions, newest first.
recall_chatSearch past saved chats by content.

Graph & maintenance

ToolWhat it does
get_graph_insightsTop hubs, orphans, broken links, fragmented tag clusters.
find_orphansPages with no incoming links.
suggest_linksWikilinks that should be added to a specific page (review mode — does not modify).
run_wiki_healthFull pipeline: graph → insights → auto cross-link → L2 lint. Writes _insights.md.
export_subgraphExport a page + its N-hop neighbors as a self-contained markdown bundle.

Write-tool safety

Tools that modify human-edited pages refuse by default and require force: true. Every AI-written page or section is tagged in frontmatter:

created_via: mcp
mcp_client: claude-desktop
mcp_tool: save_chat_excerpt

So you can always tell which content came from a person vs. an AI.

Resources reference

URIContent
mindbase://recentMarkdown digest of the last 7 days of wiki updates
mindbase://hubsMost-linked-to pages
mindbase://orphansPages with no incoming links
mindbase://insightsLatest structural analysis report
mindbase://wiki/<slug>A specific wiki page (one resource per page)
mindbase://chats/<id>A specific saved chat session

Resources are read-only and cheap — clients can subscribe to them as standing context without burning tool calls.

Prompts reference

Surface 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):

PromptWhat it does
daily-digestSummarize what was added today, grouped by topic
brainstorm <topic>Brainstorm a topic, grounded in your wiki
auditAudit wiki health and propose fixes
connectSurface surprising cross-cluster connections
explain <slug>Re-explain a wiki page from first principles
quizQuiz you on what you've recently learned
write <topic>Write a long-form piece grounded in your wiki

These are just composed prompts — they instruct the AI to call the right combination of tools above. You can also write your own.

How it works

┌─────────────────────┐    stdio (JSON-RPC)    ┌──────────────────────┐
│  Claude / Cursor /  │  ◄───────────────────► │  mindbase-mcp-server │
│  Windsurf / etc.    │                        │  (this package)      │
└─────────────────────┘                        └──────────┬───────────┘
                                                          │ direct
                                                          ▼
                                        ┌────────────────────────────────┐
                                        │  ~/mindbase-data/              │
                                        │  ├─ config.json                │
                                        │  └─ projects/<id>/             │
                                        │      ├─ README.md  context.md  │
                                        │      ├─ index.yaml             │
                                        │      ├─ sources/{contributors, │
                                        │      │    research, raw}/      │
                                        │      ├─ logs/  artifacts/      │
                                        │      └─ state/                 │
                                        └────────────────────────────────┘
  • Transport: stdio (the MCP standard for local servers).
  • Storage: reads and writes the same file-based MindBase data directory the web app uses (FileStore from @mindbase/core).
  • 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).
  • 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.

Privacy

  • Everything runs locally. No telemetry. No analytics.
  • The only outbound network calls are to the LLM endpoint you've configured (OpenAI, Anthropic, or your own via the LLM adapter).
  • Read-only tools never call the LLM.
  • 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.

Troubleshooting

"Server failed to connect" / shows red in Claude Desktop

Run the binary by hand and watch stderr:

node /absolute/path/to/mindbase/apps/mcp/dist/cli.js
# expect: [mindbase-mcp] connected · dataDir=… · client=…

If that prints fine, the issue is in your client's config (wrong path, malformed JSON).

"Cannot find module" or "ERR_MODULE_NOT_FOUND"

The dist/ directory is missing. Rebuild:

pnpm -F mindbase-mcp build

Tools return empty results

Check --data-dir points at a real MindBase data directory. The default is ~/mindbase-data. Verify with:

ls ~/mindbase-data/projects
cat ~/mindbase-data/config.json    # should contain currentProjectId

"No current project"

Ask your AI client to "create a new mindbase project called " (calls mindbase_init_project), or set one manually:

echo '{"currentProjectId": "my-project"}' > ~/mindbase-data/config.json

Need to confirm the protocol works

Use Inspector for a visual UI:

npx @modelcontextprotocol/inspector npx -y mindbase-mcp

Development

# from monorepo root
pnpm -F mindbase-mcp dev        # tsx watch on src/cli.ts
pnpm -F mindbase-mcp build      # tsup bundle to dist/
pnpm -F mindbase-mcp typecheck  # tsc --noEmit
pnpm -F mindbase-mcp test       # vitest

Source layout:

src/
├── cli.ts              # bin entry — flag parsing, then start server
├── index.ts            # createServer() — wires SDK + tools + resources + prompts
├── context.ts          # FileStore + adapter + config loading
├── lib/
│   ├── error.ts        # consistent MCP error envelope
│   ├── safe-write.ts   # human-edit guard + audit-trail tagging
│   └── markdown-bundle.ts
├── tools/              # one file per tool (49 tools)
├── resources/index.ts  # resource handlers for the 6 schemes
└── prompts/            # one file per prompt (7 files)

tsup bundles @mindbase/core inline, so the published package has no workspace dependencies at runtime.

License

MIT

Keywords

mcp

FAQs

Package last updated on 25 Jul 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts