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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.