You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: mcp-package/README.md
+14-5Lines changed: 14 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,9 +22,14 @@ npx codegraph-mcp-fetch-engine # --force re-downloads an engine that is
22
22
```
23
23
24
24
For air-gapped machines, or if you vendor the binary yourself, set
25
-
`CODEGRAPH_SKIP_BINARY_FETCH=1` to skip the download and place the engine at
26
-
`<package>/bin/codegraph-server-<platform>-<arch>` (`.exe` on Windows) yourself -
27
-
that is the path `codegraph-mcp` launches.
25
+
`CODEGRAPH_SKIP_BINARY_FETCH=1` to skip the download and supply the engine one
26
+
of two ways:
27
+
28
+
- place it at `<package>/bin/codegraph-server-<platform>-<arch>` (`.exe` on
29
+
Windows) - the path `codegraph-mcp` launches by default; or
30
+
- point `CODEGRAPH_SERVER_PATH` at the engine wherever it already lives. This
31
+
wins over the bundled path, and `codegraph-mcp` fails with a clear message
32
+
rather than falling back if nothing is there.
28
33
29
34
## Usage
30
35
@@ -62,13 +67,17 @@ Pass flags after `--`:
62
67
}
63
68
```
64
69
70
+
Leave the transport out of `args`: `codegraph-mcp` already puts the engine in
71
+
MCP (stdio) mode, so `--mcp`, `--stdio` and `--connect` are dropped from
72
+
whatever the client passes rather than forwarded twice.
73
+
65
74
| Flag | Default | Description |
66
75
|------|---------|-------------|
67
76
|`--workspace <path>`| current dir | Directories to index (repeatable) |
68
77
|`--exclude <dir>`| — | Directories to skip (repeatable) |
69
-
|`--embedding-model <model>`|`bge-small`|`bge-small`, `jina-code-v2`, `granite-97m` (32K, multilingual), or `static` (model2vec, ~100× faster indexing, ~90% of BGE quality; needs a local model dir via `CODEGRAPH_STATIC_MODEL`) |
78
+
|`--embedding-model <model>`|`bge-small`|`bge-small`, `jina-code-v2`, `granite-97m` (32K, multilingual), or `static` (model2vec, ~100× faster indexing, ~90% of BGE quality; needs a local model dir - this install downloads one to `~/.codegraph/static_models/jina-code-static-256`, or point `CODEGRAPH_STATIC_MODEL` elsewhere) |
70
79
|`--max-files <n>`| 5000 | Maximum files to index |
"codegraph.embeddingModel":"bge-small", // or "static" for ~100× faster indexing
65
-
"codegraph.staticModelPath":"", //required when embeddingModel is "static": the model2vec model dir
65
+
"codegraph.staticModelPath":"", //only to override the default model2vec model dir
66
66
"codegraph.maxFileSizeKB":1024,
67
67
"codegraph.codeLens.enabled":true, // caller / test / complexity counts above functions
68
68
"codegraph.hover.enabled":true, // the same stats on hover
@@ -71,7 +71,8 @@ CodeGraph's Symbols and Memories views live in the CodeGraph activity-bar contai
71
71
```
72
72
73
73
The static (model2vec) model is not bundled with the extension.
74
-
Distill one with [`scripts/distill_static_model.py`](https://github.com/codegraph-ai/codegraph/blob/main/scripts/distill_static_model.py), or reuse the copy the `@astudioplus/codegraph-mcp` npm install puts in `~/.codegraph/static_models/jina-code-static-256`, and point `codegraph.staticModelPath` at it.
74
+
The engine looks for it in `~/.codegraph/static_models/jina-code-static-256`, which is where the `@astudioplus/codegraph-mcp` npm install puts it, so a model in that location needs no setting at all.
75
+
Set `codegraph.staticModelPath` only to point at a model somewhere else - for instance one you distilled yourself with [`scripts/distill_static_model.py`](https://github.com/codegraph-ai/codegraph/blob/main/scripts/distill_static_model.py).
75
76
76
77
Full-body embeddings are enabled by default. Function body text is captured at parse time with zero I/O overhead.
Copy file name to clipboardExpand all lines: vscode/package.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -304,15 +304,15 @@
304
304
"enumDescriptions": [
305
305
"BGE-Small-EN-v1.5 (384d) — fast, good quality with full-body embeddings. ~127MB download.",
306
306
"Jina Code V2 (768d) — 6x slower indexing, no quality advantage with full-body embeddings. ~642MB download.",
307
-
"Static (model2vec, 256d) — ~100x faster indexing, no ONNX runtime or 1.5GB RAM gate, ~90% of BGE quality in hybrid search. Requires a local model dir in codegraph.staticModelPath."
307
+
"Static (model2vec, 256d) — ~100x faster indexing, no ONNX runtime or 1.5GB RAM gate, ~90% of BGE quality in hybrid search. Needs a local model dir: ~/.codegraph/static_models/jina-code-static-256 by default, or codegraph.staticModelPath."
308
308
],
309
309
"description": "Embedding model for semantic search and code similarity"
310
310
},
311
311
"codegraph.staticModelPath": {
312
312
"type": "string",
313
313
"default": "",
314
314
"scope": "resource",
315
-
"description": "Directory of the model2vec static model (config.json + tokenizer.json + model.safetensors). Required when embeddingModel is 'static' - the model is not bundled with the extension. Installing @astudioplus/codegraph-mcp from npm puts a copy in ~/.codegraph/static_models/jina-code-static-256, or distill one with scripts/distill_static_model.py."
315
+
"description": "Directory of the model2vec static model (config.json + tokenizer.json + model.safetensors). Only set this to use a model outside the default location: left empty, the engine resolves ~/.codegraph/static_models/jina-code-static-256, which is where installing @astudioplus/codegraph-mcp from npm puts it. The model is not bundled with the extension - distill one with scripts/distill_static_model.py if you have neither."
0 commit comments