{
  "markdown": "# @pipeworx/pa-dmv\n\nPennsylvania DMV MCP — registered vehicles and electric-vehicle adoption by county and by\nZIP code, from PennDOT Driver & Vehicle Services.\n\nPart of [Pipeworx](https://pipeworx.io) — an MCP gateway connecting AI agents to 1476+ live data sources.\n\n## Tools\n\n- `pa_dmv_ev_adoption(county?, year?, quarter?, limit?)` — battery-electric, plug-in\n  hybrid, fuel-cell and conventional hybrid registrations for each of Pennsylvania's 67\n  counties in one quarter, with plug-in share and a genuine statewide total. Answers \"how\n  many EVs are registered in Pennsylvania\", \"EV share in Allegheny County\", \"which\n  Pennsylvania county has the most electric vehicles\".\n- `pa_dmv_vehicle_registrations(county?, year?, quarter?, limit?)` — the whole registered\n  fleet of every fuel type by county, with a statewide total and each county's share.\n  Rides on the same layer, which carries `TOTAL_REG` alongside the EV columns.\n- `pa_dmv_ev_adoption_by_zip(zip?, year?, quarter?, limit?)` — the same drivetrain\n  breakdown for ~1,830 Pennsylvania ZIP codes. Answers \"how many EVs are registered in ZIP\n  19103\", \"which Pennsylvania ZIP code has the most electric vehicles\".\n\n## Auth\n\nKeyless.\n\n## Data sources\n\n- <https://gis.penndot.pa.gov/gis/rest/services/opendata/evregistrationscounty/MapServer/0>\n  — 67 counties × registration years 2023–2026. Attributes: `COUNTY_NAME`,\n  `COUNTY_NUMBER`, `FIPS_COUNTY_CODE`, `DISTRICT_NO`, `PLANNING_PARTNER`,\n  `REGISTRATION_YEAR`, then per-quarter `HEV_Q*`, `PHEV_Q*`, `BEV_Q*`, `FUEL_CELL_Q*`,\n  `TOTAL_EV_Q*`, `TOTAL_REG_Q*`, `PCT_EV_Q*`.\n- <https://gis.penndot.pa.gov/gis/rest/services/opendata/evregistrationszip/MapServer/0>\n  — 7,328 records total, ~1,832 per registration year. Same quarter columns keyed on `ZIP`.\n\nBoth layers have `maxRecordCount` 2000, so a full year fits in a single request and no\npaging is needed. Latest published quarter as of 2026-07-29 is **2026 Q2**.\n\n## Gotcha: quarters are COLUMNS, not rows\n\nEach feature is one county (or ZIP) for one `REGISTRATION_YEAR`, carrying all four\nquarters side by side as separate column groups. Quarters PennDOT has yet to file are\npresent as `null` columns. There is no row to filter on and no date field to sort by, so\n\"the latest data\" means walking `Q4 → Q1` looking for a quarter that actually carries\nvalues.\n\n`pickQuarter()` does that walk **once for the whole result set**, not per row. Picking a\nquarter per row looks harmless on a single-county lookup and is a correctness bug on a\nranking: you end up comparing one county's Q2 against another's Q1 and summing the mix\ninto a \"statewide total\". A quarter is accepted only if at least half as many rows carry\nit as carry the best-covered quarter, so one early-reporting straggler cannot drag the\nwhole answer forward.\n\n## Gotcha: hybrids sit outside TOTAL_EV\n\nPennDOT's `TOTAL_EV = BEV + PHEV + FUEL_CELL`. Conventional hybrids (`HEV`) are reported\n**separately** and are deliberately excluded — a Prius appears in `hybrid_gasoline` and\nnever in `plug_in_vehicles`. Verified across all 67 counties × both 2026 quarters: zero\nmismatches between `TOTAL_EV` and `BEV + PHEV + FUEL_CELL`.\n\n## Gotcha: the ZIP layer's 2026 Q1 columns are wrong upstream\n\nIn the **ZIP** layer only, and in the **2026 Q1** column group only, PennDOT's own derived\ncolumns are broken two ways:\n\n- `TOTAL_EV_Q1` folds conventional hybrids in. ZIP 19103 publishes `TOTAL_EV_Q1` 1291\n  against `BEV_Q1` 314 + `PHEV_Q1` 136 + `HEV_Q1` 841 = 1291.\n- `PCT_EV_Q1` is written as a **fraction** of that inflated number rather than a percent.\n  ZIP 19103 publishes 0.14 where the plug-in share is 4.85%.\n\nEvery other year, quarter and layer is internally consistent. So this pack **computes**\n`plug_in_vehicles` and `ev_share_pct` from the component columns everywhere rather than\nreading `TOTAL_EV` / `PCT_EV` — which reproduces PennDOT's published values exactly\nwherever those are sound (Montgomery County 2026 Q1 → 22,606 and 2.87, matching), and\nquietly repairs them where they are not.\n\n## Gotcha: the ZIP file undercounts the state by ~0.5%\n\nSumming every ZIP code gives 12,039,085 registered vehicles for 2026 Q2 against the county\nlayer's 12,098,320 — a few registrations carry no usable ZIP code. `pa_dmv_ev_adoption`\n(county layer) is the authoritative statewide number; the ZIP tool labels its own sums\n`zip_file_total_vehicles` rather than claiming a state total.\n\n## Verified figures (checked 2026-07-29)\n\n| Query | Result |\n|---|---|\n| `pa_dmv_ev_adoption{county:\"Montgomery\", year:\"2026\", quarter:\"Q1\"}` | BEV 16,243 · PHEV 6,363 · plug-in 22,606 · HEV 45,763 · total 788,762 · share 2.87% |\n| `pa_dmv_ev_adoption{county:\"Allegheny\", year:\"2026\"}` (Q2) | plug-in 19,350 · total 965,589 |\n| `pa_dmv_ev_adoption{}` (2026 Q2) | statewide 171,670 plug-in of 12,098,320 registered, 1.42% |\n| `pa_dmv_ev_adoption_by_zip{zip:\"19103\", year:\"2026\"}` (Q2) | BEV 337 · PHEV 131 · plug-in 468 · total 9,322 · share 5.02% |\n\n## Quick Start\n\nAdd to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):\n\n```json\n{\n  \"mcpServers\": {\n    \"pa-dmv\": {\n      \"url\": \"https://gateway.pipeworx.io/pa-dmv/mcp\"\n    }\n  }\n}\n```\n\n### What this endpoint actually serves\n\n`tools/list` at `https://gateway.pipeworx.io/pa-dmv/mcp` returns the tools in the table\nabove **plus the shared Pipeworx meta-tools** — `ask_pipeworx`,\n`discover_tools`, `search_within`, `remember`/`recall` and the rest of the\ngateway-wide set. So the tool count you see is larger than this table: a\nsingle-pack endpoint currently lists roughly 30 shared tools alongside the\npack's own. The connection's `initialize` response states its exact scope, and\nis the authoritative answer for a given day.\n\nThis is deliberate, not multiplexing by accident. The meta-tools are what let a\nscoped connection answer a question this pack does not cover — via\n`ask_pipeworx`, which routes across the whole catalog — without you adding a\nsecond MCP server. There is currently no way to mount a pack endpoint without\nthem; if the extra schemas cost you more context than the routing is worth,\nconnect to the full gateway once rather than to several pack endpoints.\n\nOr connect to the full Pipeworx gateway to get every pack's tools listed\ndirectly, instead of just this one's:\n\n```json\n{\n  \"mcpServers\": {\n    \"pipeworx\": {\n      \"url\": \"https://gateway.pipeworx.io/mcp\"\n    }\n  }\n}\n```\n\nBoth URLs reach the same gateway and the same 1476+ data sources. The\nonly difference is which pack's tools are listed **directly**; `ask_pipeworx`\nreaches all of them from either one.\n\n## Using with ask_pipeworx\n\nInstead of calling tools directly, you can ask questions in plain English —\nthis works on the pack endpoint above as well as on the full gateway:\n\n```\nask_pipeworx({ question: \"your question about Pa Dmv data\" })\n```\n\nThe gateway picks the right tool and fills the arguments automatically.\n\n## More\n\n- [Docs and guides](https://pipeworx.io/docs)\n- [pipeworx.io](https://pipeworx.io)\n\n## License\n\nMIT\n",
  "bytes": 6993,
  "sha": "ddfa75cbbc516d8b373b850aeb3f0f750ef23e7b0c09fec3f4f6f9d562194528",
  "repo_slug": "pipeworx-io/mcp-pa-dmv",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_pipeworx_io_pa_dmv_af05cc0f/readme"
}