LI

Litmus.io MCP Server for Edge Configuration and Monitoring

Configure and monitor Litmus Edge devices with the MCP server for seamless device management, configuration, and real-time monitoring.

Quick Install
npx -y @litmusautomation/litmus-mcp-server

Overview

The Litmus.io MCP Server implements the Model Context Protocol (MCP) to bridge Large Language Models and other intelligent agents with Litmus Edge installations. It exposes an HTTP Server-Sent Events (SSE) MCP endpoint and an optional web chat UI so LLMs and developer tools can request device configuration, query telemetry, and run management workflows against Litmus Edge instances.

For developers, the MCP server provides a simple, local-facing MCP relay that accepts MCP clients (Claude Desktop, Cursor, VS Code extensions, etc.) and forwards requests to Litmus Edge using configured credentials and telemetry backends (NATS, Influx). Use it to add natural-language orchestration, automated configuration, and real-time monitoring to industrial edge deployments.

Features

  • MCP-compatible SSE endpoint for standard MCP clients
  • Built-in web chat UI for quick natural-language interactions (optional, port 9000)
  • Persistent configuration via an externally mounted .env file
  • Headers for Edge API, NATS, and Influx integration to connect to Litmus Edge services
  • Docker image for rapid deployment (ghcr.io/litmusautomation/litmus-mcp-server)
  • Works with popular MCP clients: Claude, Cursor, VS Code / Copilot, and custom MCP SDK clients

Installation / Configuration

Quick Docker run (SSE endpoint only)

docker run -d --name litmus-mcp-server -p 8000:8000 \
  ghcr.io/litmusautomation/litmus-mcp-server:latest

If your host is ARM64 and you need to run the AMD64 image:

docker run -d --name litmus-mcp-server --platform linux/amd64 -p 8000:8000 \
  ghcr.io/litmusautomation/litmus-mcp-server:latest

Enable the built-in web chat UI (exposes port 9000) and set an LLM API key (example uses Anthropic):

docker run -d --name litmus-mcp-server \
  -p 8000:8000 -p 9000:9000 \
  -e ANTHROPIC_API_KEY="<your_anthropic_key>" \
  ghcr.io/litmusautomation/litmus-mcp-server:latest

Persist configuration across container restarts

  1. Create a host-side .env file before starting the container:
    mkdir -p /opt/litmus-mcp
    touch /opt/litmus-mcp/.env
    
  2. Mount it into the container:
    docker run -d --name litmus-mcp-server \
      -p 8000:8000 -p 9000:9000 \
      -v /opt/litmus-mcp/.env:/app/.env \
      ghcr.io/litmusautomation/litmus-mcp-server:latest
    

Note: create the host file with touch; if Docker sees a missing file it may create a directory and prevent the app from writing configuration.

Docker Compose example

services:
  litmus-mcp-server:
    image: ghcr.io/litmusautomation/litmus-mcp-server:latest
    ports:
      - "8000:8000"
      - "9000:9000"
    volumes:
      - /opt/litmus-mcp/.env:/app/.env

Common MCP server endpoints and ports

PurposePortEndpoint
SSE MCP8000/sse
Web chat UI9000/ (http://host:9000)

Client configuration examples (mcp.json)

  • Claude / Anthropic (place in ~/.claude/mcp.json):
{
  "mcpServers": {
    "litmus-mcp-server": {
      "type": "sse",
      "url": "http://localhost:8000/sse",
      "headers": {
        "EDGE_URL": "${EDGE_URL}",
        "EDGE_API_CLIENT_ID": "${EDGE_API_CLIENT_ID}",
        "EDGE_API_CLIENT_SECRET": "${EDGE_API_CLIENT_SECRET}",
        "NATS_SOURCE": "${NATS_SOURCE}",
        "NATS_PORT": "${NATS_PORT:-4222}",
        "NATS_USER": "${NATS_USER}",
        "NATS_PASSWORD": "${NATS_PASSWORD}",
        "INFLUX_HOST": "${INFLUX_HOST}",
        "INFLUX_PORT": "${INFLUX_PORT:-8086}",
        "INFLUX_DB_NAME": "${INFLUX_DB_NAME:-tsdata}",
        "INFLUX_USERNAME": "${INFLUX_USERNAME}",
        "INFLUX_PASSWORD": "${INFLUX_PASSWORD}"
      }
    }
  }
}
  • Cursor (add to ~/.cursor/mcp.json or project .cursor/mcp.json):
{
  "mcpServers": {
    "litmus-mcp-server": {
      "url": "http://<MCP_SERVER_IP>:8000/sse",
      "headers": {
        "EDGE_URL": "https://<LITMUSEDGE_IP>",
        "EDGE_API_CLIENT_ID": "<oauth2_client_id>",
        "EDGE_API_CLIENT_SECRET": "<oauth2_client_secret>",
        "NATS_SOURCE": "<LITMUSEDGE_IP>",
        "NATS_PORT": "4222",
        "NATS_USER": "<access_token_username>",
        "NATS_PASSWORD": "<access_token_from_litmusedge>",
        "INFLUX_HOST": "<LITMUSEDGE_IP>",
        "INFLUX_PORT": "8086",
        "INFLUX_DB_NAME": "tsdata"
      }
    }
  }
}

Available Tools / Resources

  • SSE MCP endpoint: accept MCP client requests and forward them to Litmus Edge
  • Web chat UI: lightweight chat interface for experimenting without external MCP clients
  • Headers-driven integration: pass EDGE_URL, EDGE_API_CLIENT_ID/SECRET, NATS and Influx credentials via MCP headers
  • GitHub repo: https://github.com/litmusautomation/litmus-mcp-server
  • MCP spec and SDKs: https://modelcontextprotocol.io/

Use Cases

  • Natural-language device configuration: ask an LLM (via MCP) to add connectors, update pipeline configurations, or deploy tasks to an edge device.
  • Real-time monitoring and investigation: query recent telemetry, generate time-series plots, and request summaries of anomalies from Influx data through an LLM.
  • Troubleshooting and diagnostics: fetch edge logs, inspect connector statuses, and run health checks using automated scripts invoked from an MCP-aware client.
  • Automation and orchestration: integrate LLM-driven decision logic into maintenance workflows (e.g., create tickets, roll back configs, scale data collectors).
  • Developer prototyping: test LLM-to-edge workflows locally using the built-in chat UI before integrating with production LLM clients.

Getting started checklist

  1. Run the Docker container (8000 for SSE; 9000 for web UI if desired).
  2. If you plan to save config, create and mount /opt/litmus-mcp/.env.
  3. Configure your MCP client (Claude, Cursor, VS Code) to point at http://:8000/sse and supply required headers to authenticate to Litmus Edge and telemetry backends.
  4. Use the web UI (if enabled) to add Edge instances and experiment with natural-language commands.
  5. For more implementation details and examples, see the repository: https://github.com/litmusautomation/litmus-mcp-server.