Repository navigation
Installation
- Python 3.10 or newer (tested on 3.10–3.13)
- Optional: Docker, see Docker and Deployment
- Optional: a CAN adapter, see Real Hardware and Safety
pip install peykanThis installs the peykan command. For serial/USB adapters that use slcan (CANable, USBtin, ...), add the serial extra:
pip install "peykan[serial]"To run it without installing into your current environment: pipx run peykan demo or uvx peykan demo.
Peykan uses the mcp 2.x SDK, so it can share an environment with other current MCP tools (for example ollmcp).
git clone https://github.com/farzadnadiri/peykan.git
cd peykan
pip install -e ".[dev]".[dev] adds pytest, ruff, mypy, build and twine; see Development and Testing.
| Package | Used for |
|---|---|
python-can |
Bus access: the built-in virtual bus, log file readers/writers, and real adapters |
cantools |
DBC loading, encoding and decoding |
can-isotp |
ISO-TP transport (multi-frame messages) for UDS and the OBD VIN |
udsoncan |
UDS client |
mcp (>=2.1.1,<3) |
MCP server SDK (MCPServer) |
typer, rich
|
CLI and colour output |
pydantic, pydantic-settings
|
Typed tool results and PEYKAN_* settings |
uvicorn |
HTTP server for the SSE / streamable HTTP transports |
The package also bundles a sample DBC (vehicle.dbc) and a 30-second sample drive recording (sample_drive.asc), so it works from any directory.
peykan --help
peykan log-info sampleThe second command analyses the bundled recording and should report 2563 frames over 30 s. Next: Quickstart.
This project was published as mcp-can before 0.2.0.
pip uninstall mcp-can
pip install peykanRename MCP_CAN_* environment variables to PEYKAN_*. Old names and the mcp-can command still work for now, with a deprecation warning.
If the checkout lives in a cloud-synced folder (OneDrive, Dropbox), pip install -e . or git can fail with odd FileNotFoundError / Permission denied errors caused by the sync client. Pause syncing for that folder or work from a local path.
Getting started
Reference
Protocols
Features
Operating it
Contributing