Back to Browse

LogicMonitor REST MCP Server

Developer ToolsModerate7.5MCP RegistryLocal
Free

Server data from the Official MCP Registry

LogicMonitor REST API v3 in 273 tools: alerts, devices, metrics, dashboards, logs and Edwin AI.

About

LogicMonitor REST API v3 in 273 tools: alerts, devices, metrics, dashboards, logs and Edwin AI.

Security Report

7.5
Moderate7.5Low Risk

Valid MCP server (2 strong, 1 medium validity signals). 5 known CVEs in dependencies Package registry verified. Imported from the Official MCP Registry.

5 files analyzed · 6 issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

What You'll Need

Set these up before or after installing:

Portal hostname, such as company.logicmonitor.com; required unless LM_MULTI_PORTAL is trueOptional

Environment variable: LM_PORTAL

LogicMonitor API Bearer token; LM_ACCESS_ID with LM_ACCESS_KEY can stand in for itRequired

Environment variable: LM_BEARER_TOKEN

LMv1 API access ID; with LM_ACCESS_KEY it stands in for LM_BEARER_TOKENOptional

Environment variable: LM_ACCESS_ID

LMv1 API access key, the secret of the LM_ACCESS_ID tokenRequired

Environment variable: LM_ACCESS_KEY

API request timeout in seconds, 5 to 300Optional

Environment variable: LM_TIMEOUT

List and allow the tools that change the portal (create, update, delete, acknowledge, run)Optional

Environment variable: LM_ENABLE_WRITE_OPERATIONS

Resends of a rate-limited request, or of a 5xx on an idempotent method, 0 to 10Optional

Environment variable: LM_MAX_RETRIES

Longest wait in seconds a server's Retry-After header can impose between retriesOptional

Environment variable: LM_RETRY_AFTER_CAP_SECONDS

Serve several portals from one server, chosen at runtime (stdio only)Optional

Environment variable: LM_MULTI_PORTAL

Age-encrypted portal vault (multi-portal mode)Optional

Environment variable: LM_VAULT_FILE

Age identity file that decrypts LM_VAULT_FILEOptional

Environment variable: LM_AGE_KEY

Plaintext JSON portal map for testing multi-portal mode; LM_VAULT_FILE wins when both are setOptional

Environment variable: LM_PORTALS_FILE

stdio, or http for the Streamable HTTP endpoint at /mcpOptional

Environment variable: LM_TRANSPORT

HTTP bind address; a non-loopback bind needs LM_HTTP_AUTH_TOKEN or LM_HTTP_ALLOW_UNAUTHENTICATEDOptional

Environment variable: LM_HTTP_HOST

HTTP portOptional

Environment variable: LM_HTTP_PORT

Bearer token every HTTP request must carry, except to the health endpoints and /; 16 characters or moreRequired

Environment variable: LM_HTTP_AUTH_TOKEN

Accept a non-loopback HTTP bind with no LM_HTTP_AUTH_TOKEN, for a listener another layer protectsOptional

Environment variable: LM_HTTP_ALLOW_UNAUTHENTICATED

Comma-separated Host names the HTTP server accepts besides the loopback names and LM_HTTP_HOSTOptional

Environment variable: LM_HTTP_ALLOWED_HOSTS

TLS certificate for the HTTP transportOptional

Environment variable: LM_HTTP_SSL_CERTFILE

TLS private key for the HTTP transportOptional

Environment variable: LM_HTTP_SSL_KEYFILE

Password of an encrypted LM_HTTP_SSL_KEYFILERequired

Environment variable: LM_HTTP_SSL_KEYFILE_PASSWORD

Tool calls kept in the session history, 0 to 1000Optional

Environment variable: LM_SESSION_HISTORY_SIZE

Comma-separated tool names or glob patterns to enable (e.g., get_*,create_device)Optional

Environment variable: LM_ENABLED_TOOLS

Comma-separated tool names or glob patterns to disable (e.g., delete_*)Optional

Environment variable: LM_DISABLED_TOOLS

Comma-separated categories to list (read, write, delete, export, import, session, workflow); narrows the tool filters, never widens themOptional

Environment variable: LM_MCP_CATEGORIES

Add a LogicMonitor API call to the HTTP /health check for callers that pass the bearer checkOptional

Environment variable: LM_HEALTH_CHECK_CONNECTIVITY

Server log levelOptional

Environment variable: LM_LOG_LEVEL

Edwin AI API credential client id; with EDWIN_CLIENT_TOKEN it turns on the eight Edwin toolsOptional

Environment variable: EDWIN_CLIENT_ID

Secret of that Edwin AI credentialRequired

Environment variable: EDWIN_CLIENT_TOKEN

Edwin AI base URL, https only (default: https://<portal name>.dexda.ai; required in multi-portal mode)Optional

Environment variable: EDWIN_HOST

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "lm-mcp": {
      "command": "uvx",
      "args": [
        "lm-mcp==5.0.1"
      ],
      "env": {
        "LM_PORTAL": "your-lm-portal-here",
        "EDWIN_HOST": "your-edwin-host-here",
        "LM_AGE_KEY": "your-lm-age-key-here",
        "LM_TIMEOUT": "your-lm-timeout-here",
        "LM_ACCESS_ID": "your-lm-access-id-here",
        "LM_HTTP_HOST": "your-lm-http-host-here",
        "LM_HTTP_PORT": "your-lm-http-port-here",
        "LM_LOG_LEVEL": "your-lm-log-level-here",
        "LM_TRANSPORT": "your-lm-transport-here",
        "LM_ACCESS_KEY": "your-lm-access-key-here",
        "LM_VAULT_FILE": "your-lm-vault-file-here",
        "LM_MAX_RETRIES": "your-lm-max-retries-here",
        "EDWIN_CLIENT_ID": "your-edwin-client-id-here",
        "LM_BEARER_TOKEN": "your-lm-bearer-token-here",
        "LM_MULTI_PORTAL": "your-lm-multi-portal-here",
        "LM_PORTALS_FILE": "your-lm-portals-file-here",
        "LM_ENABLED_TOOLS": "your-lm-enabled-tools-here",
        "LM_DISABLED_TOOLS": "your-lm-disabled-tools-here",
        "LM_MCP_CATEGORIES": "your-lm-mcp-categories-here",
        "EDWIN_CLIENT_TOKEN": "your-edwin-client-token-here",
        "LM_HTTP_AUTH_TOKEN": "your-lm-http-auth-token-here",
        "LM_HTTP_SSL_KEYFILE": "your-lm-http-ssl-keyfile-here",
        "LM_HTTP_SSL_CERTFILE": "your-lm-http-ssl-certfile-here",
        "LM_HTTP_ALLOWED_HOSTS": "your-lm-http-allowed-hosts-here",
        "LM_SESSION_HISTORY_SIZE": "your-lm-session-history-size-here",
        "LM_ENABLE_WRITE_OPERATIONS": "your-lm-enable-write-operations-here",
        "LM_RETRY_AFTER_CAP_SECONDS": "your-lm-retry-after-cap-seconds-here",
        "LM_HEALTH_CHECK_CONNECTIVITY": "your-lm-health-check-connectivity-here",
        "LM_HTTP_SSL_KEYFILE_PASSWORD": "your-lm-http-ssl-keyfile-password-here",
        "LM_HTTP_ALLOW_UNAUTHENTICATED": "your-lm-http-allow-unauthenticated-here"
      }
    }
  }
}

Some servers take additional arguments. See the repository for details.

Documentation

View on GitHub

From the project's GitHub README.

LogicMonitor MCP Server

PyPI version Python versions License: MIT

A Model Context Protocol (MCP) server that gives AI assistants the LogicMonitor REST API v3 through 273 tools, 3 workflow prompts and 25 resources.

Upgrading from 4.x

5.0.0 is a breaking release. Check a setup that worked on 4.3.0 against these before it moves to 5.x. The CHANGELOG has the rest under Upgrading from 4.3.0.

  • 82 of the 306 tool names in 4.3.0 no longer answer: 7 are renamed and 75 removed. The CHANGELOG's table gives each one's 5.0 name or what to call instead.
  • A tool that changes the portal is listed only with LM_ENABLE_WRITE_OPERATIONS=true. 4.3.0 listed its write tools and refused the call.
  • A failed call returns one JSON envelope, {"error": {"code", "message", ...}}, in place of the Error: and Suggestion: lines.
  • uvx --from lm-mcp lm-mcp-server takes the newest release the first time it runs on a machine and uv's cached one after that, so a setup moves to 5.x when that cache is cleared or refreshed. uv tool install lm-mcp stays on its version until uv tool upgrade lm-mcp. To hold a setup on 4.3.0, start it with uvx --from lm-mcp==4.3.0 lm-mcp-server.

Overview

Your MCP client starts the server as a subprocess and talks to it over stdio; the server calls your portal with your API token. It can also run as an HTTP service that serves MCP at /mcp.

Of the 273 tools, 261 are there with one portal. Multi-portal mode adds four portal tools, and Edwin AI credentials add eight Edwin tools. The server lists a tool that changes the portal only when you set LM_ENABLE_WRITE_OPERATIONS=true, and refuses it by name until then, so by default a client sees 150 of them (154 in multi-portal mode, 7 more with Edwin credentials).

Before one of the 36 destructive tools runs, the server asks you to confirm when the client supports MCP elicitation. Where it cannot ask, as over the stateless HTTP transport, the write setting is the only check.

Setup

You need uv for uvx, and a LogicMonitor API token: a Bearer token, or an LMv1 access ID and key.

Claude Code

  1. In your portal, go to Settings > Users and Roles > API Tokens.

  2. Create an API-only user or add a token to an existing user, then copy the Bearer token.

  3. Add the server:

    claude mcp add logicmonitor \
      -e LM_PORTAL=yourcompany.logicmonitor.com \
      -e LM_BEARER_TOKEN=<your-bearer-token> \
      -- uvx --from lm-mcp lm-mcp-server
    
  4. Run claude mcp list. It lists logicmonitor as connected.

  5. Ask your assistant to "List the first 5 devices in LogicMonitor".

Other clients

Claude Desktop, Cursor and Gemini CLI read the same block:

{
  "mcpServers": {
    "logicmonitor": {
      "command": "uvx",
      "args": ["--from", "lm-mcp", "lm-mcp-server"],
      "env": {
        "LM_PORTAL": "yourcompany.logicmonitor.com",
        "LM_BEARER_TOKEN": "your-bearer-token"
      }
    }
  }
}

documentation/client-setup.md has each client's config file and steps, including VS Code and OpenAI Codex CLI, whose formats differ. If your Cursor release still sends only the first 40 MCP tools to the agent, that page shows how to narrow the list with LM_MCP_CATEGORIES.

Container

The image on GitHub Container Registry runs the HTTP transport on port 8080:

docker run --rm -p 8080:8080 \
  -e LM_PORTAL=yourcompany.logicmonitor.com \
  -e LM_BEARER_TOKEN=<your-bearer-token> \
  -e LM_HTTP_AUTH_TOKEN=<a-secret-of-16-characters-or-more> \
  ghcr.io/ryanmat/mcp-server-logicmonitor:latest

Point a Streamable HTTP client at http://127.0.0.1:8080/mcp with the header Authorization: Bearer <LM_HTTP_AUTH_TOKEN>. Deployment covers compose, TLS and Kubernetes.

Other install methods

# pip
pip install lm-mcp

# a persistent install; uv tool upgrade lm-mcp picks up a new release
uv tool install lm-mcp

# from source
git clone https://github.com/ryanmat/mcp-server-logicmonitor.git
cd mcp-server-logicmonitor
uv sync
uv run lm-mcp-server

Restart your MCP client after an upgrade.

Usage

Ask your assistant in plain language:

  • "Triage the critical alerts from the last 4 hours"
  • "Run a health check on device 123"
  • "Give me a portal overview for shift handoff"
  • "Forecast when memory on device 123 reaches 90 percent"
  • "What is the blast radius if device 789 goes down?"
  • "Acknowledge alert LMA12345 with the note 'Investigating disk issue'"
  • "Create a 2-hour SDT for device 123"

The tools also take LogicMonitor filter syntax, for example displayName~"prod",hostStatus:"normal". String values, hostStatus words included, are quoted.

Find a tool

Start with search_tools. It searches the tools your settings list by keyword, so with writes off it names no write tool, and category narrows it to one group. The lm://guide/tool-categories resource groups all 273 tools by domain, and documentation/tools.md lists every tool with its parameters and whether it writes, generated from the registry.

Tool families

FamilyWhat the tools cover
AlertsQuery, acknowledge, bulk acknowledge, escalate and annotate alerts; alert rules; datapoint thresholds, read at instance, device or group level with the level each comes from, and set or cleared at instance or group level
DevicesDevices and groups, their properties and manual instances; Active Discovery scheduling; the device delta, to follow what changed; the unmonitored devices a NetScan found
MetricsDatasources and the devices each applies to, instances, metric data and graphs
DashboardsDashboards, widgets and dashboard groups
SDTScheduled downtime, one at a time or in bulk
CollectorsCollectors and collector groups, with the operations below
WebsitesSynthetic checks, website groups and checkpoint locations
ReportsList, view, run and schedule reports
EscalationsEscalation chains and recipient groups
Users and auditUsers, roles, access groups, API tokens, audit logs and ops notes
LogicModulesData, config, event, property, topology, log, diagnostic and remediation sources: query, create, update, delete and import, and read any as its full REST object with raw=true; Config Archive versions, diffs and on-demand collection
Diagnostics and remediationAssigned sources, execution results with script output, manual runs, action chains and action rules
ServicesService Insights services, service groups and rules
APMTraced services and their alerts; a service's operations, metrics and properties through the device tools
NetworkNeighbors, interfaces, flows, connections, top talkers and link flaps. See networking intelligence
Usage and costThe contract's entitlements per feature, current resource counts (not billing figures), cost recommendations and idle resources
Ingestioningest_logs and push_metrics, with a Bearer or an LMv1 token
Batch jobsBatch jobs and the BatchJob datasources on a device

update_logicmodule(type, id, changes, mode) is the safe way to change a LogicModule: it reads the definition, deep-merges changes, checks required fields, and returns a dry-run diff unless you ask it to apply.

get_device_flows and get_device_top_talkers answer FEATURE_DISABLED when the portal has NetFlow off, as the only portal tested does, so their row shapes are unverified against NetFlow data.

Analytics and composites

The analytics run in the server, so an assistant gets an answer in one call:

  • analyze_metric reads one series once for its summary, trend, seasonality, change points, anomalies and a forecast to a threshold, and can compare it with an earlier window.
  • analyze_alerts clusters a window's alerts and reports statistics, noise, flapping and bursts.
  • correlate_metrics, calculate_availability (with MTTR and an SLO error budget) and analyze_blast_radius cover the rest.

The composites combine several reads to answer a common investigation: triage, diagnose, health_check, portal_overview, capacity_plan and detect_site_outage. Each takes detail_level (summary or full) and returns what it could read when a sub-call fails. triage, portal_overview, capacity_plan and detect_site_outage send a progress notification per phase when the request carries a progress token. These eleven tools declare an output schema and return structured content beside the JSON text.

Edwin AI

Set EDWIN_CLIENT_ID and EDWIN_CLIENT_TOKEN to an Edwin AI API credential and the server lists eight more tools:

  • get_edwin_insights and get_edwin_insight read the incidents Edwin built from correlated alerts, with its root cause and remediation analysis when it has one.
  • get_edwin_records, get_edwin_alert_volume and get_edwin_metadata read Edwin's copy of alerts and events and its data model.
  • get_edwin_tools lists Edwin's agent tools, and edwin_run_tool runs one. It needs writes on, every run is audited, and multi-portal mode leaves it out, since one Edwin tenant serves every portal there.
  • ask_edwin asks Edwin a question and waits up to two minutes for the answer.

The server calls https://<portal name>.dexda.ai unless EDWIN_HOST names another host; multi-portal mode has no portal name to derive it from, so set EDWIN_HOST there. A credential that lacks a scope a tool needs gets SCOPE_MISSING naming the scope.

Logs

get_log_pipelines, get_tracked_log_queries, get_log_query_groups, get_log_partitions and get_log_usage read LM Logs configuration and usage, and ingest_logs sends log lines. There is no log search: the v3 search endpoint applied neither the query nor the time range when probed.

OpenTelemetry metrics

get_otlp_metric_names, get_otlp_metric_labels and get_otlp_label_values explore the OTLP metrics your portal holds, and query_otlp_metrics runs a PromQL instant or range query. analyze_metric(source="otlp") analyzes a PromQL series, and add_widget and update_widget take an OTLP query for an advanced metrics widget. Alert rules cannot hold one: the v3 alert rule has no query field.

Collector operations

get_collectors marks each collector is_down, and get_collector_health adds the latest status check and five latest events for the collector you name and for each one not known to be up. The events, uploaded log files and upgrade history are readable too. With writes on, run_collector_status_check, restart_collector, acknowledge_collector_down and collector_debug act on a collector; collector_debug runs one debug command from a fixed list, and the portal records each session in its audit log. OpenTelemetry (lmotel) collectors are not listed: the v3 API does not return them.

Terraform imports

get_terraform_imports lists one resource type's objects as import blocks for the logicmonitor/logicmonitor provider, one per object:

import {
  to = logicmonitor_device_group.linux_servers_18
  id = "18"
}

It covers 15 of the 16 types whose provider docs (2.1.7) import by ID: alert_rule, collector, collector_group, dashboard, dashboard_group, datasource, device, device_group, escalation_chain, report_group, role, sdt, website, website_group and widget. It refuses device_group_cluster_alert_conf, whose importer reads a conf by ID without its device group, a read the API answers with 404. Each address ends with the object's ID, so objects that share a name get distinct addresses.

Save the blocks in a .tf file beside the provider configuration:

terraform {
  required_providers {
    logicmonitor = {
      source = "logicmonitor/logicmonitor"
    }
  }
}

provider "logicmonitor" {}

Then run terraform init and terraform plan -generate-config-out=generated.tf (Terraform 1.5 or later), and review generated.tf before terraform apply.

The provider authenticates only with an LMv1 token, api_id and api_key (LM_API_ID, LM_API_KEY), plus company (LM_COMPANY). It takes no Bearer token, so a server set up with LM_BEARER_TOKEN alone needs an LMv1 token for Terraform.

What the server does not do

The server does not run Terraform or launch Ansible jobs. Run Terraform with the terraform CLI, or HashiCorp's Terraform MCP server, which drives runs in HCP Terraform and Terraform Enterprise. Launch Ansible jobs with ansible-playbook, or Red Hat's MCP server for Ansible Automation Platform, a Technology Preview in AAP 2.6.4.

The portal refuses API tokens on API version 4 ("External calls are not supported for API Version 4"), so trace and span search, service maps, Resource Explorer, Cloud Operations billing and the lmotel collector list are out of the server's reach.

Multi-portal mode

One server entry can serve many portals. Set LM_MULTI_PORTAL=true and point the server at a credential vault: an age-encrypted file, or a plaintext JSON file for testing. get_portals, use_portal, get_current_portal and run_portal_reload manage the active portal, and every LogicMonitor tool takes an optional portal argument that runs one call against another portal. Each portal is read-only unless its record marks it writable. The mode is stdio-only. See MULTIPORTAL.md.

Claude Code skills

The repository ships slash-command runbooks. Clone it and run /lm-triage in Claude Code.

CommandWhat it does
/lm-triageTriage alerts: one triage call, then bursts, the worst clusters, and acknowledgements or notes you confirm
/lm-health <device>A device health check: CPU, memory and disk, anomalies, open alerts, availability and topology neighbors
/lm-portalA portal-wide overview: alert volume, clusters, noise, collectors, active SDTs, open critical and error alerts, and dead devices
/lm-capacity <device>Capacity planning: level, trend, daily and weekly cycles, level shifts and threshold-breach forecasts
/lm-apm [service]APM: services, operation-level RED metrics and alert correlation
/lm-remediate <alert_id or device>Diagnose an alert, then run an assigned RemediationSource or an Edwin AI agent tool after a checklist and your confirmation
/lm-edwin [insight]Check an Edwin AI insight's root cause against the causal CI's metric and the alert window
/lm-logs [partition]Review LM Logs partitions and their contracts, the pipelines that name them, usage, and saved and tracked queries

Resources and prompts

Clients read these through the standard MCP resource and prompt calls.

URIDescription
lm://schema/alertsAlert object fields, types, and descriptions
lm://schema/devicesDevice object fields and types
lm://schema/sdtsSDT (Scheduled Downtime) object fields
lm://schema/dashboardsDashboard object fields
lm://schema/collectorsCollector object fields
lm://schema/escalationsEscalation chain object fields
lm://schema/reportsReport object fields
lm://schema/websitesWebsite check object fields
lm://schema/datasourcesDataSource definition fields
lm://schema/usersUser object fields
lm://schema/auditAudit log entry fields
lm://enums/severityAlert severity levels: critical(4), error(3), warning(2), info(1)
lm://enums/device-statusDevice status words: normal, dead, dead-collector, unmonitored, disabled
lm://enums/sdt-typeSDT types: DeviceSDT, DeviceGroupSDT, etc.
lm://enums/alert-clearedAlert cleared status: true, false
lm://enums/alert-ackedAlert acknowledgment status: true, false
lm://enums/collector-buildCollector build types: EA, GD, MGD
lm://filters/alertsFilter fields and operators for alert queries
lm://filters/devicesFilter fields and operators for device queries
lm://filters/sdtsFilter fields and operators for SDT queries
lm://syntax/operatorsFilter operators: :, ~, >, <, !:, !~, >:, <:
lm://guide/tool-categoriesAll 273 tools organized by domain category
lm://guide/examplesCommon filter patterns and query examples
lm://guide/mcp-orchestrationPatterns for combining LogicMonitor with other MCP servers
lm://guide/best-practicesScenario-based best practices with recommendations and anti-patterns
PromptDescriptionArguments
incident_triageAnalyze active alerts, identify patterns, suggest root causeseverity, time_window_hours
capacity_reviewReview resource utilization and identify capacity concernsgroup_id, threshold_percent
remediationExecute a LogicMonitor remediation source with pre-execution safety checkshost_id, remediation_source_id, alert_id

Layout

PathContents
src/lm_mcp/server.pyEntry point (lm-mcp-server) and tool dispatch
src/lm_mcp/registry.pyTool definitions and the handler map
src/lm_mcp/tools/Tool handlers, one module per domain
src/lm_mcp/client/Async HTTP clients for the LogicMonitor and Edwin AI APIs
src/lm_mcp/auth/Bearer and LMv1 authentication
src/lm_mcp/transport/Stdio and HTTP transports
src/lm_mcp/prompts/, resources/MCP prompts and reference resources
.claude/skills/Claude Code skills
documentation/Tool reference (generated), client setup, networking intelligence
deploy/Dockerfile, compose file, Caddyfile, Kubernetes manifest
server.jsonMCP Registry manifest
tests/pytest suite and contract fixtures

Configuration

Set these as environment variables, through your client's env block or -e flags. The server does not read a .env file; to use one from a clone, run uv run --env-file .env lm-mcp-server. server.json lists the same variables for registry clients.

Authentication

Set LM_BEARER_TOKEN, or LM_ACCESS_ID and LM_ACCESS_KEY for an LMv1 token. Either works for every tool, ingest_logs and push_metrics included; with both set, the server uses the Bearer token. To create an LMv1 token, go to Settings > Users and Roles > Users, select a user, open the API Tokens tab, and create the access ID and key.

Portal, tools and requests

VariableRequiredDefaultDescription
LM_PORTALYes, one portal-Portal hostname, such as company.logicmonitor.com. Multi-portal mode takes hosts from the vault instead
LM_BEARER_TOKENYes, or LMv1-API Bearer token (10 characters or more)
LM_ACCESS_IDFor LMv1-LMv1 access ID; with LM_ACCESS_KEY it stands in for LM_BEARER_TOKEN
LM_ACCESS_KEYFor LMv1-LMv1 access key
LM_ENABLE_WRITE_OPERATIONSNofalseList and allow the tools that change the portal
LM_ENABLED_TOOLSNo-Comma-separated tool names or glob patterns to enable, such as get_*,triage. Not with LM_DISABLED_TOOLS
LM_DISABLED_TOOLSNo-Comma-separated tool names or glob patterns to disable, such as delete_*. Not with LM_ENABLED_TOOLS
LM_MCP_CATEGORIESNo-Comma-separated categories to list: read, write, delete, export, import, session, workflow. It narrows the two settings above, never widens them; useful under a client's tool cap
LM_TIMEOUTNo30Request timeout in seconds, 5 to 300
LM_MAX_RETRIESNo3Resends of a rate-limited request, and of a 5xx on an idempotent request (GET, PUT, DELETE); a POST or PATCH that gets a 5xx is not resent. 0 to 10
LM_RETRY_AFTER_CAP_SECONDSNo120Longest wait between retries. A Retry-After header can lengthen the backoff up to this cap, never shorten it
LM_SESSION_HISTORY_SIZENo50Tool calls kept in the session history, 0 to 1000
LM_LOG_LEVELNowarningdebug, info, warning or error, for the server and, under the HTTP transport, uvicorn. The server logs to stderr. Write audit lines (info for a success, warning for a failure) appear at every level, with argument values under credential-shaped keys such as password, token, api_key and extra_vars, LogicMonitor credential properties such as ssh.pass and snmp.community, and a property_value whose property_name is one, redacted

Multi-portal and Edwin AI

VariableRequiredDefaultDescription
LM_MULTI_PORTALNofalseServe several portals from one server, chosen with use_portal or a call's portal argument. Stdio only
LM_VAULT_FILENo-Age-encrypted portal vault
LM_AGE_KEYNo-Age identity file that decrypts the vault
LM_PORTALS_FILENo-Plaintext JSON portal map, for testing; the vault wins when both are set
EDWIN_CLIENT_IDNo-Edwin AI API credential client ID. With EDWIN_CLIENT_TOKEN it turns on the eight Edwin tools; one without the other leaves them off and logs a warning
EDWIN_CLIENT_TOKENNo-Secret of that Edwin AI credential
EDWIN_HOSTNohttps://<portal name>.dexda.aiEdwin AI base URL, https only. Required in multi-portal mode

HTTP transport

VariableRequiredDefaultDescription
LM_TRANSPORTNostdiostdio for MCP clients, or http (see Deployment)
LM_HTTP_HOSTNo0.0.0.0Bind address. Any address but 127.0.0.1, ::1 or localhost needs LM_HTTP_AUTH_TOKEN or LM_HTTP_ALLOW_UNAUTHENTICATED=true, or the server refuses to start
LM_HTTP_PORTNo8080Port
LM_HTTP_AUTH_TOKENNo-Bearer token required on every path except / and the health endpoints; 16 characters or more
LM_HTTP_ALLOW_UNAUTHENTICATEDNofalseStart on a non-loopback bind with no LM_HTTP_AUTH_TOKEN, for a listener protected another way
LM_HTTP_ALLOWED_HOSTSNo-Comma-separated Host names accepted on every route except /healthz and /readyz, besides the loopback names and a non-wildcard LM_HTTP_HOST, such as the name a reverse proxy forwards
LM_HTTP_SSL_CERTFILENo-TLS certificate; with LM_HTTP_SSL_KEYFILE the server speaks HTTPS
LM_HTTP_SSL_KEYFILENo-TLS private key
LM_HTTP_SSL_KEYFILE_PASSWORDNo-Password of an encrypted TLS private key
LM_HEALTH_CHECK_CONNECTIVITYNofalseAdd a LogicMonitor API call to /health for callers that pass the bearer check; /readyz never makes one

Deployment

Stdio needs no deployment: your client starts the server. The HTTP transport serves MCP at /mcp through the MCP SDK's Streamable HTTP, stateless and answering with JSON, beside the health and info routes. With LM_HTTP_AUTH_TOKEN set, /mcp requires it like every route outside / and the health endpoints. /mcp refuses a body that is not application/json with 415, and one over 4 MiB with 413.

cd deploy
cp .env.example .env
# Edit .env with your credentials, including LM_HTTP_AUTH_TOKEN (required)

docker compose up -d                  # HTTP on port 8080
docker compose --profile tls up -d    # behind Caddy with TLS

Health endpoints for orchestration:

  • GET /health: every component's status, plus the API connectivity check when LM_HEALTH_CHECK_CONNECTIVITY is on and the caller passes the bearer check
  • GET /healthz: liveness, 200 or 503
  • GET /readyz: readiness from local checks only; never calls the LogicMonitor API

Every route except /healthz and /readyz answers only the Host names the server expects (the loopback names, a non-wildcard LM_HTTP_HOST and LM_HTTP_ALLOWED_HOSTS) and refuses others with 400; the two probes accept any Host, so probes by pod IP work. The compose file requires LM_HTTP_AUTH_TOKEN in every profile and passes DOMAIN through as an allowed host for the tls profile.

deploy/k8s/deployment.yaml is a Deployment and Service for the published image that runs on AKS, EKS, GKE, OpenShift or plain Kubernetes. It reads credentials from a secret you create, documented at the top of the file, and wires the liveness and readiness probes to the endpoints above. Apply it with kubectl apply -f deploy/k8s/deployment.yaml.

SECURITY.md describes the exposure model.

Troubleshooting

The server logs to stderr. Set LM_LOG_LEVEL=debug to add the httpx and MCP SDK lines.

"Failed to connect" in Claude Code

The server is missing environment variables. Claude Code starts it with its own environment, so variables in your shell or a .env file do not reach it; pass them with -e:

claude mcp remove logicmonitor
claude mcp add logicmonitor \
  -e LM_PORTAL=yourcompany.logicmonitor.com \
  -e LM_BEARER_TOKEN=<your-bearer-token> \
  -- uvx --from lm-mcp lm-mcp-server

"Write operations are disabled"

The tools that change the portal are off by default: the server does not list them, and a call to one by name returns this error. Set LM_ENABLE_WRITE_OPERATIONS=true.

"spawn uvx ENOENT" in Claude Desktop

Claude Desktop cannot find uvx. Find its path with which uvx and use the full path:

{
  "command": "/Users/yourname/.local/bin/uvx",
  "args": ["--from", "lm-mcp", "lm-mcp-server"]
}

The server refuses to start with LM_TRANSPORT=http

The default bind is 0.0.0.0, which needs LM_HTTP_AUTH_TOKEN. Set the token, bind to 127.0.0.1, or set LM_HTTP_ALLOW_UNAUTHENTICATED=true for a listener protected another way.

Authentication errors

Check that the token is active and that its user's role grants the access the tool needs. Manage tokens under Settings > Users and Roles > API Tokens.

Rate limits

The server retries a rate-limited request with exponential backoff, waiting at least what Retry-After asks up to LM_RETRY_AFTER_CAP_SECONDS. If you keep hitting limits, make fewer calls.

Development

uv sync --extra http
uv run pytest
uv run ruff check src tests
uv run ruff format src tests

CONTRIBUTING.md has the workflow, the type-check ratchet, and what to regenerate after a tool change.

License

MIT License. See LICENSE.

Reviews

No reviews yet

Be the first to review this server!