lobbywatch-mcp
The lobbywatch-mcp server connects AI models to Lobbywatch.ch, the largest database of Swiss federal parliamentarians' conflicts of interest, lobby connections, and transparency scores. Capabilities include:
Look up parliamentarian profiles: Retrieve a full profile by name (with fuzzy matching) or ID, including declared conflicts of interest (interessenbindungen), party, canton, commission memberships, and compensation transparency rating.
List conflicts of interest: Get a filtered list of a parliamentarian's mandates, optionally restricted to active or full-time (hauptberuflich) mandates. Returns near-miss suggestions if the name isn't found exactly.
Search by industry or commission: Find which parliamentarians hold mandates in a specific industry (e.g. "Pharma", "Bank", "Bildung"), optionally filtered by commission (e.g. "WBK-N").
Rank parliamentarians: Generate top-N rankings by total number of mandates or full-time mandates, filterable by party (e.g. "SP", "SVP") and/or commission.
Analyze transparency distribution: View the distribution of compensation transparency scores across all parliamentarians or a specific commission.
Fetch lobby group details: Look up a lobby group (interessengruppe) by name or ID, including its connected organisations and linked parliamentarians (e.g. "economiesuisse").
Manage data cache: Force a re-download of the weekly Lobbywatch JSON data dump, or check the current cache status (age, record count, last loaded timestamp).
Data is provided under a CC BY-SA 4.0 license. The server is designed to complement parlament-mcp for comprehensive insights into Swiss parliamentarians' official activities and lobby connections.
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., "@lobbywatch-mcpWhich Swiss MPs have conflicts with pharma companies?"
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.
ποΈ lobbywatch-mcp
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 β
Related MCP server: swiss-food-safety-mcp
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).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
βββββββββββββββββββββββββββββββ
LLM client β LobbywatchClient β
(Claude Desktop, β β
Inspector, β¦) β βββββββββββββββββββββ β
β β β Dump cache β β cms.lobbywatch.ch
β MCP β β (24 h TTL, β β ββββββββββββββββββββ
βΌ stdio / β β ~80 MB resident)βββββββΌββββββΊβ weekly JSON β
βββββββββββ HTTP β βββββββββββββββββββββ β β export (~17 MB) β
β FastMCP βββββββΊβ β ββββββββββββββββββββ
β server β β βββββββββββββββββββββ β ββββββββββββββββββββ
βββββββββββ β β dataIF REST βββββββΌββββββΊβ /interface/v1/ β
β β (live fallback) β β β json/β¦ β
β βββββββββββββββββββββ β ββββββββββββββββββββ
βββββββββββββββββββββββββββββββ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):
pip install lobbywatch-mcpFrom source:
git clone https://github.com/malkreide/lobbywatch-mcp.git
cd lobbywatch-mcp
pip install -e ".[dev]"Usage
Standalone
lobbywatch-mcpThis starts the server in stdio mode. For HTTP:
LOBBYWATCH_MCP_TRANSPORT=http LOBBYWATCH_MCP_PORT=8000 lobbywatch-mcpContainer
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.
docker build -t lobbywatch-mcp:0.2.0 .
docker run --rm -p 127.0.0.1:8000:8000 lobbywatch-mcp:0.2.0Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"lobbywatch": {
"command": "uvx",
"args": ["lobbywatch-mcp"]
}
}
}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.
Tool | Purpose | Source |
| Full profile + all conflicts of interest | Dump |
| Filtered mandate list | Dump |
| Cross-filter by industry and commission | Dump |
| Lobby group with connected MPs and organisations | Live dataIF |
| Top-N by criterion | Dump |
| Distribution of compensation transparency labels | Dump |
| Cache control | Dump |
Configuration
All behaviour is controlled via environment variables:
Variable | Default | Purpose |
|
| Transport ( |
|
| HTTP bind host (set to |
|
| HTTP bind port |
|
| Dump cache location |
|
| Cache time-to-live in seconds |
|
| HTTP timeout in seconds |
| (unset) | Comma-separated origin allow-list for HTTP/SSE; when set, exposes |
|
|
|
|
|
|
|
| Set to |
| (unset) | OTLP/HTTP collector endpoint (e.g. |
Project Structure
lobbywatch-mcp/
βββ src/lobbywatch_mcp/
β βββ __init__.py
β βββ __main__.py # CLI + transport selection
β βββ config.py # URLs, cache paths, attribution
β βββ client.py # Dump download + dataIF client
β βββ models.py # Pydantic v2 response envelopes
β βββ server.py # FastMCP tool registrations
βββ tests/
β βββ conftest.py # Fixture parliamentarians
β βββ test_client.py # Respx-mocked unit tests
β βββ test_server.py # Tool integration tests
β βββ test_live.py # @pytest.mark.live β excluded from CI
βββ .github/workflows/
β βββ ci.yml # Test matrix + ruff
β βββ publish.yml # PyPI OIDC Trusted Publisher
βββ claude_desktop_config.json
βββ pyproject.toml
βββ ...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.
Changelog
See CHANGELOG.md.
License
MIT License β see LICENSE. Data CC BY-SA 4.0 β see LICENSE Β§ Data notice.
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):
{
"mcpServers": {
"lobbywatch-mcp": {
"command": "uvx",
"args": [
"lobbywatch-mcp"
]
}
}
}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
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/lobbywatch-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server