Stateless Streamable HTTP MCP endpoint.
Implementation details:
POST /mcp request creates a fresh McpServer, handles the JSON-RPC exchange, then closes it.sessionIdGenerator: undefined and enableJsonResponse: true, so this server does not issue or require mcp-session-id headers.GET /mcp returns the info document and GET /.well-known/mcp.json returns the discovery document.Accept: application/json with Content-Type: application/json.Typical flow:
initializenotifications/initializedtools/list or tools/callInitialize request example:
{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2025-11-25",
"capabilities": {},
"clientInfo": {
"name": "curl-example",
"version": "1.0.0"
}
}
}
Initialize response example:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"protocolVersion": "2025-11-25",
"capabilities": {
"tools": {
"listChanged": true
}
},
"serverInfo": {
"name": "spl-private-payments-api",
"version": "0.1.0"
}
}
}
Tool call request example:
{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "spl.deposit",
"arguments": {
"owner": "3rXKwQ1kpjBd5tdcco32qsvqUh1BnZjcYnS5kYrP7AYE",
"amount": 1,
"initIfMissing": true,
"initAtasIfMissing": true,
"initVaultIfMissing": true,
"idempotent": true
}
}
}