Skip to main content
POST
Deploy API: MCP Server

MCP API

MCP (Model Context Protocol) endpoints for agents deployed via Agent.launch(protocol="mcp") or ToolsMCPServer.

Base URL + Playground

Base URL: http://localhost:8080

Endpoints

GET /sse

Server-Sent Events endpoint for MCP communication.
none
none
No parameters required.
Response: SSE stream with MCP protocol messages.

POST /messages/

Send JSON-RPC messages to the MCP server.
jsonrpc
string
required
JSON-RPC version (must be “2.0”)
method
string
required
MCP method name (tools/list, tools/call, initialize)
params
object
Method parameters
id
integer
required
Request ID
Response:

MCP Methods

tools/list

List available tools.
Response:

tools/call

Execute a tool.
params.name
string
required
Tool name to execute
params.arguments
object
required
Tool arguments
Response:

initialize

Initialize MCP session.
params.protocolVersion
string
required
MCP protocol version
params.capabilities
object
Client capabilities
params.clientInfo
object
Client information (name, version)
Response:

Errors

MCP errors follow JSON-RPC 2.0 format: