---
title: "Model Context Protocol endpoint (JSON-RPC 2.0, stateless)"
method: POST
path: "/mcp"
tags: ["mcp"]
---

# Model Context Protocol endpoint (JSON-RPC 2.0, stateless)

`POST /mcp`

## Request

- Base URL: `https://api.contextdb.ai`
- URL: `https://api.contextdb.ai/mcp`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://app.contextdb.ai/oauth/authorize`, token URL `https://api.contextdb.ai/oauth/token`)

Single JSON-RPC 2.0 objects over POST; responses are JSON. Tools:
`remember`, `recall`, `recall_for_action`, `pending_confirmations`,
`confirm`, and scoped `forget`, with the same contract and scoping as the
plain HTTP routes. Whole-partition erasure remains on the idempotent
HTTP and console flows. Trusted backends use a `cdb_` bearer key and
explicit `user_id`. Marketplace clients use a revocable `cmo_` OAuth
token; their tool schemas omit `user_id` because the server derives it
from the grant. Notifications return 202 with no body.

## Request body

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

## Response `200`

JSON-RPC result or error object

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

## Other responses

- `202`: Notification accepted (no body)
- `401`: Missing, malformed, unknown, or revoked API key
- `403`: Authenticated but not allowed (entitlement or billing state)
- `429`: The client IP/project exceeded its request rate, or the project's idempotency retention capacity is full until older keys expire.

---

[API](https://skmtc.dev/contextdb/apis/contextdb-cloud-data-plane-api.md) · [All operations](https://skmtc.dev/contextdb/apis/contextdb-cloud-data-plane-api/llms.txt) · [OpenAPI document](https://skmtc.dev/contextdb/apis/contextdb-cloud-data-plane-api/revisions/9e441d2e21a7?raw)
