x402 Facilitator

Handle MCP JSON-RPC request

Changed on

Handles JSON-RPC requests for the Model Context Protocol (MCP). Supports MCP methods for discovering x402 payment resources and tools.

post/v2/x402/discovery/mcp

Request

  • Base URL
    https://api.cdp.coinbase.com/platform
  • Auth
    HTTP none

Request body

X402McpRequest required

A JSON-RPC 2.0 request for the Model Context Protocol.

jsonrpc, '2.0' required

JSON-RPC version, must be "2.0".

id, union

Request identifier.

method, string required

The MCP method to invoke.

params, object

Optional parameters for the method.

Example request

{
  "jsonrpc": "2.0",
  "method": "tools/list",
  "params": {}
}

Response

MCP response.

X402McpResponse required

A JSON-RPC 2.0 response for the Model Context Protocol.

jsonrpc, '2.0' required

JSON-RPC version.

id, union

Request identifier (matches the request ID, null for notifications).

result, object

The result of the method call (present on success).

error, X402McpError

JSON-RPC 2.0 error object.

Example response

{
  "jsonrpc": "2.0",
  "result": {
    "tools": []
  },
  "error": {
    "code": -32600,
    "message": "Invalid Request",
    "data": {}
  }
}

Changes

    • warning

      added the new policy_not_applicable enum value to the errorType response property for the response status

    • warning

      added the new policy_not_applicable enum value to the errorType response property for the response status

    • warning

      added the new entity_not_configured_for_top_up enum value to the errorType response property for the response status

    1 more change in this revision