feat: proxy Codebase Memory through LocalCodingMcp - #8
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e8552aa6e9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| curl -fsS -o /tmp/local-init.body \ | ||
| -H 'Content-Type: application/json' \ | ||
| -H 'Accept: application/json, text/event-stream' \ | ||
| --data "$init" \ | ||
| http://127.0.0.1:5000/mcp |
There was a problem hiding this comment.
Reuse the initialized LocalCodingMcp session
The LocalCodingMcp server uses the default stateful WithHttpTransport() registration (McpServerRegistration.cs:153-154), but this initialization response discards its headers and the later tools/list and tools/call requests neither send notifications/initialized nor an Mcp-Session-Id. Consequently, the smoke test operates outside the initialized session and fails before verifying the proxy. Capture and reuse the session exactly as the sidecar handshake earlier in this workflow does.
Useful? React with 👍 / 👎.
| [McpServerTool, Description("Invoke a tool advertised by the Codebase Memory MCP sidecar through LocalCodingMcp. The tool must appear in codebase_memory_list_tools. Pass arguments_json as a JSON object matching that tool's input schema.")] | ||
| public async Task<string> CodebaseMemoryCall( | ||
| [Description("Exact Codebase Memory tool name returned by codebase_memory_list_tools, such as get_architecture, search_graph, trace_path, detect_changes, or check_index_coverage.")] string tool, | ||
| [Description("JSON object containing the remote tool arguments. Defaults to {}.")] string argumentsJson = "{}", |
There was a problem hiding this comment.
Expose the documented arguments_json parameter
This parameter is advertised in the generated MCP input schema as argumentsJson, while the tool description, built-in skill, and public examples all instruct callers to send arguments_json. Calls following those instructions cannot bind the supplied JSON to this optional parameter, so the proxy receives its default {} instead and tools requiring arguments fail. Rename the parameter to arguments_json, consistent with the other MCP tool parameters in this repository.
Useful? React with 👍 / 👎.
Integrate the Codebase Memory sidecar behind LocalCodingMcp so clients can use a single MCP endpoint. Adds internal MCP client/proxy tools, graceful unavailable status, configuration, tests, and docs. Draft while TDD/CI is in progress.