Context Bunker MCP
An MCP server that indexes your codebase using tree-sitter AST parsing and gives AI tools instant access to structural intelligence like dependency graphs, call trees, and dead code detection from a local SQLite database.
README
Context Bunker MCP 🏗️
Stop wasting tokens on orientation. Pre-computed codebase intelligence for AI coding tools. One command. Code never leaves your machine.
What is this?
AI coding agents spend ~80% of tokens just figuring out where things are — re-reading files, tracing imports, grepping for symbols. Every. Single. Session.
Context Bunker fixes this. It's an MCP server that indexes your codebase using tree-sitter AST parsing and gives your AI tools instant access to structural intelligence — dependency graphs, call trees, dead code, cross-session diffs — all from a local SQLite database.
One call replaces 8-16 grep/read calls. ~90% token savings. Zero cloud. Zero API keys.
Works with Claude Code, Cursor, Windsurf, Copilot, and any MCP-compatible client.
Why not just grep? Grep finds text. Context Bunker understands structure — dependency graphs, cross-session memory, dead code detection, and token-efficient summaries. Things grep structurally can't do. Full comparison.
Setup
Install
# Run directly — no install needed
bunx context-bunker-mcp /your/project
# Or install globally
bun install -g context-bunker-mcp
# No Bun? npx / npm work too
Add to your AI tool
Claude Code:
# With a project (auto-indexes on startup)
claude mcp add context-bunker -- bunx context-bunker-mcp /your/project
# Without a project (AI calls set_project dynamically)
claude mcp add context-bunker -- bunx context-bunker-mcp
# No Bun? npx work too
Cursor / Windsurf / VS Code — add to settings.json:
{
"mcpServers": {
"context-bunker": {
"command": "bunx",
"args": ["context-bunker-mcp", "/your/project"]
}
}
}
Tools (16)
| Tool | What it does |
|---|---|
🔥 get_changes_since_last_session |
What changed since the AI last looked. No more re-orientation. |
🔥 find_unused_exports |
Dead code detection — exported but never imported anywhere. |
🔥 find_unused_code |
Find dead internal code — functions, classes, variables, types never referenced. |
🔥 get_file_summary |
File overview in ~50 tokens. Scan 10 files for the cost of 1. |
🔥 search_by_pattern |
Find structural patterns: HTTP calls, env access, error handlers, async, TODOs. |
🧠 get_smart_context |
Full file context in 1 call — imports, exports, dependents, types, tests. |
🧠 get_dependency_graph |
"If I change this, what breaks?" — transitive import graph with depth control. |
🧠 find_symbol |
AST-aware symbol search by name, kind, and scope. Not text matching. |
🧠 find_references |
Where a symbol is used, classified by kind (import, call, type annotation). |
🧠 get_call_graph |
What a function calls, recursively, as a tree. |
🧠 get_symbol_source |
Extract one definition — not the whole file. 80% token savings. |
🧠 get_project_map |
Architecture overview: modules, public APIs, relationships. |
🔧 set_project |
Point the index at any project directory on the fly. |
🔧 search_code |
Semantic search via local TF-IDF. No API keys needed. |
🔧 reindex |
Force re-index of the codebase or a single file. |
🔧 get_status |
Index health, file counts, token savings estimate. |
🔥 Unique 🧠 Core Intelligence 🔧 Housekeeping
Language Support
TypeScript, JavaScript (TSX/JSX/MTS/CTS), Python, Go, Rust, Java, C#
Powered by tree-sitter WASM grammars. Adding a new language = one extractor file in src/languages/.
Tech Stack
| Runtime | Bun (Node.js fallback) — bun:sqlite = zero native deps, 4-10x faster startup |
| MCP | @modelcontextprotocol/sdk |
| AST | web-tree-sitter (WASM) — no native bindings, works everywhere |
| Storage | SQLite (WAL mode) — single file, survives restarts |
| Search | TF-IDF (local) — zero API keys, no cloud |
| Watch | chokidar — incremental re-index on file changes |
Storage
The index lives in your OS cache directory — not inside the project. No .gitignore needed.
| Platform | Location |
|---|---|
| macOS | ~/Library/Caches/context-bunker/<project>/index.db |
| Linux | ~/.cache/context-bunker/<project>/index.db |
| Windows | %LOCALAPPDATA%\context-bunker\<project>\index.db |
Want it inside the project instead? Use --local or set { "storage": "local" } in .context-bunker.json.
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。