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
fix(mcp): address Copilot + CodeRabbit review comments on T1 PR
- Fix stale entry point references in design doc: api.mcp.server:app → :main
- Remove contradicting decisions about tree-sitter/incremental indexing scope
- Add language tags to fenced code blocks (MD040)
- Add anyio.fail_after timeout to stdio smoke test to prevent CI hangs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/MCP_SERVER_DESIGN.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,13 +15,13 @@ Phase 1 also bundles three foundational improvements to `api/` that the MCP serv
15
15
## Key Decisions Made
16
16
17
17
-**Mono-repo**: Build inside `code-graph/api/mcp/`, not a separate project. One pip package, one repo.
18
-
-**Module path is `api/mcp/`, NOT top-level `mcp/`**: A top-level `mcp/` directory would shadow the installed `mcp` PyPI SDK and break `from mcp.server.fastmcp import FastMCP`. Entry point: `cgraph-mcp = "api.mcp.server:app"`.
18
+
-**Module path is `api/mcp/`, NOT top-level `mcp/`**: A top-level `mcp/` directory would shadow the installed `mcp` PyPI SDK and break `from mcp.server.fastmcp import FastMCP`. Entry point: `cgraph-mcp = "api.mcp.server:main"`.
19
19
-**Python MCP server**: Use the official `mcp` Python SDK (`from mcp.server.fastmcp import FastMCP`), NOT standalone `fastmcp` or Node.js. Avoids language bridge.
20
20
-**Reuse everything**: Most code already exists. The MCP tools are thin wrappers around `api/graph.py`, `api/project.py`, `api/cli.py`, and `api/llm.py`.
21
21
-**GraphRAG SDK powers the ask tool**: `kg.ask()` does NL-to-Cypher. Code-graph's `api/llm.py` already integrates this — repackage for MCP.
22
22
-**Reuse the existing hand-coded ontology** from `api/llm.py:_define_ontology()` (lines 26–233) rather than auto-extracting via `Ontology.from_kg_graph()`. The hand-coded version has richer entity attributes and descriptions tuned for code. Refactor: rename `_define_ontology` → `define_ontology` so the MCP module can import it.
23
-
-**Ship with 3 languages** (Python/Java/C#), add tree-sitter for broad coverage in Phase 2.
24
-
-**No incremental indexing in v1**: Full re-indexing is sufficient. Deferred to Phase 3.
23
+
-**11 languages in Phase 1**: Python/JS/Kotlin via tree-sitter (refactored onto a shared base class in T15), Go/Rust/TypeScript/Ruby/C/C++ added in T16, Java/C# stay on multilspy.
24
+
-**Incremental indexing in Phase 1**: file-hash-based skip-unchanged, default-on once a `(project, branch)` graph exists (T18). Full re-index via `--full` (CLI) or `incremental=False` (MCP).
25
25
-**No Graphiti/memory or raw FalkorDB MCP in v1**: Out of scope. Available as separate servers. Architecture supports merging later.
26
26
-**Auto-init for zero config**: ensure-db auto-starts FalkorDB Docker, auto-index on first tool call, auto-GraphRAG init.
27
27
-**Expose Cypher in ask responses**: Transparency for the agent + learning patterns.
@@ -34,7 +34,7 @@ Phase 1 also bundles three foundational improvements to `api/` that the MCP serv
│ └── mcp/ # NEW — MCP server module (under api/ to avoid shadowing the installed `mcp` SDK)
@@ -69,7 +69,7 @@ code-graph/
69
69
│ ├── test_ask.py # T11 — mocked LLM, real Cypher against fixture
70
70
│ ├── test_auto_init.py # T12
71
71
│ └── test_init_agent.py # T13
72
-
└── pyproject.toml # Adds `cgraph-mcp = "api.mcp.server:app"` and `mcp>=1.0,<2.0`
72
+
└── pyproject.toml # Adds `cgraph-mcp = "api.mcp.server:main"` and `mcp>=1.0,<2.0`
73
73
```
74
74
75
75
**Note on test layout:** Each tool ticket ships its own integration + MCP-protocol round-trip tests in the same PR — there is no separate "integration tests" or "protocol tests" milestone. The previous `integration/` and `e2e/` subdirectories are removed in favor of per-tool test files. Real-LLM E2E is deferred to Phase 1.5.
@@ -276,7 +276,7 @@ Each tool ticket ships impl + unit + integration + protocol round-trip in a sing
276
276
- Real-LLM nightly E2E with API-key secrets (was a row in the CI table)
0 commit comments