lobbywatch-mcp
This MCP server lets AI models query Swiss federal parliamentarians' lobby connections, conflicts of interest, industry/commission affiliations, transparency scores, and lobby groups.
Look up a parliamentarian by fuzzy name or ID and retrieve full profile, commissions, and all interessenbindungen, with near-miss suggestions.
List and filter a parliamentarian's interessenbindungen by main occupation or active status.
Search parliamentarians by industry/organisation substring and optional commission filter.
Fetch a lobby group from the live dataIF API with connected organisations and parliamentarians.
Rank parliamentarians by number of interessenbindungen or hauptberuflich mandates, filtered by party or commission.
Get compensation-transparency distribution across all parliamentarians or a commission subset.
Refresh the weekly JSON dump and check dump cache status, age, and record count.
Click on "Deploy 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-mcp Which 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 β
Demo
Related MCP server: parlament-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).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
βββββββββββββββββββββββββββββββ
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 |
|
| Oldest cached dump that may answer when the refresh fails, 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.
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.
Era | Revision | Who reaches it |
|
| What today's clients speak. The server answers with the revision asked for, or with the |
Per-request envelope |
| A request carrying the |
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):
{
"mcpServers": {
"lobbywatch-mcp": {
"command": "uvx",
"args": [
"lobbywatch-mcp"
]
}
}
}Available Tools
8 toolslobbywatch_dump_statusARead-onlyIdempotent
Return current dump cache status without forcing a refresh.
Use cases: - "How fresh is the cached data right now?" - "When was the dump last loaded?"
Inputs: no named parameters. Returns: stale, loaded, source, cached_at, +3 more
lobbywatch_get_lobbygruppeARead-onlyIdempotent
Fetch a lobby group (interessengruppe) from the live Lobbywatch dataIF, including its connected organisations and parliamentarians.
Uses the live REST API since this endpoint returns fresh data.
Use cases: - "Look up 'economiesuisse' and list connected MPs" - "Who's affiliated with the lobby group #42?" - "Show me all parliamentarians linked to the pharma lobby"
Inputs: name_or_id (required). Returns: source, provenance, lobbygruppe
lobbywatch_get_parlamentarierARead-onlyIdempotent
Look up a Swiss federal parliamentarian and return their full profile, including all declared/researched interessenbindungen.
On a fuzzy miss, the response surfaces near-miss candidates so the LLM can prompt the user with "did you mean�" suggestions instead of treating the empty result as authoritative (audit ARCH-003).
Args: name_or_id: Either the numeric Lobbywatch ID (as string) or a name. Name matching is fuzzy β partial last names work.
Use cases: - "Show me Anna Mustermann's full lobbying profile" - "What conflicts of interest does parliamentarian #42 declare?" - "Look up Wehrli β give me everything you have"
Inputs: name_or_id (required). Returns: stale, source, provenance, suggestions, +1 more
lobbywatch_get_rankingARead-onlyIdempotent
Rank parliamentarians by a criterion.
Args: kriterium: One of "anzahl_interessenbindungen", "anzahl_hauptberuflich". kommission: Optional commission abbreviation filter (e.g. "WBK-N"). partei: Optional party filter (e.g. "SP", "SVP", "Mitte"). limit: Top-N to return (1β100).
Use cases: - "Top 10 SP MPs by total mandate count" - "Which Mitte-Fraktion members have the most full-time mandates?" - "Rank WBK-N by IB count β who's most involved?"
Inputs: limit, partei, kriterium, kommission. Returns: stale, source, eintraege, kriterium, +1 more
lobbywatch_get_transparenzquoteARead-onlyIdempotent
Aggregate the verguetungstransparenz_beurteilung values across all parliamentarians (or a commission subset) and return the distribution.
Useful to answer: 'How transparent is the education commission on compensation disclosure?'
Use cases: - "How transparent is the FK-N on compensation disclosure?" - "Distribution of transparency labels across the whole parliament" - "Compare WBK-N transparency vs the council average"
Inputs: kommission. Returns: scope, stale, total, source, +3 more
lobbywatch_list_interessenbindungenARead-onlyIdempotent
Return the list of interessenbindungen (conflicts of interest) for one parliamentarian, optionally restricted to full-time or currently-active mandates.
On a fuzzy miss, near-miss candidates are returned in
suggestions (audit ARCH-003).
Args: name_or_id: ID or name (fuzzy). nur_hauptberuflich: If True, only main-occupation mandates. nur_aktiv: If True, drop mandates with an end date (bis) set.
Use cases: - "Which active mandates does Jositsch hold today?" - "List Anna Mustermann's full-time mandates only" - "Give me every IB ever declared by parliamentarian #1"
Inputs: name_or_id (required), nur_aktiv, nur_hauptberuflich. Returns: count, stale, source, provenance, +3 more
lobbywatch_refresh_dumpAIdempotent
Force re-download of the weekly Lobbywatch dump. Returns the new cache status.
Reports progress via the MCP Context (audit SDK-003) so long-running downloads (~17 MB compressed) surface useful feedback to the calling LLM and operator.
Use cases: - "Force a fresh download β the data looks stale" - "I just heard about a new declaration β refresh and re-check"
Inputs: no named parameters. Returns: stale, loaded, source, cached_at, +3 more
lobbywatch_search_parlamentarier_nach_brancheARead-onlyIdempotent
Find parliamentarians with interessenbindungen matching a search term against the linked organisation's name, alias, and (when available) branche field. Optional commission filter.
Note: the Lobbywatch "essential" dump does not embed a branche taxonomy on each organisation β branche is referenced by id and resolved via the separate interessengruppe table. Version 0.1 therefore performs a substring match against organisation names and the branche field when present. Version 0.2 will add full cross-reference resolution.
Args:
branche_query: Substring match (case-insensitive) against
organisation.anzeige_name, organisation.name,
organisation.branche (where present), e.g. "Verlag",
"Pharma", "Bank", "Krankenkasse", "Bildung".
kommission: Commission abbreviation to restrict the result to,
e.g. "WBK-N" for the education commission of the National Council.
limit: Max number of {parlamentarier, ib} pairs returned (1β200).
Use cases: - "Which WBK-N members hold mandates in the publishing industry?" - "Cross-filter Pharma Γ FK-N to surface health-policy lobbyists" - "List every parliamentarian with a 'Krankenkasse' connection"
Inputs: branche_query (required), limit, kommission. Returns: count, query, stale, source, +2 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 8 tools
Most tools target clearly distinct actions (lookup, industry search, ranking, transparency, lobby group, cache ops). However, get_parlamentarier returns the full profile including interessenbindungen, which overlaps with list_interessenbindungen; the descriptions clarify that the latter adds filtering, so the boundary is workable but not perfectly sharp.
All tools share the lobbywatch_ prefix and use snake_case with a mostly verb_noun pattern (get_parlamentarier, list_interessenbindungen, get_ranking, refresh_dump). dump_status is a minor noun-only deviation but still fully consistent in style.
Eight tools is well-scoped for a domain-specific lobbying data server. Each tool earns its place, including the two cache-management tools that are justified by the dump-backed architecture.
The surface covers lookup, IB listing, industry/commission cross-filtering, rankings, transparency aggregates, lobby groups, and cache lifecycle. Minor gaps exist: no direct organisation or commission listing, and branche search is only a substring match pending v0.2, but core workflows are covered.
Maintenance
Related MCP Connectors
An MCP server that provides congressional transcripts
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Hosted MCP server for live public-data APIs and Skills for AI agents.
Related MCP Servers
- AlicenseAqualityBmaintenanceMCP server connecting AI models to Swiss Federal Food Safety and Veterinary Office open data, enabling queries about food recalls, animal disease surveillance, food control results, and more.1134 PyPIMIT
- AlicenseAqualityBmaintenanceAn MCP server connecting AI models to the Swiss Federal Parliament via the Curia Vista OData API, enabling queries of motions, votes, members, sessions, and debate transcripts without authentication.754 PyPI2MIT
- AlicenseBqualityDmaintenanceMCP server giving AI agents access to US political finance data: campaign contributions, PAC spending, lobbying records, and voting behavior.61MIT
- AlicenseAqualityBmaintenanceAn MCP server for Swiss Federal Railways (SBB) open data, enabling AI models to query real-time disruptions, passenger frequencies, station details, and more without an API key.926 PyPI2MIT