Goodwe Inverter Mcp Server

by marcinn2

229 downloads
Not rated
GitHub

About

Reads real-time and cumulative data from a GoodWe solar inverter

Details

Author
marcinn2
Downloads
229
Categories
Communication, Other, Infrastructure

- Reads real-time PV production in watts
- Reports battery state of charge as percentage
- Measures battery charging/discharging power in watts
- Monitors grid import and export power
- Tracks house load consumption in watts
- Returns cumulative energy counters for PV, battery, and grid
- Polls live data on every call with no caching

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Goodwe Inverter Mcp Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Configure the server to communicate with your GoodWe inverter on the local network using UDP port 8899. Each call polls live data directly from the inverter with no caching, providing current sensor readings on demand.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "goodwe inverter mcp server": {
            "goodwe": {
                "command": "goodwe-mcp",
                "env": {
                    "GOODWE_HOST": "192.168.1.100"
                }
            }
        }
    }
}

McpServers

{
    "goodwe": {
        "command": "goodwe-mcp",
        "env": {
            "GOODWE_HOST": "192.168.1.100"
        }
    }
}

MCP server for monitoring and controllingGoodWe solar invertersover the local network.

Built on thegoodwelibrary and theModel Context ProtocolPython SDK.

Based ontheHome Assistant GoodWe integration— the sensor definitions, operation modes, settings, and inverter family support are modelled directly after that implementation.

- Read live runtime data: PV production, battery state, grid import/export, load consumption
- Read and write all configurable inverter settings
- Switch operation modes (general, eco, backup, peak-shaving, off-grid, …)
- Control grid export limit and battery depth-of-discharge
- 7 MCP resources: status, runtime, settings, power flow, daily energy, battery, sensor catalog
- 6 built-in prompt templates for common workflows (status overview, diagnostics, optimisation, …)
- Bearer token authentication for all HTTP transports
- Four transport modes:stdio,SSE,Streamable HTTP, andserver(SSE + Streamable HTTP combined)
- Auto-connect via environment variables

- Python 3.10+
- GoodWe inverter reachable on the local network (UDP port 8899 or Modbus/TCP port 502)

# with uv (recommended) uv pip install . # or editable install for development uv pip install -e .

Add to~/.claude/claude_desktop_config.json:

{ "mcpServers": { "goodwe": { "command": "goodwe-mcp", "env": { "GOODWE_HOST": "192.168.1.100" } } } }
goodwe-mcp --transport sse --port 8080 # Server listens on http://0.0.0.0:8080/sse
goodwe-mcp --transport streamable-http --port 8080 # Server listens on http://0.0.0.0:8080/mcp

Server transport (SSE + Streamable HTTP combined)

Serves both transports on a single port — useful when you need to support legacy SSE clients and modern Streamable HTTP clients simultaneously.

goodwe-mcp --transport server --host 0.0.0.0 --port 8080 # SSE: http://0.0.0.0:8080/sse (GET) and /messages/ (POST) # Streamable HTTP: http://0.0.0.0:8080/mcp
--transport {stdio,sse,streamable-http,server} Transport mode (default: stdio) --host HOST Bind address for SSE/HTTP (default: 127.0.0.1) --port PORT Listen port for SSE/HTTP (default: 8000) --log-level {DEBUG,INFO,WARNING,ERROR} Logging verbosity (default: INFO) --auth-token TOKEN Bearer token required on all HTTP requests (env: MCP_AUTH_TOKEN) --base-url URL Public base URL, e.g. https://mcp.example.com (env: MCP_BASE_URL)

Bearer token authentication is supported for all HTTP transports (sse,streamable-http,server). When enabled, every MCP request must include anAuthorization: Bearer <token>header. The/healthendpoint is always unprotected so Kubernetes probes continue to work.

Enable via environment variable (recommended)

export MCP_AUTH_TOKEN="$(openssl rand -hex 32)" goodwe-mcp --transport server --host 0.0.0.0 --port 8080
goodwe-mcp --transport streamable-http --port 8080 --auth-token my-secret-token

Claude Desktop / MCP client configuration

Add the token to your client's MCP server configuration. For example, with Claude Desktop using thestreamable-httptransport via a proxy that injects the header, or with any client that supportsAuthorizationheaders:

{ "mcpServers": { "goodwe": { "url": "http://localhost:8080/mcp", "headers": { "Authorization": "Bearer my-secret-token" } } } }
MCP_AUTH_TOKEN=my-secret-token GOODWE_HOST=192.168.1.100 \ docker compose -f docs/docker-compose.yml up -d

Set the token indocs/k8s/secret.yamlbefore applying the manifests:

stringData: GOODWE_HOST: "192.168.1.100" MCP_AUTH_TOKEN: "my-secret-token"

IfMCP_AUTH_TOKENis empty or not set, authentication is disabled and all HTTP endpoints are publicly accessible. The server will log a warning at startup when bound to a non-loopback address without a token.

The MCP server itself does not terminate TLS. For any non-localhost deployment, place a TLS-terminating reverse proxy in front of it (nginx, Caddy, Traefik). Serving inverter data — which constitutes personal data under GDPR when linked to a household — over plain HTTP is a security risk.

mcp.example.com { reverse_proxy localhost:8000 }

This server processes data from a GoodWe solar inverter, including the inverter's IP address, serial number, and energy consumption metrics. When deployed in a home and operated by the homeowner for personal use, this processing falls under the GDPR household exemption (Art. 2(2)(c)) and GDPR does not apply. If deployed commercially — for example to monitor inverters belonging to third-party customers — the operator becomes a data controller under GDPR (EU) 2016/679 and must establish a lawful basis for processing (Art. 6), maintain records of processing activities (Art. 30), and ensure appropriate technical and organisational measures (Art. 32), including TLS encryption and access control.

Build for the current machine's architecture:

docker build -t goodwe-inverter-mcp:latest .

Usedocker buildxto produce an image that runs on both x86-64 servers and ARM boards (Raspberry Pi, Apple Silicon, AWS Graviton, etc.).

One-time setup— create a builder that supports cross-compilation:

docker buildx create --name multi --driver docker-container --bootstrap --use

Build both platforms and load into the local daemon— requires the containerd image store (enabled by default in Docker Desktop 4.34+; on Linux rundockerd --snapshotter=overlayfsor enable it in/etc/docker/daemon.json):

docker buildx build --platform linux/amd64,linux/arm64 -t goodwe-inverter-mcp:latest --load .

Build both platforms and push to a registry(e.g. Docker Hub or GHCR):

docker buildx build \ --platform linux/amd64,linux/arm64 \ -t youruser/goodwe-inverter-mcp:latest \ --push .

Build both platforms and export as a local OCI tar(no registry needed):

docker buildx build \ --platform linux/amd64,linux/arm64 \ -t goodwe-inverter-mcp:latest \ --output type=oci,dest=goodwe-inverter-mcp.tar .
docker run -d \ --name goodwe-mcp \ -e GOODWE_HOST=192.168.1.100 \ -p 8000:8000 \ goodwe-inverter-mcp:latest

The container defaults to--transport server(SSE + Streamable HTTP on port 8000).
Override the transport or port viaCMDargs:

docker run -d -e GOODWE_HOST=192.168.1.100 -p 9000:9000 \ goodwe-inverter-mcp:latest \ goodwe-mcp --transport streamable-http --host 0.0.0.0 --port 9000
GOODWE_HOST=192.168.1.100 docker compose -f docs/docker-compose.yml up -d

docs/docker-compose.ymlusesnetwork_mode: hostby default so the container can reach the inverter on the local LAN. Remove that line if your network already routes LAN traffic into containers.

The GoodWe inverter communicates over UDP/TCP on the local network. The pod needs to reach the inverter's IP. The simplest setup ishostNetwork: trueon a node in the same subnet; remove it if your cluster has flat networking or another routing solution.

# 1. Edit the inverter IP vi docs/k8s/secret.yaml # 2. Apply all manifests kubectl apply -f docs/k8s/ # 3. Check status kubectl rollout status deployment/goodwe-mcp kubectl logs -f deployment/goodwe-mcp

Both liveness and readiness probes hitGET /health, which returns:

{ "status": "ok", "inverter_connected": true }

The pod becomes ready once the HTTP server is up.inverter_connectedwill befalseuntil the server successfully connects to the inverter (auto-connect fires on the first MCP client session).

Pre-written prompt templates that MCP clients can fetch and use directly.

See LICENSE file in the root of the repository.

This software is not affiliated with or endorsed by GoodWe Inc. Use at your own risk. This software is a personal project that I maintain in my free time. Refer to the licence for more information.

A 3D Printing MCP server that allows for querying for live state, webcam snapshots, and 3D printer control.

Allows easy local access to air-Q devices for retrieving air quality data

Monitor air quality with Airthings devices.

Access the Cumulocity IoT platform to manage devices, measurements, and alarms.

Digi Remote Manager MCP allows users to connect Ai Agents to their Digi Remote Manager account for analyzing fleet data and help with troubleshooting.

A read-only API for querying and retrieving contextual information about devices and fleets using the Flight Control MCP server.

Read-only MCP (Model Context Protocol) server for Home Assistant. Gives AI assistants (Claude Desktop, LibreChat, Cline) full observability into your smart home — entity states, automations, scripts, devices, logs, diagnostics — without any write access. Also generates static AI context snapshots for RAG systems, ChatGPT Projects, Qwen, and other tools that accept custom knowledge files. Built in Python, runs anywhere — locally, in Docker, or as an MCP integration.

AI-powered industrial fault diagnosis MCP server. 313 fault codes across Allen-Bradley, Siemens, ABB, Mitsubishi, Fanuc. 8 diagnostic tools for Claude Code.

Enables LLMs and intelligent systems to interact with Litmus Edge for device configuration, monitoring, and management.

Fuses biometric signals into a stress score (0-100) for real-time AI adaptation. MCP + A2A native.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.