|
| 1 | +<p align="center"> |
| 2 | + <a href="https://litmus.io"> |
| 3 | + <picture> |
| 4 | + <source media="(prefers-color-scheme: light)" srcset="static/litmus-logo-light.svg" /> |
| 5 | + <source media="(prefers-color-scheme: dark)" srcset="static/litmus-logo-dark.svg" /> |
| 6 | + <img src="static/litmus-logo-light.svg" height="60" alt="Litmus logo" /> |
| 7 | + </picture> |
| 8 | + </a> |
| 9 | +</p> |
| 10 | + |
| 11 | +<p align="center"> |
| 12 | + <a href="https://docs.litmus.io"> |
| 13 | + <img src="https://img.shields.io/badge/Litmus-Docs-2acfa6?style=flat-square" alt="Documentation" /> |
| 14 | + </a> |
| 15 | + <a href="https://www.linkedin.com/company/litmus-automation/" > |
| 16 | + <img src="https://img.shields.io/badge/LinkedIn-Follow-0a66c2?style=flat-square" alt="Follow on LinkedIn" /> |
| 17 | + </a> |
| 18 | +</p> |
| 19 | + |
| 20 | +# Litmus MCP Server |
| 21 | + |
| 22 | +The official [Litmus Automation](https://litmus.io) **Model Context Protocol (MCP) Server** enables LLMs and intelligent systems to interact with [Litmus Edge](https://litmus.io/products/litmus-edge) for device configuration, monitoring, and management. It is built on top of the MCP SDK and adheres to the [Model Context Protocol spec](https://modelcontextprotocol.io/). |
| 23 | + |
| 24 | +<div> |
| 25 | + <picture> |
| 26 | + <source media="(prefers-color-scheme: light)" srcset="static/MCP-server-arch-diagram.png" /> |
| 27 | + <img src="static/MCP-server-arch-diagram.png" alt="Litmus MCP Server Architecture Diagram" /> |
| 28 | + </picture> |
| 29 | +</div> |
| 30 | + |
| 31 | +## Table of Contents |
| 32 | + |
| 33 | +- [Getting Started](#getting-started) |
| 34 | + - [Quick Launch (Docker)](#quick-launch-docker) |
| 35 | + - [Cursor IDE Setup](#cursor-ide-setup) |
| 36 | +- [API](#api) |
| 37 | +- [Usage](#usage) |
| 38 | + - [Server-Sent Events (SSE)](#server-sent-events-sse) |
| 39 | +- [Litmus Central](#litmus-central) |
| 40 | +- [Integrations](#integrations) |
| 41 | + - [Cursor IDE](#cursor-ide) |
| 42 | + - [Claude Desktop](#claude-desktop) |
| 43 | + - [VS Code / Copilot](#vs-code--copilot) |
| 44 | + - [Windsurf](#windsurf) |
| 45 | + |
| 46 | +--- |
| 47 | + |
| 48 | +## Getting Started |
| 49 | + |
| 50 | +### Quick Launch (Docker) |
| 51 | + |
| 52 | +Run the server in Docker: |
| 53 | + |
| 54 | +```bash |
| 55 | +docker run -d --name litmus-mcp-server -p 8000:8000 ghcr.io/litmusautomation/litmus-mcp-server/mcp:latest |
| 56 | +``` |
| 57 | + |
| 58 | +### Cursor IDE Setup |
| 59 | + |
| 60 | +Example `mcp.json` configuration: |
| 61 | + |
| 62 | +```json |
| 63 | +{ |
| 64 | + "mcpServers": { |
| 65 | + "litmus-mcp-server": { |
| 66 | + "url": "http://<IP Address>:8000/sse" |
| 67 | + } |
| 68 | + } |
| 69 | +} |
| 70 | +``` |
| 71 | + |
| 72 | +See the [Cursor docs](https://docs.cursor.com/context/model-context-protocol) for more info. |
| 73 | + |
| 74 | +--- |
| 75 | + |
| 76 | +## API |
| 77 | + |
| 78 | +| Category | Function Name | Description | |
| 79 | +|---------------------------|----------------------------------------|-------------| |
| 80 | +| **Edge System Config** | `get_current_environment_config` | Get current environment configuration used for Litmus Edge connectivity. | |
| 81 | +| | `update_environment_config` | Update environment variable config for connecting to Litmus Edge. | |
| 82 | +| | `get_current_config` | Retrieve current Litmus Edge instance configuration. | |
| 83 | +| | `update_config` | Update configuration of the device or container running Litmus Edge. | |
| 84 | +| **DeviceHub** | `get_litmusedge_driver_list` | List supported Litmus Edge drivers. | |
| 85 | +| | `get_devicehub_devices` | List devices configured in DeviceHub. | |
| 86 | +| | `get_devicehub_device_tags` | Retrieve tags for a specific DeviceHub device. | |
| 87 | +| | `get_current_value_of_devicehub_tag` | Get current value of a specific device tag. | |
| 88 | +| | `create_devicehub_device` | Register a new DeviceHub device. Supports various protocols and templates for register-based data polling. | |
| 89 | +| **Device Identity** | `get_litmusedge_friendly_name` | Retrieve the user-friendly name of the device. | |
| 90 | +| | `set_litmusedge_friendly_name` | Assign or update the friendly name. | |
| 91 | +| **LEM Integration** | `get_cloud_activation_status` | Check cloud activation and Litmus Edge Manager (LEM) connection status. | |
| 92 | +| **Docker Management** | `get_all_containers_on_litmusedge` | List all containers on Litmus Edge. | |
| 93 | +| | `run_docker_container_on_litmusedge` | Launch a Docker container via Litmus Edge Marketplace (not the MCP host). | |
| 94 | +| **Topic Subscription** | `get_current_value_on_topic` | Subscribe to current values on a Litmus Edge topic. Use global `NATS_STATUS = False` to unsubscribe. | |
| 95 | +| | `get_multiple_values_from_topic` | Retrieve multiple values from a topic for plotting or batch access. | |
| 96 | + |
| 97 | +--- |
| 98 | + |
| 99 | +## Usage |
| 100 | + |
| 101 | +### Server-Sent Events (SSE) |
| 102 | + |
| 103 | +This server supports the [MCP SSE transport](https://modelcontextprotocol.io/docs/concepts/transports#server-sent-events-sse) for real-time communication. |
| 104 | + |
| 105 | +- **Client endpoint:** `http://<server-ip>:8000/sse` |
| 106 | +- **Default binding:** `0.0.0.0:8000/sse` |
| 107 | +- **Communication:** |
| 108 | + - Server → Client: Streamed via SSE |
| 109 | + - Client → Server: HTTP POST |
| 110 | + |
| 111 | +--- |
| 112 | + |
| 113 | +## Litmus Central |
| 114 | + |
| 115 | +Download or try Litmus Edge via [Litmus Central](https://central.litmus.io). |
| 116 | + |
| 117 | +--- |
| 118 | + |
| 119 | +## Integrations |
| 120 | + |
| 121 | +### Cursor IDE |
| 122 | + |
| 123 | +Add to `~/.cursor/mcp.json` or `.cursor/mcp.json`: |
| 124 | + |
| 125 | +```json |
| 126 | +{ |
| 127 | + "mcpServers": { |
| 128 | + "litmus-mcp-server": { |
| 129 | + "url": "http://<IP Address>:8000/sse" |
| 130 | + } |
| 131 | + } |
| 132 | +} |
| 133 | +``` |
| 134 | + |
| 135 | +[Cursor docs](https://docs.cursor.com/context/model-context-protocol) |
| 136 | + |
| 137 | +--- |
| 138 | + |
| 139 | +### Claude Desktop |
| 140 | + |
| 141 | +Add to `claude_desktop_config.json`: |
| 142 | + |
| 143 | +```json |
| 144 | +{ |
| 145 | + "mcpServers": { |
| 146 | + "litmus-mcp-server": { |
| 147 | + "url": "http://<IP Address>:8000/sse" |
| 148 | + } |
| 149 | + } |
| 150 | +} |
| 151 | +``` |
| 152 | + |
| 153 | +[Anthropic Docs](https://docs.anthropic.com/en/docs/agents-and-tools/mcp) |
| 154 | + |
| 155 | +--- |
| 156 | + |
| 157 | +### VS Code / GitHub Copilot |
| 158 | + |
| 159 | +#### Manual Configuration |
| 160 | + |
| 161 | +In VS Code: |
| 162 | +Open User Settings (JSON) → Add: |
| 163 | + |
| 164 | +```json |
| 165 | +{ |
| 166 | + "mcpServers": { |
| 167 | + "litmus-mcp-server": { |
| 168 | + "url": "http://<IP Address>:8000/sse" |
| 169 | + } |
| 170 | + } |
| 171 | +} |
| 172 | +``` |
| 173 | + |
| 174 | +Or use `.vscode/mcp.json` in your project. |
| 175 | + |
| 176 | +[VS Code MCP Docs](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) |
| 177 | + |
| 178 | +--- |
| 179 | + |
| 180 | +### Windsurf |
| 181 | + |
| 182 | +Add to `~/.codeium/windsurf/mcp_config.json`: |
| 183 | + |
| 184 | +```json |
| 185 | +{ |
| 186 | + "mcpServers": { |
| 187 | + "litmus-mcp-server": { |
| 188 | + "url": "http://<IP Address>:8000/sse" |
| 189 | + } |
| 190 | + } |
| 191 | +} |
| 192 | +``` |
| 193 | + |
| 194 | +[Windsurf MCP Docs](https://docs.windsurf.com/windsurf/mcp) |
| 195 | + |
| 196 | +--- |
| 197 | + |
| 198 | +© 2025 Litmus Automation, Inc. All rights reserved. |
0 commit comments