MCP endpoint
POST/api/mcp
Memtro as a stateless Streamable HTTP MCP server: memory and connector tools for any MCP client.
Memtro is a Model Context Protocol server at https://platform.memtro.com/api/mcp: memory tools and every connector tool the key can use, as the key's holder. This page is the endpoint's transport facts; the MCP server guide has client setup, and the Tools reference every tool.
The transport is Streamable HTTP, stateless, with JSON responses rather than an event stream: each request is complete in itself, with no session to keep. POST, GET and DELETE are all answered by the same handler. A request may run for up to two minutes.
Example
Against https://platform.memtro.com, with your key in MEMTRO_API_KEY.
curl "https://platform.memtro.com/api/mcp?tools=memory" \
-H "Authorization: Bearer $MEMTRO_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2025-06-18", "capabilities": {}, "clientInfo": {"name": "curl", "version": "1"}}}'
A refused key: JSON-RPC, not the OpenAI envelope.
{ "jsonrpc": "2.0", "error": { "code": -32001, "message": "Invalid or revoked API key" }, "id": null }
Authentication
An API key, as Authorization: Bearer or x-api-key. A tool narrowing stored on the key applies, and the query string can only narrow further.
- This route sets no request id header.
Query parameters
toolsstringOptionalmemoryserves thememtro_*tools alone.actionsstringOptionalnonedrops every tool that changes anything.connectorsstringOptionalA comma-separated list of connector kinds, such as
xero,github: only those systems' tools.shapestringOptionalsystem: one tool per connected system;operation: one tool per operation. A key can store its own default.
Request body
A JSON-RPC 2.0 message, as the MCP specification defines.
Response
200application/json
The JSON-RPC response the MCP specification defines.
Errors
As a JSON-RPC error, {"jsonrpc": "2.0", "error": {"code", "message"}, "id": null}, with the HTTP status set.
| Status | JSON-RPC code | When |
|---|---|---|
| 401 | -32001 | The key is missing, malformed, revoked or expired. The reply carries |
| 402 | -32001 | The organisation has no active subscription. |
Notes
A value the server does not recognise in the query string (?tools=everything, an unknown connector) is not refused: it is reported in the server's instructions, where the client will read it. An unknown tools, actions or shape value leaves that setting at its default; an unknown connector is left out, so a connectors list naming none that exist serves no connector tools.