ContextDB OAuth API

OAuth discovery, dynamic registration, tokens, and revocation for MCP

Operations 7

GET /.well-known/oauth-authorization-server OAuth authorization-server metadata for MCP clients #
GET /.well-known/oauth-protected-resource OAuth protected-resource metadata for MCP #
GET /.well-known/oauth-protected-resource/mcp Path-specific OAuth protected-resource metadata for MCP #
GET /.well-known/openai-apps-challenge Optional OpenAI Apps domain-verification challenge #
POST /oauth/register Register a public OAuth PKCE client dynamically #
POST /oauth/token Exchange an authorization code or rotate a refresh token #
POST /oauth/revoke Revoke an MCP OAuth access or refresh token #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/contextdb-ai:contextdb-ai-oauth-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

contextdb-ai-oauth-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: ContextDB Cloud data-plane OAuth API
  version: 1.0.0-alpha.1
  description: 'The ContextDB Cloud data plane (hosted alpha). Managed, decision-safe

    agent memory: remember with provenance, recall for grounding, and

    recall_for_action before consequential actions.


    Authentication: `Authorization: Bearer cdb_…` is a project-wide server

    credential. The key determines org and project; requests supply only

    `user_id`, which is a partition key, not end-user authentication.


    This surface is the complete alpha allowlist. Shipped `/v1/forget`

    supports scoped deletion of one memory, one stable entity-and-attribute

    slot, or one verified user partition. Partition erasure requires

    `erase_partition=true`, typed `confirmation` equal to `user_id`, and an

    `Idempotency-Key`. Scoped ID checks make a foreign memory ID

    indistinguishable from a missing one.


    `/mcp` is a Hosted Alpha stateless JSON-RPC 2.0 endpoint over Streamable

    HTTP. Trusted backends may use a project key. Marketplace clients use

    OAuth 2.1 authorization code with S256 PKCE, refresh-token rotation, and a

    server-bound user partition. It exposes tools only, with no sessions, SSE,

    resumability, or server-initiated messages.


    Not production-ready. No SLA.'
  contact:
    name: Atoms AI
    email: gaurav@saaslabs.co
  license:
    name: Proprietary, hosted alpha
    identifier: LicenseRef-Proprietary
servers:
- url: https://api.contextdb.ai
  description: Hosted alpha
security:
- ProjectKey: []
tags:
- name: OAuth
  description: OAuth discovery, dynamic registration, tokens, and revocation for MCP
paths:
  /.well-known/oauth-authorization-server:
    get:
      tags:
      - OAuth
      summary: OAuth authorization-server metadata for MCP clients
      operationId: mcpOAuthAuthorizationServer
      security: []
      responses:
        '200':
          description: RFC 8414 authorization-server metadata
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
  /.well-known/oauth-protected-resource:
    get:
      tags:
      - OAuth
      summary: OAuth protected-resource metadata for MCP
      operationId: mcpOAuthProtectedResource
      security: []
      responses:
        '200':
          description: RFC 9728 protected-resource metadata
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
  /.well-known/oauth-protected-resource/mcp:
    get:
      tags:
      - OAuth
      summary: Path-specific OAuth protected-resource metadata for MCP
      operationId: mcpOAuthProtectedResourcePath
      security: []
      responses:
        '200':
          description: RFC 9728 protected-resource metadata
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
  /.well-known/openai-apps-challenge:
    get:
      tags:
      - OAuth
      summary: Optional OpenAI Apps domain-verification challenge
      operationId: openAiAppsChallenge
      security: []
      responses:
        '200':
          description: Configured plain-text domain challenge
          content:
            text/plain:
              schema:
                type: string
        '404':
          description: No challenge is configured
  /oauth/register:
    post:
      tags:
      - OAuth
      summary: Register a public OAuth PKCE client dynamically
      operationId: registerMcpOAuthClient
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - client_name
              - redirect_uris
              additionalProperties: true
              properties:
                client_name:
                  type: string
                  minLength: 1
                  maxLength: 120
                redirect_uris:
                  type: array
                  minItems: 1
                  maxItems: 20
                  items:
                    type: string
                    format: uri
                token_endpoint_auth_method:
                  type: string
                  enum:
                  - none
                  default: none
      responses:
        '201':
          description: Registered public client metadata
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '400':
          $ref: '#/components/responses/BadRequest'
  /oauth/token:
    post:
      tags:
      - OAuth
      summary: Exchange an authorization code or rotate a refresh token
      operationId: issueMcpOAuthToken
      security: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - grant_type
              - client_id
              additionalProperties: false
              properties:
                grant_type:
                  type: string
                  enum:
                  - authorization_code
                  - refresh_token
                client_id:
                  type: string
                code:
                  type: string
                redirect_uri:
                  type: string
                  format: uri
                code_verifier:
                  type: string
                refresh_token:
                  type: string
      responses:
        '200':
          description: Short-lived access token and optional rotating refresh token
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '400':
          $ref: '#/components/responses/BadRequest'
  /oauth/revoke:
    post:
      tags:
      - OAuth
      summary: Revoke an MCP OAuth access or refresh token
      operationId: revokeMcpOAuthToken
      security: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - token
              additionalProperties: false
              properties:
                token:
                  type: string
      responses:
        '200':
          description: Revocation is idempotently accepted
components:
  responses:
    BadRequest:
      description: Malformed request or failed validation
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      required:
      - code
      - message
      properties:
        code:
          type: string
          description: Machine-readable error code
        message:
          type: string
          description: Human-readable message; never a stack trace
        request_id:
          type:
          - string
          - 'null'
      additionalProperties: false
  securitySchemes:
    ProjectKey:
      type: http
      scheme: bearer
      description: Project-wide server credential (`cdb_…`). Never in browsers.
    McpOAuth:
      type: oauth2
      description: User-bound marketplace connector grant (`cmo_…`).
      flows:
        authorizationCode:
          authorizationUrl: https://app.contextdb.ai/oauth/authorize
          tokenUrl: https://api.contextdb.ai/oauth/token
          refreshUrl: https://api.contextdb.ai/oauth/token
          scopes:
            memory:read: Recall memory and evaluate evidence before actions
            memory:write: Remember, confirm, and forget memory
            offline_access: Rotate a refresh token for continued access