MCP stateless message dispatch
const url = 'https://mcp.infiniteaudience.ai/mcp';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"my-client","version":"1.0"}}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://mcp.infiniteaudience.ai/mcp \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "jsonrpc": "2.0", "id": 1, "method": "initialize", "params": { "protocolVersion": "2024-11-05", "capabilities": {}, "clientInfo": { "name": "my-client", "version": "1.0" } } }'Authenticate every POST independently. Send Initialize first, then later MCP messages without a session ID. Responses are JSON-RPC JSON (or 202 for notifications). A retired mcp-session-id receives 404 so clients reinitialize. Requires a Firebase ID token or resource-bound first-party OAuth access token.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”JSON-RPC 2.0 request envelope. Send initialize before tool discovery/calls; no server session ID is issued. Subsequent calls dispatch to available MCP methods (see the MCP — Available Tools section below).
object
JSON-RPC version. Always "2.0".
RPC method name. initialize for the handshake, then methods such as tools/list and tools/call.
Method-specific parameters. For initialize, pass protocol version and client capabilities. For tools/call, pass name (tool name) and arguments (tool input object).
object
Examples
Stateless initialization
{ "jsonrpc": "2.0", "id": 1, "method": "initialize", "params": { "protocolVersion": "2024-11-05", "capabilities": {}, "clientInfo": { "name": "my-client", "version": "1.0" } }}Invoke a tool
{ "jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": { "name": "list_audiences", "arguments": {} }}Responses
Section titled “Responses”MCP response — JSON-RPC 2.0 envelope.
MCP notification accepted; no response body
MCP JSON-RPC protocol error (including authentication or unsupported method)
object
object
Example
{ "jsonrpc": "2.0"}MCP JSON-RPC protocol error (including authentication or unsupported method)
object
object
Example
{ "jsonrpc": "2.0"}Token is valid but lacks the required scope for this endpoint. Check the endpoint description for the required scope (discovery, purchase, or account).
object
Stable machine-readable error code (e.g. INVALID_STATUS_TRANSITION, BILLING_INSUFFICIENT_BALANCE). Always present.
Human-readable explanation of the error.
Alternate machine-readable code — present on some endpoints as an alias for error for backward compatibility.
Opaque support/debug identifier when available.
Public action for correcting the request or retrying later.
object
JSON path to the invalid filter field or value.
Examples
{ "error": "SCOPE_REQUIRED", "message": "This endpoint requires the creator scope."}MCP JSON-RPC protocol error (including authentication or unsupported method)
object
object
Example
{ "jsonrpc": "2.0"}