Skip to content

Quickstart

farzad edited this page Aug 19, 2026 · 1 revision

Quickstart

Simulator + server, one process (recommended)

mcp-can demo --port 6278

This 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.

Simulator + server, two processes

Works if your platform's virtual-bus sharing cooperates (more likely on Linux):

# Terminal A
mcp-can simulate

# Terminal B
mcp-can server --port 6278

Try it from the CLI

With 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 it

Full command reference: CLI Reference.

View the live dashboard

With demo (or server) running, open http://localhost:6278/dashboard — see Dashboard.

Connect an MCP client

MCP Inspector (no host needed)

npx @modelcontextprotocol/inspector

Connect to http://localhost:6278/sse, then list/call tools directly. Good for exploring the tool surface before wiring up a real LLM host.

Ollama (local LLM)

  1. ollama serve and ollama pull llama3
  2. Run mcp-can demo (above)
  3. Point your MCP-capable host at http://localhost:6278/sse, with its model endpoint set to http://localhost:11434 (model llama3)
  4. 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"
    }
  }
}

Next steps

Clone this wiki locally