@codeatlas/mcp 1.0.0 → 1.0.2
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/README.md +167 -8
- package/dist/mcp-server.js +101 -101
- package/package.json +36 -5
package/README.md
CHANGED
|
@@ -1,15 +1,67 @@
|
|
|
1
1
|
# @codeatlas/mcp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> **Live codebase architecture for any MCP-compatible LLM client.**
|
|
4
|
+
> 25 tools + 5 resources expose routes, sequences, dependency graphs, diffs, impact analysis, architecture violations, and full SQL access over your workspace — so the model gets structured answers instead of grepping through files.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
Works with **Claude Code, Cursor, VS Code Copilot, Codex CLI, Gemini CLI, Antigravity, Continue** — anything that speaks the Model Context Protocol.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Why it matters: token economics
|
|
11
|
+
|
|
12
|
+
Measured against a mid-sized test project, every query returns **5×–200× fewer tokens** than the equivalent file-walking approach:
|
|
13
|
+
|
|
14
|
+
| Query | Naive file-walk | MCP context pack | Reduction |
|
|
15
|
+
|---|---:|---:|---:|
|
|
16
|
+
| List every entry point | 14,088 tokens | 1,794 tokens | **7.9×** |
|
|
17
|
+
| One route's full context | 5,647 tokens | 703 tokens | **8.0×** |
|
|
18
|
+
| Impact-of-change for a function | ~20–30 files of grepping | 254 tokens | **~50×** |
|
|
19
|
+
| Diff summary | several KB of git output | 28 tokens | **>200×** |
|
|
20
|
+
|
|
21
|
+
A 2.7B-class model with a 16K context window can answer *"what handles this route?"* or *"what breaks if I change X?"* on a 1k-file codebase using **one MCP call instead of dozens of file reads.** The retrieval problem moves from the LLM to the framework.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Quick start
|
|
26
|
+
|
|
27
|
+
### Claude Code
|
|
6
28
|
```bash
|
|
7
29
|
claude mcp add codeatlas -- npx -y @codeatlas/mcp $(pwd)
|
|
8
30
|
```
|
|
9
31
|
|
|
10
|
-
|
|
32
|
+
### Cursor — Settings → MCP → Add Server
|
|
33
|
+
```json
|
|
34
|
+
{
|
|
35
|
+
"mcpServers": {
|
|
36
|
+
"codeatlas": {
|
|
37
|
+
"command": "npx",
|
|
38
|
+
"args": ["-y", "@codeatlas/mcp", "/absolute/path/to/your/repo"]
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### VS Code (1.103+, Copilot Chat agent mode) — `.vscode/mcp.json`
|
|
45
|
+
```json
|
|
46
|
+
{
|
|
47
|
+
"servers": {
|
|
48
|
+
"codeatlas": {
|
|
49
|
+
"type": "stdio",
|
|
50
|
+
"command": "npx",
|
|
51
|
+
"args": ["-y", "@codeatlas/mcp", "${workspaceFolder}"]
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Codex CLI — `~/.codex/config.toml`
|
|
58
|
+
```toml
|
|
59
|
+
[mcp_servers.codeatlas]
|
|
60
|
+
command = "npx"
|
|
61
|
+
args = ["-y", "@codeatlas/mcp", "/absolute/path/to/your/repo"]
|
|
62
|
+
```
|
|
11
63
|
|
|
12
|
-
|
|
64
|
+
### Gemini CLI / Antigravity — `~/.gemini/settings.json`
|
|
13
65
|
```json
|
|
14
66
|
{
|
|
15
67
|
"mcpServers": {
|
|
@@ -21,10 +73,117 @@ Add to your client's MCP config (see your client docs for the right file):
|
|
|
21
73
|
}
|
|
22
74
|
```
|
|
23
75
|
|
|
24
|
-
|
|
76
|
+
After registering, reload your client and the 25 tools appear alongside its built-ins.
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## What it exposes
|
|
81
|
+
|
|
82
|
+
### 25 tools
|
|
83
|
+
|
|
84
|
+
**Context packs** — minimum-token retrieval primitives
|
|
85
|
+
`list_entrypoints` · `list_entrypoints_paged` · `get_entrypoint_pack` · `get_feature_pack` · `pre_edit_brief` · `get_function_source` · `trace_call_path`
|
|
86
|
+
|
|
87
|
+
**Diff & impact** — answer "what changed" and "what breaks"
|
|
88
|
+
`get_diff_summary` · `get_api_surface_diff` · `get_impact_of_change` · `get_impact_analysis` · `get_function_dependencies`
|
|
89
|
+
|
|
90
|
+
**Search & query** — weighted reverse index + read-only SQL over the snapshot
|
|
91
|
+
`search_workspace` · `query_snapshot` · `describe_snapshot_schema`
|
|
92
|
+
|
|
93
|
+
**Health & rules**
|
|
94
|
+
`get_health_report` · `list_architecture_violations` · `get_coverage_overlay`
|
|
95
|
+
|
|
96
|
+
**Workspace**
|
|
97
|
+
`get_workspace_status` · `find_similar_entities` · `list_saved_views` · `compare_workspaces`
|
|
98
|
+
|
|
99
|
+
**Interop**
|
|
100
|
+
`export_openapi_spec` · `export_function_calling_spec` · `summarise_payload`
|
|
101
|
+
|
|
102
|
+
### 5 resources
|
|
103
|
+
|
|
104
|
+
| URI | Contents |
|
|
105
|
+
|-----|----------|
|
|
106
|
+
| `codeatlas://workspace/microservices` | All detected services — name, technology, API count, inter-service connections |
|
|
107
|
+
| `codeatlas://workspace/apis` | All REST / GraphQL / gRPC / WS / SSE / job / CLI entry points — method, route, handler, file path |
|
|
108
|
+
| `codeatlas://workspace/features` | Feature clusters — label, file membership, cohesion, API count |
|
|
109
|
+
| `codeatlas://workspace/entrypoints` | Every entry point flattened across all categories |
|
|
110
|
+
| `codeatlas://workspace/diff-summary` | Baseline-vs-working summary across all 6 diagram layers |
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Self-init: no VS Code required
|
|
115
|
+
|
|
116
|
+
The MCP server bootstraps the snapshot itself when launched against a workspace that has no `.codeatlas/state.db` yet — scans the workspace, classifies it as a codebase (or returns `status: 'not_a_codebase'` for docs-only / empty dirs), runs the full indexing pipeline, and starts a file watcher to keep state current.
|
|
117
|
+
|
|
118
|
+
**You can register the MCP server against a brand-new repo and the LLM gets working answers within seconds — no VS Code launch required.**
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Workspace languages & frameworks
|
|
123
|
+
|
|
124
|
+
Only the host machine needs **Node.js ≥18**. The indexed workspace can be in any of these:
|
|
125
|
+
|
|
126
|
+
**14 languages:** JavaScript, TypeScript, Python, Java, Kotlin, Go, Rust, C, C++, C#, PHP, Ruby, Swift, Dart
|
|
127
|
+
|
|
128
|
+
| Category | Frameworks |
|
|
129
|
+
|----------|-----------|
|
|
130
|
+
| **Node.js** | Express, Koa, Fastify, NestJS, Hono |
|
|
131
|
+
| **Meta-frameworks** | Next.js (App + Pages), Nuxt, Remix, SvelteKit |
|
|
132
|
+
| **API protocols** | tRPC, GraphQL, gRPC |
|
|
133
|
+
| **Python** | Django, FastAPI, Flask, Starlette, DRF |
|
|
134
|
+
| **Java/Kotlin** | Spring Boot, Micronaut, JAX-RS, Ktor |
|
|
135
|
+
| **Go** | Gin, Echo, Chi, Fiber |
|
|
136
|
+
| **PHP** | Laravel, Symfony |
|
|
137
|
+
| **Ruby** | Rails, Sinatra |
|
|
138
|
+
| **Rust** | Actix, Axum, Rocket |
|
|
139
|
+
| **C#** | ASP.NET Core, Minimal API |
|
|
140
|
+
| **Swift** | Vapor |
|
|
141
|
+
| **Mobile** | Android (Jetpack Compose, Hilt, Room), iOS (SwiftUI, UIKit, Combine), React Native, Flutter/Dart, Expo Router |
|
|
142
|
+
|
|
143
|
+
Plus **non-API entry points**: background jobs, message-queue consumers, CLI commands, ORM lifecycle hooks, DB migrations/seeds, socket events, GraphQL subscriptions, health endpoints, mobile push handlers, deep links, widgets, content providers, and lifecycle hooks.
|
|
144
|
+
|
|
145
|
+
**Infrastructure auto-detected:** PostgreSQL, MySQL, MongoDB, Redis, RabbitMQ, Kafka, Celery, Sidekiq, Entity Framework, Eloquent, Room, CoreData, Realm, Firebase, Prisma, Sequelize, and more.
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Any-workspace wrapper (optional)
|
|
150
|
+
|
|
151
|
+
If you want one config that works in any project, drop a tiny shim onto your `$PATH`:
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
#!/usr/bin/env bash
|
|
155
|
+
# /usr/local/bin/codeatlas-mcp
|
|
156
|
+
exec npx -y @codeatlas/mcp "$PWD"
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Then your client configs become `command: codeatlas-mcp` with no args — workspace is wherever you launched the client.
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## Running alongside the VS Code extension
|
|
164
|
+
|
|
165
|
+
When both the [CodeAtlas VS Code extension](https://marketplace.visualstudio.com/items?itemName=codeatlaslive.codeatlas-live) or [VSCodium](https://open-vsx.org/extension/codeatlaslive/codeatlas-live) and an MCP server target the same workspace, **MCP wins write ownership**. The extension watches for `.codeatlas/.mcp-preempt`, yields its lock when an MCP process requests it, disables auto-update for the session, and surfaces a recovery toast. Close + reopen the workspace once the MCP process exits to reclaim writes. No silent races on `state.db`.
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Privacy & security
|
|
170
|
+
|
|
171
|
+
- **Your code stays local.** All indexing and queries run on your machine; no source is uploaded.
|
|
172
|
+
- **No telemetry from this binary.** Telemetry only exists in the VS Code extension build, and even there it is anonymous, opt-out, and never includes source code, file names, or commit metadata.
|
|
173
|
+
- **Sensitive data scrubbed.** Passwords, tokens, and connection strings are redacted before being written to `.codeatlas/state.db`.
|
|
174
|
+
- **Path-traversal-safe.** Every file lookup is validated against the workspace boundary.
|
|
175
|
+
- **Read-only SQL.** `query_snapshot` enforces SELECT-only access — no mutations, no shell-out.
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## Links
|
|
25
180
|
|
|
26
|
-
|
|
181
|
+
- **Issues / feature requests:** https://github.com/vamsikk7/codeatlas-live-issues/issues
|
|
182
|
+
- **Website:** https://codeatlas.live
|
|
183
|
+
- **Marketplace:** https://openvsx.org/extension/codeatlaslive/codeatlas-live
|
|
184
|
+
- **Docs:** https://www.codeatlas.live/docs/mcp/tools
|
|
185
|
+
---
|
|
27
186
|
|
|
28
|
-
##
|
|
187
|
+
## License
|
|
29
188
|
|
|
30
|
-
See [
|
|
189
|
+
See [LICENSE.md](LICENSE.md).
|