Skip to content

Coder API Reference

This page describes MemStrata Coder 0.6.32, checked against its release source on October 13, 2026. Coder, Conversational, Structured and Governance have separate packages and interfaces. This is not a shared “5.2.x” API version.

ServiceDefault addressPurpose
Coder API / MCPhttp://127.0.0.1:8000/mcp/HTTP MCP tools for a registered code project
Provider harnesshttp://127.0.0.1:8080Explicitly routed provider requests and their telemetry

Setup may already start these services. Check memstrata-coder status and memstrata-coder doctor before starting another copy. If needed, memstrata-coder api --port 8000 starts the local API; memstrata-coder start --port 8080 starts the provider harness. Keep them bound to loopback.

The old examples memstrata serve, memstrata mcp --stdio, and an MCP server on port 8080 do not describe this release’s Coder setup. Use the Coder guide and custom MCP setup.

Use your MCP client’s initialization and tools/list discovery to inspect the installed server’s actual schemas. Do not assume the three legacy names context_query, index_status, and savings_summary are the current Coder contract.

Coder 0.6.32 registers these code-context tools; the underlying server can expose additional tools:

ToolPurpose
list_code_projectsDiscover registered code projects
get_code_contextRetrieve a context pack for a selected project and optional query
remember_verified_code_factExplicitly write a fact supported by a quote in the current registered source
get_verified_code_factCheck a stored fact against its current-source evidence

A fact-writing tool changes local state. Enable it only when that action is intended. Context delivery telemetry is not proof that a downstream model used the context.

Arguments in this release:

{
"project_id": "your-registered-project-id",
"query": "AuthService.login and its callers"
}

Both fields are strings. An omitted project can resolve to the active or sole registered project; if a choice is needed, the result is project_required. Use the project IDs returned by discovery rather than inventing one.

A successful result includes project_id, status, context, block_hash, pack_tokens, raw_codebase_tokens, estimated_tokens_avoided, and source_paths. These are fields inside the tool result, not the MCP protocol envelope. Other results can be not_indexed or project_required; an empty pack is not a complete repository view.

The source-backed signature does not expose the old max_tokens or include_tests arguments. Discover the installed schema before calling any version.

For the provider harness on its default port:

Terminal window
curl http://127.0.0.1:8080/

Illustrative response for Coder 0.6.32:

{ "status": "alive", "version": "0.6.32" }

GET /health/detail and GET /health/routing provide more diagnostics. The earlier examples of GET /health, GET /status, and Prometheus GET /metrics were not verified endpoints for this release and should not be used as its contract.

The harness supports these protocol routes in the reviewed release:

RouteProtocol
POST /v1/chat/completionsOpenAI-compatible chat completions
POST /v1/responsesOpenAI-compatible Responses
POST /v1/messagesAnthropic-compatible Messages
POST /api/chat, POST /api/generateOllama-compatible requests
POST /v1beta/models/{model_path}, POST /v1/models/{model_path}Supported Gemini-compatible paths

Project- and provider-scoped route variants also exist. Use the routing configuration generated for your installed Coder setup. Protocol compatibility is not a promise that every upstream feature, model, or client is supported. A request sent directly to a provider does not pass through this harness.

Use your client’s credential handling or the product’s OS credential vault. Do not put real keys in shared examples, shell history, or committed configuration. MCP context access and provider routing are separate connections.

Savings are a counterfactual, not a naive-RAG benchmark

Section titled “Savings are a counterfactual, not a naive-RAG benchmark”

The published Coder example compares actual input with a one-time full-repository session-start counterfactual, not “what naive RAG would have sent.” Visible turns and model invocations are different units. A context pack’s estimated avoided tokens are not a paid invoice saving or an independent quality score.

See Telemetry and savings for the four-turn measurement, denominator, formula, and limitations. Provider rates change; use your actual provider plan instead of copying a stale price table.

Inspect the installed CLI’s help and current configuration:

Terminal window
memstrata-coder --version
memstrata-coder config get
memstrata-coder doctor

Review output for secrets before sharing it.