
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
logicmonitor-api-mcp
Advanced tools
⚠️ Community Project Disclaimer
This is an open-source community project and is not officially supported by LogicMonitor. While hosted in the LogicMonitor github organization, support is provided on an "as-is" basis through GitHub issues and community contributions. For questions, bug reports, or feature requests, please open an issue on this repository.
A Model Context Protocol (MCP) server that provides secure access to the LogicMonitor API, enabling AI assistants to manage monitoring infrastructure through natural language commands.
raw) together with request metadata so downstream agents never lose fields that the API exposes.fields parameter, only LogicMonitor-supported field names are accepted. Invalid field names trigger a InvalidParams error to prevent silent data loss or filtering mistakes.src/schemas/swagger.json file shipped with the project contains the authoritative schema for each resource if you need to look up the available fields.items / device, etc. – parsed data objects for convenienceraw – the exact API payloadmeta – request/response metadata (status, timing, rate-limit info)request – the effective parameters sent to LogicMonitor (validated field list, offsets, filters, etc.)npm install -g logicmonitor-api-mcp
# Clone the repository
git clone https://github.com/LogicMonitor/logicmonitor-api-mcp.git
cd logicmonitor-api-mcp
# Install dependencies
npm install
# Build the project
npm run build
You'll need:
STDIO mode is best for local AI assistants like Claude Desktop. Add to your MCP settings:
{
"mcpServers": {
"logicmonitor": {
"command": "logicmonitor-api-mcp",
"args": ["--stdio"],
"env": {
"LM_ACCOUNT": "your-account-name",
"LM_BEARER_TOKEN": "your-bearer-token"
}
}
}
}
If installed from source, use the full path:
{
"mcpServers": {
"logicmonitor": {
"command": "node",
"args": ["/path/to/logicmonitor-api-mcp/dist/index.js", "--stdio"],
"env": {
"LM_ACCOUNT": "your-account-name",
"LM_BEARER_TOKEN": "your-bearer-token"
}
}
}
}
HTTP mode allows remote access and is suitable for shared deployments:
# With environment variables (default port is 3000)
LM_ACCOUNT=your-account LM_BEARER_TOKEN=your-bearer-token logicmonitor-api-mcp
# Or use a .env file
cp .env.example .env
# Edit .env with your credentials
logicmonitor-api-mcp
Option A - Pass credentials via headers (more secure):
{
"mcpServers": {
"logicmonitor": {
"url": "http://localhost:3000/mcp",
"transport": "http",
"headers": {
"X-LM-Account": "your-account-name",
"X-LM-Bearer-Token": "your-bearer-token"
}
}
}
}
Option B - Server-side credentials (for trusted environments):
# Start server with credentials
LM_ACCOUNT=your-account LM_BEARER_TOKEN=your-token logicmonitor-api-mcp
Then connect without credentials in headers:
{
"mcpServers": {
"logicmonitor": {
"url": "http://localhost:3000/mcp",
"transport": "http"
}
}
}
When no X-LM-* headers are provided, the server falls back to LM_ACCOUNT and LM_BEARER_TOKEN environment variables that were set when the process started.
The server supports two auth modes (AUTH_MODE):
none (default): No MCP client authentication. Only safe for STDIO transport or trusted networks.bearer: Static bearer token authentication. Clients send Authorization: Bearer <token>.LogicMonitor Credentials are resolved in priority order:
Bearer Token Configuration
AUTH_MODE=bearer
MCP_BEARER_TOKENS=token1,token2,token3
# Option 1: Use per-request headers (most flexible)
# Clients send X-LM-Account and X-LM-Bearer-Token headers with each request
# Option 2: Map bearer tokens to LM credentials
AUTH_CREDENTIAL_MAPPING='{"token1":{"account":"prod","token":"lm-xyz"},"token2":{"account":"dev","token":"lm-abc"}}'
# Option 3: Use default credentials (fallback for all tokens)
LM_ACCOUNT=default-account
LM_BEARER_TOKEN=default-lm-token
# Wildcard mapping (applies to any token not explicitly mapped)
AUTH_CREDENTIAL_MAPPING='{"*":{"account":"shared","token":"lm-default"}}'
Example: Bearer token with per-request credentials
curl -H "Authorization: Bearer token1" \
-H "X-LM-Account: mycompany" \
-H "X-LM-Bearer-Token: my-lm-token" \
-H "Content-Type: application/json" \
https://your-server:3000/mcp
The server provides resource-based tools that handle all CRUD operations through an operation parameter:
lm_deviceManage LogicMonitor devices with all operations:
lm_device_groupManage device groups with full CRUD support:
lm_websiteManage website monitoring:
lm_website_groupManage website groups:
lm_collectorList and view collectors (read-only):
lm_alertManage alerts (read and update only):
lm_userManage LogicMonitor users:
lm_dashboardManage LogicMonitor dashboards:
lm_collector_groupManage collector groups:
lm_device_dataRetrieve device monitoring data including datasources, instances, and time-series metrics:
Key features:
datasourceIncludeFilter: "CPU*")-6h/-7d, ISO 8601 dates, Unix epochs, or "now" — defaults to last 24 hours)lm_sdtManage Scheduled Down Times (maintenance windows):
isEffective:true for active SDTs)"R_42")SDT types: ResourceSDT (device), ResourceGroupSDT, WebsiteSDT, WebsiteGroupSDT, CollectorSDT, DeviceDataSourceSDT, and more.
lm_opsnoteManage operational notes for change tracking:
lm_sessionManage session context and variables using standard CRUD operations:
Operations:
limit (optional, 1-50)key (optional - if omitted, returns full context), fields (project specific fields from arrays), index (single item by position), limit (first N items), historyLimit, includeResultskey (required), value (required)key (required), value (required)scope (optional: 'variables', 'history', 'results', or 'all')Example Usage:
// Store devices for batch operations
{ "operation": "create", "key": "myDevices", "value": [...] }
// Get a stored variable
{ "operation": "get", "key": "myDevices" }
// View session history
{ "operation": "list", "limit": 10 }
// Clear all session data
{ "operation": "delete", "scope": "all" }
The server provides guided workflows for complex multi-step tasks:
export-device-metricsA comprehensive workflow that guides you through exporting monitoring data from LogicMonitor devices.
Arguments:
device_identifier (required) - Device ID, name, or filter (e.g., "123", "displayName:prod")datasource_filter (optional) - Wildcard filter for datasources (e.g., "CPU*", "Memory")time_range_hours (optional) - Hours of historical data to retrieve (default: 24)Workflow Steps:
Example Usage:
"Use the export-device-metrics prompt to get CPU and memory data for device 123 over the last 48 hours"
The prompt will guide the AI through each step, ensuring proper data collection and formatting.
batch-device-updateA guided workflow for finding devices by filter, reviewing them, and applying updates in bulk.
Arguments:
device_filter (required) - Filter to select devices (e.g., "displayName:*prod*", "hostStatus:dead")update_description (required) - Description of what to update (e.g., "disable alerting", "add custom property env=production")Workflow Steps:
applyToPreviousalert-triageA guided workflow for listing, filtering, and triaging LogicMonitor alerts.
Arguments:
severity_filter (optional) - Alert severity to focus on: "critical", "error", "warning", or "all" (default)resource_filter (optional) - Filter to scope alerts to specific resources (e.g., "monitorObjectName:*prod*")The server automatically resolves resource IDs from previous operations:
# Create a device
lm_device({ operation: "create", displayName: "web-01", ... })
# Update it without specifying ID - automatically uses last created device
lm_device({ operation: "update", disableAlerting: true })
Three ways to perform batch operations:
1. Explicit Arrays
{
"operation": "update",
"devices": [
{"id": 123, "disableAlerting": true},
{"id": 456, "disableAlerting": true}
]
}
2. Apply to Previous Results
// First, list devices
{"operation": "list", "filter": "name:web*"}
// Then update all from previous list
{
"operation": "update",
"applyToPrevious": "lastDeviceList",
"updates": {"disableAlerting": true}
}
3. Filter-Based Batch
{
"operation": "update",
"filter": "name:web*",
"updates": {"disableAlerting": true}
}
"Add server web-01.example.com (192.168.1.10) to monitoring in group Production using collector 1"
"List all devices in the Production group"
"Get details for device 1234"
"Update the device to disable alerting" # Automatically uses device from previous operation
"List all devices with names starting with 'web'"
"Update all those devices to disable alerting" # Uses applyToPrevious automatically
"Create these device groups:
- Production Web Servers (parent: 1)
- Production Database Servers (parent: 1)
- Staging Web Servers (parent: 2)"
"Update all devices matching 'test-*' to disable alerting"
# Translates to: lm_device({ operation: "update", filter: "name:test*", updates: { disableAlerting: true }})
"Delete all devices in the 'temp' group"
# Uses filter-based batch delete with safety checks
"List all critical alerts that aren't cleared"
"Acknowledge the first alert with comment 'Investigating'"
"Add a note to alert 12345 saying 'Fixed in deploy #456'"
"List all datasources for device 123"
"Show me CPU metrics for device 123 over the last 24 hours"
"Get memory usage data for all instances on device 456 for the past week"
"Use the export-device-metrics prompt to get all CPU and Memory data for production servers"
# Install dependencies
npm install
# Run in development mode
npm run dev
# Build
npm run build
Enable debug logging:
LOG_LEVEL=debug logicmonitor-api-mcp
This project is licensed under the Mozilla Public License 2.0 (MPL-2.0). See the LICENSE file for details.
This project uses third-party dependencies that are licensed under permissive open-source licenses (MIT, BSD, ISC). These licenses are compatible with MPL-2.0. See THIRD-PARTY-NOTICES.md for details.
FAQs
MCP server for LogicMonitor API integration
We found that logicmonitor-api-mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.