Skip to content
farzad edited this page Aug 19, 2026 · 2 revisions

MCP-CAN Wiki

MCP-CAN is an MCP server purpose-built to surface vehicle CAN/OBD data to an LLM/SLM. It simulates ECUs on a virtual CAN bus, decodes traffic via a DBC file, and exposes MCP tools over SSE (or streamable-HTTP) — no real hardware required by default.

This wiki is a deeper reference than the README; start there for a two-minute overview, come here for details.

Where to start

If you want to... Go to
Install it and run your first simulated vehicle InstallationQuickstart
Understand how the pieces fit together Architecture
See every MCP tool an LLM client can call MCP Tools Reference
See every mcp-can CLI command CLI Reference
Force a specific fault scenario for testing/demos Fault Injection
Understand the OBD-II / UDS diagnostic simulation Diagnostics and OBD-II
Configure via environment variables Configuration
Use the live web dashboard Dashboard
Run it in Docker Docker and Deployment
Contribute, run tests, or add a tool Development and Testing
Fix something that isn't working Troubleshooting
See what's planned next Roadmap

What this project actually is

Three cooperating pieces, all talking over one CAN bus (virtual by default, real hardware/SocketCAN optionally):

  1. ECU simulator (mcp-can simulate) — background threads that encode and send CAN frames for ENGINE_STATUS, ABS_STATUS, AIRBAG_STATUS, BODY_STATUS, plus responders for OBD-II (SAE J1979) and a UDS-style diagnostic protocol. Signal values aren't independently random — a small correlated "driving state" model ties RPM, throttle, speed, temperature and fuel together (see Architecture), and named fault scenarios can override them on demand.
  2. MCP server (mcp-can server) — a FastMCP app exposing tools and a DBC resource over SSE or streamable-HTTP, plus a read-only live dashboard.
  3. CLI (mcp-can ...) — a Typer app mirroring most of the MCP tool surface for direct terminal use, independent of any MCP client.

mcp-can demo runs the simulator and server together in one process — the recommended way to actually see data flow, since python-can's virtual backend doesn't reliably share bus state across separate OS processes (see Troubleshooting).

Scope

Explicitly educational/prototyping: a compact, readable reference for wiring an LLM up to CAN/OBD data over MCP, not a certified automotive tool. License is MIT — see the LICENSE file.

Clone this wiki locally