MCP server exposing 3 tools for us-elections.
This URL is a JSON-RPC 2.0 endpoint over HTTP. Issue POST requests with a JSON-RPC body. Browsers and search crawlers land here on GET.
POST https://gateway.pipeworx.io/us-elections/mcp
Content-Type: application/json
{"jsonrpc":"2.0","id":1,"method":"tools/list"}
election_results — Candidate-level U.S. election results for one state, year and office, at state, county, or precinct granularity. State-level President and Senate cover every state 1976-2024 (MIT Election Data + Science Lab / MEDSL, Harvard Dataverse, CC0). County- and precinct-level President/Senate/House cover the 2024 general election in Pennsylvania, Michigan and Georgia only (OpenElections) -- this is the current limit of coverage, not a bug. Pass state as a postal code ("PA") or full name ("Pennsylvania"), office as "president", "senate" or "house". Use county to scope a county/precinct query (e.g. county="Allegheny"); omit it at level="county" to get every county in the state. Returns candidate, party, votes, the race total and the share of the vote, plus source/licence/data_as_of on every row. A state/year/office/level combination with no data returns a loud not-found (reason + available_levels hint), never an empty success.election_race_summary — Aggregated summary of a U.S. election race -- total votes, each candidate's vote share, the winner and the winning margin -- for one state/year/office. Uses the most aggregated level actually available for that race: a statewide number when MEDSL state-level data covers it (President/Senate, every state, 1976-2024), otherwise summed from whatever county/precinct detail exists (OpenElections: PA/MI/GA, 2024 only). For a district office (House) returns one summary per district. Use for "who won the 2024 PA Senate race and by how much" rather than reading every county row yourself.list_elections — List the state/year/office combinations this pack actually holds data for, and at which levels (state/county/precinct). Pass state to scope the listing to one state; omit it to see full coverage. Use this before election_results or election_race_summary to check whether a given state/year/office exists before querying it, or to discover what is covered.Code samples (curl / TypeScript / one-click client install), schemas, and the live playground are on the pack page:
https://pipeworx.io/packs/us-elections/
Pipeworx is an open MCP gateway connecting AI agents to live data. pipeworx.io