Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
OBD2MCP_BAUDNoSerial baud rate for the adapter. Defaults to 38400; override with `OBD2MCP_BAUD=115200` if your adapter needs it. A malformed baud rate stops startup with a message naming the setting.38400
OBD2MCP_CONNECTIONNoAdapter connection setting. Use `serial:COM3` (Windows), `serial:/dev/ttyUSB0` (Linux), or `serial:/dev/tty.usbserial-XXXX` (macOS) for USB/Bluetooth serial adapters; `tcp:192.168.0.10:35000` for WiFi adapters; or `mock` (the default). Write an IPv6 address in brackets, for example `tcp:[fe80::1]:35000`.mock
OBD2MCP_ENABLE_CLEARNoSet to `1` before starting the server to enable clearing codes on a real vehicle (Mode 04). Real vehicle code clearing is disabled by default. Even when enabled, the tool's `confirm` argument must be true and the separate MCP form confirmation must be approved. This relies on the client displaying the confirmation to a human; the server cannot verify the identity of the approver.
OBD2MCP_MOCK_SCENARIONoMock vehicle scenario used when `OBD2MCP_CONNECTION=mock`. Available values are `catalyst` (default, P0420), `healthy` (no codes), `misfire` (P0301), `lean` (P0171 with elevated bank 1 fuel trims), `evap` (P0456), `cleared` (codes cleared recently: nothing stored and the light off, but a permanent P0420 and three incomplete monitors), and `partial` (P0128 with coolant at 72 °C, several unsupported sensors, and no freeze frame). The setting is ignored for real connections. An unknown scenario stops startup instead of falling back silently.catalyst

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

obd2-mcp reads OBD-II data from a vehicle through an ELM327-compatible adapter, or from a simulated vehicle.

  • Results with "simulated": true come from the mock vehicle, not the user's car. Say so whenever you use them.

  • For a general check, call read_diagnostic_report. Before choosing live sensors, call read_supported_pids and pass only supported names.

  • read_permanent_dtcs lists codes that survive a scan-tool clear and a battery disconnect until the car confirms the repair by itself during normal driving. If read_dtcs shows no codes while permanent codes remain, several readiness monitors are incomplete, or the live values warmups_since_clear and distance_since_clear are small, codes may have been cleared recently (by a scan tool, a battery disconnect or a repair): present that as a question to ask (for example, a used-car seller), not as proof. After a repair, a remaining permanent code means the fix is not yet confirmed, not that the repair failed. A null list means unsupported or no answer.

  • Many users are not technical. When a result has a hint, explain it in plain words and give one next step at a time (for example, turn the ignition on), instead of repeating the raw error.

  • Treat results as observations, not a diagnosis. Keep freeze-frame values separate from live readings, and report null values, unknown states and errors instead of presenting them as clean results.

  • Do not call clear_dtcs unless the user explicitly asks to clear codes after you have read the codes and freeze frame and explained that clearing erases that evidence and resets readiness monitors. Real-vehicle clearing is disabled unless the user enabled it.

  • The VIN identifies a vehicle. Call read_vin only when the user needs it, and remind them to remove it before sharing results.

  • To connect a real adapter, do not ask the user for a port name. For a USB or Bluetooth adapter, call find_adapter; if it finds one, ask the user and then call use_adapter with its connection value. For a WiFi adapter, ask the user to join the adapter's WiFi network, then call use_adapter with tcp:192.168.0.10:35000 (or the address in its manual). use_adapter lasts until the server restarts; to keep it, the user sets Adapter connection in the Claude Desktop extension settings (or OBD2MCP_CONNECTION). list_serial_ports shows all ports if find_adapter finds nothing.

  • If the user mentions a flashing check-engine light, overheating, smoke, a fuel smell, or brake or steering problems, put that first: advise stopping where it is safe and arranging an inspection. Suggest reading data only while the vehicle is safely parked.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
connection_statusA

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.

list_serial_portsA

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.

find_adapterA

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.

use_adapterA

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.

read_dtcsA

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.

read_permanent_dtcsA

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.

read_supported_pidsA

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.

read_live_dataA

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.

read_freeze_frameA

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.

read_readinessA

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.

read_diagnostic_reportA

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.

read_vinA

Read the Vehicle Identification Number (VIN) from the ECU (mode 09 PID 02). A VIN identifies the vehicle; remove it before sharing results publicly.

clear_dtcsA

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.

Prompts

Interactive templates invoked by user choice

NameDescription
check_engine_lightRead the car's codes, freeze frame, live data and readiness, explain them in plain words and list what to check before spending money.
workshop_handoverCollect a timestamped diagnostic report and turn it into a concise note to share with a mechanic, with unknowns and errors kept visible.
connect_adapterConnect a real USB, Bluetooth or WiFi ELM327 adapter step by step without asking for a port name: find it, connect after asking, check that it answers, and explain how to keep the setting.
used_car_checkWith the seller's permission, read codes, permanent codes and readiness monitors, point out signs that codes were cleared recently, and list questions for the seller and a pre-purchase inspection.

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.2/5.0

Scored across 13 tools

Disambiguation4/5

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.

Naming Consistency4/5

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.

Tool Count5/5

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.

Completeness4/5

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

ActivityMaintained
ResponsivenessNo recent community issues