context-mcp-server 1.0.2 → 1.0.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.
@@ -9,7 +9,7 @@ description: >
9
9
  # Context-MCP — Claude Usage Guide
10
10
 
11
11
  Persistent memory + codebase knowledge graph for Claude.
12
- Every conversation starts with `context.resume`. Every structural question uses `codegraph_query`. Files only read for bugs/logic.
12
+ Every conversation starts with `context.resume`. Every codebase question uses `codegraph_query`. Files only read for bugs/logic.
13
13
 
14
14
  ---
15
15
 
@@ -45,42 +45,31 @@ Always pass `project`. Auto-compact fires at >50 entries — oldest summarized a
45
45
 
46
46
  ## 3. CodeGraph Pipeline
47
47
 
48
- ### Step 1 — Build (once per project, free)
48
+ ### Step 1 — Build (once per project, fast, local)
49
49
  ```
50
50
  codegraph_build(path)
51
- → AST: code files → functions, classes, imports, edges
52
- → Config: .yaml .toml .sql → schema nodes
53
- → Docs: .md .txt .pdf → pending (no content yet)
54
51
  ```
55
- Saves graph to `~/.context-mcp/graphs.json`. Visible on `context.resume`.
52
+ - Parses codebase into AST graph using tree-sitter (regex fallback for unsupported languages)
53
+ - Extracts functions, classes, imports, call edges for all code files
54
+ - Build files (package.json, pyproject.toml, go.mod, Dockerfile, etc.) get a single metadata node
55
+ - Saves graph to `~/.context-mcp/graphs.json`. Visible on `context.resume`.
56
56
 
57
- ### Step 2 — Enrich (one-time cost per file)
57
+ ### Step 2 — Query (free, instant, forever)
58
58
  ```
59
- codegraph_extract(path)
60
- → returns changed code files (with existing node list) + doc files (raw text)
61
-
62
- For each code file: write description for each node listed in existing_nodes
63
- For each doc file: extract concept nodes + relationships
64
-
65
- codegraph_add_nodes(path, nodes)
66
- → stores descriptions in semantic cache (never overwritten by rebuild)
67
- ```
68
-
69
- ### Step 3 — Query (free, instant forever)
70
- ```
71
- codegraph_query(path, question) → NODE/EDGE subgraph, token_budget param (default 2000)
72
- codegraph_explain(path, node) → one node: description + depends_on + used_by
73
- codegraph_path(path, from, to) → shortest path between two concepts
74
- codegraph_nodes(path, type) → list all nodes of a type
75
- codegraph_report(path) → god nodes, clusters, surprises
59
+ codegraph_query(path, question) → fetch any details about the codebase
60
+ codegraph_explain(path, node) one node: type, file, depends_on, used_by
61
+ codegraph_path(path, from, to) → shortest path between two concepts
62
+ codegraph_nodes(path, type) → list all nodes of a type
63
+ codegraph_report(path) → god nodes, clusters, surprises
76
64
  ```
77
65
 
78
66
  ---
79
67
 
80
68
  ## 4. Graph vs File
81
69
 
82
- **Graph** — structural questions: dependencies, callers, imports, paths between concepts.
83
- **File** — bugs, logic inside a function, tracing unexpected behavior.
70
+ **Graph** — use for any question about what exists in the codebase: finding functions, classes, files, understanding what a module contains, dependencies, callers, imports, paths between concepts.
71
+
72
+ **File** — use for bugs, logic inside a specific function, tracing unexpected behavior.
84
73
 
85
74
  ---
86
75
 
@@ -91,4 +80,3 @@ codegraph_report(path) → god nodes, clusters, surprises
91
80
  3. **`search` before asking** — if user references past work, find it first
92
81
  4. **`codegraph_query` before reading files** — graph is faster and cheaper
93
82
  5. **Read files for bugs/logic** — graph is structure only, not behavior
94
- 6. **Enrich once** — run extract → add_nodes once per project; descriptions persist forever
@@ -1,7 +1,7 @@
1
1
  # Context-MCP — Gemini CLI Usage Guide
2
2
 
3
3
  Persistent memory + codebase knowledge graph.
4
- Every conversation starts with `context.resume`. Every structural question uses `codegraph_query`. Files only read for bugs/logic.
4
+ Every conversation starts with `context.resume`. Every codebase question uses `codegraph_query`. Files only read for bugs/logic.
5
5
 
6
6
  ---
7
7
 
@@ -37,21 +37,15 @@ Always pass `project`. Auto-compact fires at >50 entries.
37
37
 
38
38
  ## 3. CodeGraph Pipeline
39
39
 
40
- ### Step 1 — Build (once, free)
40
+ ### Step 1 — Build (once, fast, local)
41
41
  ```
42
42
  codegraph_build(path) → AST graph: functions, classes, imports, edges
43
43
  ```
44
44
 
45
- ### Step 2 — Enrich (one-time per file)
45
+ ### Step 2 — Query (free, instant)
46
46
  ```
47
- codegraph_extract(path) file content + node list
48
- codegraph_add_nodes(path, nodes) semantic descriptions (permanent cache)
49
- ```
50
-
51
- ### Step 3 — Query (free, instant)
52
- ```
53
- codegraph_query(path, question) → NODE/EDGE subgraph (token_budget default 2000)
54
- codegraph_explain(path, node) → single node + neighbors
47
+ codegraph_query(path, question) fetch any details about the codebase
48
+ codegraph_explain(path, node) single node: type, file, connections
55
49
  codegraph_path(path, from, to) → shortest path
56
50
  codegraph_nodes(path, type) → list nodes by type
57
51
  codegraph_report(path) → full graph analysis
@@ -61,8 +55,8 @@ codegraph_report(path) → full graph analysis
61
55
 
62
56
  ## 4. Graph vs File
63
57
 
64
- **Graph** — structural questions: dependencies, callers, imports.
65
- **File** — bugs, logic, tracing behavior.
58
+ **Graph** — use for any question about what exists: finding functions, classes, files, dependencies, callers, imports, paths between concepts.
59
+ **File** — bugs, logic, tracing unexpected behavior.
66
60
 
67
61
  ---
68
62
 
@@ -73,4 +67,3 @@ codegraph_report(path) → full graph analysis
73
67
  3. **`search` before asking** — if user references past work, find it first
74
68
  4. **`codegraph_query` before reading files** — graph is faster and cheaper
75
69
  5. **Read files for bugs/logic** — graph is structure only, not behavior
76
- 6. **Enrich once** — descriptions persist forever