-
Notifications
You must be signed in to change notification settings - Fork 2
Home
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.
| If you want to... | Go to |
|---|---|
| Install it and run your first simulated vehicle | Installation → Quickstart |
| 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 |
Three cooperating pieces, all talking over one CAN bus (virtual by default, real hardware/SocketCAN optionally):
-
ECU simulator (
mcp-can simulate) — background threads that encode and send CAN frames forENGINE_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. -
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. -
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).
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.
Getting started
Reference
Simulation features
Operating it
Contributing