DR

da-real-frog/powerwall-mcp-agent

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

0 stars 0 forks 质量 39 趋势 20

想办法根据天气预报配置我的电池

概览

想弄清楚如何根据天气预报配置我的电池。 一个集成模型上下文协议(MCP)、本地特斯拉Powerwall遥测、多阵太阳能预报(Open-Meteo)、国家气象局警报以及运行在Gemini或Claude上的大型语言模型代理的AI工作流程实验室。 - 服务器/:Python FastMCP服务器,通过可流式HTTP暴露Powerwall状态、三阵太阳能预报和活跃天气警报,作为MCP工具。参见server/README.md。- client/:chat.py,一个交互式终端聊天,通过服务器工具向Claude提问,以及代理客户端,发现这些工具、调用它们并建议当晚备用。LLM提供者(Gemini或Claude)在其.env文件中被选定。参见client/README.md。- web/:Home Chat,家庭Wi-Fi手机聊天页面。它运行于Percula,保留Claude API密钥,iPhone上则像应用一样添加到主屏幕。参见web/README.md。

概述(AI 翻译)

想弄清楚如何根据天气预报配置我的电池。

一个集成模型上下文协议(MCP)、本地特斯拉Powerwall遥测、多阵太阳能预报(Open-Meteo)、国家气象局警报以及运行在Gemini或Claude上的大型语言模型代理的AI工作流程实验室。

项目结构

  • server/:Python FastMCP 服务器通过可流式 HTTP 作为 MCP 工具,公开 Powerwall 状态、三阵太阳能预报和活跃天气警报。参见 server/README.md。
  • client/:chat.py,一个交互式终端聊天,通过服务器工具向Claude提问,以及一个代理客户端,发现这些工具,呼叫它们并推荐当晚的备用资源。LLM提供者(Gemini或Claude)在其.env文件中被选定。参见client/README.md。
  • web/:家庭聊天,家庭Wi-Fi手机聊天页面。它运行于Percula,保留Claude API密钥,iPhone上则像应用一样添加到主屏幕。详见web/README.md。
  • bridge/:在车库中设置树莓派作为桥接器,使服务器能通过TEG Wi-Fi访问网关的本地API。参见bridge/README.md。
  • “服务器/站点。”

本页由 AI 翻译,技术细节请以原文为准。

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 .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.
  • 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 whenever server/ changes on main; deploy-web.yml does the same for web/.

Quick Start

  1. Start the server (see server/README.md), or let the deploy workflow do it.
  2. Point the client at it with MCP_SERVER_URL and run uv run client.py from client/.
  3. To ask your own questions, run uv run chat.py from client/ for an interactive chat in the terminal, or open http://percula.local:8080 on 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…

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →