Data Collection
electionsmcp.com
Provides geographic boundaries, demographic data, and election information for U.S. locations using canonical IDs.
ENDPOINT 1
https://www.electionsmcp.com/mcp
Known tools 179
resolve_geographyTurn a place name or shorthand into its canonical geo_id — resolve natural-language or structured location input.
get_geographyBoundary reference, children, and a demographic summary (county grain — ACS 2023; states and districts return boundary + identity only) for a canonical geo_id (us, us-ca, us-ca-cd-03, us-ca-county-06017, us-ca-vtd-<id>).
list_contestsWhat contests are on the 2028 Pennsylvania ballot — the real races (president, senate, house, governor, state legislature) for any state and cycle.
election_calendarTHE PLANNER'S CALENDAR — what is on the ballot when.
set_performanceSet a candidate's vote share, such as the Democratic candidate to 54%, in one specific county, district, state, or precinct (the general-election override).
compute_vote_goalHow many votes a candidate needs to win a contest — the win number and remaining gap.
target_precinctsReturn the STRUCTURED precinct data an orchestrator needs to reason about where to focus — baseline share, modeled share, turnout, ballots, gap-to-goal, demographics where available.
create_raceInstantiate a tenant workspace (a Race) on a real-world Contest.
delete_raceDelete a Race (workspace-scoped).
list_racesList the Races (contest workspaces) in this workspace, with scenario counts.
get_raceOne Race with its contest, scenario list, and latest top-line per scenario.
create_scenarioCreate a new Scenario (a modeled path) — optionally inside a Race and seeded from a contest_id or an existing scenario (import_from).
get_viewSee what the app RENDERS — the view-model the front end draws, without a browser (tk_0b6d3501).
focus_viewFly the LIVE map camera to a geography — frame the state / county / district / precinct the viewer is watching, so "show them the decisive counties" actually moves the view (tk_9e8de8).
render_viewA headless server-rendered IMAGE of the map — the rendered view a viewer sees, as SVG or PNG, WITHOUT a browser (tk_0b6d3501 P2).
render_chartA headless server-rendered IMAGE of a DATA-BOUND chart/scorecard for a scenario — the standalone counterpart to render_view (which renders maps).
set_viewWRITE the view — the MCP-writable half of get_view (tk_0b6d3501 P3).
get_scenarioA Scenario at its latest version (or a specified version_id): metadata (incl.
update_scenarioEdit a Scenario's name / description / tags.
commit_versionSave the scenario's current state as a new immutable, hash-stamped version in the append-only chain.
list_scenario_versionsThe append-only version chain for a scenario, newest last, with per-version summary + top_line.
list_scenariosList saved scenarios/simulations in this workspace, newest first, with scenario columns: scenario_id, name, level, cycle, contest_id, race_id, tags, durable_id, published, timestamps.
diff_versionsStructured diff between two versions of one scenario: which feature/precinct overrides changed (before/after) and how the top_line moved.
restore_versionSet the scenario's working state back to a prior version's payload, and return that complete per-precinct `state` (so the map redraws to the exact configuration) plus the hash chain.
maine_live_results(RETIRED, 2026-06) The Maine 2026 primary live-results feature has been retired — the event has passed and the live feed never reached results.
maine_live_map(RETIRED, 2026-06) The Maine 2026 primary live map has been retired along with maine_live_results (event passed; live feed never reached results).
query_metricCAMPAIGN HQ — the one read path for governed campaign metrics (the semantic layer behind Claude-composed dashboards).
save_cardCAMPAIGN HQ — save a dashboard card: a query_metric spec + a viz spec.
compose_dashboardCAMPAIGN HQ — create or update a dashboard: a named, workspace-scoped layout of saved cards.
get_dashboardCAMPAIGN HQ — fetch a dashboard with each card's query RESOLVED live (server runs query_metric per card).
list_dashboardsCAMPAIGN HQ — list the workspace's saved dashboards (id, name, scope, updated_at).
delete_dashboardCAMPAIGN HQ (EM-150) — delete a saved dashboard in your workspace.
get_shapesSHAPE LIBRARY — pull our boundary shapes for ANY area and get a map ready to drop into a client report.
billing_statusBILLING — your subscription state: {billing_enabled, logged_in, plan (personal|team|null), status, active, renews, can_save}.
start_subscriptionBILLING — begin a paid subscription.
manage_billingBILLING — returns {portal_url} to the Stripe Customer Portal, where the USER can update payment, switch plan, or cancel (opened in a browser).
add_poll_wavePOLLING TIMELINE — store one poll wave in a named, org-scoped series so it can be trended and diffed wave-over-wave (generic ballot, favorability, issue salience).
get_poll_timelinePOLLING TIMELINE — the full wave series for a place, in date order, with wave-over-wave deltas per metric + a derived margin (D+/R+) and a net-shift trend headline, PLUS a sample-weighted rollup (the statistically-correct pool: n-weighted estimate, effective N, date span, mixed-mode/universe flags, with the naive mean shown for contrast).
diff_poll_wavesPOLLING TIMELINE — what moved between two waves of a series (defaults first→latest): per-metric change + the margin shift, with a headline like "D+12 → D+8 = R+4 net shift".
list_poll_seriesPOLLING TIMELINE — the workspace's poll series: name, geo_scope, wave count, date span, and the metrics tracked.
list_poll_wavesTEAM POLL MANAGEMENT — every poll wave loaded in the workspace, grouped by series, each with WHO loaded it (added_by) + when, its approval STATUS (pending|approved|rejected), its quality WEIGHT_SHARE (% of the series average it drives), and its EFFECT_PP (leave-one-out: how many points the series quality-weighted margin moves if you drop this wave — the "which loaded polls are moving our number" view).
set_poll_wave_statusTEAM POLL MANAGEMENT — approve, reject, or re-pend a loaded poll wave.
delete_poll_seriesPOLLING TIMELINE — remove a whole series, or one wave of it (pass date).
delete_poll_wavePOLLING TIMELINE (EM-148) — delete exactly ONE wave from a series (a fat-fingered topline, a duplicate) without touching the rest.
poll_of_pollsPOLLING TIMELINE (EM-148) — the QUALITY-WEIGHTED polling average for a series: every wave weighted by pollster rating (A+…F), recency (exponential half-life, default 14 days back from as_of/latest), sample size (√n), and a partisan-sponsor penalty — vs get_poll_timeline's rollup which weights by sample size only.
score_pollPOLL ACCURACY (EM-111) — grade a stored poll against the REAL contest result: poll margin vs actual margin, signed error (+ = overstated Dem), per-candidate error, and whether it called the winner.
pollster_leaderboardPOLL ACCURACY (EM-111) — rank every stored, contest-linked poll in your library by accuracy: per-pollster mean absolute margin error (lower = better) and bias (signed: + leaned Dem, − leaned Rep), plus called-winner rate.
bulk_mapDEMOGRAPHIC SPINE — map MANY raw labels at once (map-or-create each), for clearing the unmapped queue at scale.
list_metricsMEASURE SPINE (EM-109) — list the canonical poll metrics (the WHAT-is-measured registry): dem_ballot, gop_ballot, dem_margin, generic-ballot, trump_net_fav, wrong_track/right_track, approval, etc.
trend_metricMEASURE SPINE (EM-109) — trend a canonical metric across polls/waves: joins every (poll,question,option) you mapped to the metric_key and returns the value per poll (with date, state, sample size), plus COMPARABILITY flags (never silently pools generic-vs-named ballots or pre-vs-retro results).
query_demographicDEMOGRAPHIC SPINE (EM-106) — the CROSS-POLL JOIN.
get_demographic_reportDEMOGRAPHIC SPINE (EM-106) — RECALL.
get_campaign_contextAI-NATIVE MEMORY — load a place's full state-of-play in ONE call: baseline (real returns or presidential proxy), your stored poll timeline for the place, your data overlays (datasets + collections), the campaign plan, and insights — every section provenance-stamped (source + as_of).
list_levelsList the legislative levels available to simulate.
list_featuresList the geographic features (counties, states, districts, etc.) for a given level.
list_candidatesList candidates currently configured for a simulation+level.
add_candidateAdd a candidate to the candidates list for a simulation+level.
set_feature_percentagesOverride the vote percentages on a single feature.
set_candidatesReplace the entire candidate roster for a simulation+level in one call (add / edit / remove / reorder).
remove_candidateRemove one candidate from a simulation+level roster (and drop them from any feature overrides).
create_custom_candidateCreate a CUSTOM (write-in) candidate who is NOT in the canonical candidate registry, and persist it to the workspace so it is reusable across ALL of the workspace's forecasts (distinct DB structure from the baked registry).
list_custom_candidatesList the workspace's custom (write-in) candidates created via create_custom_candidate — the non-canonical field, distinct from the baked candidate registry.
clear_feature_overrideClear the manual percentage override on a single feature (county/state/district), reverting it to its baseline.
reset_overridesClear all manual overrides — the "reset to baseline" action.
set_cycleSet the election cycle the simulation models (2024 actuals, or 2026/2028/2030 forecasts).
set_modeSet the presidential modeling mode: general election, or the 2028 Democratic / Republican primary.
set_turnoutSet the turnout (mobilization) model — president only.
set_swingsPersist the swing-slider state so a scenario built by hand in the browser (uniform + demographic share swings, the swing target, and the demographic region scope) survives reload.
add_annotationPin a note or highlight on the map — an annotation that travels with the scenario, so collaborators see what the forecast is targeting at a glance.
list_annotationsList every annotation (pins, highlights, notes) on a scenario.
remove_annotationRemove a single annotation by its id.
clear_annotationsRemove all annotations from a scenario, or only those of one type when "type" is given.
add_map_commentLeave a Google-Docs-style COMMENT on the scenario map — a threaded, resolvable discussion anchored to a place.
list_map_commentsList the map comments on a scenario (oldest-first), each with its anchor (feature / point / scenario-level), author, body, @mentions, parent_id (for replies/threads), and resolved state.
list_threadsThe War Room as ONE feed of THREADS — full discussion context in a single call.
resolve_map_commentMark a map comment resolved (closed), like resolving a Google-Docs comment — or reopen it with resolved:false.
react_map_commentToggle an emoji reaction on a War Room chat message (map comment): adds the caller to reactions[emoji] if absent, removes them if present.
remove_map_commentDelete a map comment by id (soft-delete, so threads stay intact).
list_workspace_commentsTEAM/CAMPAIGN DASHBOARD feed — every map COMMENT (threaded discussions) and NOTE (pins/highlights/notes) across ALL scenarios in your workspace, newest-first, each labeled with its scenario name, where it sits on the map (anchor), author, resolved state, and a deep link to open it.
submit_ticketFile a bug report, data issue, feature request, or question with the electionsmcp team.
submit_feedbackEM-053 — file a bug / data error / feature request / question from the workflow where you hit it; returns a durable tracking id you can read back with list_tickets / get_ticket (this is the alias name for submit_ticket — same queue, same verified-key requirement).
list_ticketsList the tickets you have submitted (scoped to your verified key / account), newest first, with their current status.
get_ticketGet one of your tickets by id, including the team's response and current status.
apply_uniform_swingApply a uniform swing in points toward one candidate across every feature in a level.
get_tallyCompute the current per-candidate tally for a simulation+level.
create_simulationStart a brand-new what-if model: an empty simulation of any race, ready for candidates, swings, and turnout.
list_simulationsList all saved simulations in this workspace.
get_simulationFetch the full state of a simulation: candidates per level, overrides per level, last modified.
describe_open_campaignShow the agent the campaign the user has OPEN right now, as one editable packet.
delete_simulationPermanently delete a simulation.
apply_demographic_swingApply a points-toward-candidate swing only to features matching a demographic criterion.
list_flippedList features whose winner under the simulated overrides differs from the baseline — `count` is the FULL flip total; `flipped` returns up to `limit` rows (default 100).
compare_simulationsCompare two simulations side by side — a per-feature diff at a level.
clone_simulationDuplicate a simulation under a new name.
generate_reportRender a shareable HTML report of the simulation across one or more levels.
list_reportsList the reports generated in this workspace (newest first): report_id, title, simulation_id, created_at, url.
delete_reportDelete a generated report (workspace-scoped).
share_simulationMint a public read-only share token for a simulation.
revoke_shareRevoke a previously-minted public share token.
get_impact_reportNation-wide election impact across ALL 6 legislative levels in one call.
list_precinctsList precincts in a state with 2024 D/R/total votes baked in.
get_precinctGet a single precinct by external_id (e.g.
query_precinctsQuery precincts with structured filters, sorted + trimmed server-side.
export_precinctsBULK EXPORT — get a whole state's (or several states', or the national) precinct atoms as ONE downloadable file (csv | json | ndjson) instead of paginating one row at a time.
aggregate_precinctsServer-side roll-up of precinct atoms — grouped sums + the grand total in ONE call, so you never pull thousands of precincts and fold them client-side.
cost_modelPrice a vote goal in dollars by channel — $ per net vote (a net vote = +1 to your margin) as a RANGE, not a false-precision point.
set_precinct_pctsSet a precinct-level override in a simulation.
clear_precinct_overrideRemove a precinct-level override from a simulation, reverting that precinct to its 2024 baseline.
list_precinct_overridesList every precinct override stored in a simulation.
list_districtsList every district at a given race level.
precincts_in_districtReturn precincts whose centroid falls inside the given district boundary.
roll_up_raceRoll up precincts to a race outcome under the current simulation.
apply_swing_to_queryApply a uniform swing to every precinct matching a filter, in one call.
roll_up_state_racesRoll up every race in scope at a single level for a state, in one call.
get_manual_editsEvery manual edit in a scenario — the human's (or an agent's) overrides — in one scenario-scoped read, so a connected AI can see exactly what has been modeled and the deltas it produced.
senate_controlCompute Senate control for a cycle using the real class calendar.
race_ratingsA race-ratings board (Cook/270towin style) computed straight from the certified 2024 baseline — no simulation needed.
tipping_pointChamber-control triage from the 2024 baseline: orders every race from most-Democratic to most-Republican, runs the cumulative count to the majority line (270 EV for president, 51 seats for senate incl.
exposureExposure / sensitivity sweep from the 2024 baseline (no sim): applies a uniform national swing across a race set and reports how control responds — the wave size that flips the chamber each way (flip_control_at), each seat's swing-to-flip (how exposed it is), and the seat curve across swings.
rank_geoData-driven map: rank geographies by a variable, COLOR them by one variable and (optionally) EXTRUDE their HEIGHT by a second, then repaint the wall.
candidate_standingPORTAL — one candidate/official's standing across every race you model them in.
list_modeled_candidatesPORTFOLIO — every candidate or elected official you are modeling, unioned across ALL of your simulations and every level, deduped by name+party.
helpHigh-level orientation for AI clients new to the simulator.
get_catalogDISCOVERY — find the right tool when nothing in your list fits, like survey ingest or polling, by searching the whole catalog including gated tools.
get_usageOBSERVABILITY — session usage meter: total api_calls (every tool invocation since this server session began), distinct tools used, a by_category breakdown, and the per-tool leaderboard.
list_eventsWITNESS STREAM (EM-116) — replay the ordered server-side event log of every tool-call (a running then a done event each, carrying category, latency_ms, args_digest, affected{precinct_ids,count}, delta{margin_shift}, scenario_id, version, channel).
verify_auditWITNESS AUDIT (EM-116) — re-verify the immutable, content-hashed audit chain of a scenario's committed versions (commit_version is the append-only hash-stamped write).
list_primary_calendarReturn the ordered 2028 primary calendar for D or R: state by state, with date, type (primary/caucus), delegates, and tier (carve-out / super-tuesday / april).
set_primary_candidatesDefine the candidate field for a party's presidential primary on this simulation (the GOP/Dem contenders).
set_primary_sharesSet one state's vote shares for a party's presidential primary (the percentage each candidate wins in that state).
set_primary_county_sharesModel a party's presidential primary at COUNTY level: set one county's candidate vote shares within a state's primary.
set_primary_precinct_sharesModel a party's presidential primary at PRECINCT level — the finest grain.
apply_primary_cohortBULK conditional primary edit — for every precinct in a HOUSE district that matches a 2024 cohort filter, set the candidate shares, in ONE call (instead of one set_primary_precinct_shares per precinct).
build_strategyBuild a multi-step "how to beat <incumbent>" STRATEGY PLAYBOOK for a HOUSE district, in one call.
get_strategyReturn the saved strategy playbook for a simulation (s.strategy), or {strategy:null} if none.
clear_strategyClear the strategy playbook — the one-call reset for the plan.
clear_primary_sharesRemove a state's primary vote shares for a party (un-model that contest).
set_primary_asofMove the calendar playhead — the point in the primary calendar "as of" which to view the race on the map/chart.
set_primary_grain_prefPin which modeling grain DRIVES a state in a party's presidential primary — i.e.
set_primary_demo_leversSet a candidate's GLOBAL DEMOGRAPHIC DIALS in a primary — how many points to shift them among a voter group across the whole district/state.
set_compare_pathsGenerate a two-path comparison that the browser renders side-by-side.
roll_up_primaryThe running delegate count.
define_dem_calendarDefine the Democratic primary calendar order + dates (the DNC has not set the 2028 schedule, so the user/AI models it).
clear_dem_calendarDiscard the simulation's user-defined Democratic calendar and revert to the default 2024-based Dem calendar.
add_insightAttach a strategist insight (analysis, recommendation, key finding) to a SCENARIO (simulation_id) or — EM-086 — to a RACE (race_id), the campaign "brain" container that spans the race's scenarios.
list_insightsList insights for a SCENARIO (simulation_id) or — EM-086 — for a whole RACE (race_id): the race's own campaign-level insights PLUS every scenario's insights, aggregated with provenance (scope + scenario_id).
delete_insightRemove an insight from a simulation by id.
add_pollRecord a poll datapoint for a race in a simulation.
list_pollsList all polls stored against a simulation, optionally filtered by race_key.
delete_pollRemove ONE poll from a simulation by its poll_id (returned by add_poll, listed by list_polls).
clear_pollsBulk-remove polls from a simulation: pass race_key to drop only that race's polls, or omit it to drop ALL polls in the sim.
update_pollCorrect a stored poll in place by poll_id — change any of pct, sample_size, pollster, date, moe_pp, race_key, candidate_id.
set_race_scopeScope a simulation to one specific race/campaign.
clear_race_scopeRemove the race scope from a simulation, returning it to national/retrospective mode.
find_similar_countiesGiven a seed county (e.g.
snapshot_simulationCapture the current state of a simulation as a labeled snapshot.
list_snapshotsList all snapshots taken against a simulation.
restore_snapshotRoll a simulation back to a previously-captured snapshot.
publish_forecastTurn a simulation into a published forecast article.
get_forecast_usageReach of YOUR published forecasts — view counts per published-forecast link in your workspace, so you can see which theses are landing.
fork_forecastClone a published forecast as a new editable simulation in the caller's workspace.
extrapolate_from_seedsTake a small set of seed observations ("Newsom +4 nationally, +6 with under-30s, wins NJ") and propose precinct-level mutations from them.
average_pollsCompute a polling average per candidate for a race.
actual_coverageDiscover what REAL ingested election results are available to analyze — actual precinct-level returns (from RoutPoint), grouped by state × office × year with district / contest / precinct counts.
data_provenanceGOVERNANCE — machine-readable provenance for every data layer so you can responsibly cite what you publish: source, provider, vintage, kind (actual | boundary | reference | modeled | user_supplied), method, limitations, and which tools use it — plus a legend and methodology card.
actual_resultsThe real result of one race, rolled up from its actual precinct returns: winner + party, margin (pp), Dem/Rep vote totals & pct, turnout, and the candidate list.
candidate_overperformanceCANDIDATE QUALITY — how a real down-ballot candidate ran vs the TOP OF THE TICKET in the same district.
query_actual_precinctsAnalytical filter over real precinct returns: closest precincts, precincts a party won, turnout outliers — within one race or across a whole state×office×year.
actual_rollupAggregate real precinct returns up to county, district, or statewide totals for a state×office×year.
list_actual_contestsBrowse the FULL ballot — every individual contest with real precinct returns, including down-ballot races that aren't districted (sheriffs, county commissioners, judges, school boards, ballot measures, city councils).
actual_contestThe real result of any single contest by its contest_id (from list_actual_contests) — works for every ballot line, including non-districted local races.
race_resultWho actually WON a race — the authoritative, certified winner and result from precinct returns, including the 2024 presidential result by state.
campaign_briefCAMPAIGN COCKPIT — one call, the whole state-of-play for any race, president → state house.
cost_to_winThe budget ask for a race: net votes needed to flip (half the current margin in votes) × public per-net-vote benchmarks across persuasion/turnout channels, cheapest first.
target_listA ranked precinct target list (the field/turf hand-off) for a race — closest-margin precincts first, each with its winner, margin, turnout, and net votes to flip.
flip_frontierCOST-TO-FLIP FRONTIER — the single most-asked strategic question: how big a swing across how many precincts flips this race?
campaign_helpCampaign playbook — call this FIRST when the user is campaign staff (manager, finance, field, data, or the candidate).
swing_for_spendGround a budget in the margin: given $ to spend on a race, returns how many net votes it buys per channel (budget ÷ public $/net-vote benchmark) and how far that moves the margin — current margin → new margin, and whether it flips.
slate_digestA monitoring board for a slate of races: one call returns each race's rating, margin, net-votes-to-flip and turnout, plus a compact snapshot.