obd2-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@obd2-mcp My check-engine light is on — read the trouble codes from my car."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
obd2-mcp
See actual mock output and run the demo without an AI client.
New here? Try the step-by-step mock demo — no car required.
Want to contribute? Find a first issue or read the contribution guide. Documentation, tests and questions are welcome in English or Japanese. Share first-use feedback (a public GitHub issue).
English | 日本語
An MCP server that lets AI assistants read your car's OBD-II data through cheap ELM327 adapters — trouble codes, live sensors, freeze frame, readiness monitors, and VIN.
Try it without an AI client or car: with Node.js 22 or 24 and npm installed, run this in a terminal. npm downloads the built package and its dependencies; Git and a local build are not needed.
npm exec --yes --package=https://github.com/shoka-jp/obd2-mcp/releases/download/v0.6.1/obd2-mcp-0.6.1.tgz -- obd2-mcp --demo --summaryThe command uses the package attached to this repository's v0.6.1 release. It prints simulated observations and exits. See the output and what to check next.
Example from the mock vehicle: stored code P0420; freeze frame at 98 km/h and 2,210 rpm; current reading 0 km/h and 740 rpm. These are simulated observations, not a diagnosis. See the captured results and their limits.
For the complete tool responses, remove --summary. Add --lang ja for the Japanese summary. To develop or connect an MCP client from source, follow the quick start below.
Ask Claude "why is my check-engine light on?" and it reads the actual codes from your actual car, pulls the freeze frame before anything gets erased, checks the fuel trims, and reasons about causes — instead of you transcribing scanner output by hand.
No hardware? It still works. A built-in mock vehicle (a warm idling sedan with a stored P0420, MIL on, and realistic live data) lets you try everything before buying an adapter.
Choose how to start
You want to… | Start here | You need |
See what it returns, without an AI client or a car | The demo command above | Node.js 22 or 24 |
Use it in Claude Desktop | Claude Desktop | |
Use it in Claude Code or another MCP client | Node.js 22 or 24 | |
Check a used car before buying | The | An ELM327 adapter and the seller's permission |
Read your own car | Plug in the adapter and ask Claude to connect (how it works), then troubleshooting if needed | A USB, Bluetooth (serial) or WiFi ELM327 adapter (which kind to buy) |
Change the code or contribute | Build from source and the contribution guide | Git and Node.js |
Every path starts with the simulated vehicle, so you can check the setup before connecting a car. In your MCP client, the guided prompts such as check_engine_light are an easy first question.
obd2-mcp is listed in the official MCP Registry as io.github.shoka-jp/obd2-mcp, so MCP clients and directories that read the registry can find each release.
Related MCP server: Bouncie MCP Server
Claude Desktop: install as an extension
Each GitHub release from v0.4.0 includes obd2-mcp-<version>.mcpb, a Claude Desktop extension. It needs no Git, build step or JSON editing:
Download the
.mcpbfile from the release.Open it with Claude Desktop (double-click it, or install it from Settings → Extensions) and confirm the installation.
Ask: "Read my car's trouble codes and tell me what to check before I spend money." The extension starts with the simulated vehicle.
To use a real adapter, just ask. Plug the adapter into the car, turn the ignition on (pair a Bluetooth adapter in the computer's settings first, or join a WiFi adapter's network), and ask: "Connect to my car's adapter." Claude finds a USB or Bluetooth adapter with find_adapter and, after asking you, connects with use_adapter. No port name or restart is needed. This lasts until Claude Desktop restarts; to keep it, set Adapter connection in the extension's settings to the value Claude shows (for example serial:COM3 or tcp:192.168.0.10:35000). The extension includes its dependencies and serial-port support for Windows, macOS and Linux. Release checks start it with the mock vehicle on Linux; Windows and macOS installs and real adapters have not been verified.
Quick start (mock mode — no hardware)
Without Git or a build
With Node.js 22 or 24 and npm installed, an MCP client can start the v0.6.1 release package directly. First run the demo command near the top of this page once: it downloads the package into npm's cache, so the client's first start does not wait for the download (about 40 seconds in a Windows test).
Claude Code:
claude mcp add obd2 -- npx -y --package=https://github.com/shoka-jp/obd2-mcp/releases/download/v0.6.1/obd2-mcp-0.6.1.tgz obd2-mcpOn native Windows, put cmd /c before npx.
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"obd2": {
"command": "npx",
"args": ["-y", "--package=https://github.com/shoka-jp/obd2-mcp/releases/download/v0.6.1/obd2-mcp-0.6.1.tgz", "obd2-mcp"]
}
}
}On Windows, use "command": "cmd" and start args with "/c", "npx". If Claude Desktop cannot find npx, use its full path (which npx on macOS/Linux, where npx on Windows). For a real adapter, add "env": {"OBD2MCP_CONNECTION": "serial:COM3"}; see Connecting a real car. The release URL always refers to v0.6.1; change it to upgrade.
From source
Build from source using Git and Node.js/npm. Verify npm availability before using registry installation.
git clone https://github.com/shoka-jp/obd2-mcp.git
cd obd2-mcp
npm ci
npm run build
node -p "require('node:path').resolve('dist/index.js')"Replace /absolute/path/to/obd2-mcp/dist/index.js below with the absolute path printed by the last command. Windows JSON configuration can use forward slashes.
Claude Code:
claude mcp add obd2 -- node "/absolute/path/to/obd2-mcp/dist/index.js"Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"obd2": {
"command": "node",
"args": ["/absolute/path/to/obd2-mcp/dist/index.js"]
}
}
}Then ask: "Read my car's trouble codes and tell me what to check before I spend money."
Try another mock scenario
Set OBD2MCP_MOCK_SCENARIO in your MCP client configuration while using OBD2MCP_CONNECTION=mock. Available values are catalyst (default, P0420), healthy (no codes), misfire (P0301), lean (P0171 with elevated bank 1 fuel trims), evap (P0456 evaporative emission system small leak), cleared (codes cleared recently: nothing stored and the light off, but a permanent P0420 and three incomplete monitors; try it with the used_car_check prompt), and partial (P0128 with coolant at 72 °C, several unsupported sensors, and no freeze frame). These are synthetic teaching examples, not diagnoses or verified vehicle profiles. An unknown scenario stops startup instead of falling back silently. The setting is ignored for real connections.
For example, register a separate Claude Code mock server:
claude mcp add obd2-lean --env OBD2MCP_CONNECTION=mock --env OBD2MCP_MOCK_SCENARIO=lean -- node "/absolute/path/to/obd2-mcp/dist/index.js"Restart the server after changing the setting. Each server has independent mock state. Clearing a mock scenario resets its readiness monitors (its permanent code stays, as on a real car) and does not affect any vehicle.
To look at a scenario without an MCP client, add --scenario to the demo command, for example obd2-mcp --demo --summary --scenario cleared (add --lang ja for Japanese).
Connecting a real car
You need an ELM327-compatible USB, Bluetooth-serial, or WiFi adapter plugged into the vehicle's OBD-II port, with the ignition on. Support varies by vehicle, market, protocol, adapter and connection method; this project has not yet verified a real-vehicle or real-adapter combination. Start with read-only checks while parked, and do not assume that an adapter connection confirms vehicle communication. Not every adapter can work with a computer: Bluetooth LE-only models cannot; see choosing an adapter.
The easy way: ask your MCP client to connect. find_adapter checks only ports that look like an adapter (a known USB-serial chip or a Bluetooth serial port) and asks each to identify itself (ATZ), without contacting the vehicle; use_adapter then switches the session after checking that the adapter answers. For safety, use_adapter accepts only serial port names and local-network WiFi addresses, and clearing codes stays disabled.
To set a connection permanently, use the environment variable or CLI flag:
Adapter | Setting |
USB / Bluetooth (serial port) |
|
WiFi |
|
Mock (default) |
|
Find the serial port name. Ask your MCP client to run list_serial_ports, or run node dist/index.js --list-ports in a terminal. Both list the ports the operating system reports, with the exact serial: value to use, without opening a port or contacting the vehicle. If you are unsure which entry is the adapter, unplug or unpair it and list again. A known USB-serial chip (FTDI, CH340, PL2303 or CP210x) is a hint, not proof that the port is an OBD-II adapter. Listing requires the optional serialport dependency; WiFi adapters are not listed.
Serial baud rate defaults to 38400; override with OBD2MCP_BAUD=115200 if your adapter needs it. Bluetooth adapters must first be paired at the OS level so they expose a serial port.
A malformed connection, port number or baud rate stops startup with a message naming the setting. Write an IPv6 address in brackets, for example tcp:[fe80::1]:35000.
A WiFi adapter that does not accept the connection within 10 seconds returns a timeout error. Check that the computer is on the adapter's network, then restart the server before trying again.
If the port, pairing, permissions or vehicle replies cause trouble, see connection troubleshooting.
Tried it with a real car? Please report your setup, whether it worked or not. Reports are listed in reported setups; none have been verified by the project yet.
Claude Code example with a real adapter:
claude mcp add obd2 --env OBD2MCP_CONNECTION=serial:COM3 -- node "/absolute/path/to/obd2-mcp/dist/index.js"Guided prompts
Not sure what to ask? The server provides four ready-made prompts. Claude Desktop lists them in the attachment (+) menu under the server's name, and Claude Code offers them as slash commands such as /mcp__obd2__check_engine_light.
Prompt | What it does |
| Reads the diagnostic report, explains each code in plain words, keeps the freeze frame separate from live readings, and lists inexpensive checks before a workshop visit. Optional: your symptoms and reply language. |
| Turns the diagnostic report into a short note for a mechanic, with unknowns and errors kept visible and the VIN and personal details left out. |
| For a used car you are considering: with the seller's permission, reads codes, permanent codes ( |
| Finds a USB or Bluetooth adapter with |
The server also sends usage instructions when a client connects, so Claude knows to label mock data, check supported sensors first and leave codes uncleared even without a prompt. The prompts only instruct Claude; every vehicle access still goes through the read-only tools. They tell Claude not to clear codes or request the VIN, and to label mock data and missing values.
One-call evidence report
With the server configured in your MCP client, ask: "Run read_diagnostic_report and turn its observations, missing values and errors into a workshop handover note. Keep freeze-frame values separate from live readings."
read_diagnostic_report collects codes, freeze frame, live sensors and readiness in one response, with collection timestamps and structured JSON. It reuses the individual readers and preserves their null values and errors if part of the collection fails. Collection is sequential, so the readings can come from different moments.
To select only the live sensors you need, pass PID names, for example {"pids":["rpm","coolant_temp"]}. Omit pids or pass an empty array to use the same default set as read_live_data. An unknown name is retained as a per-sensor error, and other requested sensors are still read. This selection affects live data only; codes, freeze frame and readiness are collected as usual.
The report does not request VIN or clear codes, and omits the connection source field. Review its contents before sharing, since adapter error text can still contain device details. Save or format the returned report in your MCP client for a workshop discussion; it is not a vehicle-specific diagnosis.
Discover available live sensors
Ask your MCP client to run read_supported_pids before choosing live sensors. It reads the Mode 01 support bitmaps for the 01–60 hexadecimal range used by this server, following continuation flags. It returns supported_sensor_names for use as the pids argument of read_live_data or read_diagnostic_report.
Each sensor is supported (the vehicle advertises support), not_advertised (its bit or continuation is absent), or unknown (the required reply could not be read). Incomplete discovery returns complete: false, a tool error, the successful earlier results and the failed request. NO DATA, truncated and ambiguous replies are never treated as proof of no support. Discovery is refreshed on each call and does not read sensor values, request VIN or clear codes.
Use only a nonempty list of supported names for the next read: passing pids: [] still selects the existing default set. Advertised support does not guarantee a reading, and complete covers only this stated PID range. This feature has mock/protocol test coverage; real vehicle and adapter compatibility remains unverified.
Protocol references: ELM327 datasheet, “Talking to the Vehicle” and python-OBD command tables.
Tools
Tool | What it does |
| Discover advertised support for this server's live sensors; preserve unknowns and partial failures. |
| Collect a timestamped evidence report from four readers, optionally selecting live sensors and including unavailable fields and errors. |
| Stored + pending trouble codes, MIL state, DTC count. A code list is |
| Permanent trouble codes (Mode 0A) that stay after codes are cleared until the car confirms the repair: a clue that codes were cleared recently, for example before buying a used car. |
| The DTC that set the freeze frame and the engine conditions at that moment |
| Live sensors: RPM, coolant temp, fuel trims, MAF, O2 voltages, and more (25 PIDs) |
| Emissions monitor completion status (inspection readiness), with counts and the list of incomplete monitors. Clearing codes or disconnecting the battery resets them. |
| Vehicle Identification Number from the ECU |
| Adapter identity and port voltage if available. A connected adapter does not itself confirm communication with the vehicle. |
| Find a USB or Bluetooth ELM327 adapter automatically: opens only adapter-like ports briefly and sends the identification command |
| Connect this session to a found adapter (or back to mock) without editing settings or restarting. Checks the adapter first and keeps the old connection on failure; accepts only serial ports and local-network WiFi addresses. |
| List this computer's serial ports and their |
| Clear codes — disabled for real adapters by default; warns that freeze frame evidence is erased and readiness monitors reset |
Pairs with automotive-ai-skills 🔧
This server is the tool layer. The knowledge layer — how to reason from codes to causes, what to test before buying parts, when to see a professional — lives in automotive-ai-skills:
/plugin marketplace add shoka-jp/automotive-ai-skills
/plugin install automotive-ai-skills@automotive-ai-skills
claude mcp add obd2 -- node "/absolute/path/to/obd2-mcp/dist/index.js"With both installed, Claude reads the codes from your car and runs the diagnostic workflow on them.
Safety and scope
Real vehicle code clearing is disabled by default. To enable mode 04, set
OBD2MCP_ENABLE_CLEAR=1before starting the server, set the tool'sconfirmargument to true, and approve the separate MCP form confirmation. Clients without form elicitation cannot clear real codes. This relies on the client displaying the confirmation to a human; the server cannot verify the identity of the approver. Mock clearing remains available for testing.Tool annotations. Every tool has a display title. The readers are annotated read-only and
clear_dtcsis annotated destructive, so MCP clients can present or confirm them differently. Annotations are hints for the client and do not replace the safeguards above.Response limitations. Multiple or mixed ECU replies and unsupported compression-ignition readiness data are reported as errors instead of combining or guessing values. VIN reading accepts the CAN-formatted response with data-item count
01followed by exactly 17 valid VIN characters; other response formats return an error. Following an adapter timeout or disconnect, restart the server before trying again. Real-vehicle and adapter compatibility must be verified independently.Diagnosis support, not a verdict. Codes identify failed tests, not failed parts. Verify with physical tests before spending money, and defer safety-critical work (brakes, fuel, SRS, high-voltage) to professionals.
Never drive while interacting with an AI assistant. Read with the vehicle parked.
Found a safety or security problem? Report it privately as described in SECURITY.md, not in a public issue.
Development
git clone https://github.com/shoka-jp/obd2-mcp.git
cd obd2-mcp
npm ci
npm test # builds + runs the stdio smoke test against the mock vehicle
npm run test:package # tests an isolated installation of the actual npm tarball
npm run build:mcpb # stages the Claude Desktop extension in build/mcpb (see docs/releasing.md)
node dist/index.js --help # command-line options and environment variablesThe mock vehicle answers at the ELM327 protocol level, so tests exercise the full parsing stack (including multi-frame ISO-TP VIN responses).
Roadmap
See the product roadmap for current release status, proposed improvements, and ways to help. Priorities are open to feedback and are not a release schedule.
Support the project
If this server is useful to you:
Follow shoka-jp for automotive AI and MCP development.
Star this repository to bookmark it, and share it with someone who works with vehicle diagnostics.
Report a reproducible issue with your adapter type, operating system, connection mode, and expected versus actual behavior. Remove VINs and other personal information from logs.
Sponsor the maintainer to support this open-source work.
License
MIT © 2026 Sho Kamakura
Available Tools
13 toolsclear_dtcsClear trouble codes (destructive)ADestructive
Clear stored DTCs and turn off the MIL (mode 04). DESTRUCTIVE: also erases freeze frame data and resets readiness monitors, which can make the vehicle fail an emissions inspection until drive cycles complete. Read read_dtcs and read_freeze_frame first, and only call this with confirm=true after the user explicitly agrees.
Inputs: confirm (required).
connection_statusCheck adapter connectionARead-only
Report the OBD-II adapter connection, identity, and port voltage if available. Adapter connectivity does not establish communication with a vehicle; vehicle_communication is not_checked.
Inputs: no named parameters.
find_adapterFind my OBD-II adapterAIdempotent
Find a USB or Bluetooth ELM327 adapter automatically, so the user does not need to know a port name. Only ports that look like an adapter (a known USB-serial chip, or a Bluetooth serial port) are opened, briefly, to send the adapter's identification command (ATZ); nothing is sent to the vehicle. Takes a few seconds per port. A Bluetooth adapter must be paired in the operating system first, and the adapter must be plugged into the car with the ignition on. WiFi adapters are not found this way: after the user joins the adapter's WiFi network, use use_adapter with tcp:192.168.0.10:35000 (or the address in its manual). If an adapter is found, ask the user before calling use_adapter with its connection value.
Inputs: no named parameters.
list_serial_portsFind adapter serial portsARead-onlyIdempotent
List the serial ports this computer reports, to find the connection value for a USB or paired Bluetooth ELM327 adapter (for example serial:COM3). Does not open any port or contact a vehicle, and works in mock mode. WiFi adapters are not listed. Changing the connection requires setting OBD2MCP_CONNECTION and restarting the server.
Inputs: no named parameters.
read_diagnostic_reportCollect diagnostic evidence reportARead-only
Collect stored/pending codes, freeze frame, live data and readiness into one timestamped evidence record for a workshop discussion. Optionally select live sensor names with pids; omit or pass an empty list for the defaults. Available names: engine_load, coolant_temp, stft_b1, ltft_b1, stft_b2, ltft_b2, intake_map, rpm, vehicle_speed, timing_advance, intake_air_temp, maf, throttle, o2_b1s1_voltage, o2_b1s2_voltage, run_time, distance_with_mil, fuel_level, warmups_since_clear, distance_since_clear, baro, catalyst_temp_b1s1, module_voltage, ambient_temp, oil_temp. Readings are collected sequentially. Preserve each section's errors and unknown values when summarizing. VIN is not requested and codes are not cleared. The result contains observations, not a diagnosis.
Inputs: pids.
read_dtcsRead trouble codesARead-only
Read diagnostic trouble codes: stored (confirmed) DTCs, pending DTCs, MIL (check-engine light) state, and DTC count. A null code list means the adapter returned no data, not that there are no codes. Use first when a warning light is on.
Inputs: no named parameters.
read_freeze_frameRead freeze frameARead-only
Read the freeze frame (frame 0): the DTC that froze it plus engine conditions captured at the moment the fault set. Read this BEFORE clearing codes — clearing erases it.
Inputs: no named parameters.
read_live_dataRead live sensor dataARead-only
Read live sensor values (mode 01 PIDs). Omit "pids" for a sensible default set. Available names: engine_load, coolant_temp, stft_b1, ltft_b1, stft_b2, ltft_b2, intake_map, rpm, vehicle_speed, timing_advance, intake_air_temp, maf, throttle, o2_b1s1_voltage, o2_b1s2_voltage, run_time, distance_with_mil, fuel_level, warmups_since_clear, distance_since_clear, baro, catalyst_temp_b1s1, module_voltage, ambient_temp, oil_temp.
Inputs: pids.
read_permanent_dtcsRead permanent trouble codesARead-only
Read permanent DTCs (Mode 0A): codes the engine computer keeps after codes are cleared with a scan tool or the battery is disconnected, until its own monitor confirms the fault is gone. Useful to check whether codes were cleared recently, for example before buying a used car. Many vehicles built before about 2010 do not support it: permanent_dtcs is null when the vehicle gives no answer or reports the request unsupported, which is not a confirmed empty list. Read-only; it never clears anything.
Inputs: no named parameters.
read_readinessRead readiness monitorsARead-only
Read readiness monitors (emissions self-tests): which monitors this vehicle supports and whether each has completed, with supported_count, complete_count and the incomplete_monitors list. Monitors reported as not_supported do not apply to the vehicle. Clearing codes or disconnecting the battery resets monitors; they complete again after enough driving, and some vehicles normally leave one (often EVAP) incomplete. Useful when preparing for an emissions inspection or checking a used car; this result alone does not determine whether the vehicle will pass.
Inputs: no named parameters.
read_supported_pidsDiscover supported live sensorsARead-only
Discover advertised Mode 01 support for this server's live sensors (PID range 01-60). Returns supported_sensor_names for a later read_live_data or read_diagnostic_report call, plus per-sensor supported/not_advertised/unknown states. Partial failures retain earlier results. Support does not guarantee a reading. If no names are supported, do not pass an empty pids array expecting no reads: it selects the defaults. No VIN request or code clearing.
Inputs: no named parameters.
read_vinRead VINARead-only
Read the Vehicle Identification Number (VIN) from the ECU (mode 09 PID 02). A VIN identifies the vehicle; remove it before sharing results publicly.
Inputs: no named parameters.
use_adapterConnect to my adapterAIdempotent
Switch this session to a real adapter, or back to mock, without editing settings or restarting. Use the connection value from find_adapter (serial:...) or a WiFi address (tcp:192.168.0.10:35000). The adapter is checked first; if it does not answer, the current connection is kept. Only the adapter is contacted, not the vehicle. The change lasts until the server restarts; to keep it, the user sets Adapter connection in the Claude Desktop extension settings (or OBD2MCP_CONNECTION). Clearing codes on a real vehicle stays disabled. Ask the user before switching.
Inputs: connection (required), baud.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Each tool targets a distinct OBD-II mode or adapter task, and descriptions explicitly disambiguate the closest pairs (stored vs permanent DTCs, supported PIDs vs live data, adapter switching vs connection status). The only real overlap is read_diagnostic_report, which aggregates what read_dtcs/read_freeze_frame/read_live_data/read_readiness already return, though its 'one timestamped record' purpose is stated clearly enough to avoid misselection.
Thirteen tools are nearly all snake_case verb_noun (read_dtcs, clear_dtcs, find_adapter, use_adapter, list_serial_ports). The one deviation is connection_status, a noun-first name with no verb, which slightly breaks the pattern but remains unambiguous.
Thirteen tools is right in the sweet spot, and each one earns its place: four adapter/connection tools, seven vehicle-data reads across distinct OBD-II modes, one destructive clear, and one aggregation helper. Nothing feels redundant or missing at the count level.
Coverage spans connection lifecycle (list, find, use, status) plus diagnostics, live data, freeze frame, readiness, permanent DTCs, VIN and a report aggregator, with a guarded destructive clear. Minor gaps remain: no Mode 06 on-board monitor test results, no actuator/vehicle-info reads beyond VIN, and no persistent configuration write (settings change requires restart).
Maintenance
Related MCP Connectors
Reads your car through the AI ELM app and an OBD2 adapter: fault codes, live data, reports
Tesla data for your AI: battery, range, charging, tires, alerts, history. Controls off by default.
Your car's drives, fuel use and engine health from its OBD-II port. Explains any fault code.
Control your Tesla from your AI assistant - climate, charging, access, and security.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables LLMs to interact with vehicle CAN bus and OBD-II data through a simulated ECU environment. Provides tools for reading frames, decoding messages via DBC files, monitoring signals, and querying automotive diagnostics without requiring physical hardware.25 PyPI26MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that connects Bouncie OBD2 vehicle tracking data to AI assistants. It enables users to retrieve real-time vehicle stats, health diagnostics, and detailed trip history through the Bouncie API.MIT
- FlicenseAqualityDmaintenanceExposes a connected-vehicle OBD-II/telematics platform to AI agents, enabling vehicle health scoring, live data queries, DTC decoding, maintenance prediction, and gated remote commands via a pluggable data layer.9-
- AlicenseNot gradedqualityCmaintenanceEnables AI-powered automotive diagnostics by connecting LLMs to vehicle ECUs over UDS/CAN, indexing workshop manuals locally, and augmenting with web search, while enforcing a human-in-the-loop approval gate for any write operations.1MIT