> ## Documentation Index
> Fetch the complete documentation index at: https://bundleup.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP

> Forward MCP messages to the connected provider’s MCP server with the user’s credentials.

The streamable HTTP MCP endpoint. Send JSON-RPC MCP messages with `POST`, open a server stream with `GET`, and end a session with `DELETE`. Each message goes to the MCP server of the connection’s provider, with the user’s access token. Bodies and responses pass through unchanged.

Guides: [MCP overview](/docs/guides/mcp/overview), [How Proxy MCP works](/docs/guides/mcp/proxy-mcp), [Using MCP clients](/docs/guides/mcp/clients).

## Headers

<ParamField header="Authorization" type="string" required>
  `Bearer YOUR_API_KEY`, or `Bearer YOUR_API_KEY.CONNECTION_ID` for clients that accept only one credential. Replaced with the user’s token before forwarding.
</ParamField>

<ParamField header="BU-Connection-Id" type="string">
  The connection to use. Required unless it’s appended to the API key.
</ParamField>

<ParamField header="Mcp-Session-Id" type="string">
  The session ID returned by the provider on `initialize`. Passed through.
</ParamField>

<ParamField header="Accept" type="string">
  Usually `application/json, text/event-stream`. Passed through.
</ParamField>

## Body

A JSON-RPC 2.0 MCP message, passed through unchanged.

## Response

The provider’s response, unchanged: JSON or `text/event-stream`, with the provider’s `Mcp-Session-Id`. If BundleUp rejects the request first, you get an HTTP error with a JSON body, not a JSON-RPC error. See [errors](/docs/api-reference/errors#proxy-and-mcp-errors).

## Behaviour

* The URL path and query string are ignored. The connection selects the upstream server.
* No retries.
* Every message counts toward the 100-per-60-seconds limit per connection.

<RequestExample>
  ```bash tools/list theme={null}
  curl https://mcp.bundleup.io \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "BU-Connection-Id: conn_abc123" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json, text/event-stream" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
  ```

  ```typescript MCP SDK theme={null}
  const { url, headers } = bundleup.mcp('conn_abc123').transport();

  const mcp = new Client({ name: 'my-agent', version: '1.0.0' });
  await mcp.connect(new StreamableHTTPClientTransport(new URL(url), { requestInit: { headers } }));
  const { tools } = await mcp.listTools();
  ```
</RequestExample>

<ResponseExample>
  ```json 200 (from the provider) theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
      "tools": [
        {
          "name": "create_issue",
          "description": "Create a new issue",
          "inputSchema": { "type": "object", "properties": { "title": { "type": "string" } } }
        }
      ]
    }
  }
  ```

  ```json 400 theme={null}
  { "status": 400, "code": "mcp_not_supported", "message": "MCP is not supported for this integration" }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.