civicapi-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@civicapi-mcpWhat are the upcoming election dates in the US?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
civicAPI MCP Server
Model Context Protocol (MCP) server for civicAPI - live and historical US election results . No API keys or authentication required.
Hosted MCP (Vercel)
Production: https://civicapi-mcp.vercel.app/mcp
Use Streamable HTTP transport (not stdio).
Cursor
{
"mcpServers": {
"civic-api-hosted": {
"url": "https://civicapi-mcp.vercel.app/mcp"
}
}
}Zed
"civic-api-hosted": {
"enabled": true,
"url": "https://civicapi-mcp.vercel.app/mcp"
}Related MCP server: onpe-mcp
Local stdio MCP (Python)
Clone the project, then:
pip install -r python/requirements.txt
python python/server.pyCursor (local)
{
"mcpServers": {
"civic-api": {
"command": "python",
"args": ["/absolute/path/to/civicapi-mcp/python/server.py"]
}
}
}Zed (local)
"civic-api": {
"enabled": true,
"remote": false,
"command": "python",
"args": ["/absolute/path/to/civicapi-mcp/python/server.py"]
}Tools
Tool | civicAPI endpoint |
|
|
|
|
|
|
|
|
|
|
|
|
search_races
Search by name, country, province, district, election type, and date range. At least one filter is required.
query— race name (slow alone; prefer geographic/date filters)country— ISO 3166-1 alpha-2 (US) or alpha-3 for limited-recognition states (USA)province— e.g.AL,JP-07district— English district nameelection_typestart_date/end_date—YYYY-MM-DDlimit— default 20, max 50000
get_race_by_id
Full race payload. Optional flags:
generate_map/generate_map_png— rendered map (SVG or PNG)testdata— random test datadata—jsonorcsvembed— embed iframe JSONprecinct— include precinct-level resultsformat— map style (percentage,raw, etc.)
Non-JSON responses (CSV, SVG, PNG) are returned with _content_type and _body or _body_base64.
get_race_history
Historical snapshots for timeline/progression views. Data available for races tracked after October 9, 2025.
Omit
timestampto list available UTC timestampsSet
timestamp(YYYY-MM-DDTHH:MM:SS.sssZ) for a full snapshotOptional:
generate_map,generate_map_png,light,precinct
get_election_dates
Election dates for a year (defaults to current year). Optional country and province filters.
get_election_years
All election years in the database.
get_api_status
Service health check ({"status":"ok"} when available).
Attribution
civicAPI requires attribution for non-personal projects. Link to civicapi.org or mention civicAPI in your project.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
- UnifAPIOAuthcom.unifapi
Hosted MCP server for live public-data APIs and Skills for AI agents.
MCP server for Brazilian Federal Senate open data (legislative, administrative, e-Cidadania).
Access U.S. congressional data - bills, votes, members, committees - via MCP.
An MCP server that provides congressional transcripts
Related MCP Servers
- AlicenseAqualityAmaintenanceAn MCP server providing access to Swiss direct democracy data, covering all federal popular votes since 1848 and elections since 1900.1028 PyPI2MIT
- FlicenseNot gradedqualityDmaintenanceMCP server for querying Peruvian electoral data (ONPE) including mesa results, candidate votes, and regional statistics. Enables natural language queries about the 2026 presidential election with local SQLite cache and live API fallback.-
- AlicenseDqualityBmaintenanceMCP server for South Korean election research, providing tools to search candidates, retrieve election results, and lookup campaign booklet texts using NEC open data and the krpoltext dataset.161MIT
- AlicenseAqualityAmaintenanceMCP server for the Congress.gov API that tracks US federal legislative process, providing tools to search bills and get bill details.1138 PyPI1Apache 2.0