Mcp Server For Victron Energy Gx Devices

Created By
Lubos Strejcek4 months ago
Overview

Victron TCP — MCP Server

An MCP (Model Context Protocol) server that connects to Victron Energy GX devices on your local network via MQTT (recommended) or Modbus TCP. Get direct, low-latency access to real-time solar, battery, grid, and inverter data — no cloud required.

900+ registers across 33 device categories, built from the official CCGX Modbus TCP register list (Rev 50). MQTT transport uses the Venus OS built-in broker for zero-config auto-discovery.

Features

  • 30 specialized tools for reading Victron device data
  • Dual transport — MQTT (port 1883, zero-config) or Modbus TCP (port 502, raw register access)
  • 900+ registers across 33 device categories
  • Network discovery — scan the local network to find GX devices, no IP needed
  • One-shot setupvictron_setup probes both transports, discovers everything, generates ready-to-use config
  • Read-only and safe — all tools annotated with readOnlyHint: true

Prerequisites

  1. A Victron GX device on your local network (Ekrano, Cerbo, Venus GX, etc.)
  2. MQTT (enabled by default) or Modbus TCP (Settings → Services → Modbus TCP)
  3. Node.js 18+

Quick Start

claude mcp add --transport stdio victron-tcp -- npx victron-tcp

With environment variables pre-configured:

claude mcp add --transport stdio \
  -e VICTRON_HOST=192.168.1.50 \
  -e VICTRON_TRANSPORT=mqtt \
  -e VICTRON_PORTAL_ID=ca0f0e2e2261 \
  victron-tcp -- npx victron-tcp

Claude Desktop / Cursor / Windsurf

{
  "mcpServers": {
    "victron-tcp": {
      "command": "npx",
      "args": ["-y", "victron-tcp"],
      "env": {
        "VICTRON_HOST": "192.168.1.50",
        "VICTRON_TRANSPORT": "mqtt",
        "VICTRON_PORTAL_ID": "your-portal-id"
      }
    }
  }
}

See docs/setup.md for per-client config paths, project/user scopes, and building from source.

Don't know your GX device IP?

Ask the AI:

Find my Victron GX device on the network and set it up.

The AI will use victron_network_scan to find it, then victron_setup to configure everything.

Available Tools

Core Monitoring

ToolDescription
victron_system_overviewBattery SOC, PV power, grid power, AC consumption, ESS status
victron_battery_statusSOC, voltage, current, power, temperature, cell data, time-to-go
victron_solar_statusPV power, yield today/yesterday/total, charger state, tracker data
victron_grid_statusGrid power per phase (L1/L2/L3), voltage, current, frequency
victron_vebus_statusMulti/Quattro: AC in/out, current limit, mode, state, alarms
victron_tank_levelsTank level, capacity, remaining, fluid type
victron_temperatureTemperature, sensor type, humidity, pressure
victron_inverter_statusStandalone inverter: AC output, state, alarms
victron_evcs_statusEV Charging Station (direct connection): power, status, session energy

Extended Devices

ToolDescription
victron_multi_statusMulti RS inverter/charger
victron_pvinverter_statusAC-coupled PV inverters (Fronius, SolarEdge, ABB)
victron_genset_statusAC genset controllers
victron_dcgenset_statusDC generators
victron_alternator_statusNMEA 2000 alternators
victron_charger_statusAC chargers (Skylla, Blue Smart)
victron_dcdc_statusOrion XS DC-DC converter
victron_acload_statusAC load / current sensors
victron_dcenergy_statusDC energy meters (SmartShunts in DC meter mode)
victron_gx_infoGX device identity, relay states
victron_digital_inputsDigital input state and type
victron_gps_statusGPS position, altitude, speed
victron_meteo_statusSolar irradiance, wind speed, temperatures
victron_generator_statusGenerator auto start/stop, runtime, alarms

Discovery & Setup

ToolDescription
victron_network_scanScan local network to find GX devices by probing Modbus TCP and MQTT ports
victron_setupFull system setup: test transports, discover devices, generate MCP config
victron_mqtt_discoverAuto-discover MQTT portal ID, services, and device instances
victron_discoverScan Modbus unit IDs to find all connected devices

Utility

ToolDescription
victron_read_categoryRead all registers for any device category by service name
victron_read_registerRead raw register(s) by address (Modbus only)
victron_list_registersList available registers for a device category

Environment Variables

Set these to skip repetitive parameters:

VariableDescriptionExample
VICTRON_HOSTGX device IP or hostname192.168.1.50
VICTRON_TRANSPORTmodbus or mqttmqtt
VICTRON_PORTAL_IDPortal ID for MQTTca0f0e2e2261
VICTRON_MODBUS_PORTModbus TCP port502
VICTRON_MQTT_PORTMQTT broker port1883
VICTRON_UNIT_IDDefault Modbus unit ID100

Documentation

GuideContent
SetupClient configuration, transport comparison, finding unit IDs, supported devices
Examples15 real-world prompts with step-by-step AI behavior
TroubleshootingCommon errors and debugging
FAQFrequently asked questions
ArchitectureCode structure, how it works, register map

Roadmap

  • Phase 2: Write support — ESS mode control, grid setpoint, charge current limits, relay control
  • Phase 3: Resources — expose live device data as MCP resources with subscription notifications for real-time updates
  • Claude Desktop Extension packaging (.mcpb)
  • NPM package publishing (npx victron-tcp)

References

License

MIT

Server Config

{
  "mcpServers": {
    "victron-tcp": {
      "command": "npx",
      "args": [
        "victron-tcp"
      ]
    }
  }
}
Project Info
Created At
4 months ago
Updated At
3 months ago
Author Name
Lubos Strejcek
Star
-
Language
-
License
-
Category

Recommend Servers

View All
Hellogrowthcrm

13 hours ago
GovQL
@Alex Stout

# govql-mcp-server An MCP (Model Context Protocol) server for [GovQL](https://govql.us) — gives AI clients like Claude Desktop, Claude Code, and Cursor direct access to the US Congressional GraphQL API at [api.govql.us/graphql](https://api.govql.us/graphql) without bespoke HTTP wiring. For the design rationale (why FastMCP-Python, the passthrough+curated philosophy, roadmap through v0.4), see [design.md](https://github.com/govql/govql/blob/main/mcp-server/docs/design.md). ## What you can do with it Ask an agent questions like: - *"How did Vermont's two senators vote on the most recent nomination?"* - *"Which legislators in the 118th Congress switched parties during their service?"* - *"Compare Senator Sanders' voting record to Senator Murkowski's on cloture votes in the most recent Congress."* The agent picks the right tool, writes the GraphQL query against the live schema, and parses the response — no manual API wrangling. ## Install The server runs as a per-client subprocess over stdio. Pick your client: ### Claude Desktop Edit `claude_desktop_config.json` (Settings → Developer → Edit Config): ```json { "mcpServers": { "govql": { "command": "uvx", "args": ["govql-mcp-server"] } } } ``` Restart Claude Desktop. The `govql` tools appear in the tools panel. ### Claude Code Add to `.mcp.json` in your project (or `~/.mcp.json` for global): ```json { "mcpServers": { "govql": { "command": "uvx", "args": ["govql-mcp-server"] } } } ``` ### Cursor Settings → MCP → Add Server. Use the same `command` / `args` as above. ### Other clients Any MCP-compatible client that supports stdio servers will work. The command is `uvx govql-mcp-server` with no required arguments. ## Tools | Tool | Purpose | |---|---| | `execute_graphql` | Run any GraphQL query against the GovQL endpoint. Returns the result plus an `last_ingest` timestamp so the agent can reason about data freshness. | | `list_types` | Returns the names and kinds of every type in the GovQL schema. Optional `kind` filter (`"OBJECT"`, `"INPUT_OBJECT"`, `"ENUM"`, etc.) to narrow further. Start here when you don't know what's queryable. | | `describe_type` | Returns one type's full details — fields, arg signatures, input fields, enum values. Call after `list_types` to learn the shape of a specific type before writing a query. | ## Configuration All env vars are optional — the package is zero-config for end users. | Env var | Default | Purpose | |---|---|---| | `GOVQL_ENDPOINT` | `https://api.govql.us/graphql` | Endpoint to query. Override to point at a local dev stack. | | `GOVQL_TIMEOUT_MS` | `30000` | Per-request HTTP timeout. | | `LOG_LEVEL` | `INFO` | Logging level. Logs go to stderr only (stdout is reserved for the MCP transport). | ## Limits (enforced by the upstream API) - Max query depth: 10 - Max query complexity: ~10 billion points (`first: N` multiplies child cost by N — keep page sizes reasonable on deeply nested queries) - Rate limit: 100 requests / 60 s per source IP A depth or complexity violation surfaces as a GraphQL `errors` entry in the tool response so the agent can adjust and retry. ## Data freshness Every `execute_graphql` response includes a `last_ingest` ISO timestamp. Vote data refreshes hourly; legislator data refreshes daily. ## Status Version 0.1.0 ships three foundational tools: a GraphQL passthrough (`execute_graphql`) and two narrow schema-discovery tools (`list_types`, `describe_type`). Curated higher-level tools (`find_legislator`, `get_voting_record`, `compare_voters`, etc.) are planned for subsequent releases — see [design.md](https://github.com/govql/govql/blob/main/mcp-server/docs/design.md) for the roadmap. ## Links - [GovQL project site](https://govql.us) - [GraphQL API](https://api.govql.us/graphql) - [Source / issues](https://github.com/govql/govql)

20 hours ago