Octopus Energy (octopus-mcp)

io.github.mattoddie由 GitHub 帳號 mattoddie 發布v0.3.1更新於 Oct 29, 2026

Octopus Energy usage and costs, tariffs, Agile prices, bills, EV charging and Saving Sessions

發布方自己的服務:Octopus.do

已驗證STDIO僅桌面位置與生活金融

概覽

AI 產生的概覽

給英國 Octopus Energy 用戶的非官方 MCP 伺服器,讓助理讀取智慧電表用量、費用、電價與帳單,並可選擇管理電動車充電與 Saving Sessions。

可以做什麼
  • 讀取帳戶資訊、餘額、帳單與交易紀錄
  • 依半小時、小時、日、週或月查詢電表用電(進口、出口)與瓦斯用量,並提供費用估算與 Home Mini 即時負載
  • 查詢販售中的電價方案、地區價格、半小時 Agile 電價、固定費用以及最便宜的用電時段
  • 查看 Intelligent Octopus 車輛與充電樁狀態、排程與充電時段
  • 查看 Octoplus 點數與 Saving Sessions,開啟寫入後可設定充電目標、啟動補電或報名場次
  • 以原始 GraphQL 查詢與 REST GET 作為備用手段
適用情境
適合擁有智慧電表的英國 Octopus 用戶,想用自然語言了解用電花費、Agile 電價、瓦斯用量或電動車充電安排,並可能希望助理調整充電或報名 Saving Sessions。
執行需求
以 Docker 映像、Claude Desktop 一鍵擴充包或獨立執行檔在本機執行;需要 Octopus Energy 帳戶,用量資料還需智慧電表。需要 OCTOPUS_API_KEY 密鑰,通常還需 OCTOPUS_ACCOUNT;可選 OCTOPUS_ALLOW_WRITES、OCTOPUS_TOOLSETS、OCTOPUS_AUDIT_LOG 與 MCP_TRANSPORT。HTTP 方式另需 MCP_AUTH_TOKEN 作為 Bearer 標頭。
安裝前請注意
API 金鑰是真實憑證且無法限制為唯讀,伺服器的 OCTOPUS_ALLOW_WRITES 開關是唯一防線,不打算修改時請保持關閉。開啟寫入後助理可變更 Intelligent Octopus 充電設定並報名 Saving Sessions,可能影響實際費用。建議設定 OCTOPUS_AUDIT_LOG 記錄變更。本專案為非官方專案,與 Octopus Energy 無關。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Octopus Energy (octopus-mcp),將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

[octopus-mcp logo]

octopus-mcp

Talk to your energy.

An open-source Model Context Protocol server for Octopus Energy customers in the UK. It lets Claude and other AI assistants read your smart meter usage, costs, tariffs and bills, find the cheapest Agile half-hours and, if you allow it, manage Intelligent Octopus EV charging and join Saving Sessions, all from one small Docker container.

[CI] [Release] [Container image] [License: MIT]

octopus-mcp.mattoddie.dev

Quick start · Documentation · Tool reference · Contributing

[!NOTE] octopus-mcp is an unofficial, independent community project. It is not affiliated with, endorsed by or supported by Octopus Energy. It uses the public customer APIs with your own API key.


"How much did I spend on electricity last week, and when should I run the dishwasher tonight?" Last week you used 58.4 kWh for £11.92, including £2.66 of standing charges, an average of 15.9p/kWh on Agile. Wednesday was the priciest day: you used 4.1 kWh between 4pm and 7pm, when prices were over 30p. Tonight the cheapest two hours are 01:30 to 03:30 at an average of 7.8p/kWh, so a 1.5 kWh dishwasher cycle would cost about 12p, against 46p if you started it now.

Ask about your energy in plain English. The assistant picks from 22 tools to look things up and, if you allow it, make changes. Some examples:

  • 📊 "Give me a report on my energy use for September."
  • ⚡ "What are the Agile prices for tomorrow? Any negative ones?"
  • 🕑 "Find the cheapest 3 hours overnight to charge the home battery."
  • 🔥 "How much gas did we use this month, in kWh?"
  • 🚗 "When will the car charge tonight? Make it 90% by 7am tomorrow."
  • 🎁 "Is there a Saving Session coming up? Sign me up."

Highlights

  • 🐳 Docker-first and tiny. One image (ghcr.io/mattoddie/octopus-mcp) for linux/amd64 and linux/arm64, about 20 MB. It's a single static Go binary on a distroless base, with no shell or package manager, running as a non-root user with nothing to write. It serves Streamable HTTP for a long-running service, or stdio for docker run -i. You can also run the binary on its own, and for Claude Desktop there's a one-click extension bundle (.mcpb) that needs no Docker.
  • 💷 Real costs, half-hour by half-hour. Consumption is priced with the actual unit rate for every half-hour from the tariff you were on at the time, plus standing charges, so Agile, Go, Intelligent Go, Cosy, Flux and Tracker are costed properly.
  • 🕑 Cheapest-time finder. Finds the cheapest continuous block for a job, runner-up times and the cheapest half-hours, and says what it'll cost against running it now.
  • 🔥 Honest about units. SMETS2 gas meters report m³. octopus-mcp knows which your meter uses, converts with the standard formula, and tells you what it assumed.
  • 🛡️ Safe by default. The server is read-only unless you turn on writes. Tools that aren't allowed aren't registered at all, and the raw GraphQL tool can't run mutations without writes, or ever touch tokens or API keys.
  • 🔑 Simple, secret-safe auth. Just your Octopus API key: REST requests use it directly, and GraphQL gets short-lived Kraken tokens that are renewed automatically and kept in memory. Neither the key nor tokens ever appear in output or logs.
  • 🎛️ Tunable. Expose only the toolsets you need, which keeps the model's context small and focused.
  • 🧪 Tested. The test suite runs against a mock Octopus REST API and GraphQL APIs on every build.

Quick start

You need Docker, an Octopus Energy account (with a smart meter for usage data) and an MCP client such as Claude Code.

1. Get your API key from Personal details → API access in your Octopus account. Note your account number (A-1234ABCD) too.

2. Set up and start the server.

sh
mkdir octopus-mcp && cd octopus-mcpcurl -fsSLO https://raw.githubusercontent.com/mattoddie/octopus-mcp/main/compose.yamlcurl -fsSL https://raw.githubusercontent.com/mattoddie/octopus-mcp/main/example.env -o .env# Edit .env: set OCTOPUS_API_KEY, OCTOPUS_ACCOUNT# and a random MCP_AUTH_TOKEN (e.g. `openssl rand -hex 32`)docker compose up -ddocker compose exec octopus-mcp /octopus-mcp status   # checks the API key

3. Connect your assistant.

sh
claude mcp add --transport http octopus http://<docker-host>:8080/mcp \  --header "Authorization: Bearer <MCP_AUTH_TOKEN>"

Now ask "What tariff am I on, and what's my electricity price right now?" in Claude Code.

Using Claude Desktop on a Mac or Windows PC? You don't need Docker at all. Download the .mcpb bundle for your computer from the latest release, open it, and enter your API key in the settings. See Claude Desktop.

Using VS Code, Cursor or Codex? See Connecting MCP clients. Prefer not to run a service? Use stdio mode with docker run -i or the local binary.

octopus-mcp is listed in the MCP Registry as io.github.mattoddie/octopus-mcp, so clients that install from the registry can find it there, with the Docker image and the bundles.

Turning on changes

Out of the box the assistant can look but not touch. To let it change Intelligent Octopus charging settings, start a bump charge and join Saving Sessions, add this to .env and restart:

sh
OCTOPUS_ALLOW_WRITES=trueOCTOPUS_TOOLSETS=account,consumption,tariffs,intelligent,octoplus   # optional: expose fewer tools

Octopus API keys can't be limited to read-only, so this switch, enforced by octopus-mcp, is what keeps the assistant read-only. Read Security before turning it on. To keep a record of every change the assistant makes, set OCTOPUS_AUDIT_LOG to a file path (see Audit log).

What it can do

ToolsetWhat's covered
accountThe account overview (properties, MPAN/MPRN, meter serials, smart meter device IDs, current tariffs), balance, bills and transactions
consumptionSmart meter usage for electricity import and export and gas, by half-hour, hour, day, week or month, with cost estimates; live demand from a Home Mini
tariffsProducts on sale, prices by region, half-hourly unit rates (Agile, Go and more), standing charges, the cheapest times to use electricity, region by postcode. No account needed
intelligentIntelligent Octopus cars and chargers: status, schedule, planned and completed charging slots; with writes, target and ready-by time, bump charge, smart control
octoplusOctoplus points, Saving Sessions with rewards and results; with writes, joining a session
rawEscape hatches: any GraphQL query (mutations only with writes) and any REST GET

See the tool reference for every tool and argument. Ready-made prompts like energy_report, plan_cheap_usage and compare_tariffs chain the tools together for common jobs.

Documentation

The docs are also published at octopus-mcp.mattoddie.dev/docs, with search.

🚀 Getting startedStep-by-step setup, from API key to first question
🔌 Connecting MCP clientsClaude Code, Claude Desktop, VS Code, Cursor, Codex, stdio mode
⚙️ ConfigurationEvery environment variable, how authentication works, Docker secrets, toolsets
🐳 DeploymentCompose, image tags, upgrades, TLS reverse proxy, hardening, running without Docker
💬 Using octopus-mcpExample conversations, prompts, units, cost estimates, gas in m³, EV charging, Saving Sessions
🧰 Tool referenceEvery tool and prompt, generated from the code
🛡️ SecurityThreat model, the API key, safe write setups
📡 CompatibilityThe Octopus APIs, meters and tariffs, and known gaps
🩹 TroubleshootingCommon errors and how to fix them
🛠️ DevelopmentArchitecture, adding a tool, testing

Contributing

Contributions are very welcome, whether that's bug reports, docs or new tools. Read the contributing guide to get started, and please follow the code of conduct. To report a vulnerability, see the security policy. Please don't open a public issue for one.

License

MIT © Matt Oddie

octopus-mcp is an independent community project. It is not affiliated with, endorsed by or sponsored by Octopus Energy Ltd or Kraken Technologies Ltd. "Octopus Energy", "Agile Octopus", "Intelligent Octopus", "Octoplus" and related names are trademarks of their owners and are used here only to describe what the software works with.

來源:README.md,提交 224d3b8

工具

0
SourceWeft 曾在隔離沙箱中以無憑證方式啟動該軟體包一次,以列出其工具,但未能完成:該軟體包類型無法在沙箱中執行。

版本歷史

1
  1. v0.3.1最新Oct 22, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Octopus 整合