@codeatlas/mcp 1.1.0 → 2.0.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/README.md +121 -6
- package/dist/mcp-server.js +315 -143
- package/dist/webview-ui/dist/assets/index.css +1 -0
- package/dist/webview-ui/dist/assets/index.js +63 -0
- package/dist/webview-ui/dist/index.html +13 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
# @codeatlas/mcp
|
|
2
2
|
|
|
3
|
-
> **Live codebase architecture for any MCP-compatible LLM client.**
|
|
4
|
-
>
|
|
3
|
+
> **Live codebase architecture and AI code review for any MCP-compatible LLM client.**
|
|
4
|
+
> 39 tools + 8 resources expose routes, sequences, dependency graphs, diffs, impact analysis, architecture violations, full SQL access, and AI-driven review findings over your workspace — so the model gets structured answers instead of grepping through files.
|
|
5
5
|
|
|
6
6
|
Works with **Claude Code, Cursor, VS Code Copilot, Codex CLI, Gemini CLI, Antigravity, Continue** — anything that speaks the Model Context Protocol.
|
|
7
7
|
|
|
8
|
+
**New in v2** — AI code review tools. Run a review with `run_review`, list findings with `list_ai_findings`, ask "what's wrong with auth?" with `search_ai_findings`, then ask for a one-shot context bundle to fix the issue with `review_and_fix_pack`. Findings are grounded in source quotes the model has to copy verbatim — no invented issues.
|
|
9
|
+
|
|
8
10
|
---
|
|
9
11
|
|
|
10
12
|
## Why it matters: token economics
|
|
@@ -79,7 +81,7 @@ After registering, reload your client and the 25 tools appear alongside its buil
|
|
|
79
81
|
|
|
80
82
|
## What it exposes
|
|
81
83
|
|
|
82
|
-
###
|
|
84
|
+
### 39 tools
|
|
83
85
|
|
|
84
86
|
**Context packs** — minimum-token retrieval primitives
|
|
85
87
|
`list_entrypoints` · `list_entrypoints_paged` · `get_entrypoint_pack` · `get_feature_pack` · `pre_edit_brief` · `get_function_source` · `trace_call_path`
|
|
@@ -99,7 +101,10 @@ After registering, reload your client and the 25 tools appear alongside its buil
|
|
|
99
101
|
**Interop**
|
|
100
102
|
`export_openapi_spec` · `export_function_calling_spec` · `summarise_payload`
|
|
101
103
|
|
|
102
|
-
|
|
104
|
+
**AI code review** — query, score, and act on findings (new in v2)
|
|
105
|
+
`list_ai_findings` · `get_ai_finding` · `get_ai_finding_counts` · `update_ai_finding_status` · `get_review_guidelines` · `set_review_guidelines` · `search_ai_findings` · `summarise_findings` · `list_findings_by_guideline` · `get_review_summary` · `clear_findings` · `review_and_fix_pack` · `score_findings` · `propose_guideline_from_finding` · `review_diff_with_baseline`
|
|
106
|
+
|
|
107
|
+
### 8 resources
|
|
103
108
|
|
|
104
109
|
| URI | Contents |
|
|
105
110
|
|-----|----------|
|
|
@@ -108,14 +113,124 @@ After registering, reload your client and the 25 tools appear alongside its buil
|
|
|
108
113
|
| `codeatlas://workspace/features` | Feature clusters — label, file membership, cohesion, API count |
|
|
109
114
|
| `codeatlas://workspace/entrypoints` | Every entry point flattened across all categories |
|
|
110
115
|
| `codeatlas://workspace/diff-summary` | Baseline-vs-working summary across all 6 diagram layers |
|
|
116
|
+
| `codeatlas://workspace/ai-findings` | All AI-review findings — severity, layer bindings, source quotes |
|
|
117
|
+
| `codeatlas://workspace/review-guidelines` | Team review rules currently injected into every review prompt |
|
|
118
|
+
| `codeatlas://workspace/review-summary` | Counts by layer + severity, top findings, last review metadata |
|
|
119
|
+
|
|
120
|
+
### Push notifications
|
|
121
|
+
|
|
122
|
+
Stdio clients that subscribe get `notifications/codeatlas/findings_changed` when findings are added, updated, or removed — no polling needed.
|
|
111
123
|
|
|
112
124
|
---
|
|
113
125
|
|
|
114
126
|
## Self-init: no VS Code required
|
|
115
127
|
|
|
116
|
-
The
|
|
128
|
+
The first time you point it at a workspace, the MCP server indexes the code and starts watching for changes. The AI gets working answers within seconds.
|
|
129
|
+
|
|
130
|
+
Both this server and the VS Code extension can run on the same repo at the same time — they keep their own state, so they don't conflict. Add `.codeatlas-sa/` to `.gitignore` (the index lives there).
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## Browser diagrams (`--browser`)
|
|
135
|
+
|
|
136
|
+
Add `--browser` to view the architecture in a browser tab alongside the AI conversation:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
npx @codeatlas/mcp /path/to/repo --browser
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
A tab opens at `http://localhost:7742` showing six linked diagram layers: system design, feature clusters, API list, sequences, file dependencies, and function flow. File edits propagate to the browser in real time. Click any node to open the file in your editor.
|
|
143
|
+
|
|
144
|
+
| Flag | Effect |
|
|
145
|
+
|------|--------|
|
|
146
|
+
| `--browser` | Start the diagram view alongside the AI server |
|
|
147
|
+
| `--port <N>` | Use a specific port (default 7742) |
|
|
148
|
+
| `--no-open` | Don't auto-open the browser; just print the URL |
|
|
149
|
+
|
|
150
|
+
Set `CODEATLAS_EDITOR=<cmd>` to pick the editor (defaults to `$EDITOR`, then `code`, `cursor`, `subl`, `nvim`, `vim`).
|
|
151
|
+
|
|
152
|
+
### Connect an LLM
|
|
153
|
+
|
|
154
|
+
AI Review and natural-language search use any OpenAI-compatible provider. Pick one:
|
|
155
|
+
|
|
156
|
+
| Provider | Env var | `provider` setting |
|
|
157
|
+
|----------|---------|--------------------|
|
|
158
|
+
| OpenRouter (default) | `OPENROUTER_API_KEY` | `openrouter` |
|
|
159
|
+
| OpenAI | `OPENAI_API_KEY` | `openai` |
|
|
160
|
+
| Anthropic | `ANTHROPIC_API_KEY` | `anthropic` |
|
|
161
|
+
| Ollama (local — no key) | — | `ollama` |
|
|
162
|
+
| Custom endpoint | `LLM_API_KEY` (optional) | `custom` |
|
|
163
|
+
|
|
164
|
+
Change provider + model from the browser (LLM settings panel) or write to `<workspace>/.codeatlas-sa/config.json`:
|
|
165
|
+
```json
|
|
166
|
+
{
|
|
167
|
+
"codeatlas.llmProvider": "anthropic",
|
|
168
|
+
"codeatlas.llmModel": "claude-3-5-sonnet-latest"
|
|
169
|
+
}
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Compare commits, branches, and pull requests
|
|
173
|
+
|
|
174
|
+
From the diagram view in your browser:
|
|
175
|
+
|
|
176
|
+
- **Compare Commits** — pick base + head from a list of recent commits.
|
|
177
|
+
- **Compare Branch** — pick a branch; the diff shows what that branch added relative to your current `HEAD`.
|
|
178
|
+
- **Compare PR** — pick a pull request from the connected GitHub repo. Public repos work without a token (60 requests/hour limit). For private repos or higher rate limits, set `GITHUB_TOKEN` (or `GH_TOKEN`) with at least `repo` scope.
|
|
179
|
+
|
|
180
|
+
### Pairing with your AI assistant
|
|
181
|
+
|
|
182
|
+
The AI doesn't open the browser — you do. Register the server with `--browser` and the AI can cite URLs you click to jump straight to a specific diagram.
|
|
183
|
+
|
|
184
|
+
**Claude Code:**
|
|
185
|
+
```bash
|
|
186
|
+
claude mcp add codeatlas -- npx -y @codeatlas/mcp $(pwd) --browser
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
**Cursor / VS Code / Codex / Gemini** — add `--browser` to the args:
|
|
190
|
+
```json
|
|
191
|
+
{
|
|
192
|
+
"mcpServers": {
|
|
193
|
+
"codeatlas": {
|
|
194
|
+
"command": "npx",
|
|
195
|
+
"args": ["-y", "@codeatlas/mcp", "/absolute/path/to/repo", "--browser"]
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
The AI can link directly to any layer:
|
|
202
|
+
|
|
203
|
+
| URL | View |
|
|
204
|
+
|------|------|
|
|
205
|
+
| `http://localhost:7742/` | System design |
|
|
206
|
+
| `http://localhost:7742/#/features/service:main` | Feature clusters |
|
|
207
|
+
| `http://localhost:7742/#/apis/cluster:auth` | APIs in a cluster |
|
|
208
|
+
| `http://localhost:7742/#/sequence/<file>:<handler>` | Sequence for a route |
|
|
209
|
+
| `http://localhost:7742/#/file/<path>` | File diagram |
|
|
210
|
+
| `http://localhost:7742/#/flow/<path>/<fn>` | Function flow |
|
|
211
|
+
|
|
212
|
+
### If port 7742 is already in use
|
|
213
|
+
|
|
214
|
+
The server tries 7742 first and walks up (7743, 7744, …) up to four times if those are busy. The actual port appears in the startup log:
|
|
215
|
+
|
|
216
|
+
```
|
|
217
|
+
CodeAtlas browser ready: http://localhost:7743
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
To pick a specific port, pass `--port`:
|
|
221
|
+
|
|
222
|
+
```bash
|
|
223
|
+
npx @codeatlas/mcp /path/to/repo --browser --port 8080
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### Restarting the server
|
|
227
|
+
|
|
228
|
+
The standalone is a single process. To restart:
|
|
229
|
+
|
|
230
|
+
- **Launched in a terminal:** press `Ctrl+C`, then re-run the command.
|
|
231
|
+
- **Launched by an AI client** (Claude Code, Cursor, etc.): use the client's "reload MCP servers" action, or quit and reopen the client.
|
|
117
232
|
|
|
118
|
-
|
|
233
|
+
After restart the browser reconnects automatically — just refresh the tab.
|
|
119
234
|
|
|
120
235
|
---
|
|
121
236
|
|