---
search:
  tags:
    - McpTransport
    - POST
seo:
  description: >-
    Model Context Protocol endpoint over Streamable HTTP. Send JSON-RPC requests
    here to list and call… Reference for the POST /mcp endpoint in the varsafe
    API.
sidebar:
  label: MCP transport (JSON-RPC request)
  badge: POST
title: MCP transport (JSON-RPC request)
type: openapi-operation
---
Model Context Protocol endpoint over Streamable HTTP. Send JSON-RPC requests here to list and call varsafe tools. Requires an OAuth 2.1 access token whose granted scopes cover the tool being called; an unauthenticated request answers 401 with a WWW-Authenticate header pointing at the protected-resource metadata.

`POST /mcp`

**Responses**

- `200` — The JSON-RPC response(s), delivered as a server-sent event stream. The request must \`Accept\` both \`application/json\` and \`text/event-stream\`.
- `202` — Accepted: the message carried only notifications or responses, so no reply.
- `400` — The body is not a valid JSON-RPC message, or names an unsupported MCP protocol version.
- `401` — No bearer token, or it is invalid, expired or revoked. The \`WWW-Authenticate\` header names the protected-resource metadata.
- `403` — The token lacks the grant the transport requires.
- `406` — The \`Accept\` header must allow both \`application/json\` and \`text/event-stream\` (\`GET\` needs \`text/event-stream\`).
- `415` — The request \`Content-Type\` must be \`application/json\`.
- `429` — Too many rejected authentication attempts.
- `500` — Unexpected server error. The body never carries internal detail.
- `503` — Token verification is temporarily unavailable. Retry later.

Response example, 200:

```json
"string"
```
