Skip to main content
The Solana AI Gateway implements the Model Context Protocol (MCP) using Server-Sent Events (SSE). Clients such as Claude Desktop and Cursor can connect to the SSE endpoint to discover and invoke gateway tools in real time. After establishing the SSE stream, the client sends JSON-RPC messages via POST to the messages endpoint using the session ID returned in the stream.

Endpoints

Establish SSE stream

No authentication required. The gateway opens a long-lived SSE connection and assigns a unique sessionId. The first event contains the messages URL, for example /mcp/messages?sessionId=<uuid>.

Send messages

Send JSON-RPC tool invocation requests to this endpoint using the sessionId from the SSE stream.

How it works

1

Open SSE connection

Send GET /mcp/sse. The gateway creates a session and streams events back to your client.
2

Read session ID

The gateway emits the messages endpoint URL with a unique sessionId query parameter.
3

POST tool requests

Send JSON-RPC tools/call requests to POST /mcp/messages?sessionId=<uuid>.
4

Receive responses

Results are streamed back over the original SSE connection as JSON-RPC responses.

Available MCP tools

The gateway exposes the following tools over MCP. Each tool accepts the same parameters as the equivalent REST endpoint and returns structured JSON text content.

Example: cURL SSE connection

Example: TypeScript SSE client

TypeScript

Errors

Notes

  • SSE sessions are cleaned up automatically when the client disconnects.
  • The gateway applies the same rate limits to MCP traffic as to REST traffic.
  • For tool schemas and descriptions, fetch the MCP manifest first.