Skip to content

Installation

farzad edited this page Oct 7, 2026 · 2 revisions

Installation

Requirements

From PyPI

pip install peykan

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

From source

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.

What gets installed

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.

Check the install

peykan --help
peykan log-info sample

The second command analyses the bundled recording and should report 2563 frames over 30 s. Next: Quickstart.

Upgrading from mcp-can

This project was published as mcp-can before 0.2.0.

pip uninstall mcp-can
pip install peykan

Rename MCP_CAN_* environment variables to PEYKAN_*. Old names and the mcp-can command still work for now, with a deprecation warning.

Windows note

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.

Clone this wiki locally