Skip to main content
POST
/
mcp
/
{serverId}
Execute MCP request (API Key)
curl --request POST \
  --url https://mcp.runalloy.com/mcp/{serverId} \
  --header 'Accept: <accept>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: <content-type>' \
  --header 'x-alloy-userid: <x-alloy-userid>' \
  --data '{
  "jsonrpc": "2.0",
  "method": "tools/list",
  "params": {},
  "id": "<string>"
}'
{
  "jsonrpc": "2.0",
  "result": {},
  "error": {
    "code": 123,
    "message": "<string>"
  },
  "id": "<string>"
}

Authorizations

Authorization
string
header
required

Use either an Alloy API key or JWT token

Headers

Content-Type
string
default:application/json
required

Request content type

Accept
string
default:application/json, text/event-stream
required

Response format - must include text/event-stream for MCP

x-alloy-userid
string
required

User ID

x-alloy-user-token
string

JWT token for user isolation (optional)

x-credential-id
string

Specific credential to use (optional)

x-redirect-uri
string

OAuth redirect URI for credential creation (optional)

Path Parameters

serverId
string
required

Server ID

Body

application/json
jsonrpc
enum<string>
required
Available options:
2.0
method
enum<string>
required
Available options:
tools/list,
tools/call,
resources/list,
resources/read,
prompts/list,
prompts/get
id
string
required
params
object

Response

MCP response

jsonrpc
enum<string>
Available options:
2.0
result
object
error
object
id
string
I