Send an MCP request
POST https://{controlplane_path}/api/1/rest/public/platform_mcp/mcp
Overview
This API sends a JSON-RPC 2.0 request to the Platform MCP Server and returns the response as a Server-Sent Events (SSE) stream.
Use this endpoint to initialize an MCP session, list available tools, and invoke tools to perform operations on the SnapLogic platform. All requests and responses follow the JSON-RPC 2.0 specification.
POST /platform_mcp/mcp/pygen— Access PyGen tools only.POST /platform_mcp/mcp/platform— Access Platform tools only.
Prerequisites
- Read access to the requested assets
Request
POST https://{controlplane_path}/api/1/rest/public/platform_mcp/mcp[/{toolset}]
Path parameters
| Key | Description |
|---|---|
controlplane_path |
Required. The path to the SnapLogic control plane:
elastic.snaplogic.com
For the UAT or EMEA control plane, substitute the name for elastic. For
example:
|
toolset |
Optional. Restricts the session to a specific
tool subset. Valid values: pygen,
platform. When omitted, all tools are available.
Requests with any other value return
400 Bad Request. |
Request headers
| Key | Type | Description |
|---|---|---|
Authorization |
String | Required. SLToken or HTTP Basic credentials. Forwarded verbatim to the Platform MCP Server for per-request authentication. |
Content-Type |
String | Required. Must be
application/json. |
Mcp-Session-Id |
String | Optional. Session identifier returned by the
initialize response. Required for all requests after
the initial initialize call. Omit on the first
request. |
Request body
A JSON-RPC 2.0 request object:
| Key | Type | Description |
|---|---|---|
jsonrpc |
String | Required. Must be "2.0". |
id |
Integer or String | Required. for requests; omit for
notifications. A unique identifier used to correlate the response.
Must be omitted when method is
notifications/initialized. |
method |
String | Required. The MCP method to invoke. Supported
methods:
|
params |
Object | Optional. Parameters for the method. The
structure varies by method. For tools/call, provide
name (the tool name) and arguments
(tool-specific inputs). See
Examples. |
Response headers
| Key | Type | Description |
|---|---|---|
Mcp-Session-Id |
String | Returned on a successful initialize response.
Include this value in the Mcp-Session-Id request header
for all subsequent requests in the session. |
Response body
Responses are delivered as Server-Sent Events (SSE). Each event carries a
JSON-RPC 2.0 response object in the data field:
event: message
data: {"jsonrpc": "2.0", "id": 1, "result": { ... }}
HTTP status codes:
| Key | Description |
|---|---|
200 OK |
The request was forwarded and the SSE stream contains the response. |
400 Bad Request |
The toolset value in the URL path is not recognized. |
401 Unauthorized |
The request is missing a valid Authorization
header. |
502 Bad Gateway |
The Platform MCP Server is unreachable. |
504 Gateway Timeout |
The Platform MCP Server did not respond within the timeout period. |
Examples
Step 1: Initialize a session
POST https://cdn.elastic.snaplogic.com/api/1/rest/public/platform_mcp/mcp
Authorization: SLToken <your_token>
Content-Type: application/json
{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2025-03-26",
"capabilities": {},
"clientInfo": { "name": "my-client", "version": "1.0" }
}
}
The server responds with an SSE event containing its capabilities and returns
the Mcp-Session-Id in the response header. Use this session ID
in all subsequent requests.
Step 2: Confirm the handshake
POST https://cdn.elastic.snaplogic.com/api/1/rest/public/platform_mcp/mcp
Authorization: SLToken <your_token>
Content-Type: application/json
Mcp-Session-Id: <session_id>
{
"jsonrpc": "2.0",
"method": "notifications/initialized"
}
This is a JSON-RPC notification — omit the id field. The server
does not send a response. The session is now fully initialized.
Step 3: List available tools
POST https://cdn.elastic.snaplogic.com/api/1/rest/public/platform_mcp/mcp
Authorization: SLToken <your_token>
Content-Type: application/json
Mcp-Session-Id: <session_id>
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/list",
"params": {}
}
Step 4: Invoke a tool
POST https://cdn.elastic.snaplogic.com/api/1/rest/public/platform_mcp/mcp
Authorization: SLToken <your_token>
Content-Type: application/json
Mcp-Session-Id: <session_id>
{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "execute_pipeline",
"arguments": {
"pipeline_path": "/myOrg/myProject/myPipeline"
}
}
}
Using a toolset-scoped endpoint
POST https://cdn.elastic.snaplogic.com/api/1/rest/public/platform_mcp/mcp/platform
Authorization: SLToken <your_token>
Content-Type: application/json
{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2025-03-26",
"capabilities": {},
"clientInfo": { "name": "my-client", "version": "1.0" }
}
}