logicmonitor-mcp
logicmonitor-mcp
LogicMonitor MCP 服务器 — 将 LogicMonitor REST API (v3, /santaba/rest) 暴露为 MCP 工具。
概述
该服务器实现了 Model Context Protocol(Streamable HTTP/SSE 传输),并封装了 MSPbots 自身 LogicMonitor 集成所使用的 LogicMonitor 端点。它遵循 MSPbots Vendor MCP Service SOP:无状态、不存储凭据、按请求进行头部认证。
底层 API 通过 LMv1 进行认证 — 这是一种基于 Access Id / Access Key 对计算的每次请求 HMAC-SHA256 签名(与 MSPbots 自身用于此集成的方案相同:Company + Access Id + Access Key,无 OAuth)。该服务器根据请求头中提供的凭据,为每个出站请求自行计算 LMv1 签名;它从不持久化这些凭据。
Related MCP server: databricks-mcp
快速开始
Docker(推荐)
docker compose up --build服务器启动于 http://localhost:8080。
本地(uv)
uv sync
python -m logicmonitor_mcp健康检查
curl http://localhost:8080/health
# {"status": "ok"}健康检查端点不需要任何凭据。
授权参数说明 (Authentication)
Every request to /mcp must include the following HTTP headers:
Header | 类型 | 是否必填 | 默认值 | 枚举值 | 字段描述 | Example |
| string | 必填 | 无 | 无(自由文本) | LogicMonitor 门户子域名,即 |
|
| string | 必填 | 无 | 无(自由文本) | LMv1 API Token 的 Access Id,与 MSPbots 集成配置里的 "Access Id" 字段一致。 |
|
| string | 必填 | 无 | 无(自由文本,敏感信息) | LMv1 API Token 的 Access Key(密钥),用于对每次请求做 HMAC-SHA256 签名,本服务只在本次请求生命周期内使用,不做持久化存储。 |
|
Missing any of the three headers returns 401 Unauthorized.
环境变量
变量 | 默认值 | 描述 |
|
| 监听端口 |
|
| 监听主机 |
logicmonitor-mcp 没有必需的环境变量 — 所有身份信息(company/access id/access key)均通过请求头按请求提供。
MCP 端点
POST http://localhost:8080/mcp使用以下方式连接你的 MCP 客户端:
传输方式:
http(Streamable HTTP / SSE)请求头:
X-LogicMonitor-Company、X-LogicMonitor-Access-Id、X-LogicMonitor-Access-Key(均为必填)
工具列表
15 个工具 — 与 MSPbots 中此集成下已注册的 15 个 LogicMonitor API 端点(sys_integration subject_code LOGICMONITOR)相匹配,因此工具覆盖范围与 MSPbots 现有范围一致。所有工具均为只读(readOnlyHint=True);本服务不包含任何写入/删除工具。
分页:size 默认为 50,服务端会将其硬性限制为 1000 — 这是 LogicMonitor 自身文档规定/强制执行的该参数最大值(超过 1000 的值会被 LogicMonitor 静默截断;请求更多不会报错,只是最多返回 1000 条)。除此之外,任何单个工具响应上限为 20,000 个字符 — 如果一页结果超过该限制,响应将被截断,并带有 truncated/original_count 字段,而不是完整返回。
设备(3)
Tool | 功能 | 参数 |
| 列出监控设备 |
|
| 列出设备分组 |
|
| 查设备的自定义/系统属性 |
|
设备数据源(4)
Tool | 功能 | 参数 |
| 列出设备已应用的 DataSource |
|
| 列出某 DataSource 在设备上的实例 |
|
| 获取 DataSource 采集的数据点 |
|
| 查 DataSource 实例的告警阈值/设置覆盖 |
|
告警(3)
Tool | 功能 | 参数 |
| 列出活跃/历史告警 |
|
| 查单条告警详情 |
|
| 列出告警升级规则 |
|
管理(2)
Tool | 功能 | 参数 |
| 列出门户用户(admin)账号 |
|
| 列出角色(权限集) |
|
报表(2)
Tool | 功能 | 参数 |
| 列出报表 |
|
| 列出报表分组 |
|
SDT(1)
Tool | 功能 | 参数 |
| 列出计划停机(Scheduled Down Time)条目 |
|
错误处理
工具错误以 JSON 字符串形式返回(而非协议级异常),因此 Agent 可以以编程方式根据它进行分支处理:
{"error": {"code": "upstream_error", "message": "...", "retryable": true}}code 是固定词汇表之一:not_configured、unauthorized、not_found、invalid_argument、rate_limited、upstream_error。retryable 表示同一调用是否可安全重试(对于 rate_limited/upstream_error 为 true,否则为 false)。
网络健壮性
出站超时:连接 5 秒 / 读取 30 秒 / 写入 10 秒 / 连接池 5 秒。
有限重试(最多 3 次),在
429/5xx上采用有上限的指数退避,并遵循Retry-After(如果存在)。每次重试都会从头重新计算 LMv1 签名(其中嵌入了当前时间戳),因此重试的请求绝不会使用过期/失效的签名发送。
进程生命周期内复用单个共享的
httpx.AsyncClient连接池。
测试示例 (Test Example)
列出设备:
{
"method": "tools/call",
"params": { "name": "logicmonitor_get_devices", "arguments": { "size": 10 } }
}针对运行中的服务器(streamable HTTP MCP 端点)的等效 curl 命令:
curl -X POST http://localhost:8080/mcp \
-H "Content-Type: application/json" \
-H "X-LogicMonitor-Company: <company>" \
-H "X-LogicMonitor-Access-Id: <access_id>" \
-H "X-LogicMonitor-Access-Key: <access_key>" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": { "name": "logicmonitor_get_devices", "arguments": { "size": 10 } }
}'参数化调用:
{
"method": "tools/call",
"params": {
"name": "logicmonitor_get_device_datasources",
"arguments": { "device_id": "7186" }
}
}API 参考
认证方案:LMv1 API Tokens
基础 URL 模式:
https://{company}.logicmonitor.com/santaba/rest
已知差距 / 尚未验证
尚未针对真实的 LogicMonitor 门户进行测试 — 目前仅完成了协议级验证(健康检查、缺少/部分请求头时返回 401、
tools/list返回全部 15 个工具、单元测试的错误码映射)。工具覆盖范围有意与 MSPbots 现有的 15 个已注册 LogicMonitor API 条目保持一致,而非完整的 LogicMonitor REST API 表面(后者还涵盖写操作、仪表板、网站、采集器和 LogicModules)— 如需更广泛的覆盖,可按请求扩展。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
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
Remote MCP for 1,500+ APIs. Vault-managed credentials; OAuth or API key. Search, load, and execute.
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
- OneOAuthai.withone
Search, document and execute authenticated API calls across 700+ apps via one MCP server
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceMCP server for the FortiMonitor v2 monitoring API. 241 tools across 33 modules covering server management, outage monitoring, maintenance windows, metrics, notifications, cloud monitoring, SNMP, dashboards, reporting, and more. Unofficial community project, not affiliated with Fortinet. Python, MIT license, Docker and local deployment supported.3MIT
- AlicenseBqualityCmaintenanceExposes Databricks REST APIs as MCP tools for managing and querying a Databricks workspace, including clusters, jobs, SQL, Unity Catalog, and more.100MIT
- AlicenseBqualityCmaintenanceExposes N-able N-central REST API as MCP tools for managing devices, organizations, users, and more, with support for read-only, write, and full write modes.825MIT
- AlicenseNot gradedqualityBmaintenanceExposes the ConnectWise Command (Continuum) ITSupport247 Reporting API as MCP tools, enabling querying of sites, devices, patches, antivirus, performance, and more.Apache 2.0
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/MSPbotsAI/logicmonitor-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server