Skip to main content
Glama
iec-mcp

iec-mcp

by tadnir

iec-mcp

Read your own Israel Electric Corporation (IEC, חברת החשמל) account from an AI assistant over MCP: bills, invoice PDFs, meter readings and smart-meter consumption.

license

Unofficial. Not affiliated with IEC. It uses the same customer API as IEC's own website and app, which can change without notice.

Everything runs on your machine. You sign in through your own browser, the session is saved only on your computer, and this project has no hosted backend and collects nothing. Whatever your AI client requests is passed to that client and handled under its provider's privacy terms.

The IEC endpoints and sign-in flow follow the community py-iec-api project (MIT), which documents them for Home Assistant.

Terms of use

  • Own account only.

  • Read-only. No payments, no changes to the account, no requests to IEC.

  • The session file is secret. It holds a refresh token, is saved with mode 0600 under ~/.config/iec-mcp/, and must never be committed or pasted.

Related MCP server: byob

Install

git clone https://github.com/tadnir/iec-mcp.git
cd iec-mcp
npm install
npm test

Use it from an MCP client

{
  "mcpServers": {
    "iec": {
      "command": "npx",
      "args": ["tsx", "src/main.ts"],
      "cwd": "/absolute/path/to/iec-mcp"
    }
  }
}

For Claude Desktop, use absolute paths: "command": "/absolute/path/to/node" with "args": ["/absolute/path/to/iec-mcp/node_modules/.bin/tsx", "/absolute/path/to/iec-mcp/src/main.ts"].

Signing in

  1. Ask your assistant something, for example "how much was my last electricity bill?".

  2. While nobody is signed in, the tools answer with a link to a sign-in page this server serves on http://localhost:8766/. iec_login returns the same link.

  3. Open it, enter your ID number and pick how long to stay signed in (1 hour to 30 days). IEC sends a one-time code by SMS or email; enter it on the page.

  4. Ask again.

Your ID number and the code are only ever typed on that page and sent to IEC. The assistant only ever sees the link.

IEC's sign-in gives a refresh token, so the session doesn't depend on activity: the server refreshes the tokens shortly before they expire, saves them, and signs out at the end of the length you picked. A restart picks the saved session back up.

Tools

Tool

What it reads

get_customer

The account holder: BP number, accounts, contact details

list_contracts

Contracts (one per address) with debt and due date

get_electric_bill

The current bill summary

list_invoices, get_invoice_pdf

Invoices with amounts, periods and consumption; one invoice as a PDF

list_meters, get_last_meter_reading

Meters on a contract and their last readings

get_consumption

Smart-meter kWh: one day in 15-minute steps, or a week or month of daily totals

iec_login, iec_session_status, iec_logout

The sign-in link, whether a session is live and until when, and sign-out

bpNumber and contractId default to the signed-in customer and their first contract, and the meter to the contract's first meter.

Settings

Variable

Default

Meaning

IEC_CONFIG_DIR

~/.config/iec-mcp

Where the session is saved

IEC_LOGIN_HOST

127.0.0.1

Address the sign-in page listens on

IEC_LOGIN_PORT

8766

Its port; a free one is used if another copy holds it

IEC_LOGIN_URL

http://localhost:<port>/

The link handed out, when the page sits behind a reverse proxy. When set, the page starts with the server.

Hosting one long-lived copy

To share one session between several clients, run a single copy on an always-on machine and put a stdio-to-HTTP MCP proxy in front of it, such as TBXark/mcp-proxy, with a bearer token per client. Keep it on your own network or a private VPN, never on the internet. Put the sign-in page behind your own authentication and set IEC_LOGIN_URL to its address (and IEC_LOGIN_HOST=0.0.0.0 inside a container). Its links and forms are relative, so it can sit at the root of a host or under a path whose prefix the reverse proxy strips (IEC_LOGIN_URL=https://mcp.example.com/iec/login/, with the trailing slash).

Every token holder reads the account that signed in on the page; the proxy's tokens and the IEC session are unrelated. For a second person, run a second copy with its own IEC_CONFIG_DIR, tokens and sign-in page.

The Dockerfile builds an image of the stdio server, published as ghcr.io/tadnir/iec-mcp from master, with the session in /data and the page on port 8766. Run it with docker run -i, or use it as a base for an image that adds your MCP proxy.

The sign-in page answers only to localhost, 127.0.0.1 and the host in IEC_LOGIN_URL, and each form carries a per-process token. Anyone who can open the page can sign in or out, so keep it on loopback or behind your own authentication.

License

MIT

Available Tools

11 tools
get_consumptionB

Smart-meter consumption (kWh): one day in 15-minute steps, or a week / month of daily totals.

Inputs: date (required), bpNumber, meterCode, contractId, +2 more.

get_customerB

The signed-in IEC customer: BP number, accounts, name and contact details.

Inputs: no named parameters.

get_electric_billC

The current bill summary of a contract.

Inputs: bpNumber, contractId.

get_invoice_pdfB

Download one invoice as a PDF (base64).

Inputs: invoiceNumber (required), bpNumber, contractId.

get_last_meter_readingB

The last reading of each meter on a contract.

Inputs: bpNumber, contractId.

iec_loginA

Get the link where the user signs in to IEC (ID number and one-time code are typed on that page, never in the chat). Returns the status when already signed in.

Inputs: no named parameters.

iec_logoutB

Sign out of IEC here: forget the saved session.

Inputs: no named parameters.

iec_session_statusA

Whether this server is signed in to IEC, since when, until when, and the sign-in link when it is not.

Inputs: no named parameters.

list_contractsC

The customer's electricity contracts (one per address) with debt and due date.

Inputs: bpNumber.

list_invoicesC

A contract's invoices: amounts, paid status, billing periods and consumption.

Inputs: bpNumber, onlyOpen, contractId.

list_metersC

The meters on a contract, with deviceNumber and deviceCode.

Inputs: contractId.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 11 tools

    Disambiguation5/5

    Each tool targets a distinct resource or session action: auth trio (iec_login/iec_session_status/iec_logout), customer, contracts, bills, invoices, PDF, meters, readings, and consumption are clearly separated. The only mild proximity is get_electric_bill vs list_invoices, but the descriptions frame one as a current summary and the other as a per-period invoice list, which is enough to choose correctly.

    Naming Consistency4/5

    The dominant pattern is a consistent verb_noun snake_case (get_customer, list_contracts, get_invoice_pdf, etc.), which reads predictably. The deviation is the iec_ prefix reserved for the three session/auth tools, a minor but noticeable inconsistency rather than a readability problem.

    Tool Count5/5

    Eleven tools is well within the ideal range and each one maps to a concrete self-service need (auth, account lookup, contracts, billing, invoices, metering, consumption). Nothing feels redundant or padded; the surface is scoped to a single utility-customer domain.

    Completeness4/5

    Coverage spans the full read lifecycle of an electricity account plus session management and an invoice download, so common agent workflows have no dead ends. Minor gaps remain around write/action operations (payments, contract or tariff detail beyond the summary) that an agent might expect for a customer portal.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    • e-conomic MCP server for ChatGPT, Claude and any AI agent: create draft invoice, book invoice, add customer, list unpaid invoices and create entry in your own e-conomic account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to e-conomic yourself; Cotlet does not store your password and you need no e-conomic API key. About the official e-conomic API: Yes, e-conomic has a full REST API with customers, draft and booked invoices, invoice PDFs and journal vouchers (checked 14 Oct 2026), but you get it through a developer agreement: you create an app that holds an AppSecretToken, and each accounting user grants it access with an AgreementGrantToken. The developer docs list no official MCP server. Setup and FAQ: https://cotlet.dev/integrations/e-conomic-api-mcp-server

    • Browser MCP for logged-in tasks. Uses your Chrome — credentials stay local. Zero-token replay.

      https://mcp.taprun.dev/mcp
    • Számlázz.hu MCP server for ChatGPT, Claude and any AI agent: issue invoice, cancel invoice, issue receipt, record payment and get invoice PDF in your own Számlázz.hu account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Számlázz.hu yourself; Cotlet does not store your password and you need no Számlázz.hu API key. About the official Számlázz.hu API: Yes. Számlázz.hu has an official API called Számla Agent, in operation since 2010, that issues, reverses and queries invoices and records payments over HTTP with XML (checked 14 Oct 2026). Setup and FAQ: https://cotlet.dev/integrations/szamlazz-hu-api-mcp-server

    • Remote streamable-HTTP MCP server running on a single Cloudflare Worker. Your assistant gets live Airbnb, Amazon, Booking.com, Google Flights, Maps and Reddit data, social search on X, Instagram and TikTok, the Meta Ad Library, and image/video generation without any keys. Connect your own accounts to let it send WhatsApp or Telegram messages, work an IMAP inbox, manage Meta Ads campaigns and publish to X and LinkedIn. OAuth 2.1 with PKCE; stored credentials are AES-256-GCM encrypted.

    Related MCP Servers

    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables any MCP-compatible AI agent to drive your own Chrome browser with your existing login state, filling forms, clicking elements, fetching data, and handling captchas without API keys or re-authentication.
      335 npm
      610
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      A local MCP server that enables AI coding assistants to drive the real, already-logged-in Chrome browser — navigating pages, clicking, typing, reading content, taking screenshots, and inspecting tabs, cookies, and network traffic through natural language. It works as a Chrome extension, so no remote-debugging port needs to be opened and pages the user is already signed into are fully usable.
      1 npm
      ISC
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI coding tools to control your real, already-logged-in Chrome browser through local MCP tools for navigation, reading, screenshots, form filling, cookies, tabs, network inspection, and more. It works via a Chrome extension rather than a remote-debugging port, keeping all communication on your machine.
      1 npm
      ISC
    • A
      license
      Not graded
      quality
      A
      maintenance
      A local MCP server that lets AI coding assistants drive the user's own already-signed-in Chrome, so agents can read logged-in pages, click, fill forms, navigate, screenshot, inspect network traffic and storage, and run multi-step browser workflows without a separate headless browser or remote debugging port. All communication stays on the user's machine and agent-opened tabs are grouped so they never steal focus.
      1 npm
      ISC