---
title: "Send a Model Context Protocol message"
method: POST
path: "/v1/mcp"
tags: ["mcp"]
---

# Send a Model Context Protocol message

`POST /v1/mcp`

Send a JSON-RPC message to the Spice MCP server using the MCP Streamable HTTP transport. The response is either a single JSON-RPC response (`application/json`) or an SSE stream (`text/event-stream`), selected via the `Accept` header. Session continuity is carried via the `Mcp-Session-Id` header.

## Response `200`

JSON-RPC response. Returned as `application/json` for a single response or `text/event-stream` when the server streams additional messages.

## Other responses

- `202` — Message accepted (for JSON-RPC notifications / responses that do not require a reply).
- `400` — Malformed JSON-RPC payload.
- `401` — Unauthorized. The `/v1/mcp` endpoint requires `runtime.auth` to be configured. Configure an API key provider in your Spicepod and retry with credentials.
- `403` — Forbidden. The `Host` header value is not in the `runtime.mcp.allowed_hosts` list. Configure `runtime.mcp.allowed_hosts` or set it to `["*"]` to allow all hosts.
- `404` — Unknown or expired `Mcp-Session-Id`.
- `413` — Payload too large. Maximum allowed size is 32 MiB.

---

[API](https://skmtc.dev/spiceai/apis/runtime.md) · [All operations](https://skmtc.dev/spiceai/apis/runtime/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/spiceai/runtime/revisions/fb597a4eaa56/schema)
