CAN

Provides virtual CAN data and MCP tools over SSE for easy CAN/OBD experimentation with LLMs
  • python

3

GitHub Stars

python

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "farzadnadiri-mcp-can": {
      "command": "mcp-can",
      "args": [
        "simulate"
      ],
      "env": {
        "DBC_PATH": "vehicle.dbc",
        "MCP_PORT": "6278",
        "CAN_CHANNEL": "bus0",
        "CAN_INTERFACE": "virtual"
      }
    }
  }
}

MCP CAN Server is an MCP server implementation that surfaces vehicle CAN and OBD data to LLMs/SLMs. It simulates ECUs on a virtual CAN bus, decodes messages via a DBC, and exposes MCP tools over SSE to enable experimentation and prototyping without hardware.

How to use

Use the MCP CAN Server with an MCP client to simulate CAN frames, decode data, monitor signals, and perform OBD-like requests. You can run a simulator and the server in separate terminals or run a combined demo flow for quick testing.

Typical usage patterns include starting the ECU simulator, launching the MCP SSE server, and then issuing commands through your MCP client or the built‑in CLI to capture frames, decode a frame, monitor a signal, or send an OBD‑like request.

How to install

Prerequisites include Python 3.10+ and optional Docker/Docker Compose. The project supports both a Python‑native workflow and a Dockerized setup.

pip install -r requirements.txt
pip install -e .

Additional sections

Configuration, Docker usage, and troubleshooting are described below. This section also covers testing and common development steps so you can run, build, and verify the MCP server locally.

Environment variables prefixed with MCP_CAN control runtime behavior such as the CAN interface, the CAN channel, the DBC path, and the server port.

Docker and docker-compose files are provided for running the server and simulator together, enabling quick experimentation in isolation from the host environment.

Available tools

simulate

Launch the ECU simulator on the virtual CAN bus to produce frames and OBD responses.

server

Start the MCP SSE server to expose MCP tools and metadata over Server-Sent Events.

frames

Capture and export raw CAN frames for a given duration as JSON.

decode

Decode a single CAN frame by ID and data bytes using the DBC.

monitor

Monitor a specific signal from the DBC for a set duration and output live values.

obd_request

Perform a demo OBD-II request and display the response.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
CAN MCP Server - farzadnadiri/mcp-can | VeilStrat