Skip to main content
Glama
neel-kumar-v

civicapi-mcp

by neel-kumar-v

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.py

Cursor (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

GET /api/v2/race/search

get_race_by_id

GET /api/v2/race/{raceid}

get_race_history

GET /api/v2/race/{raceid}/history or /history/{timestamp}

get_election_dates

GET /api/v2/getElectionDates

get_election_years

GET /api/v2/getElectionYears

get_api_status

GET /api/v2/status

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-07

  • district — English district name

  • election_type

  • start_date / end_dateYYYY-MM-DD

  • limit — 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 data

  • datajson or csv

  • embed — embed iframe JSON

  • precinct — include precinct-level results

  • format — 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 timestamp to list available UTC timestamps

  • Set timestamp (YYYY-MM-DDTHH:MM:SS.sssZ) for a full snapshot

  • Optional: 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

F
license - not found
-
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    An MCP server providing access to Swiss direct democracy data, covering all federal popular votes since 1848 and elections since 1900.
    10
    2
    MIT
  • F
    license
    -
    quality
    B
    maintenance
    MCP 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.
  • A
    license
    D
    quality
    B
    maintenance
    MCP 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.
    16
    1
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    MCP server for the Congress.gov API that tracks US federal legislative process, providing tools to search bills and get bill details.
    10
    1
    Apache 2.0

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/neel-kumar-v/civicapi-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server