LabscoMCP early access ↗
marcinn2MCP SERVER

GoodWe MCP Server

Read live production, battery and grid data from a GoodWe inverter on your LAN — and change its settings.

by marcinn2 ↗IoT, Smart Home & Embedded HardwareCommunity

LABSCO SUMMARY

Read-write access to a piece of household infrastructure.

This is not a dashboard: set_operation_mode, set_grid_export_limit and write_setting change how the inverter behaves, so an assistant connected to it can alter what your house does with its own power. The upside is that questions like why the battery drained overnight can be answered against live sensor values instead of a vendor app, and the same session can act on the answer. Keep it on the LAN or behind a token and a TLS proxy.

What it is

A local server that talks to a GoodWe solar inverter over your own network, built on the goodwe Python library with sensor definitions and operation modes modelled on the Home Assistant integration. It reads every live sensor the inverter exposes and also writes: operation mode, grid export limit and battery depth-of-discharge are all settable.

What you get

  • get_runtime_data returns all live sensor values, optionally filtered by kind — PV, AC, BAT, GRID, UPS or BMS
  • list_sensors and read_sensor enumerate sensor IDs and read one at a time
  • get_settings_data, read_setting and write_setting read and change any configurable setting
  • get_operation_mode and set_operation_mode switch between general, eco, backup, off_grid, peak_shaving, eco_charge and eco_discharge
  • get_grid_export_limit and set_grid_export_limit control export in watts, with 0 disabling it
  • get_battery_dod and set_battery_dod set depth-of-discharge
  • connect_inverter, get_connection_status and get_device_info handle the connection and report model, serial and firmware

Requirements

Python 3.10+ and a GoodWe inverter reachable on the local network, on UDP port 8899 or Modbus/TCP port 502. Install with uv pip install . (package goodwe-inverter-mcp, version 0.1.0) and run goodwe-mcp. Set GOODWE_HOST to auto-connect at startup. Stdio is the default; --transport sse, streamable-http and server are available, and for those set MCP_AUTH_TOKEN — when it is empty, authentication is off and every HTTP endpoint is public. The server does not terminate TLS, so put a reverse proxy in front of anything not on localhost.

Setup effort

Build from source — git clone https://github.com/marcinn2/goodwe-inverter-mcp.git