Claude Code
3 min
Configure the Claude Code CLI to use the Litmus MCP server over SSE.
1. Run the server
docker run -d --name litmus-mcp-server \
-p 8000:8000 \
ghcr.io/litmusautomation/litmus-mcp-server:latest2. Create or edit ~/.claude/mcp.json
Run Claude Code from a directory that has access to a config file at ~/.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}"
}
}
}
}The ${VAR} syntax reads from your shell environment, so you can keep secrets out of the config file by exporting them before launching Claude Code.
3. Verify
Inside Claude Code, ask the agent to list available tools. You should see the full Litmus tool set (DeviceHub, NATS, InfluxDB, Digital Twins, LEM, etc.). If you don't, check:
- docker logs litmus-mcp-server for SSE connection attempts.
- curl http://localhost:8000/health returns {"status":"ok"}.
- The headers in mcp.json resolve to non-empty values (echo "$EDGE_URL").