MCP endpoint contract and @keeptrusts/agent 0.1.0 limit
:::danger Do not use the 0.1.0 MCP helpers
This unlisted page is retained to explain a version-specific incompatibility. For a supported setup, follow Gateway-Hosted MCP.
:::
Keeptrusts exposes MCP on an enabled agent publication at:
https://<published-hostname>/mcp
The route uses remote streamable HTTP. A client must send an MCP initialize
request before methods such as tools/list and tools/call, preserve the
returned session identifier when required, and authenticate with a Keeptrusts
API token as a bearer token.
It is not a REST endpoint with a /tools child route.
Current Agent SDK mismatch
@keeptrusts/agent 0.1.0 exports createMcpGatewayClient,
buildMcpGatewayConfig, and getMcpTools, but they are not a protocol-compliant
client for the published endpoint:
getMcpToolssendsGET /toolsinstead of JSON-RPCtools/list;- no
initializeexchange is performed; - no MCP session ID is captured or reused;
- the builder appends
/mcpto the SDK's default gateway URL, producinghttp://localhost:41002/v1/mcp, while the gateway route is/mcpat the host root; - the builder's
headersobject contains tracing headers but not the bearer authorization value needed by an external client.
Do not use these exports to validate hosted MCP or discover its tools.
Supported client path
Configure a protocol-capable MCP client with:
- the active publication URL ending exactly in
/mcp; - remote streamable-HTTP transport;
- an active Keeptrusts API token in
Authorization: Bearer ...; - any client-specific bearer-token environment reference documented in Gateway-Hosted MCP.
Verify the connection with a successful initialize followed by a real
tools/list exchange. A generic HTTP 200 check is not enough to prove an MCP
session works.
Keep the gateway surfaces separate
| Surface | Purpose | Credential |
|---|---|---|
Published https://<host>/mcp | MCP tools and resources for an external MCP client | Keeptrusts API token |
Gateway model API under /v1 | OpenAI-compatible, Responses, Messages, and other configured model traffic | Gateway request token |
providers.targets[].mcp | Gateway-side calls to an external MCP backend | Credential required by that external backend |
Configuring one surface does not configure either of the others.
Publication requirements
The gateway returns a not-found response when its MCP server is disabled. The public route also requires an agent publication context and supports bearer authentication for the hosted MCP endpoint. Confirm the active publication URL before troubleshooting the client protocol.