Skip to main content
Glama
mv-wahl-mcp
by voundbrand

mv-wahl-mcp

MCP server for searching and retrieving the Wahlprogramme (election platforms) of all 19 parties admitted to the Landtagswahl Mecklenburg-Vorpommern 2026.

This is retrieval only — not a Wahl-O-Mat clone and not a voting recommender. Do not use it to compute "closeness" scores from user positions.

Built for Martin Müller / Remington S.: let a KI browse full party programmes (primary) plus the official bpb Wahl-O-Mat MV 2026 theses & answers (secondary corpus).

Quick start

git clone https://github.com/voundbrand/mv-wahl-mcp.git
cd mv-wahl-mcp
./run.sh

That's it. The script creates a virtual environment if needed, installs dependencies, and starts the MCP server. The pre-built search index is included — no rebuild required.

Requirements: Python 3.11+

Related MCP server: Bundestag MCP Server

Add to Cursor or Claude Desktop

Run ./run.sh --print-config to get a ready-to-paste MCP configuration:

./run.sh --print-config

Copy the output into your MCP config file:

  • Cursor: ~/.cursor/mcp.json or .cursor/mcp.json in your project

  • Claude Desktop: claude_desktop_config.json

If you already have other MCP servers configured, merge the mv-wahl entry into your existing mcpServers object.

Features

Tool

Purpose

list_parties

All 19 parties + indexing status

search_programmes

FTS5 keyword search (query, optional party, corpus)

get_party_programme

Fetch sequential chunks for one party

coverage_status

Coverage table (source → indexed)

Corpora:

  • programme — full / website-captured Wahlprogramme (primary)

  • wahlomat — bpb Wahl-O-Mat MV 2026 dataset (theses + party answers)

Test search without MCP

./run.sh &  # or skip if you just want to test the search module
cd mv-wahl-mcp
source .venv/bin/activate
python -c "
from mv_wahl_mcp.search import search_programmes
import json
print(json.dumps(search_programmes('Wohnungsbau', limit=5), ensure_ascii=False, indent=2))
"

Data layout

data/
  parties.json          # metadata + source URLs for all 19
  programmes/           # PDF sources
  programmes_text/      # pdftotext extracts
  wahlomat/             # bpb Datensatz zip + xlsx
  index.db              # SQLite + FTS5 (pre-built, ready to use)

Wahl-O-Mat dataset

Downloaded from the bpb download page:

bpb licence restricts creating Wahl-O-Mat-like recommenders from the dataset; this project only indexes text for search/retrieval (journalistic/research-style analysis).

Programme sources

Prefer official party / Landesverband PDFs where available. Many smaller parties are mirrored via the schwerin.news Aug 2026 aggregation of all admitted lists:

See data/parties.json and the coverage_status tool for per-party notes. Short / website-captured texts (e.g. Die PARTEI, WLD, Team Freiheit, Handwerker 10-Punkte) are documented honestly.

Re-extract / re-index (optional)

Only needed if you modify the source PDFs or Wahl-O-Mat data:

# Needs poppler-utils (pdftotext)
for f in data/programmes/*.pdf; do
  base=$(basename "$f" .pdf)
  pdftotext -layout "$f" "data/programmes_text/${base}.txt"
done
python scripts/build_index.py

Licence / ethics

  • Party programmes remain copyright of the respective parties.

  • Wahl-O-Mat dataset © Bundeszentrale für politische Bildung — see data/wahlomat/Hinweis.txt.

  • This tool must not be turned into a proximity/voting recommender.

Coverage (build-time snapshot)

All 19/19 admitted Landeslisten are indexed. Volume varies:

Party

Chars (approx)

Notes

SPD, AfD, CDU, Die Linke, GRÜNE, FDP, BSW, Volt

large full programmes

Official / Landesverband PDFs

Tierschutzpartei, FREIE WÄHLER, Bündnis C, PdF, KPD

medium

Official or aggregator PDFs

PIRATEN, ÖDP

shorter full programmes

Official / aggregator

Die PARTEI, Team Freiheit, WLD

website captures

No long PDF published

Handwerker Partei Deutschland

short 10-point PDF

Intentional short programme

Secondary corpus: 722 Wahl-O-Mat position rows (38 theses × 19 parties) from the official bpb dataset.

Available Tools

4 tools
coverage_statusA

Return coverage table: which of the 19 parties are indexed and source notes.

Inputs: no named parameters. Returns: object

get_party_programmeA

Fetch sequential text chunks from one party's programme (or Wahl-O-Mat answers).

Args: party: Party id or short name (e.g. "CDU", "Volt", "BSW"). offset: Chunk offset (0-based). limit: Number of chunks to return (1–50). corpus: "programme" (default) or "wahlomat".

Inputs: party (required), limit, corpus, offset. Returns: object

list_partiesA

List all 19 parties with indexing status, source notes, and chunk counts.

Inputs: no named parameters. Returns: result

search_programmesA

Keyword/FTS search across Wahlprogramme (and optionally Wahl-O-Mat answers).

Args: query: Search terms in German or English (e.g. "Wohnungsbau", "Energiewende"). party: Optional party filter (id or short name, e.g. "SPD", "GRÜNE", "Die Linke"). corpus: Optional "programme" (full platforms) or "wahlomat" (theses + answers). limit: Max hits (1–50, default 10).

Inputs: query (required), limit, party, corpus. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 4 tools

    Disambiguation3/5

    The tools list_parties and coverage_status both report on which of the 19 parties are indexed, with only minor differences (chunk counts vs. a coverage table). This overlap could cause misselection, while search_programmes and get_party_programme are clearly distinct.

    Naming Consistency4/5

    Tool names are consistently lowercase with underscores and mostly follow a verb_noun pattern (list_parties, search_programmes, get_party_programme). The exception is coverage_status, which uses a noun phrase, but it remains readable and predictable.

    Tool Count5/5

    With exactly 4 tools, the server is well-scoped for its purpose of listing, checking coverage, searching, and retrieving election programme content. Each tool has a clear role and the count is appropriate.

    Completeness5/5

    The server covers the core read-only workflows: listing parties, verifying indexing status, performing keyword search, and fetching chunked content. No obvious gaps exist for the stated domain of accessing Wahlprogramme and Wahl-O-Mat data.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables searching and retrieving documents, activities, and plenary protocols from the German Bundestag's DIP system via MCP tools.
      59 npm
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides programmatic access to official German Bundestag parliamentary data, enabling LLMs to answer questions about legislation, voting records, and members.
      1
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides live, source-linked transparency data on German MPs, including roll-call voting, side jobs, committee memberships, and election programs, via the Abgeordnetenwatch API. No API key required.
      AGPL 3.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Provides access to official 2022 French presidential election programs for five parties, retrieving exact passages with full references and without synthesis.
      Apache 2.0