API keys and raw MCP
Call the Sigment MCP server from scripts and headless agents with an API key.
Create a key in Sigment → Settings → AI agents → API keys. Keys start with ak_, are approved automatically, and can be revoked on the same page. Send the key on every request:
Use an MCP client library
The easiest route is an official MCP SDK with the Streamable HTTP transport. For example, in Python (pip install "mcp>=2"):
Raw JSON-RPC
The server is stateless: every request is a plain POST that returns JSON, so no session ID or SSE stream is needed. GET /mcp returns 405. Send both Accept types:
Call a tool:
Tool errors come back as a normal result with "isError": true and a message that tells the agent what to do next. See Errors.