km003c-mcp
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., "@km003c-mcp what's the voltage and current on the USB-C meter right now?"
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.
km003c-mcp
MCP server for the ChargerLab POWER-Z KM003C USB-C power meter. It exposes measurements, high-rate VBUS/IBUS streaming, USB PD capture with decoding, and the meter's fast-charge protocol trigger as MCP tools (stdio transport).
Install
python -m venv .venv
.venv\Scripts\pip install -e .[dev]Requires Python 3.11+. On Windows the meter's vendor interface already uses the WinUSB
driver, so no extra driver is needed; libusb-package ships the libusb DLL.
Close the ChargerLab POWER-Z PC software first — only one program can hold the
meter's USB interface. The server reports DeviceBusyError otherwise.
Related MCP server: instrumentControl
Register with Claude Code
claude mcp add km003c -- <repo>\.venv\Scripts\km003c-mcp.exeConfiguration (environment variables)
Variable | Purpose |
| Pick a meter by USB serial number when several are attached |
| Override the trigger's virtual serial port (e.g. |
| Use a specific |
Tools
Tool | What it does |
| Model, hardware/firmware version, serial, trigger COM port |
| VBUS/IBUS/power, CC1/CC2, D+/D−, VDD, temperature; optional averaging |
| PD-side snapshot (VBUS, IBUS, CC1, CC2) |
| Background sampling at 2/10/50/1000 SPS with min/max/mean, energy (Wh), charge (mAh), dropped-sample count and optional CSV |
| Background PD sniffing: attach/detach and the full USB PD R3.1 message set decoded - PDOs/RDOs (incl. PPS, AVS, EPR), PD 3.x data objects, extended messages with chunk reassembly, structured VDMs (Discover Identity incl. cable VDOs, SVIDs, DisplayPort and Thunderbolt 3 alt modes) |
| Protocol detection ( |
| Read the charger's PDOs and request a fixed/PPS/AVS contract |
| QC2/QC3/FCP/AFC/SFCP/SCP/VFCP/TFCP/UFCS voltage requests |
| Reset, leave trigger mode, or send any documented command |
Trigger requests make the charger raise VBUS on the meter's output — disconnect sensitive loads first. Positive IBUS means current flows from the meter's USB-C receptacle (input) to its plug (output).
Tests
.venv\Scripts\pytest # unit tests (no hardware)
$env:KM003C_HW="1"; .venv\Scripts\pytest tests\test_hw.py # against a real meterProtocol sources
okhsunrog/km003c-protocol-research (MIT) and okhsunrog/km003c-rs (MIT/Apache-2.0): bulk protocol, AES framing, PD event format.
ChargerLab's "KM003C/002C Protocol Trigger by Virtual Serial Port" sheet (installed with the POWER-Z software).
Linux
drivers/hwmon/powerz.c: ADC layout cross-check.
License
MIT — see LICENSE.
Available Tools
18 toolsdevice_infoA
Identify the attached KM003C: model, hardware/firmware version, serial, trigger port.
Inputs: no named parameters.
measureA
Read VBUS/IBUS/power, CC1/CC2, D+/D-, VDD and temperature (V, A, W, °C).
With samples > 1 the readings are taken interval_ms apart and mean/min/max are returned for vbus_v, ibus_a and power_w. Positive current flows from the meter's USB-C receptacle (input) to its plug (output).
Inputs: samples, interval_ms.
pd_capture_readC
Page through captured PD events from index since; next is the next index to ask.
Inputs: limit, since, decode.
pd_capture_startA
Start capturing USB PD traffic (messages, attach/detach) in the background.
Inputs: no named parameters.
pd_capture_stopA
Stop the PD capture; captured events stay readable until the next start.
Inputs: no named parameters.
pd_statusA
Read the PD-side status snapshot (timestamp, VBUS, IBUS, CC1, CC2).
Not available while a PD capture runs, because reading would consume captured events.
Inputs: no named parameters.
stream_samplesB
Return up to max_samples evenly spaced samples from the running stream's buffer.
Inputs: max_samples.
stream_startA
Start high-rate VBUS/IBUS sampling in the background (2, 10, 50 or 1000 samples/s).
Optionally writes every sample to csv_path. Use stream_status / stream_samples while running and stream_stop for the final statistics (energy, charge, min/max/mean).
Inputs: csv_path, rate_sps.
stream_statusB
Running state, error (if any), live statistics and the most recent samples.
Inputs: no named parameters.
stream_stopB
Stop the stream and return its statistics.
Inputs: no named parameters.
trigger_closeB
Leave protocol trigger mode (pdm close).
Inputs: no named parameters.
trigger_detectA
Detect the fast-charge protocols the attached charger supports (entry list).
extended=True also probes VOOC/MTK PE (entry list+), which takes much longer.
Inputs: extended, timeout_s.
trigger_enterC
Enter a trigger protocol: pd, ufcs, qc, fcp, scp, afc, vfcp, sfcp, tfcp, bc, apple.
Inputs: protocol (required), timeout_s.
trigger_fast_chargeA
Request a voltage via qc, qc3, fcp, afc, sfcp, scp, vfcp, tfcp or ufcs.
Makes the attached charger raise VBUS on the meter's output; disconnect sensitive loads first.
Inputs: protocol (required), voltage_mv (required), request, current_ma.
trigger_pd_requestA
Request PDO position (1-based); voltage_mv is needed for PPS/AVS PDOs.
Makes the attached charger raise VBUS on the meter's output; disconnect sensitive loads first.
Inputs: position (required), current_ma, voltage_mv.
trigger_pd_source_capsB
Ask the charger for its PD Source_Capabilities (pd pdo).
Inputs: no named parameters.
trigger_rawC
Send any trigger command from ChargerLab's virtual serial port sheet verbatim.
Makes the attached charger raise VBUS on the meter's output; disconnect sensitive loads first.
Inputs: command (required), timeout_s.
trigger_resetA
Reset the protocol trigger to its initial state (re-opened on the next trigger call).
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 18 tools
Most tools map to a distinct resource+action: measurement, streaming, PD capture, and protocol triggers are cleanly separated, and the start/status/samples/stop quadrilogy is unambiguous. The only fuzzy edges are within the trigger group, where trigger_enter (which accepts 'pd'), trigger_fast_charge, and trigger_pd_request could be confused, and trigger_raw overlaps with all of them as an escape hatch.
The set uses a systematic prefix scheme (stream_*, pd_capture_*, trigger_*) with verb or noun suffixes applied consistently inside each group. Minor deviation: the three ungrouped tools mix noun and verb forms (device_info, pd_status vs measure), but the pattern is still highly readable.
18 tools is on the upper end but each supports a real capability: device identification, one-shot measurement, background streaming, PD traffic capture, and the multi-step trigger workflow. Nothing looks redundant enough to be obviously removable, though the trigger family alone accounts for seven tools.
The surface covers the device lifecycle well: identify, measure, high-rate stream with CSV output and final statistics, PD capture with paging, and protocol entry/request/reset/close. Gaps are minor: no tool to query currently configured PDO/trigger state after entry, and no raw PD message transmit, but trigger_raw provides a general fallback for unsupported commands.
Maintenance
Related MCP Connectors
Protocol-native energy infrastructure orchestration for AI data centers. Provides 46 MCP tools across 8 grid protocols (IEC-61850, DNP3, Modbus, OCPP, OpenADR, IEEE 2030.5, IEC 60870-5-104, ICCP) with 5 core API primitives: connect, dispatch, settle, comply, and intel. Enables AI agents to programmatically interact with substations, grid interfaces, and energy assets for real-time workload-grid coordination.
Email inboxes, webhook URLs, mock APIs and 170+ tools for coding agents over one MCP connection.
A paid remote MCP for AI agent browser DevTools MCP, built to return verdicts, receipts, usage logs,
Browz hosted MCP (free public beta): let an AI app drive your own Browz browser profiles from anywhere. Connect https://mcp.gobrowz.com/mcp and sign in with your Browz account (OAuth) or an agent token. Each call is relayed to the Browz app on your computer, which must be online with Remote control on and have a hardware security chip (Mac Secure Enclave or TPM 2.0). 17 tools: profiles, tabs, navigate, snapshot, act, wait, screenshot. Cookies, downloads and stored sign-ins stay on your computer.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server for the JouleScope JS220 precision energy analyzer, enabling agents to measure current, voltage, power, charge, and energy via tools like measure_energy.102Apache 2.0
- FlicenseNot gradedqualityBmaintenanceEnables unified discovery, query, and control of laboratory instruments (power supplies, oscilloscopes, signal generators, multimeters) via VISA/SCPI, with device-specific libraries and an MCP server exposing 19 tools for natural language interaction.-
- FlicenseNot gradedqualityCmaintenanceEnables LLMs to control an RND 320-KA3005P lab power supply through MCP tools, allowing natural language commands to set voltage/current, toggle output, and read measurements.-
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to configure an OWON/Digcreat XDM1041 bench multimeter and take measurements over WiFi through MCP. It exposes meter functions, ranges, and verified readings so agents can measure circuits directly.GPL 3.0