Skip to content

MCP stateless message dispatch

POST
/mcp
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.

Media typeapplication/json

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
jsonrpc
required

JSON-RPC version. Always "2.0".

string
Allowed values: 2.0
method
required

RPC method name. initialize for the handshake, then methods such as tools/list and tools/call.

string
id
One of:
string
params

Method-specific parameters. For initialize, pass protocol version and client capabilities. For tools/call, pass name (tool name) and arguments (tool input object).

object
key
additional properties
any
Examples

Stateless initialization

{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2024-11-05",
"capabilities": {},
"clientInfo": {
"name": "my-client",
"version": "1.0"
}
}
}

MCP response — JSON-RPC 2.0 envelope.

Media typeapplication/json
object
jsonrpc
required
string
Allowed values: 2.0
id
One of:
string
result

Present on success; shape depends on the MCP method called.

error

Present on failure.

object
code
required
integer
message
required
string
Example
{
"jsonrpc": "2.0"
}

MCP notification accepted; no response body

MCP JSON-RPC protocol error (including authentication or unsupported method)

Media typeapplication/json
object
jsonrpc
required
string
Allowed value: 2.0
error
required
object
code
required
integer
message
required
string
id
required
null
Example
{
"jsonrpc": "2.0"
}

MCP JSON-RPC protocol error (including authentication or unsupported method)

Media typeapplication/json
object
jsonrpc
required
string
Allowed value: 2.0
error
required
object
code
required
integer
message
required
string
id
required
null
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).

Media typeapplication/json
object
error
required

Stable machine-readable error code (e.g. INVALID_STATUS_TRANSITION, BILLING_INSUFFICIENT_BALANCE). Always present.

string
message

Human-readable explanation of the error.

string
code

Alternate machine-readable code — present on some endpoints as an alias for error for backward compatibility.

string
request_id

Opaque support/debug identifier when available.

string
next_step

Public action for correcting the request or retrying later.

string
issues
Array<object>
object
path
required

JSON path to the invalid filter field or value.

string
code
required
string
Allowed values: INVALID_FILTER_SHAPE UNKNOWN_FILTER_FIELD FIELD_NOT_FILTERABLE UNSUPPORTED_FILTER_OPERATOR UNSUPPORTED_TEXT_COMPARISON INVALID_FILTER_VALUE INVALID_ENUM_VALUE AMBIGUOUS_ENUM_VALUE
message
required
string
suggestions
Array<string>
key
additional properties
any
Examples
Examplemissing_scope
{
"error": "SCOPE_REQUIRED",
"message": "This endpoint requires the creator scope."
}

MCP JSON-RPC protocol error (including authentication or unsupported method)

Media typeapplication/json
object
jsonrpc
required
string
Allowed value: 2.0
error
required
object
code
required
integer
message
required
string
id
required
null
Example
{
"jsonrpc": "2.0"
}