Metadata-Version: 2.4
Name: braindb-mcp
Version: 1.0.0
Summary: SOTA Cognitive Memory & GraphRAG FastMCP Guidance Bundle for Autonomous Agents & IDEs
Author-email: BrainDB Cloud <hello@braindb.tech>
License: Apache-2.0
Project-URL: Homepage, https://braindb.tech
Project-URL: Repository, https://github.com/bodepudimuneendra-netizen/braindb-mcp
Keywords: mcp,model-context-protocol,graphrag,neo4j,memory,anti-amnesia,cursor,claude,agents
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

<!-- mcp-name: io.github.bodepudimuneendra-netizen/braindb-mcp -->

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

[![FastMCP SSE](https://img.shields.io/badge/FastMCP-SSE%20Live-06B6D4)](https://braindb.tech/docs)
[![Neo4j GraphRAG](https://img.shields.io/badge/Backend-Neo4j%20GraphRAG-2563EB)](https://braindb.tech/benchmarks)
[![License](https://img.shields.io/badge/License-Apache%202.0-10B981)](./LICENSE)

**Live Control Plane:** [braindb.tech](https://braindb.tech/) · **Benchmarks:** [braindb.tech/benchmarks](https://braindb.tech/benchmarks) · **31-Tool Docs:** [braindb.tech/docs](https://braindb.tech/docs) · **For AI Agents:** [braindb.tech/for-ai](https://braindb.tech/for-ai) · **Compare:** [braindb.tech/vs](https://braindb.tech/vs)

`braindb-mcp` connects Cursor, Claude Code, Claude Desktop, VS Code, Windsurf, and Google Antigravity to **[BrainDB Cloud](https://braindb.tech/)** 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](https://braindb.tech/vs).

---

## 30-Second Quickstart

```bash
# 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

```bash
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](https://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](./BENCHMARKS.md) and [braindb.tech/benchmarks](https://braindb.tech/benchmarks)):

| Suite | Judge / Model | BrainDB Score | Reference Baseline | Gain |
| :--- | :--- | :--- | :--- | :--- |
| **GraphRAG Bench (Novel)** | `GPT-4o-mini` | **89.5%** | FalkorDB `66.09%` | `+23.41 pts` |
| **ZeroSets Atlas v0** | `Gemini 2.5 Flash` | **87.4%** | ZeroSets `66.00%` | `+21.40 pts` |
| **LegalBench RAG (R@1)** | `GPT-4o-mini` | **65.67%** | Vector baseline `4.94%` | `+60.73 pts` |
| **LongMemEval v2** | `GPT-5.6 Luna` | **75.83%** | OpenAI Codex `69.30%` | `+6.53 pts` |
| **PrecisionMemBench v4** | `GPT-4o-mini` | **93% (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`](./rules.md) / [`AGENTS.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`](./SKILL.md)** — Execution recipes for Turn 1 recovery, multi-hop retrieval, and AST code lookup.
3. **[`instructions.md`](./instructions.md)** — Spec SHA-256 verification and `sync_and_complete_task` commit workflow.
4. **[`mcp_tools_api.md`](./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](https://braindb.tech/)). Hosted backend gateway services remain in BrainDB Cloud's private infrastructure.
