IoTaWatt MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@IoTaWatt MCP Server what is the house drawing right now, by circuit?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
IoTaWatt MCP Server
A Model Context Protocol server for the IoTaWatt open-source energy monitor. It lets an MCP client such as Claude Code or Claude Desktop read live power, query the on-device history log, inspect the device configuration, and look at the shape of the current on a circuit.
All tools are read-only. The server talks to the IoTaWatt's local HTTP API and needs no cloud account.
This project is not affiliated with or endorsed by IoTaWatt, Inc.
Requirements
Node.js 18 or newer
An IoTaWatt reachable over HTTP from the machine running the server
Related MCP server: Network Monitor MCP Server
Install
git clone https://github.com/519Green/IotaWattMCP.git
cd IotaWattMCP
npm installConfigure
The device address is given with --host or the IOTAWATT_HOST environment
variable. Use an IP address or hostname, for example 192.168.1.50 or
iotawatt.local. A full URL such as https://iotawatt.example.net also
works if the device sits behind a proxy.
Claude Code
Add to .mcp.json in your project, or to your user configuration:
{
"mcpServers": {
"iotawatt": {
"command": "node",
"args": ["/path/to/IotaWattMCP/index.js", "--host", "192.168.1.50"]
}
}
}Claude Desktop
Add the same iotawatt block under mcpServers in
claude_desktop_config.json.
Password-protected devices
If the IoTaWatt has passwords set, give the server one through the environment:
{
"mcpServers": {
"iotawatt": {
"command": "node",
"args": ["/path/to/IotaWattMCP/index.js", "--host", "192.168.1.50"],
"env": { "IOTAWATT_PASSWORD": "your-admin-password" }
}
}
}The account defaults to
admin. SetIOTAWATT_USERtouserto use the device's restricted account instead. That account can do everything exceptsample_waveform.--userand--passwordflags also work, but command-line arguments are visible to other processes on the machine. Prefer the environment.The device uses HTTP Digest authentication, so the password is not sent in the clear. The data itself still travels over plain HTTP.
Tools
Tool | What it does |
| Lists input channels (CTs and VTs) and calculated outputs with their units. Call this first. |
| Device status: firmware version, uptime, Wi-Fi, per-input readings, and data log ranges. |
| Returns the device's |
| Average power over the last 5 minutes for all outputs or for named channels. |
| Time-series query against the on-device log. |
| Energy in Wh per interval for all outputs or for named channels. |
| Live readings once a second for up to two minutes, for catching something as it switches. |
| One AC cycle of raw voltage and current from a CT, with harmonics, distortion and phase lag. |
Query notes
query passes its arguments to the IoTaWatt
query API.
selectis a list of series. Puttime.local.isofirst to get timestamps.Add a unit suffix to a channel name to change what is returned:
.watts,.wh,.amps,.va,.var,.varhor.pffor power channels,.voltsor.hzfor voltage. Add.d2for two decimal places.beginandendaccept relative times (dfor today at midnight,sfor now,d-7d,s-3600s) or absolute times such as2026-02-17T06:00. Leave the seconds off absolute times.groupis the aggregation interval. Seconds must be a multiple of 5 (5s,10s,30s); then1m,1h,1dand so on, orallfor one row.The device returns at most 1,000 rows unless you pass
limit. When a result is cut short, the tool adds a note saying where the data stops.Results come back one row per line.
format: "csv"is the more compact of the two.
Waveform notes
sample_waveform describes the shape of the current, which says what kind of
load is running:
A heater or kettle draws a clean sine wave in step with the voltage: low distortion, crest factor near 1.4, lag near zero.
A motor or compressor lags the voltage.
Electronics draw a narrow, peaky current: high crest factor and a large 3rd harmonic.
The numbers are raw ADC counts, not amps, and the capture is everything on that CT at that instant, not a single appliance. Compare a capture with the appliance on against one with it off.
Example prompts
Once the server is connected, ask in plain language. The assistant picks the tools. It helps to tell it what you already know, for example which appliances are on which circuit.
Getting oriented
"What channels does my IoTaWatt have, and what does each one measure?"
"Is the device healthy? Check the firmware version, uptime, Wi-Fi signal and how far back the logs go."
"What is the house drawing right now, by circuit?"
Energy use
"How many kWh did each circuit use yesterday? Rank them."
"Show hourly energy for the water heater over the last 7 days. When does it run most?"
"Compare this week with last week, circuit by circuit."
"What is my always-on load? Find the quietest hour of the past week and break it down by circuit."
Finding appliances
"Did the dryer run today? Look for a 240 V load of about 5 kW that cycles on and off."
"Find the fridge's defrost cycles on the kitchen circuit over the last 3 days. How often do they happen and how long do they last?"
"Something drew about 1.5 kW for a few minutes around 3 pm. Which circuit was it on, and does the power factor look like a heater or a motor?"
"How many times did the well pump run today, and how long was each run?"
"Watch all circuits for the next 60 seconds. I am going to switch the space heater on, then off. Tell me which circuit it is on and how much it draws."
"Sample the waveform on the office circuit. Is that load mostly electronics, motors or heating?"
Checking the installation
"Compare each subpanel's total against the mains that feed it. Do any CTs look reversed, mislabelled or on the wrong leg?"
"Read my output formulas. Does anything get counted twice or left out?"
Tips
For short events, ask for fine resolution over a short window, such as 5 second data for one hour. The device keeps 5 second data for about a year and 1 minute data for longer.
A 240 V appliance shows up on two CTs at once, one per leg. A 120 V appliance shows up on one.
Ask for a summary, not the raw rows. Long, fine-grained queries return a lot of data.
Things to know
get_configreturns the whole config file. If you have uploaders configured (InfluxDB, Emoncms, PVoutput), that file can contain their URLs and credentials, and they will be passed to the MCP client.Queries pause sampling. The IoTaWatt documentation notes that the device does not sample power while it is answering a query. Prefer a few well-scoped queries over many large ones.
watchis light by comparison: one small request a second.Channel names are cached. Call
discoverafter changing inputs or outputs on the device.Password support is tested against a mock, built from the IoTaWatt firmware source, not against a real password-protected unit. Please open an issue if it fails on yours.
Development
npm testThe tests start the server over stdio against a small mock IoTaWatt in
test/mock-iotawatt.js, so they need no device.
License
ISC. See LICENSE.
Available Tools
8 toolsdiscoverARead-only
List all IoTaWatt inputs (physical CTs/VTs) and calculated outputs with their units. Always call this first to learn what channels are available before querying.
Inputs: no named parameters.
energy_by_intervalBRead-only
Energy consumption (Wh) broken down by interval for all or selected output channels. Use for today's hourly breakdown, daily totals, etc.
Inputs: end, begin, group, channels.
get_configBRead-only
Get the full IoTaWatt device configuration from /config.txt: input channel definitions (names, CT models, calibration factors) and output scripts showing how calculated values are derived.
Inputs: no named parameters.
queryARead-only
Flexible IoTaWatt time-series query against the on-device log. Use discover first to know valid channel names. Results come back one row per line. The device stops sampling while it answers, so prefer a few well-scoped queries.
Inputs: select (required), end, begin, group, +3 more.
sample_waveformARead-only
Capture one AC cycle of raw voltage and current samples (about 640 pairs) from a single CT input and describe the shape of the current: crest factor, 3rd/5th/7th harmonics, distortion and phase lag. This shows what kind of load is on the circuit right now: a heater draws a clean sine in phase with voltage, a motor lags, electronics draw a peaky current rich in harmonics. It is a snapshot of everything on that CT, not of one appliance. Values are raw ADC counts, not amps or volts, and have no CT/VT phase correction, so angles are approximate. Needs the admin user on a password-protected device.
Inputs: channel (required), include_samples.
snapshotARead-only
Latest instantaneous power: a single averaged value over the last 5 minutes. Defaults to all discovered output channels. Optionally restrict to specific channels.
Inputs: channels.
statusARead-only
IoTaWatt device status: firmware version, uptime, WiFi SSID/RSSI/IP, heap memory, AC frequency, and data log ranges.
Inputs: no named parameters.
watchARead-only
Live view at 1 second resolution, finer than the stored log. Polls the device once a second for the given number of seconds and returns one CSV row per second with the watts on each input (volts for a voltage input). Use it to catch an appliance being switched on or off right now. The call takes as long as the duration asked for.
Inputs: pf, seconds, channels.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool targets a distinct access mode or temporal resolution: device status, channel discovery, configuration, instantaneous snapshot, flexible historical query, aggregated energy, live 1-second polling, and raw waveform capture. Although all are read operations, the scopes are clearly differentiated in the descriptions.
Mixed conventions are present: single-word nouns/verbs (status, discover, snapshot, query, watch) alongside verb_noun (get_config, sample_waveform) and noun_prep_noun (energy_by_interval). All names are lowercase snake_case and readable, but there is no single predictable pattern.
Eight tools is well-scoped for an IoTaWatt device monitoring server. Each tool covers a distinct access pattern—status/config discovery, historical query, aggregated energy, live monitoring, and waveform analysis—with no obvious filler.
The surface covers device status, channel discovery, configuration read, raw and aggregated historical queries, live monitoring, and detailed waveform analysis, which is strong for a monitoring-oriented server. Minor gap: there are no tools to modify configuration, reboot the device, or manage firmware/logs, though these may be intentionally out of scope.
Maintenance
Related MCP Connectors
Remote MCP for JSON repair, hashing, formatting, IDs, dates, units, and other small tools.
Free, read-only MCP subset of x402 Toolbox's cheap data endpoints, free via MCP.
Unofficial remote MCP server for Less Annoying CRM: OAuth 2.1, read-only grants, 10 tools.
Scans remote MCP servers for protocol, security, and TLS issues; exposes scan tools via MCP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceExposes the UniFi Network Integration API as MCP tools, dynamically loaded from JSON manifests, with read-only mode by default.MIT
- AlicenseNot gradedqualityDmaintenanceProvides network monitoring capabilities including real-time latency measurement, ping sweeps, and subnet scanning via MCP tools, with a companion web dashboard for live visualization.MIT
- FlicenseNot gradedqualityDmaintenanceLocal MCP server for reading temperature/humidity sensors from Tuya/SmartLife devices, exposing tools to list devices, get capabilities, and read sensor data.-
- FlicenseAqualityDmaintenanceRead-only MCP server for querying solar generation, consumption, and DER telemetry from SolarNetwork via the SolarQuery API. Zero-config against a public demo node.5-