Repository avatar
AI Tools
v1.0.0
active

braindb-mcp

io.github.bodepudimuneendra-netizen/braindb-mcp

Hosted 5-layer Working Memory and Neo4j GraphRAG over 31 FastMCP tools.

Documentation

braindb-mcp — FastMCP CLI & Agent Memory Bundle for BrainDB Cloud

npm PyPI MCP Registry FastMCP SSE License

Live Control Plane: braindb.tech · npm: npmjs.com/package/braindb-mcp · PyPI: pypi.org/project/braindb-mcp · Benchmarks: braindb.tech/benchmarks · 31-Tool Docs: braindb.tech/docs · For AI Agents: braindb.tech/for-ai · Compare: braindb.tech/vs

braindb-mcp connects Cursor, Claude Code, Claude Desktop, VS Code, Windsurf, and Google Antigravity to BrainDB Cloud over Server-Sent Events (https://mcp.braindb.tech/mcp/sse). Nothing heavy runs on your laptop — the CLI configures your IDE MCP endpoint and installs lean agent rule files (AGENTS.md, .cursor/rules/braindb.mdc, CLAUDE.md, .github/copilot-instructions.md) so your coding assistant checks live task state before touching source code.


Why BrainDB Cloud Exists (vs. dimknaf/braindb & brainmcp.dev)

Several separate open-source projects show up when searching "braindb" or "brain-mcp", and they solve completely different problems:

  • brainmcp.dev (mordechaipotash/brain-mcp) archives local Claude Code / Codex JSONL transcripts into local DuckDB on a single workstation with 7 search/backup tools.
  • dimknaf/braindb is a self-hosted Rust and PostgreSQL personal knowledge base (supports, contradicts, temporal decay).
  • braindb.tech (BrainDB Cloud, this repo's hosted gateway) gives agents and multi-machine IDEs a shared Neo4j cognitive memory layer over 31 FastMCP tools: a sub-15ms hot working-memory gate (ACTIVE_TASK, USER_PREF), Warm task ring buffers, cold HNSW + codebase AST caller/callee graphs (KNOWLEDGE), and Encrypted Cloud Vault BYOK (0% LLM markup) + BYODB Neo4j isolation.

Skip BrainDB Cloud if air-gapped compliance blocks outbound SSE calls and you just want local transcript grep on one laptop. Choose BrainDB Cloud when work spans machines, requires multi-hop relational retrieval across large document sets, or loses context mid-session during compaction. See the full breakdown at braindb.tech/vs.


30-Second Quickstart

# Interactive wizard (Node.js)
npx braindb-mcp init --api-key bdb_live_YOUR_API_KEY
yarn dlx braindb-mcp init --api-key bdb_live_YOUR_API_KEY

# Standalone Python CLI
pip install braindb-mcp && braindb-mcp init --api-key bdb_live_YOUR_API_KEY

Target One Editor Non-Interactively

npx braindb-mcp init --client cursor --api-key bdb_live_YOUR_API_KEY
npx braindb-mcp init --client claude --api-key bdb_live_YOUR_API_KEY
npx braindb-mcp init --client vscode --api-key bdb_live_YOUR_API_KEY
npx braindb-mcp init --client windsurf --api-key bdb_live_YOUR_API_KEY
npx braindb-mcp init --client antigravity --api-key bdb_live_YOUR_API_KEY

Existing IDE configs and rule files are skipped unless --force is passed, and generated MCP entries point to https://mcp.braindb.tech/mcp/sse. Full manual JSON examples for every client live at braindb.tech/docs.


Measured Benchmark Results

Pure cosine similarity breaks when answers span multiple files or later user corrections supersede early facts. Wiring Neo4j entity links and deterministic hot slots behind FastMCP produced these numbers (see BENCHMARKS.md and braindb.tech/benchmarks):

SuiteJudge / ModelBrainDB ScoreReference BaselineGain
GraphRAG Bench (Novel)GPT-4o-mini89.5%FalkorDB 66.09%+23.41 pts
ZeroSets Atlas v0Gemini 2.5 Flash87.4%ZeroSets 66.00%+21.40 pts
LegalBench RAG (R@1)GPT-4o-mini65.67%Vector baseline 4.94%+60.73 pts
LongMemEval v2GPT-5.6 Luna75.83%OpenAI Codex 69.30%+6.53 pts
PrecisionMemBench v4GPT-4o-mini93% (83/89)Prior pipeline 87.6%+5.40 pts

On PrecisionMemBench v4 over FastMCP SSE gateway, 83/89 adversarial cases passed; the 6 remaining misses occurred on ambiguous cross-turn pronouns sharing a project_id without explicit entity grounding. Separating deterministic state (ACTIVE_TASK) from semantic retrieval (KNOWLEDGE) prevents fuzzy vector search from guessing task completion.


Included Agent Guidance Bundle & 31 FastMCP Tools

Agents shouldn't burn prompt context pasting every tool signature at startup. This bundle uses progressive disclosure:

  1. rules.md / AGENTS.md — Always-on startup rules: query ACTIVE_TASK and USER_PREF in <15 ms (0 tokens) and gate file edits behind start_spec_task.
  2. SKILL.md — Execution recipes for Turn 1 recovery, multi-hop retrieval, and AST code lookup.
  3. instructions.md — Spec SHA-256 verification and sync_and_complete_task commit workflow.
  4. mcp_tools_api.md — Full parameter reference for all 31 FastMCP tools (ingestion, GraphRAG retrieval, code ASTs, hot working memory, episodic belief revision, and encrypted BYOK/BYODB vault management), fetched only when needed.

Repository Scope Notice

This public repository contains the Apache-2.0 licensed client CLI (bin/cli.js, braindb_mcp/cli.py), IDE templates, rule/skill markdown bundle, and public benchmark documentation for BrainDB Cloud (braindb.tech). Hosted backend gateway services remain in BrainDB Cloud's private infrastructure.

No installation packages available.