Invariance MCP
OfficialClick on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Invariance MCPshow me recent error traces from production"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@invariance/mcp
An MCP (Model Context Protocol) server that connects AI coding agents to the Invariance observability platform. It gives tools like Claude Desktop, Cursor, and Claude Code direct access to your runs, nodes, monitors, signals, findings, reviews, and more.
MCP is an open protocol that lets AI assistants use external tools and data sources. This server implements it for Invariance, so your AI assistant can query observability data, investigate issues, and analyze agent behavior without leaving the conversation.
Install
npm install -g @invariance/mcpOr run directly with npx (recommended for MCP client configs):
npx @invariance/mcpSetup
Environment variables
Variable | Required | Default | Description |
| Yes | — | Your Invariance API key |
| No |
| API base URL |
| No |
| Transport mode: |
| No |
| Port for SSE/HTTP transport |
| No |
| Request timeout in milliseconds |
Get your API key at app.invariance.ai/settings/api-keys.
Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"invariance": {
"command": "npx",
"args": ["-y", "@invariance/mcp"],
"env": {
"INVARIANCE_API_KEY": "your-api-key"
}
}
}
}Claude Code
Add to your Claude Code config (.claude/settings.json or ~/.claude/settings.json):
{
"mcpServers": {
"invariance": {
"command": "npx",
"args": ["-y", "@invariance/mcp"],
"env": {
"INVARIANCE_API_KEY": "your-api-key"
}
}
}
}Cursor
Add to your Cursor MCP settings (.cursor/mcp.json):
{
"mcpServers": {
"invariance": {
"command": "npx",
"args": ["-y", "@invariance/mcp"],
"env": {
"INVARIANCE_API_KEY": "your-api-key"
}
}
}
}Available tools
The server exposes 37 tools covering the full Invariance API. Names follow invariance_<resource>_<action>.
Runs (invariance_run_*)
start, get, list, finish, fail, verify, metrics
Nodes (invariance_node_*)
write, list
Monitors (invariance_monitor_*)
create, list, get, update, pause, resume, evaluate, executions, findings
Signals (invariance_signal_*)
emit, list, get, acknowledge, resolve
Findings (invariance_finding_*)
list, get, update
Reviews (invariance_review_*)
list, get, claim, unclaim, resolve
Agents (invariance_agent_*)
me, set_key
Insights
invariance_narrative_get (LLM-synthesized run summary), invariance_ask (turn-based Q&A over your KB + runs), invariance_kb_pages_list, invariance_kb_page_get
For complex object arguments (monitor body, signal data, node input/output, run metadata) tools accept JSON-encoded strings, which the server parses before dispatching to the API.
Legacy tool aliases
The original 6 tool names from earlier versions are kept as aliases so existing client configs keep working: invariance_create_run, invariance_get_run, invariance_list_runs, invariance_write_node, invariance_list_nodes, invariance_verify_run.
HTTP transport
To run the server over Streamable HTTP instead of stdio:
INVARIANCE_API_KEY=your-api-key INVARIANCE_MCP_TRANSPORT=http INVARIANCE_MCP_PORT=3000 npx @invariance/mcpThe server exposes a Streamable HTTP endpoint at http://127.0.0.1:3000/mcp and a health check at http://127.0.0.1:3000/health.
MCP clients that support HTTP transport can connect using the /mcp endpoint URL instead of spawning a subprocess.
Troubleshooting
"INVARIANCE_API_KEY environment variable is required"
Make sure you've set the INVARIANCE_API_KEY environment variable in your MCP client configuration. See the setup guides above.
Server not appearing in your MCP client
Verify the config file path is correct for your client
Restart the client after editing the config
Check that
npx @invariance/mcpruns without errors in your terminal
Authentication errors
Verify your API key is valid at app.invariance.ai/settings/api-keys.
Connection timeouts
If using a custom INVARIANCE_BASE_URL, verify the URL is reachable.
Contributing
See CONTRIBUTING.md.
License
MIT
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/invariance-ai/invariance-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server