---
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.

## Changes

- **2026-05-07** `f6728b372006` — 2 info
  - added the non-success response with the status `401`
  - added the non-success response with the status `403`
- **2026-05-04** `6e68f5c91efd` — 1 info
  - endpoint added
- **2025-03-18** `dd94571fef79` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/spiceai/apis/runtime/changes/v1/mcp/post.md)

---

[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/f4bb5537fc13/schema)
