CANarchy MCP server
2026년 10월 27일 커밋구조화된 머신 리더블 이벤트 스트림을 사용하여 AI 에이전트가 CAN 및 J1939 버스 트래픽을 캡처, 디코딩 및 조작할 수 있도록 지원합니다.
다른 이름 hexsecs/canarchy
- 스타
- 5
- Tools
- —
- 다운로드, 30일
- —
- 최신 버전
- —
- 마지막 커밋
- 2026년 10월 27일
- 라이선스
- GPL-3.0
CANarchy MCP란?
구조화된 머신 리더블 이벤트 스트림을 사용하여 AI 에이전트가 CAN 및 J1939 버스 트래픽을 캡처, 디코딩 및 조작할 수 있도록 지원합니다.
프로젝트 README에서 생성된 요약
CANarchy MCP server 정보
보안 연구자와 중장비 엔지니어는 스트림 우선 툴킷을 통해 CAN 및 J1939 버스 트래픽을 캡처, 디코딩 및 조작할 수 있습니다. 자동화를 위해 설계된 이 시스템은 모든 명령 출력을 JSON, JSONL 또는 텍스트 형식의 타입이 지정된 머신 리더블 이벤트 스트림으로 처리합니다. 이를 통해 사용자는 데이터를 스크립트로 직접 파이프하거나 내장된 MCP server를 통해 AI 에이전트에 전달할 수 있습니다.
사용자는 명령줄 인터페이스(CLI) 또는 전체 화면 TUI를 통해 버스와 상호작용하며 트래픽, 신호 및 DM1 결함을 실시간으로 모니터링할 수 있습니다. 이 툴킷은 socketcan, 가상 버스, UDP multicast를 포함하여 python-can을 통한 다양한 전송 백엔드를 지원합니다. 하드웨어 없이 테스트하려는 경우 이벤트를 스트리밍할 수 있는 deterministic scaffold 백엔드를 사용할 수 있습니다.
특화된 워크플로우에는 J1939 PGN 및 SPN 디코딩, UDS 진단 서비스, 신호 순위 지정 또는 이상 탐지를 위한 리버스 엔지니어링 도구가 포함됩니다. 퍼징(fuzzing) 및 프레임 생성과 같은 active-transmit 기능은 버스 간섭을 방지하기 위해 명시적인 승인이나 dry-run 모드를 요구하는 안전 모델에 의해 보호됩니다.
활용 사례
- 1보안 이상 탐지연구자는 두 개의 캡처 데이터를 비교하여 타이밍 드리프트나 페이로드 엔트로피 붕괴를 식별할 수 있습니다.
- 2프로토콜 리버스 엔지니어링개발자는 알 수 없는 버스 캡처 데이터로부터 유력한 신호와 카운터를 순위별로 나열할 수 있습니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
구성
CANARCHY_TRANSPORT_BACKEND
| 이름 | 설명 | 유형 |
|---|---|---|
| CANARCHY_TRANSPORT_BACKEND | — |
자동 검사
2026년 11월 14일에 실행됨전체 보고서 →아직 인증되지 않았습니다. 서버는 80점 이상의 점수, 심각한 결함 없음, 그리고 검사에 충분한 데이터를 갖추어야 합니다. 검사 방식 · 점수를 높이기 위해 수정할 항목
- 소스 저장소 연결 및 접근 가능hexsecs/canarchy is public and reachablegithub.com/hexsecs/canarchy ↗통과
- 패키지가 이 저장소를 소스로 명시검사되지 않음
- 빌드 출처(Sigstore 증명)검사되지 않음
- 오픈 소스 라이선스 (OSI)GPL-3.0spdx.org/licenses/GPL-3.0.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit or release 2026-10-27github.com/hexsecs/canarchy ↗통과
- OpenSSF Scorecard검사되지 않음
- 패키지 이름이 인기 패키지와 유사하지 않음검사되지 않음
- 패키지 및 해당 종속성에 중요한 보안 권고 없음검사되지 않음
- 모델에 대한 숨겨진 지침 없음0 tool descriptions and the README read; no override phrases, credential paths or hidden characters통과
- 파괴적인 도구에 라벨 표시됨검사되지 않음
- 원격 엔드포인트가 MCP 핸드셰이크에 응답검사되지 않음
README
GitHub에서 보기What is CANarchy?
CANarchy is a CLI-first runtime for capturing, decoding, and manipulating CAN and CAN-FD traffic. Most CAN tools force a tradeoff: interactive but hard to automate, scriptable but too raw, or protocol-aware but inconsistent across interfaces. CANarchy is built around the opposite constraint — every output is a stream of typed events (--json, --jsonl, --text) you can parse, pipe, or forward to an LLM agent over MCP.
It's for you if you're:
- A security researcher reversing an unknown bus, fuzzing ECUs, or diffing captures for anomalies.
- A heavy-vehicle / J1939 engineer who wants PGN/SPN decoding, TP reassembly, and DM1 fault parsing without dropping to raw IDs.
- Building automation or AI agents that need a stable, machine-readable CAN interface instead of scraping human-formatted text.
Install
pipx install canarchy # isolated, on PATH everywhere
# or: pip install --user canarchy
Requires Python 3.11+. Live transport uses python-can (socketcan, virtual bus, UDP multicast, and more).
Try it in 60 seconds — no hardware required
canarchy --version
canarchy doctor --text # 8 offline health checks; all green = good install
# Stream typed events from the deterministic scaffold backend —
# no hardware, no fixtures, no network. This is the JSONL contract:
CANARCHY_TRANSPORT_BACKEND=scaffold canarchy capture can0 --jsonl
Point it at a real interface once you have one:
canarchy capture can0 --candump # human-friendly live view
canarchy capture can0 --jsonl | jq . # typed events, one per line
Prefer to explore visually? Launch the full-screen TUI (pictured above) and watch the bus live:
canarchy tui # /capture <iface> to stream; /filter, /sort, /help
Why CANarchy?
The event schema is the stable contract; the CLI wraps it. That one design choice is what sets CANarchy apart from most open-source CAN tooling:
- Structured output is the contract, not an afterthought. Every command — capture, decode, fuzz, reverse-engineer — emits the same canonical JSON envelope. Parse once, reuse everywhere.
- Pipe-first.
--jsonlstreams one typed event per line, so| jq,| grep, or a downstream script Just Works. - J1939 is first-class. PGN decoding, SPN extraction, TP session reassembly, and DM1 fault parsing resolve names from a bundled SAE catalog — not just raw arbitration IDs.
- Agent-ready. A built-in MCP server exposes the toolkit to Claude and other MCP clients, so an agent can drive CAN analysis directly.
| CANarchy | Typical CAN CLI tools | |
|---|---|---|
| Structured output as a core contract | ✅ | ✗ / partial |
| Pipe-friendly typed event stream | ✅ | partial |
| Provider-backed DBC discovery & cache | ✅ | ✗ |
| J1939-first operator workflows | ✅ | partial |
| MCP / agent integration | ✅ | ✗ |
See the full CAN tool feature matrix for an honest, side-by-side comparison with can-utils, SavvyCAN, Caring Caribou, TruckDevil, and others.
What can you do with it?
# Decode a capture against a DBC
canarchy decode --file trace.candump --dbc vehicle.dbc --jsonl
# J1939 heavy-vehicle analysis
canarchy j1939 decode --file trace.candump --text
canarchy j1939 spn 110 --file trace.candump --text # Engine Coolant Temp
canarchy j1939 dm1 --file trace.candump --text # active fault codes
# Reverse-engineer an unknown bus: rank likely signals, counters, anomalies
canarchy re signals --file trace.candump --jsonl
canarchy re anomalies --file trace.candump --baseline known_good.candump --jsonl
# Diff two captures per arbitration ID (rate/timing/entropy deltas)
canarchy compare before.candump after.candump --json
# Active workflows (gated by the active-transmit safety model; --dry-run plans safely)
canarchy generate can0 --count 10 --gap 50 --id 7DF --jsonl
canarchy replay --file trace.candump --rate 2.0 --json
# Pipe events straight into downstream tooling
canarchy j1939 spn 110 --file trace.candump --jsonl \
| jq '[.payload.value, .payload.units, .payload.timestamp]'
Drive it from an AI agent (MCP)
CANarchy ships a Model Context Protocol server, so an LLM agent can capture, decode, and analyze CAN traffic through the same structured contract the CLI uses.
canarchy mcp install --client claude-desktop # or: --client claude-code
canarchy mcp serve # or run the stdio server directly
Active-transmit tools require an explicit acknowledgement, so an agent can't put frames on a live bus by accident. See the active-transmit safety design.
The full-screen TUI
canarchy tui opens an interactive, full-screen dashboard that streams the bus live:
- Responsive workspaces:
Alt+1–Alt+5switch Traffic, Signals (one row per decoded observation), J1939, UDS, and Findings. Traffic opens as a per-bus, standard/extended-ID summary with counts, rate, changed-byte offsets, and activity;vswitches to the chronological event log. The active table uses the available height; wide terminals show a selected-row inspector, whileEnteropens complete raw hex/bit details on narrow terminals (Escreturns). - Background capture:
/capture <iface>starts streaming;/stop(orx) ends it. - Interactive:
/filter traffic 'id==0x123'(alsopgn==andsa==),/sort traffic <column>, arrow-key row navigation,F4to freeze inspection or return live,F3to expand activity,spaceto pause the feed,[/]to resize the backlog,ctrl+fto maximize a table. Other panes keep/filter <pane> <text>and/sort <pane> <column>. - Type any real CANarchy command at the prompt — event output folds into the panes, while stats, DBC inspection, diagnostics, reference lookups, errors, and help appear in a scrollable result view. Press
F2to switch views orEscto return to the panes.
Fully implemented and tested:
Transport
capture,send,filter,stats— transport workflows with livepython-canand deterministic scaffold backends;statsreports per-ID frequency/timing, DLC distribution, and a bus-load estimatecompare— diff two or more plain CAN captures per arbitration ID and identifier type (standard/extended): frame-count/rate deltas, cycle-time drift, payload-entropy deltas against a baseline, each identifier flagged (rate-drop, rate-spike, entropy-collapse, timing-drift, new/dropped)capture-info— fast capture metadata without loading every framegenerate— cangen-style frame generation (fixed, random, incrementing)simulate— deterministic, profile-driven mix of classic CAN, J1939, and DM1 traffic (no hardware)gateway— bridge frames between two interfaces (uni- and bidirectional)replay,sequence replay— deterministic replay planning from candump files, and YAML/JSON multi-message coordinated transmit
Databases (DBC / ARXML / KCD / SYM via cantools)
decode,encode— database-backed signal decode/encode;encoderesolves SAE PGN/SPN display names for round-tripsdbc inspect(incl.--layout,--search),dbc signals— database and signal inspectiondbc convert— convert databases between DBC / KCD / SYMdbc generate-c— C source/header/fuzzer generation from a databasedbc provider list,dbc search,dbc fetch,dbc cache list|prune|refresh— provider-backed DBC discovery and cache workflows
J1939
j1939 monitor,decode,pgn,spn,tp,dm1,faults,summary,inventory,compare,map— operator workflows across live, file-backed, and decoded views; faults resolve SPN names and FMI descriptions from the bundled SAE catalog
UDS
uds scan,trace,services,subservices,ecu-reset,tester-present,security-seed,dump-dids,read-memory,auto— diagnostic discovery and active workflows
Reverse engineering
re signals,re counters,re entropy— file-backed candidate ranking, annotated with J1939 PGN/source-address context, transport-protocol awarere correlate— correlate candidate fields against timestamped reference seriesre anomalies— inter-frame-timing and unexpected/dropped-ID anomaly detection; against a baseline it also flags per-ID rate drop/spike (suppression/injection) and payload-entropy collapse (plateau/frozen-value attacks)re corpus— cross-capture coverage, cycle-time drift, and signal-stability analysisre match-dbc,re shortlist-dbc— provider-backed DBC candidate ranking against captures
Datasets
datasets provider list,search,inspect,fetch,download,cache list|refresh— public CAN dataset provider workflowsdatasets convert,stream,replay— dataset conversion and bounded streaming/replay
Diagnostics over other transports
doip discovery,services,ecu-reset,tester-present,security-seed,dump-dids— DoIP UDP discovery and active diagnostic workflowsxcp scan,info,dump— XCP slave discovery, capability interrogation, and bounded memory dump
Visualization, front ends, and extensions
plot— signal time-series plots to PNG/SVG/HTML (pip install canarchy[plot])web serve— read-only browser dashboard over the JSONL envelope (HTTP + WebSocket)shell— interactive REPL and--commandscripting modetui— full-screen terminal dashboard with background live captureplugins list|info|enable|disable— Python entry-point plugin discovery and togglesskills provider list,search,fetch,cache list|refresh— repository-backed CANarchy skill discovery, caching, and provenance
Active-transmit fuzzing (gated by the active-transmit safety design; --dry-run is the safe planning path)
fuzz payload,fuzz replay,fuzz arbitration-id,fuzz identify— payload/replay/ID-walk fuzzing and bisecting a fuzz log to the culprit framefuzz signal,fuzz spn— DBC-signal and J1939-SPN-aware mutation with sentinel coveragefuzz guided— response-feedback coverage-guided fuzzing with a persisted seed corpus and independent, incremental payload/response evidence archives
Session, export, and utilities
session save,load,show,verify,annotate,attach,bundle,import— research records with input provenanceexport— structured artifact exportdoctor— local environment health checks (Python,python-can, vendor backends, caches, MCP, config)mcp serve,mcp install— Model Context Protocol server and client-config helpercompletion {bash,zsh,fish}— emit a shell completion script--log-level,--quiet— global stderr logging controls (place before the subcommand)
Default transport backend is python-can; set CANARCHY_TRANSPORT_BACKEND=scaffold for deterministic offline behavior.
The structured contract
Every successful command returns a stable envelope:
{ "ok": true, "command": "capture", "data": {}, "warnings": [], "errors": [] }
Failures return structured errors with actionable hints (and a documented error-code catalog):
{
"ok": false,
"command": "decode",
"data": {},
"warnings": [],
"errors": [
{ "code": "DBC_LOAD_FAILED", "message": "Failed to parse DBC file.", "hint": "Validate the DBC syntax and line endings." }
]
}
Use --candump for a human-oriented live view; use --jsonl when feeding scripts or agents — every line is a typed event from the canonical schema. Set CANARCHY_PYTHON_CAN_INTERFACE to choose an interface type, or CANARCHY_TRANSPORT_BACKEND=scaffold for deterministic offline behavior.
Documentation
- Getting Started · Cookbook — task-oriented recipes
- Event Schema — the canonical envelope for all structured output
- Command spec · Architecture
- CAN Tool Feature Matrix — comparison to other OSS CAN tools
- J1939 Heavy Vehicle Demo · Troubleshooting
- Full docs site: hexsecs.github.io/canarchy
Install from source (development)
CANarchy uses uv for environment, dependency, and packaging workflows.
git clone https://github.com/hexsecs/canarchy && cd canarchy
uv sync # create the venv and install from the checkout
uv run canarchy --help
uv tool install --editable . # optional: put `canarchy` on your PATH; edits take effect live
Run the test suite end to end:
uv run python -m unittest discover -s tests -v
Shell completions for bash, zsh, and fish come from canarchy completion <shell> — see Getting Started.
Community & contributing
CANarchy is GPL-3.0-licensed and welcomes contributions.
- ⭐ Star the repo if it's useful — it genuinely helps others find it.
- Contributing guide — local development, branch flow, and PR gates
- Code of Conduct
- Security Policy — reporting concerns and safe active-bus operation
⚠️ CANarchy can transmit on live buses. Only operate against vehicles, ECUs, and networks you own or are explicitly authorized to test. Active-transmit commands require explicit acknowledgement by design.
Philosophy
- The CLI is the contract.
- Protocol semantics over raw frames.
- Structured output over formatted text.
- Reproducible workflows over ad-hoc interaction.
Versioning follows SemVer; see the changelog and release workflow. src/canarchy/__init__.py is the authoritative version source.
CANarchy MCP 질문
하드웨어 없이 CANarchy를 사용할 수 있나요?
네, 하드웨어나 네트워크 장비 없이도 타입이 지정된 이벤트를 스트리밍할 수 있는 deterministic scaffold 백엔드를 사용할 수 있습니다.
CAN 프레임 전송을 위한 안전 메커니즘이 있나요?
네, 실제 버스에 프레임이 실수로 주입되는 것을 방지하기 위해 명시적인 승인이 필요한 안전 설계가 active-transmit 도구에 적용되어 있습니다.