Skip to main content

bundeswahlleiter-mcp 🗳️

mcp-name: io.github.mohammad-abbasi-sh/bundeswahlleiter-mcp

Unofficial read-only MCP server for bundeswahlleiterin.de — Official Bundestag election results from bundeswahlleiterin.de (free open data, no key, no login): national results, party results, constituencies and turnout for 2017, 2021 and 2025. No key, no login.

Built by Mohammad Abbasi as part of the "Germany MCP factory". Not affiliated with bundeswahlleiterin.de.

For AI agents

Add to your MCP client config (stdio):

{
  "mcpServers": {
    "bundeswahlleiter": {
      "command": "uvx",
      "args": ["bundeswahlleiter-mcp==0.1.0"]
    }
  }
}

Or run locally: python -m bundeswahlleiter_mcp.server (needs mcp<2, httpx).

Tools

Tool Description
bwl_national_results National results of a Bundestag election: turnout, valid votes, per-party second votes with previous-election comparison — year (2017, 2021 or 2025)
bwl_party_results Results of one party in a Bundestag election, nationally and by Land — year, party (e.g. CDU, SPD, AfD, GRÜNE, FDP, Die Linke, BSW)
bwl_constituency_results Results of one constituency: winner, turnout, per-party first/second votes — year, constituency (number 1–299 or name, e.g. 1, Flensburg)
bwl_constituencies List all 299 constituencies with winner and turnout — year, land (optional Land name or number), limit 1..299
bwl_turnout Voter turnout by Land and nationally — year
bwl_health Reachability probe (ok / blocked / error) — one polite request

Notes

  • All data comes from the Bundeswahlleiterin's open data (free, no key, no login; Datenlizenz Deutschland – Namensnennung – Version 2.0).
  • Each call discovers the election's *_kerg2.csv link from its results page and parses the long-format file (semicolon-separated, German decimal commas).
  • Supported years: 2017, 2021, 2025 — kerg2 exists only for these (2013 has only the wide kerg.csv; 2009 has no English results page).
  • 2017/2021 files have 18 columns (no Gewählt) and call voters "Wähler" (2021/2025: "Wählende"); party names are the short names from kerg2 (CDU, CSU, AfD, GRÜNE, SPD, FDP, DIE LINKE/Die Linke, BSW …).
  • Constituency winner: 2025 reads the official Gewählt column — it names a party for 276 constituencies and shows "–" for the 23 whose direct winner was not allocated a seat under the 2025 second-vote coverage rule (there the winner is derived from the most first votes and labeled as such); 2017/2021 winners are always derived that way.

Tests: 24/24 green (19 offline + 5 live, 2026-11-10).

Development

python3 -m venv .venv && .venv/bin/pip install "mcp<2" httpx pytest
.venv/bin/pip install -e .
.venv/bin/python -m pytest tests/ -q

License

MIT


Built by Mohammad Abbasi — Almanibama · mabbasi.ir

Metadata

Release files for bundeswahlleiter-mcp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bundeswahlleiter-mcp 0.1.0
File Size Uploaded Provenance Actions
bundeswahlleiter_mcp-0.1.0.tar.gz 46.1 kB With provenance Details for bundeswahlleiter_mcp-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bundeswahlleiter-mcp 0.1.0
File Interpreter ABI Platform Actions
bundeswahlleiter_mcp-0.1.0-py3-none-any.whl Python 3 none any Details for bundeswahlleiter_mcp-0.1.0-py3-none-any.whl

Total release size: 59.1 kB

Release files / bundeswahlleiter_mcp-0.1.0.tar.gz

Download URL bundeswahlleiter_mcp-0.1.0.tar.gz
Size 46.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b58f9d777bbb207c40ce7c79d74a34e8384581ee9cb023195cdf5ced2e9512b5
BLAKE2b-256 checksum
How to use checksums
1cc65de6abef29c88b116dd3378c0d520bad64f72603260d81be7822637e31f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Release files / bundeswahlleiter_mcp-0.1.0-py3-none-any.whl

Download URL bundeswahlleiter_mcp-0.1.0-py3-none-any.whl
Size 13.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dcb9f01a374f148c6b42bfe08ebb678fc1a8448022295a2e9ff4769600952f9a
BLAKE2b-256 checksum
How to use checksums
03914372fd59d70cc97e58acaa814b9218b92ca9dd3e24ffe02c7ac4215a493f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Security for bundeswahlleiter-mcp 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for bundeswahlleiter_mcp-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page