MCP server for Octopus Energy account analysis
Project description
octopus-mcp
Unofficial. Not affiliated with Octopus Energy. Uses the public REST API and the community-known Kraken GraphQL endpoint; the latter is unofficial and may break without notice.
A Model Context Protocol server that lets Claude analyse your Octopus Energy account: usage, costs, tariff comparisons, Saving Sessions, Octoplus rewards.
Works with Claude Code, Claude Desktop, and any MCP-compatible client.
Install
Claude Code (recommended)
# 1. Install the MCP server
uv tool install octopus-mcp
# 2. Save your credentials in your OS keychain
octopus-mcp configure
# 3. Install the plugin from this repo (in Claude Code):
/plugin install DanielChicot/octopus-mcp
Claude Desktop / Cursor / other MCP clients
Install the server, configure credentials, then add to your MCP client config:
{
"mcpServers": {
"octopus": {
"command": "uvx",
"args": ["octopus-mcp"]
}
}
}
For Claude Desktop, the config lives at ~/Library/Application Support/Claude/claude_desktop_config.json (macOS).
Credentials
You need:
OCTOPUS_API_KEY— find at octopus.energy → My account → Personal details → Developer settingsOCTOPUS_ACCOUNT_NUMBER—A-XXXXXXXX, on any bill or in your account
Optional (only some Kraken queries):
OCTOPUS_EMAIL/OCTOPUS_PASSWORD
Resolution order: shell env > .env > OS keyring > error. The recommended path is octopus-mcp configure which writes to the OS keyring so secrets never sit in plaintext config.
Tools
| Tool | What it does |
|---|---|
bill_summary(period) |
Total kWh and £ per fuel for a period |
usage_breakdown(period, group_by) |
Aggregated kWh by hour/day/week/month |
peak_hours(period, top_n) |
Top-N highest-usage half-hours |
compare_tariff(target_product_code, period, fuel) |
Replay your usage against another Octopus tariff |
current_tariff() |
What you're on now: unit rate, standing charge |
saving_session_history() |
Octoplus saving sessions joined and rewards earned |
get_account(), list_products(), get_product(), get_consumption_raw(), kraken_query() |
Thin getters / escape hatches |
Slash commands (Claude Code plugin)
/octopus:bill [period]— bill summary as a markdown table/octopus:compare <product-code> [period]— tariff comparison with caveats/octopus:peaks [period] [top_n]— highest-usage half-hours/octopus:saving-sessions— Octoplus history
How it works
- A SQLite cache at
~/Library/Caches/octopus-mcp/(or your platform's equivalent) holds your historical consumption and tariff data, refreshed incrementally. - All cost figures are in integer pence inc-VAT (no float drift), with a derived pounds string for display.
- Tariff comparison is a pure tariff swap model — caveats list what it does and doesn't model. See the design doc.
Known limitations (v0.1)
- Gas SMETS2 m³ vs kWh: if your gas meter reports in m³, values won't be normalised — expect implausibly small numbers and multiply by ~11.18 to convert. v0.2 will detect and apply calorific conversion automatically.
- Region-aware tariff lookup:
compare_tariffcurrently picks the first region's tariff variant from a target product. v0.2 will use your postcode-derived region. - TTLs are hardcoded: no
config.tomlsupport yet. - No background sync: consumption is fetched lazily on demand.
Privacy
The MCP runs on your machine. No data leaves your computer except direct calls to api.octopus.energy. Credentials live in your OS keychain. Logs at ~/Library/Logs/octopus-mcp/server.log redact secrets.
Contributing
See CONTRIBUTING.md. Run pre-commit run --all-files before pushing.
License
MIT — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file octopus_mcp-0.1.0.tar.gz.
File metadata
- Download URL: octopus_mcp-0.1.0.tar.gz
- Upload date:
- Size: 179.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3de653a78938a78da37f06c5986a888b59d346c18be62db4feaf6525cf89a1a
|
|
| MD5 |
72e9348575bedf37e39391f243c121dc
|
|
| BLAKE2b-256 |
4d71f176d93d2ba393291b643ea6c6fe9ff5f002b38b4e73a3b18cfbafd6779a
|
Provenance
The following attestation bundles were made for octopus_mcp-0.1.0.tar.gz:
Publisher:
release.yml on DanielChicot/octopus-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
octopus_mcp-0.1.0.tar.gz -
Subject digest:
b3de653a78938a78da37f06c5986a888b59d346c18be62db4feaf6525cf89a1a - Sigstore transparency entry: 1393926058
- Sigstore integration time:
-
Permalink:
DanielChicot/octopus-mcp@c84f15587e7e645068e73ff30645591525bf6870 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/DanielChicot
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c84f15587e7e645068e73ff30645591525bf6870 -
Trigger Event:
push
-
Statement type:
File details
Details for the file octopus_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: octopus_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 42.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
056d80eca6ee0c2e6c58103d672905c52ebe019f0ea98babe4c728cabf5dbdc9
|
|
| MD5 |
4ad90a566f104a7636b3d7e085efbfb4
|
|
| BLAKE2b-256 |
fd96fbc1cd633c877a4bc8fb2e029ffa90d5da3c776d7ae519dfe47b8ed397c0
|
Provenance
The following attestation bundles were made for octopus_mcp-0.1.0-py3-none-any.whl:
Publisher:
release.yml on DanielChicot/octopus-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
octopus_mcp-0.1.0-py3-none-any.whl -
Subject digest:
056d80eca6ee0c2e6c58103d672905c52ebe019f0ea98babe4c728cabf5dbdc9 - Sigstore transparency entry: 1393926131
- Sigstore integration time:
-
Permalink:
DanielChicot/octopus-mcp@c84f15587e7e645068e73ff30645591525bf6870 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/DanielChicot
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c84f15587e7e645068e73ff30645591525bf6870 -
Trigger Event:
push
-
Statement type: