election-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
election-mcp
A Model Context Protocol (MCP) server for Indian Election Commission (ECI) data. It lets Claude Code, Claude Desktop, Cline, and any other MCP client query Lok Sabha election results, validate voter IDs, and search candidates — all from a self-contained, static sample dataset. No API key or network access is required.
What it does
Three tools:
election_results— search Lok Sabha (parliament) results by year (2014, 2019 or 2024) and/or state. Returns the constituency, winning party, winning candidate, votes, and the runner-up for each matching seat.voter_lookup— validate a voter ID card number and/or find the state Election Commission office.candidate_search— search candidates / MPs by name or by constituency.
Data is sample data. The constituencies, candidates, parties and vote counts in this package are plausible but fabricated for demonstration. They are not real Election Commission of India results. For authoritative results, see https://eci.gov.in
Related MCP server: Situação Eleitoral (TSE)
Quick start
Requires Node.js 18+ (uses the built-in global fetch). No API key is needed.
# from the monorepo root
npm install # installs @modelcontextprotocol/sdk
npm run test --workspace election-mcp # run the testsRun the server directly (stdio transport):
node server.jsMCP client configuration
Add it to your MCP client's configuration as a stdio server:
{
"mcpServers": {
"election": {
"command": "node",
"args": ["/absolute/path/to/india-mcp/election-mcp/server.js"]
}
}
}Or, from inside the package folder:
{
"mcpServers": {
"election": {
"command": "node",
"args": ["server.js"]
}
}
}Tool examples
election_results — arguments:
argument | type | required | description |
| string | no | Election year: |
| string | no | Indian state, e.g. |
Example call:
{ "name": "election_results", "arguments": { "state": "Karnataka", "year": "2024" } }Example response (trimmed):
{
"ok": true,
"results": [
{
"constituency": "Bengaluru North",
"state": "Karnataka",
"year": "2024",
"winnerName": "Anusha Kumar",
"winnerParty": "Bharatiya Janata Party",
"winnerVotes": 234560,
"runnerUpName": "Prakash Hampe",
"runnerUpParty": "Indian National Congress",
"runnerUpVotes": 210880
}
],
"count": 1,
"note": "year=2024 & state=Karnataka"
}voter_lookup — arguments:
argument | type | required | description |
| string | no | Voter ID, e.g. |
| string | no | State to look up the Election Commission office for |
Example call:
{ "name": "voter_lookup", "arguments": { "cardNumber": "ABC1234567" } }A malformed card number is rejected locally:
{ "name": "voter_lookup", "arguments": { "cardNumber": "123" } }{ "ok": false, "valid": false, "message": "Invalid voter ID format. Expected 3 uppercase letters followed by 8 digits (e.g. ABC1234567)." }candidate_search — arguments:
argument | type | required | description |
| string | no | Candidate / MP name (partial match) |
| string | no | Constituency name (partial match) |
Example call:
{ "name": "candidate_search", "arguments": { "constituency": "Chennai Central" } }Data source
There is no external data source — this package ships with a bundled, static sample dataset (lib/election.js) covering Lok Sabha results for Maharashtra, Karnataka and Tamil Nadu across the 2014, 2019 and 2024 general elections (5–7 constituencies each).
The data is intentionally fabricated and labeled as sample data. Do not use it for any real electoral decision-making. For official results, refer to the Election Commission of India.
Scripts
script | description |
| run the server ( |
| run the server ( |
| run the tests ( |
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Query UK Parliament, elections, crime stats, ONS census data, and national archives
Free Indian data and AI: pincode, IFSC, GSTIN, holidays, GST invoice, OCR, calculators, translation.
Indian government statistics and public data: economy, elections, health, agriculture and more
Search MPs and Lords, fetch profiles, synopses, and Westminster constituencies
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables querying Brazilian electoral data through TSE's official API. Supports candidate searches, election information, and campaign finance records for municipalities and states.72MIT
- AlicenseNot gradedqualityCmaintenanceEnables querying a person's electoral situation in Brazil (TSE) using name, birth date, CPF and voter ID. Allows checking if the voter registration is regular or irregular.MIT
- FlicenseNot gradedqualityCmaintenanceEnables AI assistants to query and compare Indian MPs using parliamentary records, attendance, affidavits, and election results, including topic search, report cards, rankings, and source-backed answers.-
- AlicenseAqualityBmaintenanceEnables AI agents to validate Indian identifiers (GSTIN, PAN, Aadhaar format, IFSC) and look up pincodes, state/GST codes, Central Government holidays, and compliance due dates entirely offline. Every result is deterministic and carries its data source and freshness, while making clear that a well-formed number is not proof of registration.834 npmMIT