Skip to main content
Glama

shelly-local-mcp

MCP server for discovering and managing local Shelly devices. Exposes device discovery and management over the Model Context Protocol (stdio transport), so you can query and configure Shelly devices from Claude Code or any other MCP client. Supports Gen1, Gen2, and Gen3 devices. No cloud connection required.

Prerequisites

  • Python 3.13+

  • uv

  • Shelly devices reachable on the local network

Related MCP server: Switcher MCP Server

Configuration

The server is configured via environment variables:

Variable

Default

Description

SHELLY_TIMEOUT

5

HTTP timeout in seconds per device

SHELLY_PASSWORDS

(empty)

Per-device auth: ip1=pass1,ip2=pass2

Running

With uv (development)

uv run shelly-local-mcp

Directly from GitHub (no clone needed)

uv run --with git+https://github.com/daniel-k/shelly-local-mcp shelly-local-mcp

Claude Code integration

Add to your MCP config (e.g. ~/.claude/settings.json or .claude/settings.json):

From GitHub (no local checkout)

{
  "mcpServers": {
    "shelly": {
      "command": "uv",
      "args": ["run", "--with", "git+https://github.com/daniel-k/shelly-local-mcp", "shelly-local-mcp"],
      "env": {
        "SHELLY_PASSWORDS": "192.168.1.100=mypass,192.168.1.101=otherpass"
      }
    }
  }
}

From a local checkout

{
  "mcpServers": {
    "shelly": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/shelly-local-mcp", "shelly-local-mcp"],
      "env": {
        "SHELLY_PASSWORDS": "192.168.1.100=mypass,192.168.1.101=otherpass"
      }
    }
  }
}

Leave SHELLY_PASSWORDS empty if none of your devices have authentication enabled.

Available tools

Tool

Description

discover_devices

Find Shelly devices via mDNS and/or IP range scanning. Targets support single IPs, ranges (192.168.1.1-254), and CIDR (192.168.1.0/24).

get_device_info

Get detailed info for a device: identity, firmware, WiFi/cloud/MQTT status, uptime, components, and update availability.

Development

Install dev dependencies:

uv sync

Run all checks:

uv run tox

Format code:

uv run ruff format src/

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers