Skip to main content

openinverter-mcp

MCP server for openinverter / EV-CAN work: inspect openinverter parameter databases, decode and encode CAN frames via DBC files, and analyze recorded CAN logs — from Claude Code, Claude Desktop, or any MCP client.

Built for DIY EV builders (Leaf/Tesla drive units, stm32-sine firmware). No CAN hardware required: the DBC, log, and param-DB lanes are fully usable standalone on files. Live device access exists but is deliberately locked behind a feature flag (see Safety).

Install

Requires Python 3.10+.

pip install openinverter-mcp        # once published; from a clone:
git clone <this repo> && cd openinverter-mcp
uv sync                             # or: pip install -e .

Register with Claude Code

From a clone (project-scoped .mcp.json in this repo already does this):

claude mcp add openinverter -- uv run --directory C:/path/to/openinverter-mcp openinverter-mcp

Once on PyPI, no clone needed:

claude mcp add openinverter -- uvx openinverter-mcp

Then in a session: "load assets/sample.dbc and decode 0x156 701C2D2ED40D4A00".

Tools

Handles (dbc:1, log:1, paramdb:1) are returned by the load tools; every tool that takes a handle also accepts a file path directly.

Tool What it does
server_info Version, device-lane status, loaded handles. Smoke test.
dbc_load Load a DBC file → handle + message/node summary.
dbc_info List messages (with search over message/signal names) or full signal detail for one message.
decode_frame One raw frame (id + hex data) → named signal values.
encode_message Signal values → frame bytes (hex + candump form), range-checked.
log_open Open a recorded log: candump .log, Vector .blf, python-can .csv, .asc, .trc.
log_stats Bus overview: per-id counts, rates (Hz), time span, DLC profile.
log_decode Decode a log through a DBC; id filter + pagination; unknown ids summarized.
param_db_load Load an openinverter param DB (oic-format JSON, NUL-tolerant).
param_list Parameters/spot values: id, unit, range, default, enum/bitfield labels; filter by category/search.
param_read Parameter definition from file; live value only with a connected device=.
param_write Write to a LIVE inverter — refuses without device + confirm:true (see Safety).
device_scan / device_connect Live bus access — feature-flagged.

SavvyCAN users: export captures as candump (.log) for log_open.

Safety model

Writing parameters can command a physical inverter, so param_write is safe by construction — three independent latches:

  1. The server must be started with OPENINVERTER_MCP_ENABLE_DEVICE=1 before any physical CAN interface can be opened at all (the virtual interface is always allowed).
  2. param_write requires an explicit device handle from device_connect.
  3. param_write requires confirm: true, and its refusal text instructs the model to obtain the human's explicit confirmation of the exact write first.

Everything is validated (writability, range, enum/bitfield labels) before any bus traffic. Firmware save/reset/start/stop commands are not exposed at all. Values written go to RAM only.

Bundled sample assets

assets/ ships a synthetic, MIT-licensed trio (regenerate with python assets/generate.py): sample.dbc (EV-style messages), sample-candump.log (10 s synthetic drive, 405 frames), sample-paramdb.json (openinverter param DB with real stm32-sine parameter facts). See ATTRIBUTION.md for licensing of dependencies and asset provenance.

Development

uv sync --extra dev
uv run pytest          # 33 tests incl. a real stdio MCP end-to-end drive

Design: specs/DESIGN.md. Research notes: specs/api-research.md. License: MIT.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openinverter_mcp-0.1.0.tar.gz (115.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

openinverter_mcp-0.1.0-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file openinverter_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: openinverter_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 115.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for openinverter_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b84103bbee1014fbbdca004a859122308af9fa1d8438d022b13355a3371f4c94
MD5 64d53b52042c52fdc0c118a7205ca01f
BLAKE2b-256 14df09c9d0c8e0fd5152a07c714a0113bcb64ca686d62fc4c842b2977c6136ee

See more details on using hashes here.

File details

Details for the file openinverter_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: openinverter_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for openinverter_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 052a0df894cb48ae27e36888e2aabf995fdae49d0c66fe6f7c74a5b3fdaffac1
MD5 464daa0afb8cdb5aadd9dd9e8fde5831
BLAKE2b-256 d73c79472eaec80f9617bbcc9b591ce8d15e6e8ede7e6a74c540daa346ab7d48

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page