logicmonitor-mcp
Exposes the LogicMonitor REST API as MCP tools with per-request LMv1 authentication, enabling querying of devices, alerts, reports, and more.
README
logicmonitor-mcp
LogicMonitor MCP server — exposes the LogicMonitor REST API (v3, /santaba/rest) as MCP tools.
Overview
This server implements the Model Context Protocol (Streamable HTTP/SSE transport) and wraps the LogicMonitor endpoints used by MSPbots' own LogicMonitor integration. It follows the MSPbots Vendor MCP Service SOP: stateless, no stored credentials, per-request header authentication.
The underlying API authenticates via LMv1 — a per-request HMAC-SHA256 signature computed from an Access Id / Access Key pair (the same scheme MSPbots itself uses for this integration: Company + Access Id + Access Key, no OAuth). This server computes the LMv1 signature itself for every outgoing request from the credentials supplied in that request's headers; it never persists them.
Quick Start
Docker (recommended)
docker compose up --build
The server starts on http://localhost:8080.
Local (uv)
uv sync
python -m logicmonitor_mcp
Health Check
curl http://localhost:8080/health
# {"status": "ok", "service": "logicmonitor-mcp", "transport": "http"}
No credentials are required for the health endpoint.
授权参数说明 (Authentication)
Every request to /mcp must include the following HTTP headers:
| Header | 类型 | 是否必填 | 默认值 | 枚举值 | 字段描述 | Example |
|---|---|---|---|---|---|---|
X-LogicMonitor-Company |
string | 必填 | 无 | 无(自由文本) | LogicMonitor 门户子域名,即 https://{company}.logicmonitor.com 中的 {company} 部分,同时也是签名算法中 base URL 的一部分。 |
X-LogicMonitor-Company: acme |
X-LogicMonitor-Access-Id |
string | 必填 | 无 | 无(自由文本) | LMv1 API Token 的 Access Id,与 MSPbots 集成配置里的 "Access Id" 字段一致。 | X-LogicMonitor-Access-Id: abcd1234efgh5678 |
X-LogicMonitor-Access-Key |
string | 必填 | 无 | 无(自由文本,敏感信息) | LMv1 API Token 的 Access Key(密钥),用于对每次请求做 HMAC-SHA256 签名,本服务只在本次请求生命周期内使用,不做持久化存储。 | X-LogicMonitor-Access-Key: <access_key> |
Missing any of the three headers returns 401 Unauthorized.
Environment Variables
| Variable | Default | Description |
|---|---|---|
MCP_HTTP_PORT |
8080 |
Listening port |
MCP_HTTP_HOST |
0.0.0.0 |
Listening host |
logicmonitor-mcp has no required environment variables — all identity (company/access id/access key) is per-request via headers.
MCP Endpoint
POST http://localhost:8080/mcp
Connect your MCP client with:
- Transport:
http(Streamable HTTP / SSE) - Headers:
X-LogicMonitor-Company,X-LogicMonitor-Access-Id,X-LogicMonitor-Access-Key(all required)
Tool List
15 tools — matching the 15 LogicMonitor API endpoints already registered under this integration in MSPbots (sys_integration subject_code LOGICMONITOR), so tool coverage is consistent with MSPbots' existing scope.
Devices (3)
| Tool | 功能 | 参数 |
|---|---|---|
logicmonitor_get_devices |
列出监控设备 | size=100, offset=0, sort?, filter?, fields? |
logicmonitor_get_device_groups |
列出设备分组 | size=100, offset=0, sort?, filter?, fields? |
logicmonitor_get_device_properties |
查设备的自定义/系统属性 | device_id, size=100, offset=0, filter? |
Device DataSources (4)
| Tool | 功能 | 参数 |
|---|---|---|
logicmonitor_get_device_datasources |
列出设备已应用的 DataSource | device_id, size=100, offset=0, filter?, fields? |
logicmonitor_get_device_datasource_instances |
列出某 DataSource 在设备上的实例 | device_id, source_id, size=100, offset=0, filter? |
logicmonitor_get_device_datasource_data |
获取 DataSource 采集的数据点 | device_id, source_id, start?, end? |
logicmonitor_get_device_datasource_instance_alertsettings |
查 DataSource 实例的告警阈值/设置覆盖 | device_id, source_id, instance_id |
Alerts (3)
| Tool | 功能 | 参数 |
|---|---|---|
logicmonitor_get_alerts |
列出活跃/历史告警 | size=50, offset=0, sort?, filter?, fields? |
logicmonitor_get_alert_detail |
查单条告警详情 | alert_id |
logicmonitor_get_alert_rules |
列出告警升级规则 | size=100, offset=0, filter? |
Admin (2)
| Tool | 功能 | 参数 |
|---|---|---|
logicmonitor_get_users |
列出门户用户(admin)账号 | size=100, offset=0, filter?, fields? |
logicmonitor_get_roles |
列出角色(权限集) | size=100, offset=0, filter? |
Reports (2)
| Tool | 功能 | 参数 |
|---|---|---|
logicmonitor_get_reports |
列出报表 | size=100, offset=0, filter?, fields? |
logicmonitor_get_report_groups |
列出报表分组 | size=100, offset=0, filter? |
SDT (1)
| Tool | 功能 | 参数 |
|---|---|---|
logicmonitor_get_sdts |
列出计划停机(Scheduled Down Time)条目 | size=100, offset=0, filter? |
测试示例 (Test Example)
List devices:
{
"method": "tools/call",
"params": { "name": "logicmonitor_get_devices", "arguments": { "size": 10 } }
}
Equivalent curl against the running server (streamable HTTP MCP endpoint):
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 } }
}'
A parameterized call:
{
"method": "tools/call",
"params": {
"name": "logicmonitor_get_device_datasources",
"arguments": { "device_id": "7186" }
}
}
API Reference
- Official docs: LogicMonitor REST API v3
- Auth scheme: LMv1 API Tokens
- Base URL pattern:
https://{company}.logicmonitor.com/santaba/rest
Known Gaps / Not Yet Verified
- Not yet tested against a live LogicMonitor portal — only protocol-level verification (health check, 401 on missing headers,
tools/listreturning all 15 tools) has been done so far. - Tool coverage intentionally matches MSPbots' existing 15 registered LogicMonitor API entries rather than the full LogicMonitor REST API surface (which additionally covers write operations, dashboards, websites, collectors, and LogicModules) — expand on request if broader coverage is needed.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。