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, including 2020 and 2022 (MIT Election Data + Science Lab / MEDSL, Harvard Dataverse, CC0). Official FEC district-by-district U.S. House results (FEC, "Federal Elections" statistical publication, public domain) cover the 2020 and 2022 general elections nationwide -- FEC has not yet published its compiled 2024 edition, and House is not otherwise available nationwide (MEDSL's own House file is guestbook-gated). County-level President/Senate/House results (OpenElections, county/state election-board certified counts) cover the 2024 general election in Georgia, Mississippi, New Mexico, North Dakota, South Dakota, Tennessee, Utah, West Virginia, Colorado, Missouri, Oregon, South Carolina and Kentucky; Pennsylvania and Michigan additionally keep true precinct-level rows. Pass state as a postal code ("PA") or full name ("Pennsylvania"), office as "president", "senate" or "house". For a House race, pass district (e.g. "09") to scope one district; omit it to get every district returned for that state/year. 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/district number when MEDSL or FEC data covers it (President/Senate nationwide 1976-2024; House nationwide for 2020+2022 by FEC), otherwise summed from whatever county/precinct detail exists (OpenElections). 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