---
title: "Send an MCP message"
method: POST
path: "/mcp"
tags: ["MCP"]
---

# Send an MCP message

`POST /mcp`

Handle a single JSON-RPC 2.0 message from an MCP client, per the MCP
[Streamable HTTP transport](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports).

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.

## Headers

- `Accept` string, required
- `MCP-Protocol-Version` string

## Request body

- JSONRPCMessage — 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.
  - `jsonrpc` '2.0', required — JSON-RPC protocol version. Always `2.0`.
  - `id` union — Request identifier, echoed on the response. Omitted for notifications.
    - string
    - integer
  - `method` string, required — MCP method, such as `initialize`, `tools/list`, or `tools/call`.
  - `params` object — Method parameters as defined by the MCP specification.

## Response `200`

JSON-RPC response to the request

- JSONRPCResponse — A JSON-RPC 2.0 response. Exactly one of `result` or `error` is present.
  - `jsonrpc` '2.0', required — JSON-RPC protocol version. Always `2.0`.
  - `id` union, required — Identifier of the request this responds to.
    - string
    - integer
  - `result` object — Method result as defined by the MCP specification.
  - `error` JSONRPCError — A JSON-RPC 2.0 error. Failures inside a tool are reported in the tool result with `isError`, not here.
    - `code` integer, required — JSON-RPC error code.
    - `message` string, required — Short description of the error.
    - `data` unknown

## Other responses

- `202` — Notification or response accepted; no body is returned
- `400` — Malformed message, unsupported `MCP-Protocol-Version`, or an `Accept` header missing one of the required media types
- `401` — Missing or invalid credentials
- `413` — Request body larger than 4 MiB
- `415` — `Content-Type` is not `application/json`
- `500` — Internal server error

---

[API](https://skmtc.net/xataio/apis/xata-api.md) · [All operations](https://skmtc.net/xataio/apis/xata-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/xataio/xata-api/revisions/bbeb83bf32d6/schema)
