-
Notifications
You must be signed in to change notification settings - Fork 2
Quickstart
mcp-can demo --port 6278This runs the ECU simulator and MCP server in the same process, which matters: python-can's virtual backend doesn't reliably share bus state across separate OS processes (especially on Windows), so demo exists specifically to work around that. See Troubleshooting for the full explanation.
Works if your platform's virtual-bus sharing cooperates (more likely on Linux):
# Terminal A
mcp-can simulate
# Terminal B
mcp-can server --port 6278With either setup running:
mcp-can frames --seconds 2 # raw frames as JSON
mcp-can decode 0x100 "01 02 03 04 05 06 07 08" # decode one frame (table by default, --json for scripting)
mcp-can dbc-info # every message/signal in vehicle.dbc
mcp-can monitor ENGINE_SPEED --seconds 3 # watch one signal live
mcp-can snapshot --seconds 1 # latest value of every signal seen
mcp-can obd-request --service 0x01 --pid 0x0D # OBD-II vehicle speed
mcp-can diag-request --service-id 0x22 --parameter-id 0x05 # UDS-style READ_DATA_BY_ID
mcp-can fault overheat # force the overheat scenario
mcp-can fault clear # clear itFull command reference: CLI Reference.
With demo (or server) running, open http://localhost:6278/dashboard — see Dashboard.
npx @modelcontextprotocol/inspectorConnect to http://localhost:6278/sse, then list/call tools directly. Good for exploring the tool surface before wiring up a real LLM host.
-
ollama serveandollama pull llama3 - Run
mcp-can demo(above) - Point your MCP-capable host at
http://localhost:6278/sse, with its model endpoint set tohttp://localhost:11434(modelllama3) - Prompt it: "Monitor ENGINE_SPEED for 5 seconds", "List all DBC messages", "Send a READ_DATA_BY_ID diagnostic request for parameter 5", or "Activate the overheat fault scenario and show me the DTCs"
Example host config (OpenAI-compatible endpoint to local Ollama):
{
"model": {
"type": "openai-compatible",
"baseUrl": "http://localhost:11434/v1",
"model": "llama3"
},
"mcpServers": {
"can-mcp-server": {
"serverUrl": "http://localhost:6278/sse"
}
}
}- MCP Tools Reference — every tool an LLM client can call
- Fault Injection — make the simulated vehicle misbehave on purpose
- Configuration — environment variables that change any of the above
Getting started
Reference
Simulation features
Operating it
Contributing