MCP APIs

The SnapLogic Platform MCP Server exposes SnapLogic platform capabilities as MCP tools over a Streamable HTTP transport. Use these APIs to connect any MCP-compatible client — such as Claude Code, SnapGPT, or a custom integration — to SnapLogic platform tools for pipeline operations, Snaplex management, SLDB file management, and Python code generation.

The server exposes three access paths, each returning a fixed set of tools. Choose the path that matches your use case:

Path Tools Use for
/platform_mcp/mcp 21 (12 platform + 9 PyGen) Full agent — operate pipelines and generate code in one session.
/platform_mcp/mcp/platform 12 platform Control-plane operations: pipelines, Snaplexes, SLDB files.
/platform_mcp/mcp/pygen 9 PyGen Text-to-pipeline generation helpers (Snap knowledge queries).
Note: PyGen tools are available only when PyGen is configured for your environment. If /mcp/pygen returns 404 or /mcp shows only 12 tools, PyGen is not wired for that environment.

Base URLs

Use the Tectonic host for your region. SLTokens are region-bound — a token minted in one region cannot authenticate against another region's endpoint.

Region Base URL
Production US https://cdn.elastic.snaplogic.com
Production EU https://cdn.emea.snaplogic.com

Append any of the three paths above to your region's base URL to form the full endpoint, for example:

https://cdn.elastic.snaplogic.com/api/1/rest/public/platform_mcp/mcp/platform

Authentication

All MCP API requests require a SnapLogic authentication token in the Authorization request header. The value must use the literal SLToken prefix followed by a space and your token:

Authorization: SLToken YOUR_TOKEN

The proxy forwards the token verbatim to the Platform MCP Server, which authenticates per request. HTTP Basic authentication is also supported.

Important: The literal prefix SLToken and the space before the token are both required. Omitting either causes tools/list to return zero tools without an error message.

Session lifecycle

All MCP interactions follow the MCP Streamable HTTP handshake regardless of which toolset you connect to:

  1. Initialize. Send a POST request with "method": "initialize". The server returns 200 OK and sets the Mcp-Session-Id response header. Copy this value — it is required on every subsequent request.
  2. Confirm. Send a second POST with "method": "notifications/initialized" and include the session ID. This is a JSON-RPC notification (no id field). The handshake is complete after this step.
  3. Interact. Call tools/list to see available tools, then tools/call to invoke them. Include the session ID on every request. Optionally open a GET connection to receive server-initiated SSE messages.
  4. Terminate. Send a DELETE request with the session ID to release server-side resources. Session state (preferences and caches) is per-connection and is not persisted after the session ends.

Key concepts

Organization (org)
The SnapLogic org to operate within. Most tools accept org as an optional parameter. If omitted, the default set via save_user_preferences is used. Call the get_snaplogic_knowledge_base prompt at the start of a session to see your available organizations.
Project path (project_path)
The folder path within the org, for example shared or MyTeam/my-project. Do not include the org name as a prefix.
Snaplex / runtime_path_id
The runtime environment used for pipeline validation and execution. Format: <org_id>/rt/<location>/<environment>. Discover available values with list_snaplexes.
SLP content (slp_content)
The JSON definition of a SnapLogic pipeline, passed as an inline string. Supports json (raw) or base64 encoding via the slp_encoding parameter. Local file paths are not supported over the HTTP transport.
SLDB
SnapLogic's cloud file storage used for data files consumed or produced by pipelines.
duplicate_check
When importing or executing pipelines via SLP content, set to false to overwrite an existing pipeline at the target path. Defaults to true.

Typical workflow

  1. Call the get_snaplogic_knowledge_base prompt to list your available organizations.
  2. Call save_user_preferences with your desired default_org, default_path, and snaplex_path to avoid supplying them on every subsequent tool call.
  3. Call list_snaplexes to discover available runtime environments.
  4. Validate, execute, or import pipelines as needed.
  5. Manage data files in SLDB: upload, list, download, move, or delete.

Notes

  • File path parameters (slp_file_path, local_file_path) are not supported over the Streamable HTTP transport. Pass all pipeline and file content inline using slp_content or file_content.
  • Session state (preferences and caches set by save_user_preferences) is per-connection and is not persisted across sessions.
  • A client-supplied X-SL-Host-Url header is ignored — the proxy pins routing to the calling host. To target a different environment, change the base URL.

Troubleshooting

Symptom Likely cause Resolution
tools/list returns 0 tools (no error) Missing or invalid Authorization header, or wrong-region token. Confirm the literal SLToken prefix and space. A US token must be used against cdn.elastic.snaplogic.com; an EU token against cdn.emea.snaplogic.com.
401 on first call Header format is incorrect. The header must be exactly Authorization: SLToken <token> with a space after SLToken. Ensure the token is not expired.
503 / "Platform MCP server is not configured" The environment does not have the public-MCP slserver build or the platform_mcp.host config key. Use a rolled-out environment. The public proxy is available on snaplabs-dev today and on prod US/EU from release 4.44.3.0.
400 / "no session" on tools/list Missing Mcp-Session-Id, or notifications/initialized was skipped. Re-run the full handshake: initialize → capture session ID → send notifications/initialized → then call tools.
Tool returns "Organization is required" Platform tool needs an org to operate against and no default is set. Pass org in the tool arguments, or call save_user_preferences once at the start of the session.
400 / 404 on a sub-path Path is outside the allowed list (SSRF guard). Use exactly /mcp, /mcp/platform, or /mcp/pygen. All other sub-paths are blocked.
/mcp/pygen returns 404, or /mcp shows only 12 tools PyGen is not configured for the environment. The PyGen toolset appears only when PyGen is wired for the environment. Confirm with the environment owner.
Auth works then fails mid-session SLToken expired (approximately 1-hour TTL). Mint a new token and start a fresh session with a new initialize call.
Response body contains data: {...} lines SSE framing — this is expected behavior, not an error. Parse the JSON object after each data: prefix. The result object contains the fields success, response, and metadata.