# Call the hosted MCP server

<div class="api-op" data-api-operation>
<div class="api-op__main">

<p class="api-endpoint"><span class="method method-post">POST</span> <code>/mcp</code></p>

Served by the dedicated mcp role. Stateless Streamable HTTP with one JSON-RPC 2.0 message per POST, JSON responses, and no SSE stream. Supports protocol versions 2025-06-18 and 2025-11-25. Initialize negotiates a supported version; subsequent requests must supply MCP-Protocol-Version. Restricted secret keys require mcp:use and each tool's scope. Full-access keys are refused. Origin must be absent or match the configured allow-list; a refused Origin answers 403 with data.code mcp_origin_refused. Key revocation and scope changes apply within SNAPSHOT_MAX_STALENESS. Tool results return tenant-entered text (organization and connection names, attribute keys) only under an `untrusted` object, which clients must treat as data, never instructions. Request and response bounds are 256 KiB and 64 KiB respectively. GET returns 405.

<dl class="api-facts"><div><dt>Scope</dt><dd><code>mcp:use</code></dd></div><div><dt>Auth</dt><dd>Secret key (<code>sk_…</code>)</dd></div><div><dt>Since</dt><dd>1.0</dd></div></dl>

## Request body

<ul class="api-fields">
<li class="api-field">
<p class="api-field__head"><code class="api-field__name">jsonrpc</code> <span class="api-field__type">string</span> <span class="api-field__required">Required</span></p>

<p class="api-field__chips">one of <code>2.0</code></p>
</li>
<li class="api-field">
<p class="api-field__head"><code class="api-field__name">id</code> <span class="api-field__type">any</span></p>
A string or integer request identifier; absent for notifications.
</li>
<li class="api-field">
<p class="api-field__head"><code class="api-field__name">method</code> <span class="api-field__type">string</span> <span class="api-field__required">Required</span></p>

<p class="api-field__chips">min length 1 · max length 128</p>
</li>
<li class="api-field">
<p class="api-field__head"><code class="api-field__name">params</code> <span class="api-field__type">object</span></p>
</li>
</ul>

## Responses

<ul class="api-responses">
<li class="api-response"><span class="api-status api-status--ok">200</span> <span>Bounded JSON-RPC result or error with catalogue data.code. <span class="api-field__type">MCPResponse</span></span></li>
<li class="api-response"><span class="api-status api-status--ok">202</span> <span>Accepted notification; empty body.</span></li>
<li class="api-response"><span class="api-status api-status--bad">400</span> <span>Invalid JSON-RPC or protocol headers. <span class="api-field__type">MCPResponse</span></span></li>
<li class="api-response"><span class="api-status api-status--bad">401</span> <span>Native secret-key authentication refused. <span class="api-field__type">MCPResponse</span></span></li>
<li class="api-response"><span class="api-status api-status--bad">403</span> <span>Origin refused (<a href="/errors/mcp_origin_refused/">mcp_origin_refused</a>) or restricted-key authority refused. <span class="api-field__type">MCPResponse</span></span></li>
<li class="api-response"><span class="api-status api-status--bad">413</span> <span>Request exceeds the 256 KiB bound. <span class="api-field__type">MCPResponse</span></span></li>
<li class="api-response"><span class="api-status api-status--bad">429</span> <span>Per-key call quota exhausted. <span class="api-field__type">MCPResponse</span></span></li>
<li class="api-response"><span class="api-status api-status--bad">503</span> <span>A required tool, audit or quota dependency is unavailable. <span class="api-field__type">MCPResponse</span></span></li>
<li class="api-response"><span class="api-status api-status--neutral">default</span> <span>JSON-RPC refusal. <span class="api-field__type">MCPResponse</span></span></li>
</ul>

Errors share one shape; see the [error code catalogue](/errors/).

</div>
<div class="api-op__code">

**curl**

```sh wrap
curl -X POST \
  "https://mcp.ohauthcat.com/mcp" \
  -H "Authorization: Bearer $OHAUTHCAT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "jsonrpc": "2.0",
  "method": "example_method"
}'
```

**Node**

```javascript wrap
const response = await fetch("https://mcp.ohauthcat.com/mcp", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.OHAUTHCAT_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    jsonrpc: "2.0",
    method: "example_method",
  }),
});
const data = await response.json();
```

**Python**

```python wrap
import os
import requests

response = requests.post(
    "https://mcp.ohauthcat.com/mcp",
    headers={"Authorization": f"Bearer {os.environ['OHAUTHCAT_API_KEY']}"},
    json={
        "jsonrpc": "2.0",
        "method": "example_method",
    },
)
data = response.json()
```

```json title="Response 200" wrap
{}
```

</div>
</div>
