The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Swiss Grounding listing page.
Answers about Switzerland, with the source.
An MCP server that grounds AI assistants in official federal, cantonal and municipal information,
in German, French, Italian, Romansh and English, and cites the responsible authority in every answer.
|
Scan to open it on your phone |
Running on Google Cloud Run in Zürich ( Live server: swiss-grounding-mcp-542630986415.europe-west6.run.app |
Add it to an assistant in one line, e.g. Claude Code (other clients):
It scales to zero when idle, so the first request after a pause starts an instance (about 2 s; hybrid search follows about 10 s later, keyword search answers meanwhile). It is rate-limited per client, refuses browser origins and is checked every 6 hours. The hosted instance runs the code in this repository, which also runs locally.
The example is sample question 3 of the challenge brief, answered by the live server.
Ask a general-purpose assistant about Switzerland and it may answer for the wrong canton, from an outdated page or from a neighbouring country. Swiss Grounding MCP gives it the responsible authority's own data instead:
ok | needs_context | not_covered | not_found | source_error |
|---|---|---|---|---|
| answers, with the source | asks one precise question back | says it is outside Switzerland or the scope | says nothing was found, never guesses | names the source that is down |
The declared scope: what the server answers, for which area, from which authority. Assistants can read
it too, with the swiss_coverage tool.
| Topic and tool | Geography | Source (authority) | Freshness |
|---|---|---|---|
Procedures, rules, fees, deadlines — permits & migration, moving & registration, taxes, social insurance (AHV/IV), unemployment, driving licences & vehicles, customs & parcels, schools, housing, voting, civil status…search_official_info read_official_page | Federal (ch.ch in de/fr/it/rm/en, federal offices, AHV/IV, arbeit.swiss), cantonal portals of 23 cantons (see limits below), city pages of Lucerne, Lugano, Winterthur, Biel/Bienne, St. Gallen, Bern, Geneva, Lausanne and Thun | Full-text index of 10,630 official pages / 46,952 passages, plus live reading of any official page | Index built 2026-09-25, refreshed weekly; read_official_page fetches live text |
Federal law — any act and article, current consolidated versionswiss_federal_law | Federal | Fedlex (Federal Chancellery) | Live; version in force today |
Mandatory health insurance premiums — cheapest offers per municipality, age, deductible, modelhealth_insurance_premiums | All 2,110 municipalities (premium regions) | FOPH premium open data (same data as priminfo.admin.ch) | 2026 premiums; 2027 added when FOPH publishes them (end of September) |
School and public holidaysswiss_holidays | All 26 cantons; municipality level where published (e.g. Scuol, Zürich) | OpenHolidays (aggregated official lists), EDK list, municipality website | 2025–2027 |
Waste collection dateswaste_collection | City of Zürich (by postcode), Basel/Riehen/Bettingen (by address), St. Gallen (by street); by collection zone: Winterthur, Uster, Wetzikon, Dübendorf, Horgen, Wädenswil, Adliswil, Thalwil and 12 more | Municipal open data (ERZ Zürich via OpenERZ, data.bs.ch, daten.stadt.sg.ch) | Live, next 120 days |
Public transport — connections and departure boardspublic_transport | All of Switzerland | Official timetable (opentransportdata.swiss via transport.opendata.ch) | Live |
Federal popular votes — upcoming subjects, results (national + canton)federal_votes | Federal | FSO vote-day open data, Federal Chancellery | Live |
Mortgage reference interest rate (rents) and SNB exchange ratesswiss_rates | Federal | BWO; Swiss National Bank | Live (cached 6 h) |
Company registration — UID, legal seat, commercial register and VAT statuscompany_register | All of Switzerland | Federal UID register (FSO) | Live |
Place facts — municipality, canton, BFS number, postcodes, population, official websiteswiss_place_info | All 2,110 municipalities, 26 cantons | BFS register & STATPOP, swisstopo, Wikidata (websites) | Population 2025; register 2026-09-25 |
Current weather measurementscurrent_weather | Nearest MeteoSwiss automatic station | MeteoSwiss open data | Live (10-minute values) |
read_official_page reports the block
honestly). VS (7 pages), TI (45) and TG (52) are only partly indexed.semantic extra it is hybrid and also finds
pages worded differently or written in another language, but still misses some
(measured); Romansh is not covered by the embedding model.With and without this server. The same 28 questions (the 5 published samples, 12 of our own and the organisers' 11 practice cases), asked to Claude Code with Sonnet three ways that differ only in their tools:
| Mode | 17 questions | Practice cases | Links to official Swiss authorities |
|---|---|---|---|
| With this server | 16/17 | 11/11 | 94% of 34 links |
| Web search, no server | 11/17 | 7/11 | 72% of 67 links |
| Model knowledge only | 6/17 | 3/11 | 1 link in 28 answers |
With the server, answers also take half the calls and half the time of web search (1.2 vs 2.4 calls, 14 vs 28 s per question). Web search often reaches the right figure, but mixes in comparison sites, news and tourism pages and rounds official figures; without any tools the model mostly declines or answers from dated knowledge.
Across the evaluation setup: 2 MCP clients × 2 LLMs, on the 5 published sample questions plus 11 of our own (de/fr/it/rm/en, including ask-back, out-of-scope and not-covered cases), run of 2026-09-25:
| Client + LLM | Published samples | All 16 questions | Avg tool calls |
|---|---|---|---|
| Claude Code + Sonnet | 5/5 | 15/16 | 1.0 |
| Claude Code + Haiku | 5/5 | 13/16 | 0.9 |
| OpenCode + gpt-5.4-mini | 5/5 | 15/16 | 1.4 |
| OpenCode + gpt-4.1-mini | 5/5 | 14/16 | 1.0 |
On the organisers' practice pack: Sonnet 11/11, Haiku 10/11. Hybrid search finds an official page on the topic for 25 of 38 labelled questions (keyword only: 19), and passes off no wrong page for the 5 questions that have none. Every miss is listed in docs/evaluation.md.
Requires uv (it installs Python 3.13). No API keys or credentials are needed for any source.
The prebuilt data (municipality register, health premiums, search index, passage vectors) ships in the
repository, built by the scripts in scripts/ and refreshed weekly
(how). The first start unpacks the index (~1 s) and downloads
the small embedding model once (~240 MB, in the background: searches use keywords until it is ready).
For a lighter install without hybrid search, drop --extra semantic from the commands and client configurations
(what changes).
Docker: the published image (~1.4 GB, hybrid search and its model included) runs as an unprivileged user and never downloads anything at runtime.
Or build it with docker build -t swiss-grounding-mcp .. When the port is reachable from outside a
trusted network, add -e SGM_AUTH_TOKEN=<secret> (HTTP security).
Without cloning (keyword search): uvx --from git+https://github.com/Gastaan/swiss-grounding-mcp swiss-grounding-mcp.
Any client that speaks MCP over stdio or Streamable HTTP works. Tested with Claude Code, OpenCode, the
MCP Inspector CLI and the FastMCP client, including the legacy initialize handshake (protocol
2025-06-18) and the stateless 2026-07-28 protocol. For the hosted server, add its /mcp URL as a
remote (HTTP) server. For a clone, use absolute paths and replace /path/to/swiss-grounding-mcp.
The server sends usage instructions to the client.
opencode.jsonclaude_desktop_config.jsonGive the full path to uv (e.g. from which uv):
.vscode/mcp.json.cursor/mcp.json[!TIP] Give the client a request timeout of 30 s or more. OpenCode waits only 5 s by default, while a slow official source can take longer; the server ends every tool call within
SGM_TOOL_TIMEOUT(30 s) with a cleansource_error, so a client timeout of 30 s lets that answer arrive.
Nothing needs configuring. Respecting robots.txt and terms of use is on by default and can be switched off:
| Variable | Default | Meaning |
|---|---|---|
SGM_RESPECT_ROBOTS | true | Respect robots.txt of every website fetched (RFC 9309), on every redirect hop. Set false to disable. |
SGM_RESPECT_TERMS | true | Respect the terms of use recorded in data/source_terms.json: hosts whose terms do not allow automated access are never fetched. Set false to disable. |
Cache, timeouts, offline mode, bearer token, rate limit, allowed origins and logging are described in docs/configuration.md.
Built for the Swisscom myAI challenge Swiss Grounding MCP at Swiss AI Weeks, Zurich 2026.