@prom.codes/context-mcp 0.4.3 → 0.4.4
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 +28 -21
- package/dist/bin.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,28 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
prom.codes Context — local-first codebase indexing & retrieval as an MCP server (stdio).
|
|
4
4
|
|
|
5
|
-
## Quick start
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
{
|
|
10
|
-
"mcpServers": {
|
|
11
|
-
"prometheus": {
|
|
12
|
-
"command": "npx",
|
|
13
|
-
"args": ["-y", "@prom.codes/context-mcp@latest"],
|
|
14
|
-
"env": {
|
|
15
|
-
"PROMETHEUS_API_KEY": "prom_live_…",
|
|
16
|
-
"PROMETHEUS_WORKSPACE_ROOT": "/absolute/path/to/your/repo"
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
5
|
+
## Quick start (Claude Code)
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
claude mcp add context --env PROMETHEUS_API_KEY=prom_live_… -- npx -y @prom.codes/context-mcp@latest
|
|
21
9
|
```
|
|
22
10
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
11
|
+
`claude mcp add` defaults to local scope (just you); add `--scope project` to
|
|
12
|
+
write a committable `.mcp.json`, or `--scope user` for all your projects. Other
|
|
13
|
+
MCP hosts (Cursor, VS Code) use the same command/args in their own config.
|
|
14
|
+
|
|
15
|
+
## Configuration
|
|
16
|
+
|
|
17
|
+
- **`PROMETHEUS_API_KEY`** (required for semantic search) — a real key minted at
|
|
18
|
+
[app.prom.codes/app/api-keys](https://app.prom.codes), shape
|
|
19
|
+
`prom_live_<tag>_<secret>`. Embeddings route through the managed prom.codes
|
|
20
|
+
proxy — you never bring your own provider key. Without a valid key, code
|
|
21
|
+
search **degrades gracefully** to lexical (keyword) + symbol-graph retrieval
|
|
22
|
+
(no embeddings needed) and every structural tool still works.
|
|
23
|
+
- **Workspace root is auto-detected** — no need to set `PROMETHEUS_WORKSPACE_ROOT`.
|
|
24
|
+
Claude Code passes the open project via `CLAUDE_PROJECT_DIR`; Cursor/VS Code via
|
|
25
|
+
the MCP `roots` capability. Set it only to point at a different folder.
|
|
26
|
+
- The index is a local SQLite DB at `~/.prometheus/<hash>.db` (one per project).
|
|
27
|
+
Your code never leaves your machine — only embedding *text* transits to the proxy.
|
|
28
|
+
|
|
29
|
+
Tools: `search_code`, `get_symbol`, `find_references`, `find_callers`,
|
|
30
|
+
`find_callees`, `expand_context`, `get_file`, `list_changed_since`,
|
|
31
|
+
`list_workspaces`, `framework_overview`.
|
|
27
32
|
|
|
28
33
|
## Native modules
|
|
29
34
|
|
|
@@ -32,6 +37,8 @@ Prebuilt binaries are fetched automatically on the mainstream platforms
|
|
|
32
37
|
(macOS x64/arm64, Linux x64, Windows x64) — no compiler needed. On other
|
|
33
38
|
platforms (e.g. Linux/Windows arm64) or a Node ABI without a prebuild, install
|
|
34
39
|
C/C++ build tools so the native modules can compile (Windows: VS Build Tools).
|
|
40
|
+
If `npx` skips the native build under a hardened npm (`ignore-scripts=true`),
|
|
41
|
+
install globally once and point Claude Code at the built binary — see the docs.
|
|
35
42
|
Requires Node ≥ 20.10.
|
|
36
43
|
|
|
37
|
-
Docs: https://prom.codes/docs
|
|
44
|
+
Docs: https://prom.codes/docs/mcp/claude-code
|
package/dist/bin.js
CHANGED
|
@@ -8946,7 +8946,7 @@ ${hyp}`;
|
|
|
8946
8946
|
if (vectorError !== null)
|
|
8947
8947
|
return;
|
|
8948
8948
|
vectorError = err instanceof Error ? err.message : String(err);
|
|
8949
|
-
console.error(`[context-mcp] search_code: vector (semantic) search unavailable \u2014 falling back to lexical + symbol-graph. Likely a missing/invalid embedding API key; set PROMETHEUS_API_KEY
|
|
8949
|
+
console.error(`[context-mcp] search_code: vector (semantic) search unavailable \u2014 falling back to lexical + symbol-graph. Likely a missing/invalid embedding API key; set PROMETHEUS_API_KEY to a real minted prom_live_<tag>_<secret> key (mint at app.prom.codes/app/api-keys) to enable semantic ranking. Cause: ${vectorError}`);
|
|
8950
8950
|
}
|
|
8951
8951
|
});
|
|
8952
8952
|
let ordered = pool;
|
|
@@ -8981,7 +8981,7 @@ ${hyp}`;
|
|
|
8981
8981
|
};
|
|
8982
8982
|
if (vectorError !== null) {
|
|
8983
8983
|
payload.degraded = "lexical+graph-only";
|
|
8984
|
-
payload.note = "Semantic (vector) search was unavailable \u2014 results are lexical (keyword) + symbol-graph only, which can rank less precisely on concept queries. Set
|
|
8984
|
+
payload.note = "Semantic (vector) search was unavailable \u2014 results are lexical (keyword) + symbol-graph only, which can rank less precisely on concept queries. Set PROMETHEUS_API_KEY to a real minted prom_live_<tag>_<secret> key (app.prom.codes/app/api-keys) to enable semantic ranking.";
|
|
8985
8985
|
payload.vectorError = vectorError;
|
|
8986
8986
|
}
|
|
8987
8987
|
return textResult(payload);
|