Skip to main content

MCP server for the Swiss Parliament (Curia Vista OData API)

Project description

๐Ÿ›๏ธ parlament-mcp

CI PyPI version License: MIT Swiss Public Data MCP Portfolio

Part of the Swiss Public Data MCP Portfolio โ€“ connecting AI models to Swiss public data sources.

An MCP server that connects AI models to the Swiss Federal Parliament via the Curia Vista OData API (ws.parlament.ch). Access motions, interpellations, votes, members, sessions, and debate transcripts โ€“ with no API key required (Phase 1 โ€“ No-Auth-First).


๐ŸŽฏ Anchor Demo Query

"Welche Vorstรถsse zu KI in der Schule sind hรคngig?" โ†’ parlament_search_business(keyword="KI", keyword2="Schule", status="Eingereicht")

Perfect for the KI-Fachgruppe Stadtverwaltung Zรผrich: find pending motions on AI in education, digitisation initiatives, or any policy topic โ€“ instantly.


๐Ÿ”ง Tools

Tool Description
parlament_search_business Search Vorstรถsse by keyword, type, status, council, date
parlament_get_business Full details of a single business (texts, FC response)
parlament_search_members Find councillors by canton (e.g. ZH), party, council
parlament_get_votes Parliamentary votes with Ja/Nein meaning
parlament_get_sessions List recent sessions with IDs for follow-up queries
parlament_get_transcripts Debate excerpts by keyword or speaker (Amtliches Bulletin)

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚     MCP Host (Claude Desktop /   โ”‚
โ”‚     Claude API / IDE)            โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
              โ”‚ MCP Protocol (JSON-RPC 2.0)
              โ”‚ Transport: stdio (local) / SSE (cloud)
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚         parlament-mcp            โ”‚
โ”‚   FastMCP ยท Python ยท Pydantic v2 โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
              โ”‚ HTTPS / OData v3
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  ws.parlament.ch / odata.svc     โ”‚
โ”‚  Curia Vista โ€“ No Auth Required  โ”‚
โ”‚                                  โ”‚
โ”‚  Business ยท Vote ยท MemberCouncil โ”‚
โ”‚  Session ยท Transcript ยท ParlGroupโ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿš€ Installation

Claude Desktop (stdio)

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "parlament": {
      "command": "uvx",
      "args": ["parlament-mcp"]
    }
  }
}

Local development

git clone https://github.com/malkreide/parlament-mcp
cd parlament-mcp
pip install -e .
python -m parlament_mcp.server

Cloud / Railway (SSE)

MCP_TRANSPORT=sse PORT=8080 python -m parlament_mcp.server
# SSE endpoint: http://your-host:8080/sse

๐Ÿ”— Synergies

Partner Server Combination
fedlex-mcp Law text โ†” parliamentary debate that created it
zurich-opendata-mcp City policy โ†” cantonal/federal motions
swiss-statistics-mcp Data backing โ†” motions citing statistics

Power query example:

"Zeige mir alle Zรผrcher Motionen zu KI in der Bildung
 und verlinke die relevanten Bundesgesetze aus fedlex-mcp."

๐Ÿ“Š Data Source

  • API: ws.parlament.ch/odata.svc
  • Authentication: None (Phase 1 โ€“ No-Auth-First)
  • Protocol: OData v3 / JSON
  • Coverage: All parliamentary businesses since 1978; votes and transcripts
  • Update cycle: Real-time (official government data)

Known Limitations

  • OData substringof() filter is case-sensitive for some fields
  • Transcript text search can be slow for very broad queries (use limit to control)
  • Session names may be null in the API for very recent sessions โ€“ use session ID
  • Language filter is mandatory; currently only DE is fully tested (FR, IT available)

Contributing

See CONTRIBUTING.md.


License

MIT malkreide

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

parlament_mcp-0.1.0.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

parlament_mcp-0.1.0-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file parlament_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: parlament_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for parlament_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1a670637cfc1b9ba07950f57149276cf4148cc87b29d37bc6826cf48ee5defec
MD5 5dea4df307ad56b38f488d44b9240a4d
BLAKE2b-256 fa375998599fba160806863105538f2ecaebde88d205331c9b8ac8f406dc8441

See more details on using hashes here.

Provenance

The following attestation bundles were made for parlament_mcp-0.1.0.tar.gz:

Publisher: publish.yml on malkreide/parlament-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file parlament_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: parlament_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for parlament_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 303ba7aa154c499b5985e27874dcdb710168d2983e17ed049bbc621790fc1629
MD5 e9829b782c98f9acaf4f956039d96655
BLAKE2b-256 baecf05ef0069cf6e690b9520756c7e16b931d2b978b6b7d62709a1002e4a103

See more details on using hashes here.

Provenance

The following attestation bundles were made for parlament_mcp-0.1.0-py3-none-any.whl:

Publisher: publish.yml on malkreide/parlament-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page