---
title: "Call the MCP server"
method: POST
path: "/api/mcp"
tags: ["mcp"]
---

# Call the MCP server

`POST /api/mcp`

## Request

- Base URL: `https://app.stuntdouble.io`
- URL: `https://app.stuntdouble.io/api/mcp`
- Auth: one of:
  - OAuth 2 (authorization code, authorization URL `https://app.stuntdouble.io/oauth/authorize`, token URL `https://app.stuntdouble.io/oauth/token`, scopes: `mcp:read`)
  - OAuth 2 (authorization code, authorization URL `https://app.stuntdouble.io/oauth/authorize`, token URL `https://app.stuntdouble.io/oauth/token`, scopes: `mcp:write`)
  - OAuth 2 (authorization code, authorization URL `https://app.stuntdouble.io/oauth/authorize`, token URL `https://app.stuntdouble.io/oauth/token`, scopes: `mcp:run`)

The Model Context Protocol server (Streamable HTTP transport). Send a JSON-RPC 2.0 request such as `initialize`, `tools/list` or `tools/call`. Requires an OAuth 2.1 bearer token carrying at least one of `mcp:read`, `mcp:write` or `mcp:run`; `tools/list` returns only the tools those scopes cover. Unauthenticated requests get 401 with a `WWW-Authenticate` header pointing at the protected resource metadata, which MCP clients use to start the OAuth flow.

## Headers

- `MCP-Protocol-Version` '2025-11-25' | '2025-06-18' | '2025-03-26' | '2024-11-05'
- `Mcp-Session-Id` string

## Request body

- JsonRpcRequest
  - `jsonrpc` '2.0', required
  - `id` union
    - string
    - integer
  - `method` string, required
  - `params` object

## Response `200`

A JSON-RPC response, as JSON or as a server-sent event stream.

- JsonRpcResponse
  - `jsonrpc` '2.0', required
  - `id` union
    - string
    - integer
  - `result` unknown
  - `error` object
    - `code` integer, required
    - `message` string, required
    - `data` unknown

## Other responses

- `401`: Missing or invalid bearer token.

---

[API](https://skmtc.dev/stuntdouble/apis/stunt-double-public-api.md) · [All operations](https://skmtc.dev/stuntdouble/apis/stunt-double-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/stuntdouble/apis/stunt-double-public-api/revisions/f7d32f1d1c42?raw)
