
Lobbywatch Mcp
io.github.malkreidePublished by GitHub account malkreidev0.3.8Updated Oct 24, 2026
Lobbywatch.ch transparency data on parliamentarians, interests, access badges
Overview
Local MCP server exposing Lobbywatch.ch data on Swiss federal parliamentarians, their declared interests, lobby groups and transparency scores.
- What you can do
- Look up parliamentarians by name or ID with fuzzy matching and see full profiles plus all declared conflicts of interest, optionally filtered to main-occupation or active mandates only. Search parliamentarians by industry sector and commission, and fetch lobby groups with their connected members and organisations. Get top-N rankings by criterion, party or commission, and transparency-score distributions per commission. Manage the local weekly data dump with a refresh tool and a status tool.
- When to use it
- Useful when researching Swiss federal politics: conflicts of interest, lobby ties, industry mandates or compensation transparency of parliamentarians and commissions. Pairs well with official parliamentary records for questions about what a member did and who they are connected to.
- Requirements
- Python 3.11 or newer, run locally via uvx or pip; internet access to download the weekly Lobbywatch JSON export (about 17 MB zipped). No authentication or API keys. Optional environment variables control transport, host, port, cache directory and TTL, stale-cache age, timeouts, CORS origins, logging and OpenTelemetry.
Installation
In SourceWeft
- Open Lobbywatch Mcp in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
🏛️ lobbywatch-mcp
[CI] [PyPI version] [Python] [License: MIT] [Data: CC BY-SA 4.0] [Swiss Public Data MCP Portfolio]
An MCP server that connects AI models to Lobbywatch.ch, the largest lobby database of the Swiss Federal Parliament — conflicts of interest, lobby groups, access badges, and transparency scores.
Part of the Swiss Public Data MCP Portfolio — connecting AI models to Swiss public data sources.
🎯 Anchor Demo Query
"Welche Mitglieder der WBK-N haben Interessenbindungen zu Bildungsverlagen oder privaten Bildungsträgern, und wie ist ihre Transparenz-Bewertung?"
Which members of the National Council's Education Commission have declared conflicts of interest with educational publishers or private education providers, and how does their compensation transparency score compare?
→ More use cases by audience →
Demo
Overview
Lobbywatch.ch maintains the largest public database on Swiss federal parliamentarians and their connections to lobby organisations: 245 parliamentarians, ~7'800 interessenbindungen (declared mandates), 139 lobby groups, 368 access-badge holders, updated weekly, licensed CC BY-SA 4.0.
lobbywatch-mcp exposes this data to Large Language Models via the Model Context Protocol. It is designed to be used alongside parlament-mcp (the official Swiss Parliament's Curia Vista data): the pair makes it possible to ask what a parliamentarian did officially and who they are connected to — in a single conversation.
Features
- Dump-first, API-fallback architecture. The weekly JSON dump is the primary source (stable, verified in production); the live
dataIFREST API is used only where it returns reliable data (lobby groups, search). - Stale-cache fallback, never silent. If the dump cannot be refreshed, a cached copy up to 7 days old answers instead, and every dump-backed response then carries a
staleblock with its download time, age and the reason the refresh failed. The source is retried every 15 minutes;lobbywatch_refresh_dumpnever falls back. - Seven Phase 1 tools — parliamentarian lookup, conflict-of-interest listing, branche search, lobby group fetch, rankings, transparency quota, cache control.
- CC BY-SA 4.0 attribution baked into every response via Pydantic envelopes.
- Dual transport —
stdiofor Claude Desktop,streamable-http/ssefor cloud deployments. - Fuzzy name matching via rapidfuzz for natural LLM input like "Jositsch" or "Wehrli".
- No authentication required (Phase 1 — No-Auth-First).
Architecture
Outbound HTTP runs through a single httpx.AsyncClient with follow_redirects=False, an SSRF guard that blocks RFC1918 / link-local / metadata IPs, and an httpx event hook that re-resolves on every request. The dump path is the primary source of truth for parliamentarian queries; dataIF is only used for lobby group lookups and the search endpoint.
Prerequisites
- Python 3.11 or newer
- Internet access to download the weekly Lobbywatch JSON export (~17 MB zipped)
Installation
From PyPI (after first release):
From source:
Usage
Standalone
This starts the server in stdio mode. For HTTP:
Container
A hardened multi-stage Dockerfile ships with the repo (non-root,
read-only-rootfs compatible). See docs/deployment.md
and deploy/docker-compose.example.yml
for resource limits, sticky-LB guidance and egress hardening.
Claude Desktop
Add to your claude_desktop_config.json:
A full example is provided in claude_desktop_config.json.
Example Queries
Once connected, try prompts such as:
- "Give me the top 10 parliamentarians by number of interessenbindungen in the SP party."
- "Which WBK-N members have mandates in the publishing or education industry?"
- "Look up the lobby group 'economiesuisse' and list its connected parliamentarians."
- "What is the compensation-transparency score distribution for the finance commission (FK-N)?"
Tools
All tool names use the lobbywatch_ namespace prefix (since 0.2.0) to
avoid collisions with sibling portfolio servers.
Configuration
All behaviour is controlled via environment variables:
Project Structure
Data License & Attribution
The code is released under the MIT License.
The data served through this MCP is © Lobbywatch.ch and licensed under CC BY-SA 4.0. Every response envelope includes the attribution string. Downstream users must:
- Credit Lobbywatch.ch as the data source.
- Share derivative datasets under the same CC BY-SA 4.0 terms.
- Understand that Lobbywatch is a community-researched database — not an official register. It is authoritative for transparency research but should not be confused with the Federal Parliament's own declarations.
Known Limitations
- The upstream
/table/parlamentarier/...dataIFREST endpoint currently returns empty result sets. The server works around this by using the weekly JSON dump instead. zutrittsberechtigungen(access badges) are not populated in the "essential" dump variant used here. A future release will add a dedicated tool using the non-essential dump.
Contributing
See CONTRIBUTING.md.
Security
See SECURITY.md for the security posture, accepted-risk decisions, and how to report a vulnerability.
MCP Protocol Version
This server speaks two protocol eras over the same endpoint. The client's first request on a connection decides which one applies; a later claim from the other era is refused.
Both revisions are pinned in
tests/test_protocol_version.py and asserted
against the installed SDK, so a Dependabot bump of mcp cannot move either one
silently. The constants alone are the weaker form, so
tests/test_spec_2026_07_28.py measures both
eras through the assembled ASGI app: server/discover without a session, an
initialize asking for a future revision capped at 2025-11-25, and every
tool called over a 2026-07-28 connection with SDK deprecations raised as
errors.
Native to 2026-07-28. lobbywatch_refresh_dump reports its progress as
notifications/progress, which both eras deliver to any client that sends a
progressToken. It used to log via notifications/message; logging is
deprecated in 2026-07-28 (SEP-2577) and only delivered on requests that opt
in with a log level, so modern clients silently received nothing. serverInfo
now carries the package version — under 2026-07-28 it is stamped into the
_meta of every response.
Note that the SDK's LATEST_PROTOCOL_VERSION is an alias for the modern
era, not for the handshake era — pinning against it alone would leave the era
that current clients actually negotiate free to drift.
Update policy. When the gate fails, do not edit the constant blindly: read
the spec changelog between the two revisions, verify the server still behaves,
then move the constant, this section, README.de.md and
CHANGELOG.md together.
Changelog
See CHANGELOG.md.
License
MIT License — see LICENSE. Data CC BY-SA 4.0 — see NOTICE.md.
Author
malkreide · GitHub
Part of the Swiss Public Data MCP Portfolio.
Installation
Run via uv's uvx — no clone or manual install needed. Add to your MCP client config (mcpServers for Claude Desktop, Cursor and Windsurf; use a top-level servers key for VS Code in .vscode/mcp.json):
Source: README.md at commit 5219951
Tools
0Version history
3- v0.3.8LatestOct 14, 2026
- v0.3.7Sep 27, 2026
- v0.3.6Sep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts