Skip to main content

canforge-mcp

PyPI CI Python versions License: MIT

canforge-mcp is a local, read-only MCP server for inspecting DBC files and decoding CAN capture logs.

Files stay on the machine running the server. The server exposes bounded tools instead of uploading captures or returning unbounded traces.

Tools

Tool Purpose
dbc_info DBC version, message/signal/node counts, and node names
list_messages Bounded message summaries, with optional search
get_message Full message and signal detail by name or arbitration ID
search_signals Bounded signal search across a DBC
decode_frame Decode one hexadecimal CAN payload
validate_dbc Structured DBC validation issues
diff_dbcs Added, removed, and changed messages and signals
probe_log Detect a log format and read header metadata
log_stats Frame count, span, ID counts, and median cycle times
log_signal_inventory One-pass inventory of DBC signals observed in a log
read_frames Bounded raw-frame samples with ID and time filters
decode_log Bounded decoded frames from a DBC and log
signal_timeseries Downsampled timestamp/value points for one signal

See the tool reference for arguments, return shapes, and hard caps.

Install

Run directly with uvx:

uvx canforge-mcp

Or install with pip:

pip install canforge-mcp
canforge-mcp

Requires Python >=3.11.

Configure

Claude Code:

claude mcp add canforge -- uvx canforge-mcp

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "canforge": {
      "command": "uvx",
      "args": ["canforge-mcp"]
    }
  }
}

Restart Claude after changing its MCP configuration.

ChatGPT (Secure MCP Tunnel)

ChatGPT cannot start a local stdio MCP server directly. Use OpenAI's Secure MCP Tunnel to keep Canforge running locally without exposing it to the public internet.

Before starting, enable developer mode in ChatGPT under Settings → Security and login, then create a tunnel in the OpenAI Platform. You need its tunnel ID, a runtime API key, and the tunnel-client binary. Make sure the tunnel is associated with the ChatGPT workspace where you will use Canforge.

Configure and start the tunnel with placeholder credentials:

export CONTROL_PLANE_API_KEY="sk-..."

tunnel-client init \
  --sample sample_mcp_stdio_local \
  --profile canforge \
  --tunnel-id tunnel_your_id \
  --mcp-command "uvx canforge-mcp"

tunnel-client doctor --profile canforge --explain
tunnel-client run --profile canforge

Keep tunnel-client run running while using Canforge. In ChatGPT, open Settings → Plugins, add a developer-mode app, choose Tunnel as the connection, and select or paste the tunnel ID. Add the new app to a chat before asking ChatGPT to use the Canforge tools.

Canforge resolves paths on the machine running tunnel-client. Files attached directly to a ChatGPT conversation are not automatically available as local filesystem paths; provide an accessible local path instead.

Design

  • Local-first: tools accept filesystem paths and do not send file content over the network.
  • Read-only: no tool creates, edits, encodes, or overwrites a file.
  • Bounded: list and frame tools enforce hard caps and report total, returned, and truncated; timeseries are downsampled server-side.
  • Cached: parsed DBCs are cached by resolved path and nanosecond modification time for repeated inspection during one server session.
  • Composable: capkit reads capture formats; dbckit parses and decodes DBC content.
  • Stdio-only: the 0.x line exposes no network transport or hosted service.

Scope and Caveats

  • Supported capture formats come from capkit 0.3: Kvaser CanKing TXT, candump text, and Vector ASC.
  • DBC support and validation behavior follow dbckit 1.x.
  • Timestamps are floats exactly as recorded by capkit; they are not rebased.
  • Median cycle time is the median gap between consecutive occurrences of an ID.
  • capkit adds raw priority, PGN, and source-address fields for observed extended IDs; dbckit remains responsible for DBC-aware J1939 matching and decoding.
  • signal_timeseries uses deterministic, evenly spaced index sampling when a series exceeds max_points; it is intended for inspection, not resampling or signal processing.
  • log_signal_inventory always loads the DBC leniently and reports parse diagnostics and per-message decode safety. It scans the log body once; include_values=true adds bounded distinct decoded values to the inventory.
  • Paths are resolved by the machine running the MCP server. A remote client's filesystem is not visible to a server running elsewhere.

Development

python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
ruff check .
mypy canforge_mcp
pytest --cov=canforge_mcp --cov-fail-under=90
python -m build

Large-log performance checks are opt-in and generate their own deterministic captures. See benchmarks/README.md for the smoke command, the full 100k/1M matrix, measurement policy, and committed v0.2.0 baseline.

License

MIT

Metadata

Release files for canforge-mcp 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for canforge-mcp 0.2.0
File Size Uploaded Provenance
canforge_mcp-0.2.0.tar.gz 59.2 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for canforge-mcp 0.2.0
File Interpreter ABI Platform
canforge_mcp-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 76.3 kB

Release files / canforge_mcp-0.2.0.tar.gz

Download URL canforge_mcp-0.2.0.tar.gz
Size 59.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7ab251a843eadc63cc5bda433151aa6c42b5af74ef9f476a4b8217d8dfc87389
BLAKE2b-256 checksum
How to use checksums
030b16a6893846be0c76036889756922e13dd94046b4ecbbe3174606b65a2a29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 20, 2026.

Transparency log

Release files / canforge_mcp-0.2.0-py3-none-any.whl

Download URL canforge_mcp-0.2.0-py3-none-any.whl
Size 17.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e448eebb9e3a61f2d371ff81cf8f52a80727fccbf60ac09510fc80768e0f70aa
BLAKE2b-256 checksum
How to use checksums
6d18d815344e3b78c1453c760a26bd54f329b55a4590565a242825ab3a565790
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 20, 2026.

Transparency log

Security for canforge-mcp 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for canforge_mcp-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page