swiss-democracy-mcp
Provides access to historical votations and elections since 1900 with municipality-level detail using the SRGSSR Polis API (requires OAuth2 key).
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@swiss-democracy-mcpsearch for votes on climate change since 2020"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
swiss-democracy-mcp
Part of the Swiss Public Data MCP Portfolio — connecting AI models to Swiss institutional data sources.
An MCP server providing access to Swiss direct democracy data, covering all federal popular votes since 1848 and elections since 1900.
Demo Query
«Wie hat der Kanton Zürich bei der AHV 21 Initiative 2022 abgestimmt,
und welche Parteien unterstützten die Vorlage?»→ democracy_search_votes(keyword="AHV 21", year_from=2022)
→ democracy_get_cantonal_results(vote_number="551")
→ democracy_get_party_positions(vote_number="551")
→ More use cases by audience →
Data Sources
Source | Coverage | Auth |
Swissvotes (Uni Bern) | All federal votes since 1848 · 874 columns · party positions · cantonal results | None ✓ |
Real-time & archive (since 1981) · municipality level | None ✓ | |
Votes & elections since 1900 · municipality detail | OAuth2 key |
Tools
Phase 1 — Swissvotes (No Auth Required)
Tool | Description |
| Search all federal popular votes since 1848 by keyword, date range, legal form, outcome, policy domain |
| Full details for a specific vote: official title, parliamentary positions, national result, signatures |
| Party recommendations (FDP, SP, SVP, Die Mitte, GPS, GLP, …) with campaign finance data |
| Results for all 26 cantons: yes%, turnout, accepted flag |
| List all voting dates with number of proposals per date |
Phase 2 — BFS Real-Time (No Auth Required)
Tool | Description |
| List all BFS voting dates (archive + current) |
| Real-time or archived results at national, cantonal, or municipality level |
Phase 3 — SRGSSR Polis (API Key Required)
Tool | Description |
| Historical votations since 1900 with municipality-level data |
| Full Polis detail, optionally with all municipality results |
| National Council, Council of States, and cantonal elections since 1900 |
Installation
Claude Desktop (stdio)
Add to claude_desktop_config.json:
{
"mcpServers": {
"swiss-democracy": {
"command": "uvx",
"args": ["swiss-democracy-mcp"],
"env": {
"SRGSSR_CONSUMER_KEY": "your_key_here",
"SRGSSR_CONSUMER_SECRET": "your_secret_here"
}
}
}
}The
SRGSSR_*variables are optional. Without them, all Swissvotes and BFS tools remain fully functional. Only the Polis tools require credentials.
Cloud / Render.com (Streamable HTTP)
pip install swiss-democracy-mcp
MCP_TRANSPORT=streamable_http MCP_PORT=8000 python -m swiss_democracy_mcp.serverArchitecture
┌─────────────────────────────────────────────┐
│ Claude / LLM Host │
└──────────────┬──────────────────────────────┘
│ MCP (stdio / Streamable HTTP)
┌──────────────▼──────────────────────────────┐
│ swiss-democracy-mcp │
│ │
│ ┌─────────────────────────────────────┐ │
│ │ Swissvotes CSV Cache (24h TTL) │ │
│ │ All 874 columns, since 1848 │ │
│ └──────────────┬──────────────────────┘ │
│ │ │
│ ┌──────────────▼──────────────────────┐ │
│ │ BFS / opendata.swiss (no auth) │ │
│ │ Real-time & archive since 1981 │ │
│ └──────────────┬──────────────────────┘ │
│ │ │
│ ┌──────────────▼──────────────────────┐ │
│ │ SRGSSR Polis (OAuth2, optional) │ │
│ │ Votes & elections since 1900 │ │
│ └─────────────────────────────────────┘ │
└─────────────────────────────────────────────┘Transport: stdio for Claude Desktop · Streamable HTTP for cloud/Render.com
Auth pattern: No-Auth-First — Swissvotes & BFS work without any credentials
Cache: Swissvotes CSV is loaded once at startup and cached for 24 hours
Portfolio Synergy
Combine with other servers in the Swiss Public Data MCP portfolio:
zurich-opendata-mcp — add Zurich city-level statistics to vote analysis
swiss-statistics-mcp — enrich with BFS demographic data by canton
srgssr-mcp — link SRF news archive content to specific vote dates
Example multi-server query:
«Vergleiche die Abstimmungsresultate zur AHV-Reform mit der Altersstruktur der Kantone»
→ swiss-democracy-mcp + swiss-statistics-mcp
Safety & Limits
Read-only: All tools perform HTTP GET requests only — no data is written, modified, or deleted upstream.
No personal data: Swissvotes, BFS and SRGSSR Polis expose aggregate democratic data (vote results, party positions, cantonal/municipality tallies). No personally identifiable information (PII) is processed or stored by this server.
Rate limits: Swissvotes is a single CSV downloaded once per 24h and cached in memory. BFS / opendata.swiss and SRGSSR Polis are public APIs without documented rate limits — keep
limitand date ranges conservative. The server enforces a 30s timeout per request.Data freshness: Real-time BFS results reflect the upstream feed at query time (no local caching). Swissvotes is refreshed every 24h from the Uni Bern mirror.
Terms of service: Data is subject to the ToS of each source — swissvotes.ch (CC BY 4.0, Uni Bern), opendata.swiss (mostly CC-BY / Open by Default), SRGSSR Polis (free tier, non-commercial use only). Always cite the upstream source in downstream products.
No guarantees: This server is a community project, not affiliated with the University of Bern, the Federal Statistical Office, or SRG SSR. Availability depends on upstream APIs.
Known Limitations
Swissvotes coverage: Cantonal-level results are available since 1848; municipality-level results only via SRGSSR Polis (since ~1990s depending on the vote).
BFS archive: Real-time service covers federal votes since 1981 only.
Polis tools: Require free registration at developer.srgssr.ch. Non-commercial use only.
CSV cache: The Swissvotes dataset is ~several MB and is cached in memory for 24 hours. Memory footprint is accordingly higher than API-only servers.
Testing
# Unit tests (no network required)
PYTHONPATH=src pytest tests/ -m "not live" -v
# Live tests (require network access)
PYTHONPATH=src pytest tests/ -m "live" -vContributing
See CONTRIBUTING.md.
License
MIT — see LICENSE.
Data licenses:
Swissvotes: Creative Commons BY 4.0
BFS / opendata.swiss: Open use
SRGSSR Polis: Non-commercial use only — see developer.srgssr.ch
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/malkreide/swiss-democracy-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server