Open source · MIT · Unofficial · Model Context Protocol

Talk to your energy.

octopus-mcp connects Claude and other AI assistants to your Octopus Energy account. Ask about your usage, costs and Agile prices in plain English, find the cheapest time to run things, and let the assistant manage EV charging and Saving Sessions when you allow it.

Dockerdocker pull ghcr.io/mattoddie/octopus-mcp
Homebrewbrew install mattoddie/tap/octopus-mcp
Claude · octopus
When's the cheapest time to run the dishwasher today?
octopus_find_cheapest_slots2 h · 1.5 kWh
Start it at 12:30. The two hours from then average 0.5p/kWh, and prices dip below zero at 13:00, so it costs about 1p. Starting it now would be about 18p.
Nice. How much did we use yesterday?
octopus_get_consumptionyesterday · by hour
11.8 kWh for £2.73, including the standing charge. The biggest chunk was the evening peak:2.1 kWh between 5pm and 7pm, when prices were over 30p.
26tools
6toolsets
5guided prompts
~20 MBdistroless image

Ask anything

Your energy, in plain English.

The assistant picks the right tools, runs them against Octopus's APIs and explains what it found. No exporting CSVs or squinting at graphs in the app to find a number.

“What are the Agile prices tomorrow evening? Any negative ones?”

get_unit_rates

“When's cheapest to run the dishwasher tonight?”

get_accountfind_cheapest_slots

“How much did electricity cost me last month?”

get_accountget_consumption

“How much gas did we use this week, in kWh?”

get_consumption

“Will the car be at 80% by 7am? Make it 90%.”

get_dispatchesset_charge_preferences

“Any Saving Sessions coming up? Sign me up.”

get_saving_sessionsjoin_saving_session

Full coverage

26 tools across Octopus's APIs.

Grouped into 6 toolsets you can switch on and off, so the assistant only sees what you need: 22 read and 4 write tools.

read write ·Full tool reference →

Safe by default

It can look. It only changes things when you say so.

Octopus API keys can't be made read-only, so octopus-mcp enforces it: tools that aren't allowed aren't registered at all. The assistant can't see them, so it can't call them or be talked into calling them.

  • Read-only out of the box. One switch turns on EV charging changes and joining Saving Sessions.
  • Your key stays secret. It's never returned or logged, public price lookups don't send it, and the raw API tool can't touch tokens or keys.
  • Changes are labelled, and bump charges are marked as affecting the real world, so your client asks first.
  • A record of every change. An optional audit log notes each change made to your account.
  • Bearer-token auth, a Host allow-list and a read-only, non-root container.
Read the security model →
read

22 tools, always on

get_consumption · get_unit_rates · find_cheapest_slots · list_bills …
write

4 tools with OCTOPUS_ALLOW_WRITES=true

set_charge_preferences · bump_charge · set_smart_charging · join_saving_session
never

Not possible at all

switching tariff · payments and direct debits · personal details · your API key

Built with care

The fiddly parts, handled.

Half-hourly prices, UK time, clock changes, gas in cubic metres: octopus-mcp gets the details right so the answers are.

Real costs

Every half-hour is priced at the rate of the tariff you were on at the time, plus standing charges, so Agile, Go, Cosy and Tracker are costed properly.

Cheapest-time finder

Finds the cheapest block for a job, the runners-up and the cheapest half-hours, and says what it costs against running it now.

Honest about units

SMETS2 gas meters report m³. octopus-mcp knows which yours uses, converts with the standard formula, and says what it assumed.

Just your API key

No OAuth dance. Kraken tokens are fetched, renewed and kept in memory, and neither the key nor a token ever appears in output or logs.

Install it your way

Homebrew on macOS or Linux, a one-click Claude Desktop bundle, or a ~20 MB distroless image for amd64 and arm64 that runs non-root with nothing stored.

Tested against a mock Octopus

The test suite runs every tool against a mock of the REST API and both GraphQL APIs, so changes never need a real account.

5 guided prompts turn common jobs into one step. In Claude Code they're slash commands, such as /mcp__octopus__plan_cheap_usage.

  • compare_tariffs
  • energy_report
  • ev_charging_check
  • plan_cheap_usage
  • saving_session_check

Works with your Octopus account

REST and GraphQL, end to end

  • Smart meter usage
  • Cost estimates
  • Agile & time-of-use prices
  • Tariffs by region
  • Bills & balance
  • Intelligent Octopus
  • Saving Sessions
  • Home Mini live demand

Uses your own API key with Octopus's public customer APIs. Price and tariff lookups need no account at all. When a tool doesn't cover something, raw API tools do, limited to reads unless writes are on. Compatibility →

Works with your assistant

Streamable HTTP or stdio

  • Claude Code
  • Claude Desktop
  • VS Code
  • Cursor
  • Codex
  • Any MCP client

Run it once and share it, or let your client start it for each session, from Homebrew or with docker run -i. It keeps no state, so run as many as you like. On Claude Desktop, install the one-click bundle from the latest release.Client setup →

Quick start

Up and running in three steps.

  1. 1

    Get your API key

    In your Octopus account, open Personal details → API access. Copy the API key and your account number.

  2. 2

    Start the server

    mkdir octopus-mcp && cd octopus-mcp
    curl -fsSLO https://raw.githubusercontent.com/mattoddie/octopus-mcp/main/compose.yaml
    curl -fsSL https://raw.githubusercontent.com/mattoddie/octopus-mcp/main/example.env -o .env
    # set OCTOPUS_API_KEY, OCTOPUS_ACCOUNT
    # and MCP_AUTH_TOKEN in .env
    docker compose up -d

    Runs as a shared HTTP service. Deployment →

    Install with Homebrew

    brew install mattoddie/tap/octopus-mcp

    On macOS or Linux. A single binary with no dependencies, and brew upgrade picks up new releases. Homebrew →

  3. 3

    Connect your assistant

    claude mcp add --transport http octopus \
      http://<docker-host>:8080/mcp \
      --header "Authorization: Bearer <token>"
    claude mcp add octopus \
      --env OCTOPUS_API_KEY=<api-key> \
      -- octopus-mcp

    Your client starts it when needed. In Claude Desktop and other apps, use the full path from which octopus-mcp. Client setup →

    Then ask: “What's my electricity price right now?”

Ready to talk to your energy?

Free, open source and MIT licensed. Contributions and bug reports are welcome.

More MCP servers by Matt OddieFree, open-source servers that connect your AI assistant to Proxmox VE, UniFi, Crunch Accounting, Hyundai and Kia cars and Hive.See all servers