
da-real-frog/powerwall-mcp-agent
Developer toolsTrying to figure how to configure my batteries based on weatger forecast
Overview
Trying to figure out how to configure my batteries based on the weather forecast. An AI workflow lab integrating Model Context Protocol (MCP), local Tesla Powerwall telemetry, multi-array solar forecasting (Open-Meteo), National Weather Service alerts, and an LLM agent running on either Gemini or Claude. - server/: Python FastMCP server exposing the Powerwall status, the 3-array solar forecast and active weather alerts as MCP tools over streamable HTTP. See server/README.md. - client/: chat.py, an interactive terminal chat for asking Claude questions through the server's tools, and an agent client that discovers those tools, calls them, and recommends a backup reserve for the night. The LLM provider (Gemini or Claude) is selected in its .env file. See client/README.md. - web/: Home Chat, a chat page for phones on the home Wi-Fi. It runs on percula, keeps the Claude API key there, and on an iPhone is added to the Home Screen like an app. See web/README.md.
README
Powerwall MCP Agent
Trying to figure out how to configure my batteries based on the weather forecast.
An AI workflow lab integrating Model Context Protocol (MCP), local Tesla Powerwall telemetry, multi-array solar forecasting (Open-Meteo), National Weather Service alerts, and an LLM agent running on either Gemini or Claude.
Project Structure
server/: Python FastMCP server exposing the Powerwall status, the 3-array solar forecast and active weather alerts as MCP tools over streamable HTTP. See server/README.md.client/:chat.py, an interactive terminal chat for asking Claude questions through the server’s tools, and an agent client that discovers those tools, calls them, and recommends a backup reserve for the night. The LLM provider (Gemini or Claude) is selected in its.envfile. See client/README.md.web/: Home Chat, a chat page for phones on the home Wi-Fi. It runs on percula, keeps the Claude API key there, and on an iPhone is added to the Home Screen like an app. See web/README.md.bridge/: Setting up a Raspberry Pi in the garage as a bridge so the server can reach the gateway’s local API over its TEG Wi-Fi. See bridge/README.md.server/site.toml: The physical layout (arrays, panels, strings and Powerwall+ inputs) from the Tesla permit plans..github/workflows/ci.yml: Lint, unit tests and a secret scan on every pull request, on GitHub-hosted runners..github/workflows/deploy.yml: Rebuilds and restarts the server’s Docker container on a self-hosted runner wheneverserver/changes onmain;deploy-web.ymldoes the same forweb/.
Quick Start
- Start the server (see server/README.md), or let the deploy workflow do it.
- Point the client at it with
MCP_SERVER_URLand runuv run client.pyfromclient/. - To ask your own questions, run
uv run chat.pyfromclient/for an interactive chat in the terminal, or openhttp://percula.local:8080on a phone at home (see web/README.md).
.env files hold credentials and are ignored by git; each README lists the variables it needs.
More to follow as I will then start collecting the status of all strings and compare them against the solar forecast…
Install
This server does not publish a one-line install command.
Open the repository installation guide