Invariance MCP
Official@invariance/mcp
一个将 AI 编码代理连接到 Invariance 可观测性平台的 MCP(模型上下文协议)服务器。它使 Claude Desktop、Cursor 和 Claude Code 等工具能够直接访问您的运行、节点、监控、信号、发现、审查等内容。
MCP 是一种开放协议,允许 AI 助手使用外部工具和数据源。此服务器为 Invariance 实现了该协议,因此您的 AI 助手无需离开对话即可查询可观测性数据、调查问题并分析代理行为。
安装
npm install -g @invariance/mcp或者直接使用 npx 运行(推荐用于 MCP 客户端配置):
npx @invariance/mcpRelated MCP server: Claude Code Starter Kit MCP
设置
环境变量
变量 | 必需 | 默认值 | 描述 |
| 是 | — | 您的 Invariance API 密钥 |
| 否 |
| API 基础 URL |
| 否 |
| 传输模式: |
| 否 |
| SSE/HTTP 传输端口 |
| 否 |
| 请求超时(毫秒) |
在 app.invariance.ai/settings/api-keys 获取您的 API 密钥。
Claude Desktop
添加到您的 Claude Desktop 配置中(macOS 上为 ~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"invariance": {
"command": "npx",
"args": ["-y", "@invariance/mcp"],
"env": {
"INVARIANCE_API_KEY": "your-api-key"
}
}
}
}Claude Code
添加到您的 Claude Code 配置中(.claude/settings.json 或 ~/.claude/settings.json):
{
"mcpServers": {
"invariance": {
"command": "npx",
"args": ["-y", "@invariance/mcp"],
"env": {
"INVARIANCE_API_KEY": "your-api-key"
}
}
}
}Cursor
添加到您的 Cursor MCP 设置中(.cursor/mcp.json):
{
"mcpServers": {
"invariance": {
"command": "npx",
"args": ["-y", "@invariance/mcp"],
"env": {
"INVARIANCE_API_KEY": "your-api-key"
}
}
}
}可用工具
该服务器公开了 37 个工具,涵盖了完整的 Invariance API。名称遵循 invariance_<资源>_<操作>。
运行 (invariance_run_*)
start, get, list, finish, fail, verify, metrics
节点 (invariance_node_*)
write, list
监控 (invariance_monitor_*)
create, list, get, update, pause, resume, evaluate, executions, findings
信号 (invariance_signal_*)
emit, list, get, acknowledge, resolve
发现 (invariance_finding_*)
list, get, update
审查 (invariance_review_*)
list, get, claim, unclaim, resolve
代理 (invariance_agent_*)
me, set_key
洞察
invariance_narrative_get(LLM 合成的运行摘要),invariance_ask(基于您的知识库 + 运行的轮次问答),invariance_kb_pages_list,invariance_kb_page_get
对于复杂的对象参数(监控主体、信号数据、节点输入/输出、运行元数据),工具接受 JSON 编码的字符串,服务器会在分发到 API 之前对其进行解析。
旧版工具别名
保留了早期版本的 6 个原始工具名称作为别名,以便现有的客户端配置可以继续工作:invariance_create_run, invariance_get_run, invariance_list_runs, invariance_write_node, invariance_list_nodes, invariance_verify_run。
HTTP 传输
要通过可流式 HTTP 而不是 stdio 运行服务器:
INVARIANCE_API_KEY=your-api-key INVARIANCE_MCP_TRANSPORT=http INVARIANCE_MCP_PORT=3000 npx @invariance/mcp服务器在 http://127.0.0.1:3000/mcp 公开了一个可流式 HTTP 端点,并在 http://127.0.0.1:3000/health 提供健康检查。
支持 HTTP 传输的 MCP 客户端可以使用 /mcp 端点 URL 进行连接,而无需生成子进程。
故障排除
"INVARIANCE_API_KEY environment variable is required"
确保您已在 MCP 客户端配置中设置了 INVARIANCE_API_KEY 环境变量。请参阅上面的设置指南。
服务器未出现在您的 MCP 客户端中
验证客户端的配置文件路径是否正确
编辑配置后重启客户端
检查
npx @invariance/mcp在您的终端中运行是否没有错误
身份验证错误
验证您的 API 密钥在 app.invariance.ai/settings/api-keys 是否有效。
连接超时
如果使用自定义的 INVARIANCE_BASE_URL,请验证该 URL 是否可访问。
贡献
请参阅 CONTRIBUTING.md。
许可证
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
AI agent observability for production traces, natural-language insights, and improvement loops.
Connect Claude, Cursor, or ChatGPT to your business data. Ask questions, get answers.
Data + AI observability — monitor and troubleshoot production-grade agents and the context they use.
Connect Claude, Cursor, Codex, and other AI tools to your robotics mission data.
Related MCP Servers
- AlicenseAqualityCmaintenanceConnects AI assistants to Warpmetrics telemetry data to monitor AI agent performance, execution runs, and LLM costs. It allows users to query success rates, latency, and spend metrics directly through natural language interfaces.2059MIT
- AlicenseCqualityCmaintenanceEnables AI-powered automated testing, security scanning, code review, and maintenance tasks directly within Claude Code or desktop.124MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI-driven incident response by connecting Claude to monitoring tools like Prometheus, Grafana, Loki, PagerDuty, and Slack for automated investigation and runbook generation.9

Confident AIofficial
AlicenseNot gradedqualityBmaintenanceConnects AI-powered tools to the Confident AI platform for evaluating, observing, and iterating on AI quality, enabling cloud evaluations, dataset management, prompt versioning, production tracing, and human annotations directly from editors like Cursor and Claude Code.2MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/Hardik-Singh/invariance-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server