context-bunker-mcp 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +105 -0
- package/dist/index.js +24817 -0
- package/package.json +56 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Michael Chen
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Context Bunker MCP 🏗️
|
|
2
|
+
|
|
3
|
+
> **Stop wasting tokens on orientation.** Pre-computed codebase intelligence for AI coding tools. One command. Code never leaves your machine.
|
|
4
|
+
|
|
5
|
+
## What is this?
|
|
6
|
+
|
|
7
|
+
AI coding agents spend [~80% of tokens just figuring out where things are](https://earezki.com/ai-news/2026-02-26-how-i-cut-my-ai-coding-agents-token-usage-by-65-without-changing-models/) — re-reading files, tracing imports, grepping for symbols. Every. Single. Session.
|
|
8
|
+
|
|
9
|
+
Context Bunker fixes this. It's an [MCP](https://modelcontextprotocol.io/) 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.
|
|
10
|
+
|
|
11
|
+
**One call replaces 8-16 grep/read calls. ~90% token savings. Zero cloud. Zero API keys.**
|
|
12
|
+
|
|
13
|
+
Works with Claude Code, Cursor, Windsurf, Copilot, and any MCP-compatible client.
|
|
14
|
+
|
|
15
|
+
> **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](./docs/cli-comparison.md).
|
|
16
|
+
|
|
17
|
+
## Setup
|
|
18
|
+
|
|
19
|
+
### Install
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
# Run directly — no install needed
|
|
23
|
+
npx context-bunker-mcp /your/project
|
|
24
|
+
|
|
25
|
+
# Or install globally
|
|
26
|
+
npm install -g context-bunker-mcp
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Add to your AI tool
|
|
30
|
+
|
|
31
|
+
**Claude Code:**
|
|
32
|
+
```bash
|
|
33
|
+
# With a project (auto-indexes on startup)
|
|
34
|
+
claude mcp add context-bunker -- npx context-bunker-mcp /your/project
|
|
35
|
+
|
|
36
|
+
# Without a project (AI calls set_project dynamically)
|
|
37
|
+
claude mcp add context-bunker -- npx context-bunker-mcp
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**Cursor / Windsurf / VS Code** — add to `settings.json`:
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"mcpServers": {
|
|
44
|
+
"context-bunker": {
|
|
45
|
+
"command": "npx",
|
|
46
|
+
"args": ["context-bunker-mcp", "/your/project"]
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Tools (15)
|
|
53
|
+
|
|
54
|
+
| Tool | What it does |
|
|
55
|
+
|------|-------------|
|
|
56
|
+
| 🔥 `get_changes_since_last_session` | What changed since the AI last looked. No more re-orientation. |
|
|
57
|
+
| 🔥 `find_unused_exports` | Dead code detection — exported but never imported anywhere. |
|
|
58
|
+
| 🔥 `get_file_summary` | File overview in ~50 tokens. Scan 10 files for the cost of 1. |
|
|
59
|
+
| 🔥 `search_by_pattern` | Find structural patterns: HTTP calls, env access, error handlers, async, TODOs. |
|
|
60
|
+
| 🧠 `get_smart_context` | Full file context in 1 call — imports, exports, dependents, types, tests. |
|
|
61
|
+
| 🧠 `get_dependency_graph` | "If I change this, what breaks?" — transitive import graph with depth control. |
|
|
62
|
+
| 🧠 `find_symbol` | AST-aware symbol search by name, kind, and scope. Not text matching. |
|
|
63
|
+
| 🧠 `find_references` | Where a symbol is used, classified by kind (import, call, type annotation). |
|
|
64
|
+
| 🧠 `get_call_graph` | What a function calls, recursively, as a tree. |
|
|
65
|
+
| 🧠 `get_symbol_source` | Extract one definition — not the whole file. 80% token savings. |
|
|
66
|
+
| 🧠 `get_project_map` | Architecture overview: modules, public APIs, relationships. |
|
|
67
|
+
| 🔧 `set_project` | Point the index at any project directory on the fly. |
|
|
68
|
+
| 🔧 `search_code` | Semantic search via local TF-IDF. No API keys needed. |
|
|
69
|
+
| 🔧 `reindex` | Force re-index of the codebase or a single file. |
|
|
70
|
+
| 🔧 `get_status` | Index health, file counts, token savings estimate. |
|
|
71
|
+
|
|
72
|
+
🔥 Unique 🧠 Core Intelligence 🔧 Housekeeping
|
|
73
|
+
|
|
74
|
+
## Language Support
|
|
75
|
+
|
|
76
|
+
TypeScript, JavaScript (TSX/JSX/MTS/CTS), Python, Go, Rust, Java, C#
|
|
77
|
+
|
|
78
|
+
Powered by tree-sitter WASM grammars. Adding a new language = one extractor file in `src/languages/`.
|
|
79
|
+
|
|
80
|
+
## Tech Stack
|
|
81
|
+
|
|
82
|
+
| | |
|
|
83
|
+
|---|---|
|
|
84
|
+
| **Runtime** | Bun (Node.js fallback) — `bun:sqlite` = zero native deps, 4-10x faster startup |
|
|
85
|
+
| **MCP** | `@modelcontextprotocol/sdk` |
|
|
86
|
+
| **AST** | `web-tree-sitter` (WASM) — no native bindings, works everywhere |
|
|
87
|
+
| **Storage** | SQLite (WAL mode) — single file, survives restarts |
|
|
88
|
+
| **Search** | TF-IDF (local) — zero API keys, no cloud |
|
|
89
|
+
| **Watch** | `chokidar` — incremental re-index on file changes |
|
|
90
|
+
|
|
91
|
+
## Storage
|
|
92
|
+
|
|
93
|
+
The index lives in your OS cache directory — **not** inside the project. No `.gitignore` needed.
|
|
94
|
+
|
|
95
|
+
| Platform | Location |
|
|
96
|
+
|----------|----------|
|
|
97
|
+
| macOS | `~/Library/Caches/context-bunker/<project>/index.db` |
|
|
98
|
+
| Linux | `~/.cache/context-bunker/<project>/index.db` |
|
|
99
|
+
| Windows | `%LOCALAPPDATA%\context-bunker\<project>\index.db` |
|
|
100
|
+
|
|
101
|
+
Want it inside the project instead? Use `--local` or set `{ "storage": "local" }` in `.context-bunker.json`.
|
|
102
|
+
|
|
103
|
+
## License
|
|
104
|
+
|
|
105
|
+
MIT
|