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

# MCP Transport & Methods

> JSON-RPC methods, auth behavior, and request examples.

## JSON-RPC endpoint

Send POST requests to MCP root:

* `POST /mcp/` on API host
* `POST /` on MCP host

`GET` and `DELETE` on MCP root return `405 Method Not Allowed`.

## Example: initialize

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "initialize",
  "params": {}
}
```

## Example: list tools

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/list"
}
```

## Example: call capability tool

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "tools/call",
  "params": {
    "name": "documents_search",
    "arguments": {
      "query": "notion",
      "limit": 5
    }
  }
}
```

## Approval-required MCP tool calls

If an MCP tool maps to a capability that requires approval, the tool returns a structured payload instead of executing immediately.

Example result:

```json theme={null}
{
  "content": [
    {
      "type": "text",
      "text": "{\n  \"status\": \"approval_required\",\n  \"approvalRequestId\": \"01J...\",\n  \"capability\": {\n    \"name\": \"bulkEditDocuments\",\n    \"slug\": \"documents.bulk-edit\"\n  },\n  \"title\": \"Apply bulk edit\",\n  \"description\": \"Bulk editing updates multiple documents and requires approval before execution.\",\n  \"nextTools\": {\n    \"get\": \"approvals_get\",\n    \"approve\": \"approvals_approve\",\n    \"reject\": \"approvals_reject\"\n  }\n}"
    }
  ]
}
```

Clients should then call:

* `approvals_get`
* `approvals_approve`
* `approvals_reject`

## Example: list workspaces via MCP capability tool

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 4,
  "method": "tools/call",
  "params": {
    "name": "workspaces_list",
    "arguments": {}
  }
}
```

## Error behavior

* Missing bearer token for protected method: JSON-RPC unauthorized error
* Unknown tool name: JSON-RPC invalid params error
* Capability execution failure: tool response includes error text
* OAuth failures include `WWW-Authenticate: Bearer ...` challenge headers

## Workspace currency

MCP capability execution resolves currency from the active workspace first, then falls back to the user profile, then `usd`.
