aiseg2-mcp

aiseg2-mcp

An unofficial read-only MCP server for Panasonic AiSEG2 home energy management controllers, enabling clients to read live power flow, per-circuit consumption, circuit names, daily totals, and historical energy/cost data from the device's local web interface.

Category
访问服务器

README

<!-- mcp-name: io.github.chanyou0311/aiseg2-mcp -->

aiseg2-mcp

日本語版は README.ja.md をご覧ください。

An unofficial, read-only Model Context Protocol server for the Panasonic AiSEG2 home energy management (HEMS) controller. It lets an MCP client (e.g. Claude) read your home's live power flow, per-circuit consumption, circuit names, and daily energy totals from the AiSEG2's local web interface.

This project is not affiliated with or endorsed by Panasonic. "AiSEG" is a Panasonic trademark.

Verified environment

Developed and tested against:

  • AiSEG2 model MKN713 series
  • Firmware Ver.2.97I-01

The AiSEG2 web interface is undocumented and changes between firmware revisions. On a different model or firmware the pages this server scrapes may differ and some tools may not work. If you hit a parse error, please open an issue with your model / firmware version.

Tools

All tools are read-only (annotated readOnlyHint, non-destructive). The server only issues GETs and the display-only refresh POSTs the web UI itself uses; it never touches settings or any /action/ endpoint.

Tool Returns
get_power_flow Instantaneous generation/consumption (kW), buy/sell state, battery status, generation sources, top consuming circuits
get_circuit_breakdown Every measured circuit's instantaneous draw (W), ranked highest first, with the total
list_circuits Registered circuit ids and names (the authoritative naming source)
get_daily_totals Today's cumulative generation / consumption / grid-buy / grid-sell (kWh)
get_history Long-term energy history from the SD-card export (Wh), long-form points. Args: granularity (30min/hour/day/month/year), start/end (per granularity: YYYY-MM-DD, YYYY-MM, or YYYY), optional metrics/circuits filters, limit/offset paging
get_cost_history Long-term energy-cost history from the SD-card export (JPY). Args: granularity (day/month/year), start/end, limit/offset

The two history tools require an SD card inserted in the AiSEG2 — they read the device's SD-card CSV export. The export is downloaded once and cached (see AISEG_CACHE_DIR / AISEG_CACHE_TTL), so the first call is slow and later calls are fast.

Install & run

Three ways to run it, depending on your setup.

1. uvx (PyPI — once published)

The simplest option for a local (stdio) MCP client. Requires uv.

AISEG_URL=http://192.168.0.216 AISEG_PASSWORD=... uvx aiseg2-mcp

Add it to Claude Code:

claude mcp add aiseg2 \
  --env AISEG_URL=http://192.168.0.216 \
  --env AISEG_PASSWORD=your-digest-password \
  -- uvx aiseg2-mcp

2. docker run (GHCR)

The container defaults to the streamable-http transport (long-lived network service). Only expose it behind an authenticating proxy — see Security.

docker run --rm -p 8000:8000 \
  -e AISEG_URL=http://192.168.0.216 \
  -e AISEG_PASSWORD=your-digest-password \
  ghcr.io/chanyou0311/aiseg2-mcp:latest

3. From source

Requires Python 3.12+ and uv.

uv sync
AISEG_URL=http://192.168.0.216 AISEG_PASSWORD=... uv run aiseg2-mcp

Remote (authenticated claude.ai Custom Connector)

To reach the server from claude.ai while your AiSEG2 stays on your LAN, see examples/remote/ — a Docker Compose stack (MCP + GitHub-OAuth proxy + Cloudflare Tunnel).

Configuration (environment variables)

Variable Required Default Description
AISEG_URL yes — AiSEG2 base URL, e.g. http://192.168.0.216 (http only)
AISEG_PASSWORD yes — HTTP Digest password for the AiSEG2 web UI
AISEG_USER no aiseg HTTP Digest user
AISEG_TRANSPORT no stdio stdio or streamable-http
AISEG_HOST no 0.0.0.0 Bind host (streamable-http only)
AISEG_PORT no 8000 Bind port (streamable-http only)
AISEG_DISABLE_DNS_REBINDING_PROTECTION no false Disable the SDK Host allowlist — only behind a trusted auth proxy
AISEG_CACHE_DIR no <tempdir>/aiseg2-mcp-cache Where the SD-card history export is cached
AISEG_CACHE_TTL no 3600 Seconds to reuse a cached history export before re-downloading
LOG_LEVEL no info Log level

Security

  • LAN-only by design. The AiSEG2 speaks plain HTTP with Digest auth; keep it and this server on a trusted local network. The password is read from the environment and is never logged.
  • Read-only. There is no tool that changes a device setting. The tool surface is enforced by tests (registered-tool allowlist, tool-name guard, a source scan for /action/, and read-only annotation checks).
  • Do not expose the streamable-http transport to untrusted networks without authentication. This server carries no auth of its own; if you run it as a network service, put an authenticating reverse proxy in front of it. AISEG_DISABLE_DNS_REBINDING_PROTECTION=true is only appropriate in that proxied setup.

Acknowledgements

The AiSEG2 web interface is undocumented; this project builds on the reverse-engineering knowledge shared by prior work:

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选