Send an MCP message
Handle a single JSON-RPC 2.0 message from an MCP client, per the MCP Streamable HTTP transport.
The server is stateless: every request is self-contained and carries the caller’s
credential, so there is no session to establish or resume. GET and DELETE on this
path return 405 Method Not Allowed.
Requests (messages with an id) are answered with the JSON-RPC response, either as
application/json or as a text/event-stream carrying the response and any notifications
emitted while it runs. Requests must accept both. Notifications and responses
(messages without an id) are answered with 202 Accepted and an empty body.
Authorizations
API key authentication using Bearer token format: Bearer <api_key>
Headers
Must list both application/json and text/event-stream.
Protocol revision negotiated during initialize, echoed on every subsequent request.
Omitted on the initialize request itself.
"2025-06-18"
Body
A JSON-RPC 2.0 message. A request carries id and method and is answered with a
response; a notification carries method without id and is not. The method and
params values are defined by the MCP specification.
JSON-RPC protocol version. Always 2.0.
2.0 MCP method, such as initialize, tools/list, or tools/call.
Request identifier, echoed on the response. Omitted for notifications.
Method parameters as defined by the MCP specification.
Response
JSON-RPC response to the request
A JSON-RPC 2.0 response. Exactly one of result or error is present.
JSON-RPC protocol version. Always 2.0.
2.0 Identifier of the request this responds to.
Method result as defined by the MCP specification.
A JSON-RPC 2.0 error. Failures inside a tool are reported in the tool result with isError, not here.