Skip to main content
Glama
29N Elections MCP

29N Elections MCP

README.md
<div align="center">

# 29N Elections MCP

**Official results of Spain's general election of 29 November 2026, for any AI assistant.**

A [Model Context Protocol](https://modelcontextprotocol.io) server for the public results website of the
**29N general election** (Congreso de los Diputados and Senado), published by the Ministerio del Interior.

[![Python](https://img.shields.io/badge/python-3.11%2B-3776AB?logo=python&logoColor=white)](https://www.python.org/)
[![MCP](https://img.shields.io/badge/MCP-2026--07--28-6E56CF)](https://modelcontextprotocol.io)
![Transport](https://img.shields.io/badge/transport-stdio%20%7C%20Streamable%20HTTP-0A7EA4)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
![Read-only](https://img.shields.io/badge/tools-read--only-lightgrey.svg)

[Quick start](#quick-start) ·
[Connect a client](#connect-a-client) ·
[Available tools](#available-tools) ·
[Available data](#available-data)

**English** · [Spanish](README.es.md)

</div>

---

Give your AI assistant direct access to the official 29N results.

This server lets any MCP client (Claude, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Zed and others) read the results that the Ministerio del Interior publishes on [resultados.29neleccionesgenerales.com](https://resultados.29neleccionesgenerales.com). Ask in plain language, for example *"What was the turnout in Madrid at 18:00, compared with 2023?"*, and the assistant will check the publication phase, find the territory, and answer with the official figures and a link to the official page.

> **Unofficial project.** This server is **not affiliated with, endorsed by or sponsored by the Ministerio del Interior** or any other public body. It reads the same public data that the official website shows. See [Data source and attribution](#data-source-and-attribution).

| | |
| --- | --- |
| **Hosted endpoint** | Available soon (meanwhile, [run it locally](#run-locally)) |
| **Transport** | `stdio` (default) or Streamable HTTP |
| **Protocol** | MCP revision `2026-07-28` (stateless); earlier revisions through the `initialize` handshake |
| **Authentication** | None, the data is public |
| **Coverage** | Congreso and Senado: Spain, autonomous communities, provinces, islands, municipalities, municipal districts, polling places and their polling stations (tally sheets as PDF) |
| **Phases** | Constitution of polling stations, turnout updates (14:00 and 18:00) and vote count (from 20:00) |
| **Language** | Tool descriptions in English; territory and party names in Spanish, as the website publishes them |
| **Reference** | Chambers, levels, phases and identifiers in the [catalogue](Resources/Catalogue.md) |

**Why use it**

- **Real data, not memory.** Every figure is read from the official results website when the tool is called.
- **Phase-aware.** The server knows whether turnout or votes are being published and tells the assistant not to report party results before the count starts.
- **Always sourced.** Each result carries a `source` object with the publisher, the official page, the API URLs read, the phase, the data source (provisional or definitive) and the time the data was retrieved.
- **Typed.** Every tool declares an `outputSchema` and returns `structuredContent`, plus a `next_step` hint for the assistant.

## Contents

- [Quick start](#quick-start)
- [Installation](#installation)
  - [Hosted server](#hosted-server)
  - [Run locally](#run-locally)
  - [Connect a client](#connect-a-client)
  - [Configuration](#configuration)
- [Example questions](#example-questions)
- [Available tools](#available-tools)
  - [Recommended order](#recommended-order)
- [Available data](#available-data)
- [MCP protocol compliance](#mcp-protocol-compliance)
- [Development](#development)
- [Troubleshooting](#troubleshooting)
- [Limitations](#limitations)
- [Privacy](#privacy)
- [Data source and attribution](#data-source-and-attribution)
- [Links](#links)
- [WIP and disclaimer](#wip-and-disclaimer)
  - [Work in progress](#work-in-progress)
  - [Disclaimer](#disclaimer)
- [Package maintenance and contributing](#package-maintenance-and-contributing)
- [Licensing](#licensing)

## Quick start

1. Install [`uv`](https://docs.astral.sh/uv/) and clone the repository ([details](#run-locally)).
2. Register the server in your client, for example with Claude Code:

   ```bash
   claude mcp add elecciones29n -- uv run --directory /path/to/elecciones29n-mcp elecciones29n-mcp
   ```

3. Ask a question: *"What is the latest turnout in Spain for the 29N election?"*

## Installation

Two ways to use the server: the hosted endpoint (**available soon**) or a local
copy running on your machine. The local setup is available today.

### Hosted server

> **Available soon.** A public endpoint has not been published yet. Once it is,
> this section will list the URL and the configuration snippets for each client.

| | |
| --- | --- |
| **Endpoint** | *Available soon* |
| **Transport** | Streamable HTTP |
| **Authentication** | None |

### Run locally

**Requirements:** Python 3.11 or later, and [`uv`](https://docs.astral.sh/uv/).

```bash
git clone <repository-url> elecciones29n-mcp
```

```bash
cd elecciones29n-mcp
```

```bash
uv sync
```

```bash
uv run elecciones29n-mcp
```

The server starts on the `stdio` transport and waits for an MCP client. It prints nothing until a client connects; that is expected.

To serve Streamable HTTP instead (for example, for a shared deployment), set `MCP_TRANSPORT=http`. The server listens on `MCP_HOST:MCP_PORT` (by default `127.0.0.1:8000`, reachable only from the same machine) and the endpoint path is `/mcp`, so a local client connects to `http://localhost:8000/mcp`:

```bash
MCP_TRANSPORT=http MCP_PORT=8000 uv run elecciones29n-mcp
```

To update an existing clone, run `git pull` and then `uv sync` again.

### Connect a client

In the snippets below, replace `/path/to/elecciones29n-mcp` with the absolute path of your clone.

#### Command-line clients (one line)

| Client | Command |
| --- | --- |
| Claude Code | `claude mcp add elecciones29n -- uv run --directory /path/to/elecciones29n-mcp elecciones29n-mcp` |
| Codex (OpenAI) | `codex mcp add elecciones29n -- uv run --directory /path/to/elecciones29n-mcp elecciones29n-mcp` |
| VS Code | `code --add-mcp '{"name":"elecciones29n","command":"uv","args":["run","--directory","/path/to/elecciones29n-mcp","elecciones29n-mcp"]}'` |

#### Clients with a JSON file

Most clients read the same block. Paste it into the file for your client and restart it:

```json
{
	"mcpServers": {
		"elecciones29n": {
			"command": "uv",
			"args": ["run", "--directory", "/path/to/elecciones29n-mcp", "elecciones29n-mcp"]
		}
	}
}
```

| Client | Configuration file |
| --- | --- |
| Claude Desktop (macOS) | `~/Library/Application Support/Claude/claude_desktop_config.json` |
| Claude Desktop (Windows) | `%APPDATA%\Claude\claude_desktop_config.json` |
| Claude Desktop (Microsoft Store) | `%LOCALAPPDATA%\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\claude_desktop_config.json` |
| Cursor | `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (project) |
| Windsurf | `~/.codeium/windsurf/mcp_config.json` |
| Gemini CLI | `~/.gemini/settings.json` |
| Cline, LM Studio and others | The client's MCP settings file (same `mcpServers` block) |

Some clients use a different format:

<details>
<summary>VS Code (<code>.vscode/mcp.json</code>): key <code>servers</code> and a <code>type</code></summary>

```json
{
	"servers": {
		"elecciones29n": {
			"type": "stdio",
			"command": "uv",
			"args": ["run", "--directory", "/path/to/elecciones29n-mcp", "elecciones29n-mcp"]
		}
	}
}
```

</details>

<details>
<summary>Codex (<code>~/.codex/config.toml</code>): TOML instead of JSON</summary>

```toml
[mcp_servers.elecciones29n]
command = "uv"
args = ["run", "--directory", "/path/to/elecciones29n-mcp", "elecciones29n-mcp"]
```

</details>

### Configuration

The server is configured with environment variables. All of them are optional.

| Variable | Default | Description |
| --- | --- | --- |
| `MCP_TRANSPORT` | `stdio` | `stdio`, or `http` (also `streamable-http`) for Streamable HTTP. |
| `MCP_HOST` | `127.0.0.1` | Bind address in HTTP mode. Set `0.0.0.0` only to expose the server on purpose (for example, inside a container behind a reverse proxy): it has no authentication. |
| `MCP_PORT` | `8000` | Port in HTTP mode. The endpoint path is `/mcp`. |
| `ELECCIONES29N_BASE_URL` | `https://resultados.29neleccionesgenerales.com` | Origin of the results website and its API. Also used to build the official page links. |
| `ELECCIONES29N_USER_AGENT` | A current desktop Chrome User-Agent | User-Agent sent to the website. The website firewall rejects non-browser agents (see [Troubleshooting](#troubleshooting)). |

Built-in behaviour (not configurable):

- **Caching.** Responses are cached in memory (at most 256 entries; expired entries are dropped first, then the least recently used): the website configuration for 10 seconds; territory results for the website polling interval (30 seconds today); the territory tree and the candidacies catalogue for 6 hours, or until the configuration announces a new version. If a refreshed catalogue still carries the old version (the website copy lags behind its configuration), it is kept for 60 seconds before checking again. Concurrent requests for the same data share one upstream request. Tally sheet PDFs are kept for 5 minutes (at most 4).
- **Retrieval time.** `source.fetched_at` is the time the data was actually retrieved from the website, so a cached answer keeps its original time.
- **Retries.** Up to 3 attempts on HTTP 429, 502, 503 and 504 and on transport errors (timeouts, refused, reset or truncated connections), with exponential backoff or the `Retry-After` delay of 429/503 answers (at most 10 seconds). At most 8 requests run at the same time.

## Example questions

- "What was the turnout in Spain at 18:00, and how does it compare with 2023?"
- "How many polling stations opened in the province of Sevilla?"
- "Give me the turnout of every province of Andalucía."
- "How many seats does each party have in the Congreso right now, and how much has been counted?"
- "Which party is winning in each province?"
- "Who was elected senator for Madrid?"
- "Which polling stations does my polling place have, and can I see the tally sheet of one of them?"
- "How does Compromís appear in the results, and what is its acronym and color?"

## Available tools

The server exposes seven read-only tools. It is stateless: the tools are chained by passing the `scope_id` values that the search returns (and the polling station codes that `elecciones29n_get_polling_stations` returns). Every tool except `elecciones29n_get_status` takes a single `params` object.

| Step | Tool | Description |
| --- | --- | --- |
| 1 | `elecciones29n_get_status` | Publication status: current phase (0 constitution, 1 turnout, 2 count), turnout update announced by the configuration (indicative), active data source (`pro` provisional or `def` definitive), whether tally sheets are published, official alert and data versions. Takes no arguments. |
| 2 | `elecciones29n_search_scopes` | Finds territories (scopes) by name or official territory code, ignoring accents, case and word order. Returns `scope_id`, `code`, level, `parents` (to tell homonyms apart), `child_levels` and the official page. With `level=110` it finds polling places. |
| 3 | `elecciones29n_get_scope_results` | Results of one territory: polling stations constituted, turnout updates compared with 2023 and, from phase 2, vote totals, parties (votes, %, seats, change vs 2023) and Senate candidates. Optionally summarizes every child territory of one level. During the count, constitution and turnout come from the election-day snapshot. |
| 4 | `elecciones29n_get_winners_map` | The winning or leading candidacy of every child territory of a scope (for example, each province of Spain), with its seats and the share of the census counted, plus a tally per candidacy. Each entry says whether it is the official winner, an inferred leader or a tie. Phase 2 only. |
| 5 | `elecciones29n_list_parties` | Candidacies of the 29N call (code, acronym, name, color and group), optionally filtered by a word of the name or acronym. |
| 6 | `elecciones29n_get_polling_stations` | Polling stations of one polling place (level 110): code, short label (district-section-letter) and whether each one has been counted. |
| 7 | `elecciones29n_get_tally_sheet` | Metadata of the tally sheet (*acta*) of one polling station (send and processing dates, size, SHA-256) and the URI of the resource that serves the PDF. Only when the website publishes tally sheets. |

Parameters (all inside `params`):

| Tool | Parameters |
| --- | --- |
| `elecciones29n_search_scopes` | `queries` (1–15 terms, required), `chamber` (`congreso` default \| `senado`), `level` (number or name, optional), `limit` (1–100, default 20) |
| `elecciones29n_get_scope_results` | `scope_id` (24 hex characters, required), `chamber`, `data_source` (`auto` default \| `pro` \| `def`), `children_level` (number or name, optional), `children_limit` (1–500, default 60) |
| `elecciones29n_get_winners_map` | `scope_id` (required), `level` (number or name, required; `circunscripciones` for every Senate constituency), `chamber`, `data_source`, `limit` (1–1000, default 200) |
| `elecciones29n_list_parties` | `chamber`, `query` (optional, up to 100 characters) |
| `elecciones29n_get_polling_stations` | `scope_id` (a level-110 polling place, required), `chamber`, `data_source` |
| `elecciones29n_get_tally_sheet` | `mesa_code` (polling station code such as `2807903650A`, required), `chamber` |

Levels can be given as a number or a name in Spanish or English: `1` nacional, `20` comunidad, `30` provincia, `70` isla, `90` municipio, `100` distrito, `110` local. See the [catalogue](Resources/Catalogue.md#levels).

The server also publishes two resources:

| Resource | Content |
| --- | --- |
| `elecciones29n://instructions` | The usage guide (the same text it sends as server instructions), Markdown. |
| `elecciones29n://tally-sheet/{chamber}/{mesa_code}` | Resource template: the tally sheet PDF (`application/pdf`) of one polling station. Its URI is returned by `elecciones29n_get_tally_sheet`, which never puts the file itself in its result. |

How it uses the tools (simple case):

```mermaid
sequenceDiagram
    participant A as AI assistant
    participant S as 29N MCP server
    participant W as Results website API

    Note over A,S: Step 1 · what is published?
    A->>S: elecciones29n_get_status()
    S->>W: getConfig
    S-->>A: phase, turnout update, data source, alert

    Note over A,S: Step 2 · find the territory
    A->>S: elecciones29n_search_scopes(queries=["Madrid"])
    S->>W: getNomenclator (cached)
    S-->>A: scopes (scope_id, parents, child_levels)

    Note over A,S: Step 3 · get the figures
    A->>S: elecciones29n_get_scope_results(scope_id, children_level?)
    S->>W: getScopeData (phase 2 with children: getScopeDataTopPartidosGanadores)
    S->>W: phase 2: getScopeData day snapshot (turnout)
    S-->>A: constitution, turnout or count + source

    Note over A,S: Step 4 (phase 2) · winners by territory
    A->>S: elecciones29n_get_winners_map(scope_id, level=30)
    S->>W: getScopeDataTopPartidosGanadores
    S-->>A: winner, leader or tie of each child territory + tally

    Note over A,S: Step 5 (optional) · polling stations and tally sheets
    A->>S: elecciones29n_get_polling_stations(scope_id of a polling place)
    S->>W: getScopesLocalMesa
    A->>S: elecciones29n_get_tally_sheet(mesa_code)
    S->>W: getImagen
    S-->>A: metadata + resource URI
    A->>S: resources/read elecciones29n://tally-sheet/...
    S-->>A: PDF blob
```

Every result includes `next_step`, a short instruction that tells the assistant what to report and what to call next (for example, not to report party results while the count has not started).

All seven tools are annotated `readOnlyHint`, `idempotentHint` and `openWorldHint`, and not `destructiveHint`.

### Recommended order

The server is stateless, so this order is recommended, not enforced: each tool validates its own
inputs and, when one is missing or wrong, answers with an error that says which tool to call first.

| Step | Tool | Input it expects |
| --- | --- | --- |
| 1 | `elecciones29n_get_status` | Nothing. Call it at the start and again to learn about new data. |
| 2 | `elecciones29n_search_scopes` | Names or official territory codes of the places the user mentions. |
| 3 | `elecciones29n_get_scope_results` | A `scope_id` from step 2 and, optionally, a `children_level` from its `child_levels`. |
| 4 | `elecciones29n_get_winners_map` | A `scope_id` from step 2 and a `level` from its `child_levels`. Phase 2 only. |
| 5 | `elecciones29n_list_parties` | Nothing, or a word of a party name or acronym. Any time. |
| 6 | `elecciones29n_get_polling_stations` | The `scope_id` of a polling place (level 110) from step 2. |
| 7 | `elecciones29n_get_tally_sheet` | A polling station `code` from step 6, once `scrutiny_records_available` is `true`. |

## Available data

The server covers the **2** chambers of the 29N general election (Congreso, 350 deputies; Senado,
208 senators), **3** publication phases and **8** territory levels, from Spain down to polling
stations, with every figure in its provisional and definitive versions and the 2023 election as
the comparison baseline.

See [`Resources/Catalogue.md`](Resources/Catalogue.md) for the chambers, election calls, phases, data
sources, levels, example identifiers, polling station codes, official website routes and API
endpoints, plus a glossary.

## MCP protocol compliance

The server targets MCP specification revision **`2026-07-28`** and is built on the official Python SDK (`mcp[cli]>=2.3.0,<3`).

- **Stateless.** No session state is kept between requests; tools are chained through explicit `scope_id` values, not through a server-side flow. Clients negotiate with `server/discover`. Clients on earlier revisions (`2024-11-05` to `2025-11-25`) can still connect through the `initialize` handshake that the SDK keeps.
- **Typed results.** Every tool returns a Pydantic model: the SDK publishes its JSON Schema as the tool `outputSchema` and sends the result as `structuredContent` (with a JSON text copy in `content` for clients that ignore structured output).
- **Cache hints.** `tools/list`, `resources/list` and `resources/templates/list` carry `ttlMs` = 3,600,000 (one hour) and `cacheScope` = `public`, because they do not change while the server runs; `resources/read` carries `ttlMs` = 300,000 (five minutes), because tally sheets can be resent.
- **Binary resources.** The tally sheet template returns the PDF as a `blob` with `mimeType` `application/pdf`; `elecciones29n_get_tally_sheet` adds a `resource_link` content block next to its structured metadata.
- **Errors.** Upstream failures become tool errors (`isError`) with an actionable message, never protocol errors.
- **No subscriptions.** The server sends no change notifications; clients call `elecciones29n_get_status` again to learn about new data.

## Development

The server is a small package under `src/elecciones29n_mcp/`:

| File | Role |
| --- | --- |
| `server.py` | Entry point (`elecciones29n-mcp`) and transport selection. |
| `tools.py` | The MCP server instance, the instructions resource, the tally sheet resource template and the seven tools. |
| `client.py`, `cache.py` | HTTP client for the results API (retries, concurrency limit, version-aware cache) and in-memory TTL cache. |
| `models.py` | Pydantic input and output models (the source of every `outputSchema`). |
| `utils.py` | Territory search, provisional/definitive value selection and payload normalization. |
| `config.py` | Environment variables, election constants and the instruction text. |

`Resources/elecciones29n_mcp_instructions.md` is the usage guide the server sends to the client; it is bundled into the package.

Install the dependencies (including the development group) and run the tests:

```bash
uv sync
```

```bash
uv run pytest
```

The tests use trimmed copies of real responses in `tests/fixtures/`, synthetic payloads (`synthetic_*.json`, including a tiny PDF) for the endpoints not published yet, and a fake API, so they never call the website.

## Troubleshooting

| Symptom | Fix |
| --- | --- |
| The server does not appear in the client | Check that `/path/to/elecciones29n-mcp` is absolute and that `uv` is on the client's `PATH`, then restart the client completely. |
| `Error 403` (CloudFront WAF) | The website firewall rejected the request: it blocks clients that do not look like a browser and may rate limit. Set `ELECCIONES29N_USER_AGENT` to a current desktop browser User-Agent, restart the server, or wait a few minutes. |
| `Error 404` | The data is not published yet for the current phase, or the identifier does not exist. Check the phase with `elecciones29n_get_status` and take `scope_id` from `elecciones29n_search_scopes`. |
| A response that is not JSON | The website returned an HTML error page, usually for data that is not published yet. Try again later. |
| Timeouts or `Error 5xx` on election night | The website is under heavy load. The server already retries; try again in a moment. |
| No party results or empty winners map | Expected before phase 2 (polls close at 20:00) or while `count.started` is `false`. |
| `Unknown scope_id` | The identifier does not belong to the chosen chamber, or was typed by hand. Search again with the same `chamber`. |
| `incomplete configuration` | The website returned a configuration without a valid phase or data source. It is usually a transient glitch: try again in about 10 seconds. |
| Polling stations or tally sheets `not published yet` | The website publishes them late (usually after the count), and tally sheets only when `scrutiny_records_available` is `true` in `elecciones29n_get_status`. |

## Limitations

- **Phases.** Phase 0 publishes the constitution of polling stations, phase 1 the turnout updates (14:00 and 18:00) and phase 2 the vote count. Party results and winners exist only in phase 2.
- **Senado before the count.** Polling stations and turnout are common to both chambers and are published only under the Congreso; Senado results start in phase 2.
- **Provisional vs definitive.** Every figure exists as `pro` (provisional count on election night) and `def` (definitive count, published days later). `data_source="auto"` uses the source the website marks as active. Provisional figures can change.
- **Turnout update number.** `turnout_update` comes from the website configuration and can lag behind the territory data; `turnout.latest_published` is the update to report.
- **Baselines.** Previous-election figures (totals, turnout and party comparisons) are always the definitive 2023 count, as on the website; current figures and their deltas use the selected data source.
- **Winners.** A territory has no winner until the selected data source has counted part of its census. `winner_basis` says whether the winner is the one marked by the website (`official`), a leader computed from seats and votes (`inferred_leader`) or a `tie`.
- **Polling stations and tally sheets.** `elecciones29n_get_polling_stations` and `elecciones29n_get_tally_sheet` use endpoints inferred from the website code (`getScopesLocalMesa`, `getImagen`) that were not published yet when they were written: they are **not validated live**. Tally sheets are capped at 10 MB and served only as PDF resources; their figures are not machine-read.
- **Not exposed.** Polling-station level results, logos and candidate portraits, map geometry, downloadable files, and other presentation-only assets of the website: translation files (`/assets/locales/{lng}/{ns}.json`), versioned shared assets (`/shared-assets/...`: logos, `-leader` portraits, `topojson` maps including `real_{level}` variants), the live video stream and the markup of official alerts (the alert text is returned by `elecciones29n_get_status`).
- **Official links.** `official_url` points to routes of the website's single-page app. The website answers those URLs with HTTP 404 and the app shell, which then renders the page in a browser; tools that only check the HTTP status may report them as broken.
- **Unofficial client.** The API is the website's own backend. It is not documented as a public API and can change or block automated clients without notice.
- **Comparisons.** Previous-election figures refer to the general election of 23 July 2023 (call `07-23`).
- **Hosted endpoint.** It is not available yet; use the local setup.

## Privacy

No authentication and no personal data are needed. The server only forwards the requests required to answer the question to the public results website, with a browser User-Agent and a `Referer` header pointing to the website itself. It stores nothing on disk and sends no telemetry; its only log output is the list of API requests written to the server's standard error. Candidate names in Senate results are public electoral information, as published by the website.

## Data source and attribution

The results are published by the **Ministerio del Interior (Gobierno de España)** on the official results website of the 29N general election, [resultados.29neleccionesgenerales.com](https://resultados.29neleccionesgenerales.com). When you reuse the figures, cite the Ministerio del Interior as the source and link to the `official_url` returned with each result; check the website's legal notice for the reuse conditions.

**This project is independent. It is not affiliated with, endorsed by or sponsored by the Ministerio del Interior, the Government of Spain or any electoral authority.** The provisional results published on election night are informative; the definitive results come from the general count (escrutinio general) carried out by the electoral boards.

## Links

- [Official results website](https://resultados.29neleccionesgenerales.com)
- [Model Context Protocol](https://modelcontextprotocol.io)
- [Catalogue of chambers, levels, phases and identifiers](Resources/Catalogue.md)
- [Usage guide sent to the client](Resources/elecciones29n_mcp_instructions.md)

## WIP and disclaimer

### Work in progress

This project is currently under active development. The polling station and tally sheet tools rely on
endpoints that the website had not published yet when they were written.

### Disclaimer

This repository and its contents are provided for informational and technical purposes only. Use of this code is at your own risk.

The software is provided **"as is"**, without warranty of any kind, either expressed or implied. The figures it returns are copied from the official website at request time and may be incomplete, provisional or out of date.

By using this repository, you acknowledge that:
- You are responsible for reviewing and testing the code before using it in any production or critical environment.
- You must check any figure that matters against the official website before relying on it.
- The authors are **not liable** for any direct, indirect or consequential damages arising from the use of this software.

## Package maintenance and contributing

Any contribution is welcome and should be done through pull requests and/or issues. Pull requests
should include updated tests and updated documentation. If functionality is changed, the tool
docstrings (the descriptions that the assistant reads) should be added or updated.

## Licensing

The code of this project is licensed under the [MIT License](LICENSE).

TDQS

A4.7/5.0

Scored across 7 tools

Disambiguation5/5

Each tool has a clearly distinct role: status, scope search, scope results, winners map, party catalog, polling station listing, and tally sheet retrieval. The descriptions explicitly sequence the workflow and state what each tool does not cover, reducing misselection. Overlap is minimal and handled by cross-references rather than duplicated functionality.

Naming Consistency5/5

All tools use the same `elecciones29n_` prefix followed by a readable verb_noun pattern in snake_case, such as `get_status`, `search_scopes`, `get_scope_results`, and `list_parties`. The convention is predictable throughout, with no mixed casing or inconsistent verb styles.

Tool Count5/5

Seven tools is well scoped for an election-results server: status, territory discovery, results, winners, parties, polling stations, and tally sheets each earn their place. There is no obvious redundancy or missing bridge tool that would justify adding or removing one.

Completeness4/5

The surface covers the core 29N lifecycle from publication status through territory search, results, winners, parties, polling places, and tally sheets. Minor gaps exist, such as tally-sheet file access depending on a separate MCP resource read and some endpoints being inferred rather than live-validated, but agents can work around these.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues