Integration: Custom MCP Client
Coverage status
Section titled “Coverage status”This guide is scoped to Coder 0.6.32. Its configured MCP URL is http://127.0.0.1:8000/mcp/, using HTTP MCP. A client must support that transport and be able to reach the process on your computer. This is separate from the provider harness on port 8080.
- Install and activate Coder using the current install selector.
- Register your repository through Coder’s project setup. Check
memstrata-coder project list --json. - Check
memstrata-coder doctor. If the API is not running, startmemstrata-coder api --port 8000; do not duplicate a service already started by Setup. - Add the HTTP MCP URL to your client using its supported configuration format.
- Initialize the MCP connection and discover
tools/list. Calllist_code_projects, thenget_code_contextwith a returned project ID.
The URL is loopback-only. In a remote IDE or container, 127.0.0.1 refers to that environment, not necessarily your desktop. Do not expose the service publicly to work around a connection problem.
What’s captured
Section titled “What’s captured”A successful get_code_context result can record context-delivery telemetry. It does not prove that a model consumed the pack, that every coding turn called the tool, or that provider requests passed through the harness.
The four code-context tools and their scope are documented in the API reference. Discover the installed schemas; the old context_query, index_status, savings_summary and memstrata mcp --stdio examples are not this release’s contract.
remember_verified_code_fact writes to a local ledger. Do not enable or invoke write tools without intending that change.
Troubleshooting
Section titled “Troubleshooting”- No tools: verify that the API service, not only the harness, is running. Check the client’s MCP connection log and the installed tool list.
project_required: choose a project ID returned bylist_code_projects.not_indexedor empty context: wait for the registered project to finish indexing. Do not treat the empty result as evidence that the repository contains nothing relevant.- Remote client cannot connect: confirm where the client and service run. Loopback addresses are machine-local.
- Savings absent: context retrieval and provider routing are separate. See Telemetry and savings; neither a green connection icon nor a successful tool listing proves paid savings.
Use the MCP SDK or your host’s supported client rather than a hand-written one-line JSON-RPC example that skips initialization, notifications, or transport framing.