aivy-mcp
An MCP server that lets your own AI assistant (Claude Code, Claude Desktop, ChatGPT, Codex, Cursor, ...) read and control your own solar + battery system through the Aivy Developer API by Ivy Energy.
Works with every brand Aivy runs: Sungrow, Sigenergy, FoxESS, AlphaESS, SolaX and more. The same tools, whatever the inverter.
1. Get a key
In the Aivy app (web or mobile) open the user menu, API keys, and create a key. Pick Read only to let an assistant look, or Read and control to let it change the energy mode and Ai+ settings. The key sees exactly what your account sees, nothing more.
2. Add the server
Claude Code:
claude mcp add aivy -e AIVY_API_KEY=aivy_sk_... -- uvx aivy-mcp
Claude Desktop / Cursor / any MCP client (mcpServers block):
{
"mcpServers": {
"aivy": {
"command": "uvx",
"args": ["aivy-mcp"],
"env": { "AIVY_API_KEY": "aivy_sk_..." }
}
}
}
No uv? pipx run aivy-mcp or pip install aivy-mcp && aivy-mcp work too.
Assistants that cannot run local tools (ChatGPT in the browser) can use the HTTP API directly. Paste this into the chat:
Use the Aivy Developer API at https://bridge.ivyenergy.com.au/v1 with the header
Authorization: Bearer aivy_sk_.... Read https://bridge.ivyenergy.com.au/v1/llms.txt first, then GET /sites.
3. Ask
- "How's my battery doing?"
- "Why did it charge at 3am?"
- "What are prices doing tonight? Should I sell?"
- "Plan the best time to sell tonight, keep 20%, then apply it."
- "Charge at 5 kW to 90% for the next two hours." (control key)
- "Make Ai+ a bit more aggressive on exports." (control key)
Tools
| Tool | Changes anything? | What it does |
|---|---|---|
whoami |
no | Who the key is, read or control |
list_sites |
no | Your sites; ids look like sungrow:1445844 |
get_site |
no | Capacity, limits, timezone, mode, live SOC |
get_status |
no | Live SOC and power flows |
get_curve |
no | 5-minute or daily history |
get_earnings |
no | A day's energy, priced at Amber's actual prices |
get_operations |
no | What the platform did and why |
get_prices |
no | Amber prices now and forecast |
get_energy_mode |
no | Mode, windows, pending hand-back |
set_energy_mode |
yes | selfConsumption / amber_smart (Ai+) / forced (time-boxed) |
get_ai_plus |
no | Ai+ variant, settings and tunable ranges |
update_ai_plus |
yes | Change Ai+ levers or variant |
plan_best_price_discharge |
no | Propose a sell schedule from the forecast |
plan_discharge_to_target |
no | Propose a discharge that lands on a SOC at a time |
What the server enforces, whatever the assistant does
- A key sees only its owner's sites; writes need the control scope.
- A forced (manual) mode set through the API always reverts to the previous
mode after
duration_minutes(default 4 h, max 24 h). - The SOC floor and grid export limits cannot be overridden.
- Every call is recorded with the key id and client; keys can be revoked in the app at any time and stop working immediately.
- Per-key rate limit (default 120/min). Readings refresh about once a minute.
Development
git clone https://github.com/IVYEnergy/aivy-mcp && cd aivy-mcp
uv run --with pytest pytest
uv run aivy-mcp # needs AIVY_API_KEY
The package also lives in Ivy Energy's main repository under sdk/aivy-mcp;
this public repository is where it is released from.
Point at another deployment with AIVY_API_URL=https://host/v1.
License
Apache License 2.0. See LICENSE.
Metadata
Release files for aivy-mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aivy_mcp-0.1.0.tar.gz | 11.8 kB | Without provenance | Details for aivy_mcp-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aivy_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for aivy_mcp-0.1.0-py3-none-any.whl |
Total release size: 24.5 kB
Release files / aivy_mcp-0.1.0.tar.gz
| Download URL | aivy_mcp-0.1.0.tar.gz |
|---|---|
| Size | 11.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
63872613c0b64c5e0947023c5d08bf88f5acb2500d4a0a3af003e0cc96f77be2
|
|
BLAKE2b-256 checksum How to use checksums |
b87896f552b28e8e78d3e70da323c26ad47917c30ac2e17411fa968a3d326cc6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.11
|
Release files / aivy_mcp-0.1.0-py3-none-any.whl
| Download URL | aivy_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aa9bdceb8aa1d3b3686410971207c2c0e30ce5258f4c2717d8eff12ea7477d6b
|
|
BLAKE2b-256 checksum How to use checksums |
6338165163dd1ec3e2b502b135ddaa40bc762a5f7be90588b6ead85f7e7fdd0b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.11
|
Security for aivy-mcp 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.