register-mcp
Query Swiss commercial-register data and join it by company UID to official gazette publications for due diligence, vendor verification, and company research.
Search Swiss companies in Zefix by name, canton, legal form, active status, search type, and pagination.
Fetch full company profiles by EHRAID or UID, including status, legal form, registered office, purpose, SHAB publication history, and extract URL.
Quickly verify whether a company is active or dissolved, with confusion/similar-name warnings.
List Swiss legal forms and their IDs, and list municipalities while resolving a companyβs legalSeatId/BFS municipality.
Join Zefix companies to Amtsblattportal/SHAB/cantonal gazette publications by company UID, newest first, with optional rubric, sub-rubric, date, and limit filters.
Fetch a single gazette publication by ID, including official XML full text and HR company details where present.
Check reachability and cache ages for both Zefix and Amtsblattportal sources.
Return results as human-readable Markdown or machine-readable JSON.
Operate read-only and data-protection-scoped: gazette access is only UID- or publication-ID-based, with no person-name or free-text gazette search.
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., "@register-mcp verify Lehrmittelverlag ZΓΌrich AG in the commercial register"
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.
π¨π Part of the Swiss Public Data MCP Portfolio
register-mcp
MCP Server for the Swiss Federal Commercial Register (Zefix/Handelsregister), with a company-UID join to the official gazettes (SHAB + cantonal AmtsblΓ€tter)
Overview
register-mcp provides AI-native access to two Swiss federal data sources, joined on the UID, all without authentication:
Source | Data | API |
Zefix (Handelsregister) | Swiss companies, legal forms, registered-office data | ZefixREST v1 |
Amtsblattportal | Everything published about a specific company (by its UID): HR mutations, calls to creditors, bankruptcy | amtsblattportal.ch v1 |
The two sources share one key β the UID. The value is in the join: Zefix tells you whether a company exists; the gazette tells you what has been published about it.
The gazette access here is deliberately company-scoped only β keyed on a company UID or a specific publication id. There is no free-text / person-name gazette search in this server; that would be a profiling tool over the gazette's person-data rubrics (bankruptcy, debt-collection, inheritance). Broad Amtsblatt platform search (procurement, cantonal notices, full-text) is proposed as a separate amtsblatt-mcp β see docs/amtsblatt-mcp-proposal.md and the Data Protection & Scope section below.
Designed for Swiss public administration use cases: vendor verification, contract partner due diligence, and supplier onboarding β all via natural language queries.
Anchor demo query: "Before we sign a framework agreement with Lehrmittelverlag ZΓΌrich AG: is the company active in the commercial register, what is its UID and stated purpose β and, via that UID, what has the official gazette published about it (HR mutations, calls to creditors, any bankruptcy)?"
That single question walks the whole tool chain across both sources:
zefix_search_company β zefix_verify_company β gazette_company_publications(uid=β¦) β gazette_get_publication(id=β¦)Related MCP server: Zefix MCP
Features
ποΈ 9 tools across two sources β company search & verification (Zefix) + the company-scoped gazette join (SHAB/cantonal)
π
gazette_company_publicationsβ the UID join: everything published about a companyπ‘οΈ Data-protection-safe by construction β the only gazette entry points are UID- or id-scoped; no person-name search entry exists (see Data Protection & Scope)
π
zefix_verify_companyβ quick active/dissolved status checkπ Bilingual output (Markdown / JSON) with per-source attribution +
provenanceπ No API key required β open data from zefix.admin.ch and amtsblattportal.ch
βοΈ Transports β stdio (Claude Desktop) + Streamable HTTP at
/mcp(cloud, native MCP spec2026-07-28); SSE kept for existing deployments
Prerequisites
Python 3.11+
uv (recommended) or pip
Installation
# Clone the repository
git clone https://github.com/malkreide/register-mcp.git
cd register-mcp
# Install
pip install -e .
# or with uv:
uv pip install -e .Or with uvx (no permanent installation):
uvx register-mcpQuickstart
# stdio (for Claude Desktop)
python -m register_mcp.server
# Streamable HTTP (cloud deployment, endpoint /mcp) β MCP_API_KEY is REQUIRED
MCP_API_KEY=$(openssl rand -hex 32) MCP_TRANSPORT=streamable-http PORT=8000 \
python -m register_mcp.serverHTTP / Cloud Deployment
Two HTTP transports are available:
| Endpoint | Protocol revisions |
|
|
|
|
| handshake era only β kept so existing deployments keep working |
streamable-http runs stateless with JSON responses: no Mcp-Session-Id, no
session held in a single process, so a second instance needs no sticky
sessions.
β οΈ Upgrade note (0.7.0): the container image and
compose.yamlnow default tostreamable-http. Clients configured withβ¦/ssemust switch toβ¦/mcp, or the deployment setsMCP_TRANSPORT=sseexplicitly.
With either HTTP transport, the server enforces:
Bearer-token auth β set
MCP_API_KEYto a secret string. Clients must sendAuthorization: Bearer <key>on every request. Missing or wrong β HTTP 401. The server refuses to start withoutMCP_API_KEYset.Rate limiting β sliding window per bearer-token hash. Defaults: 60 req / 60 s. Tunable via
MCP_RATE_LIMITandMCP_RATE_WINDOW. Exceeding the limit returns HTTP 429 withRetry-After.Structured JSON logging β every tool call emits one line to stderr with
tool,status,latency_ms. Auth failures and rate-limit events are logged at WARNING level. Configure verbosity withLOG_LEVEL(defaultINFO).Reference-data cache β Zefix legal-forms are cached for 24h (
LEGAL_FORMS_TTLseconds) to avoid an extra upstream call per tool invocation.Egress allow-list β outbound HTTP is restricted to
www.zefix.admin.chandamtsblattportal.chvia anhttpxrequest hook that also fires on redirects. ALocationheader pointing elsewhere raisesEgressDeniedand is never followed. Override withMCP_ALLOWED_HOSTS=host1,host2(comma-separated, lower-case).β οΈ Upgrade note (0.2.x β 0.3.0):
amtsblattportal.chwas added to the default allow-list when the gazette tools shipped. If your deployment pinsMCP_ALLOWED_HOSTS, that value overrides the default entirely β addamtsblattportal.chto it, or everygazette_*call will raiseEgressDenied.Optional OpenTelemetry tracing β install with
pip install register-mcp[otel]and setOTEL_EXPORTER_OTLP_ENDPOINT(e.g.http://otel-collector:4318/v1/traces). Without the extra or without the env var the server stays silent β no hard dependency on the OTel SDK.
For multi-instance deployments, place a real gateway (Cloudflare, Railway internal networking, an API-Gateway with Redis-backed rate limiting) in front of the in-memory limiter, which is per-process by design.
Container deployment
A minimal multi-stage Dockerfile ships with the repo. The image runs as a
non-root mcp user; dependencies are resolved from uv.lock (uv sync --frozen), so the build is reproducible.
docker build -t register-mcp:local .
docker run --rm -p 8000:8000 \
-e MCP_API_KEY="$(openssl rand -hex 32)" \
register-mcp:local
# β Streamable HTTP on http://localhost:8000/mcpFor local iteration there is a compose.yaml with read_only, cap_drop: ALL
and no-new-privileges:
MCP_API_KEY=$(openssl rand -hex 32) docker compose up --buildSee SECURITY.md for hardening notes (egress restriction, key rotation, SIEM forwarding).
Try it immediately in Claude Desktop:
"Is Lehrmittelverlag ZΓΌrich AG active in the commercial register?" "Look up the company with UID CHE-108.954.978" "List all Swiss legal forms"
Configuration
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"register": {
"command": "python",
"args": ["-m", "register_mcp.server"]
}
}
}Or with uvx:
{
"mcpServers": {
"register": {
"command": "uvx",
"args": ["register-mcp"]
}
}
}Config file locations:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Cloud Deployment (Streamable HTTP for browser access)
For use via claude.ai in the browser (e.g. on managed workstations without local software):
Render.com (recommended):
Push/fork the repository to GitHub
On render.com: New Web Service β connect GitHub repo
Set start command
python -m register_mcp.serverand the environment variablesMCP_TRANSPORT=streamable-httpandMCP_API_KEY=<secret>(Render providesPORT)In claude.ai under Settings β MCP Servers, add:
https://your-app.onrender.com/mcp
π‘ "stdio for the developer laptop, Streamable HTTP for the browser."
Available Tools
Zefix β commercial register (6):
Tool | Description |
| Search companies by name, canton, legal form |
| Full company profile by internal EHRAID |
| Company lookup by UID (CHE-xxx.xxx.xxx) |
| Quick active/dissolved status check |
| All Swiss legal forms with IDs |
| Swiss municipalities with BFS IDs |
Amtsblattportal β the company-scoped gazette join (3):
Tool | Description |
| The UID join. All gazette publications for a company UID, newest first, optional (validated) rubric/time filters |
| Single publication incl. XML full text, defensively parsed (by publication id) |
| Reachability of both sources + cache ages (rubrics, legal forms) |
The prefix is gazette_, not shab_, because the source covers SHAB and the cantonal gazettes. Every entry point is UID- or id-scoped β see Data Protection & Scope. Broad, non-company gazette search (procurement, cantonal full-text) is scoped to the separate amtsblatt-mcp.
Example Use Cases
Query | Tool |
"Is Lehrmittelverlag ZΓΌrich AG active?" |
|
"Look up CHE-108.954.978" |
|
"Find companies named Migros in canton ZH" |
|
"What has been published about CHE-116.115.052?" |
|
"Show the full official text of that HR deletion notice" |
|
"Are both data sources reachable right now?" |
|
Architecture
ββββββββββββββββββββββββββββββββ
ββββββΆβ Zefix (Handelsregister) β
β β www.zefix.admin.ch β
βββββββββββββββββββ ββββββββββββββββββββββββββββ΄ββ β ZefixREST/api/v1 β
β Claude / AI ββββββΆβ register-mcp β ββββββββββββββββββββββββββββββββ
β (MCP Host) βββββββ (MCP Server) β ββββββββββββββββββββββββββββββββ
βββββββββββββββββββ β 9 Tools (zefix_ + gazette_) ββββΆβ Amtsblattportal β
β stdio | HTTP /mcp | SSE β β amtsblattportal.ch/api/v1 β
β Egress allow-list β β SHAB + cantonal gazettes β
β No authentication required β ββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββ
join key: UID (CHE-XXX.XXX.XXX)Data Source Characteristics
Source | Protocol | Coverage | Auth |
Zefix | REST/JSON | Swiss companies, legal forms, registered offices | None |
Amtsblattportal | REST/JSON (list) + XML (full text) | SHAB + cantonal gazettes, 2.79M publications | None |
ZefixPublicREST (planned) | REST/JSON | Signatories, capital, full history | Basic Auth (free) |
UID Register (planned) | SOAP | MwSt, NOGA codes, cross-validation | Public (20 req/min) |
The UID join β Zefix β Amtsblatt
The two sources share exactly one key: the UID (CHE-XXX.XXX.XXX). That is
what turns them from two data sets into one workflow.
zefix_get_company_by_uid(uid) # Zefix: does the company exist? status, purpose, legal form
β UID
βΌ
gazette_company_publications(uid) # Gazette: everything published about it (HR, KK, SB, LS, β¦)
β publication id
βΌ
gazette_get_publication(id) # Full official text from the per-rubric XMLTwo properties of the source shape this path (both verified in
docs/probe-shab.md):
The bulk list carries no company UID (
meta.uidisnull). The company UID lives only in the single-publication fetch βmeta.uidin the single JSON, or<uid>in the XML (which also carries the full text). So the join runs list β per-hit single fetch β match against the Zefix UID.gazette_company_publicationsfilters the corpus byuids=<UID>directly, so in practice you get the company's publications in one call without walking every record.
Procurement lives in the separate amtsblatt-mcp
Public procurement (Submissionen) is not a federal SHAB rubric and is not
covered by this server. It exists only as a cantonal OB-<canton> rubric,
only a few cantons publish it in this portal, and most β including ZΓΌrich β
route tenders through simap.ch, a separate platform.
Procurement, cantonal notices, and broad full-text search are scoped to the
proposed amtsblatt-mcp server, which applies
a fail-closed green-rubric allow-list. See that proposal for the full
OB-* coverage map and the rubric traffic-light table.
SBβ Submissionen.SBis Schuldbetreibungen (debt collection), a person-data-heavy rubric this server never exposes as a search entry.
Data Protection & Scope
This section is not a footnote β it is the reason the server is shaped the way it is.
The Amtsblattportal systematically publishes rubrics containing personal data of
natural persons: bankruptcies (KK), debt-collection (SB), calls to
creditors (LS/SR), inheritance/estate calls (ES, TE-*), and building
applications with owner names. Those publications are public β but making them
systematically queryable by name through an AI agent is a repurposing the
publication never intended, and under the revised Swiss Federal Act on Data
Protection (revDSG) a "show me every debt-collection entry for person X" tool
is a profiling instrument. Deliberate design choices follow:
No person-based search entry. No tool takes a natural person's name, birth date or address. The only gazette entry points are keyed on a company UID (
gazette_company_publications) or an opaque publication id (gazette_get_publication). A firm's own bankruptcy is returned via its UID β that is corporate data about a legal person, not name-based profiling.No free-text gazette search here.
keywordandcantonsare not even on the internal query-parameter allow-list, so no future code change can smuggle a corpus-wide keyword search in. Broad search lives inamtsblatt-mcpbehind a fail-closed green allow-list (procurement, HR, official notices only).No persistence of publication content. The server is a pass-through; only the rubric taxonomy and Zefix legal-forms list are cached in memory (24 h). Official publications carry statutory deletion periods β a store that outlived them would actively undermine those periods.
Fail closed. Rubric codes are validated against the live taxonomy before any call; an unknown code is refused, not silently widened.
The broad-platform counterpart, its green/yellow/red rubric classification and
its fail-closed design are specified in
docs/amtsblatt-mcp-proposal.md.
Architecture decision
ARCH A β live-API-only, consistent with the existing Zefix integration (decided 2026-07-18).
The Amtsblattportal is queried live on every call. All endpoints respond in
0.2β2.0 s, and the use case β targeted company and topic research β does not
need a local bulk copy. A bulk dump would mean mirroring 2.79M records, with an
ongoing sync burden and staleness risk, for no benefit to the join-on-UID
workflow. The taxonomy (/rubrics) and the Zefix legal-forms list are the only
data cached, each for 24h in memory, because they change at most a few times a
year and every filtered call needs them.
Phased Implementation
Phase | API | Auth | Status |
Phase 1 |
| None | Current |
Phase 2 |
| Basic Auth (free, email zefix@bj.admin.ch) | Planned |
Phase 3 | UID-Register SOAP | Public (20 req/min) | Planned |
Phase 2 will add: signatory details, share capital, full historical entries. Phase 3 will add: MwSt status, NOGA industry codes, cross-register validation.
Project Structure
register-mcp/
βββ src/register_mcp/
β βββ __init__.py # Package
β βββ server.py # 9 tools (Zefix + company-scoped gazette join)
βββ tests/
β βββ test_server.py # Zefix unit + integration tests (mocked HTTP)
β βββ test_gazette.py # Gazette tools + the three quirks (mocked HTTP)
β βββ test_egress.py # Egress allow-list
βββ docs/
β βββ probe-shab.md # Phase-1 live probe of amtsblattportal.ch
β βββ amtsblatt-mcp-proposal.md# Spec for the separate broad-platform server
β βββ demo/ # vhs demo script + standalone CLI demo
βββ .github/workflows/ci.yml # GitHub Actions (Python 3.11/3.12/3.13)
βββ pyproject.toml
βββ CHANGELOG.md
βββ CONTRIBUTING.md
βββ LICENSE
βββ README.md # This file (English)
βββ README.de.md # German versionKnown Limitations
Search by canton without a name filter may return API errors (Zefix API limitation)
Phase 1 Zefix API may be rate-limited under heavy load; retry after a short delay
ZefixPublicREST (new API) requires registration: email zefix@bj.admin.ch
Amtsblattportal β verified behaviour (live-checked 2026-07-18)
Call | HTTP | Status | Records | Note |
| 200 | OK | 2,790,323 | baseline (full corpus) β never queried unfiltered |
| 200 | OK | 4 | the join β core (and only) gazette entry |
| 200 | OK | β | optional, validated rubric narrowing on the join |
| 200 | OK | β | full text, rubric-specific schema |
| 200 | OK | β | taxonomy (for code validation) |
| 200 | Silent Empty | 0, | Quirk 2 |
| 200 | Silent Ignore | 2,790,323 | Quirk 1 |
Free-text (
keyword) and broadcantonssearch are not performed by this server β those probe results live indocs/probe-shab.mdand inform the separateamtsblatt-mcp.
Zefix β verified behaviour (live-checked 2026-08-15)
Found by the weekly live suite, not by the unit tests β which stayed green throughout.
Call to | HTTP | Result |
| 200 | 35 hits |
a name with no hits | 404 | NORESULT envelope β not an empty 200 |
| 400 | Bad Request β there is no |
| 200 | Β«CHEMAM - 999Β», UID CHE-113.593.998 |
a dissolved firm without | 404 | NORESULT β as if it never existed |
Three shapes, one shipped bug each:
No hits answer with HTTP 404, carrying the NORESULT envelope. Every call therefore goes through
_zefix_post_search; a rawraise_for_status()makes the friendly branch unreachable. That is howzefix_verify_companyshipped answering "Eintrag nicht gefunden. Bitte EHRAID oder UID prΓΌfen" to a name search, where neither an EHRAID nor a UID was in play. A fixture that puts the NORESULT body into a 200 makes exactly that dead branch look green.A hit list is not an answer. UID lookup searches the name field with
searchType: CONTAINS, soCHE-999.999.999returns a real company under a UID that is not its own. Defence: exact digit match or nothing β nofirms[0]fallback. The former fallback produced a complete, plausible, formatted record about somebody else, indistinguishable from a correct answer.Without
activeOnly: false, "dissolved" looks like "never existed". Zefix returns only active entries by default;zefix_verify_companysets the flag deliberately. A firm with no UID comes back as a string of blanks (uid: " ",uidFormatted: null), not asnull.
Three quirks are defended in code (details in the CHANGELOG under Known findings):
Quirk 1 β Silent Ignore (critical). Unknown query parameters are dropped silently and return the full 2.79M corpus with HTTP 200. Defence: query strings are built exclusively from an
ALLOWED_GAZETTE_PARAMSallow-list, and every filtered response is plausibility-checked β atotalabove 2,000,000 is rejected as "filter ignored by upstream β result not trustworthy".Quirk 2 β Silent Empty. An invalid rubric code returns HTTP 200 with an empty result. Defence: the
/rubricstaxonomy is cached 24h and every code is validated before any call, failing with the five closest valid codes.Quirk 3 β Two-step fetch. The JSON list carries only
meta; the content lives only in the per-rubric namespaced XML. Defence: namespace-agnostic defensive parsing (meta+publicationTextmandatory, HRcompanywhen present, everything else inadditional_fields).
Safety & Limits
Rate Limits
API | Limit | Notes |
ZefixREST (Phase 1) | Not officially documented | Throttling possible under heavy load β retry after 1β2 s |
ZefixPublicREST (Phase 2) | Not officially documented | Requires prior registration (free) |
UID-Register SOAP (Phase 3) | 20 req/min | Hard limit, publicly documented |
Data Privacy
Read-only access β all tools carry
readOnlyHint: True; the server performs no write, delete, or mutation operations against any APINo person-based search entry β no tool accepts a natural person's name, birth date or address; gazette access is UID- or publication-id-scoped only (see Data Protection & Scope). This is a deliberate revDSG-driven design choice, not an accident of the API
No persistence of publication content β the server is a stateless pass-through; only the rubric taxonomy and Zefix legal-forms list are cached in memory (24 h), never publication bodies, so statutory deletion periods are respected
Public register data only β the Zefix Handelsregister is a public federal register (HRegV); gazette data returned is likewise legally public, retrieved per company UID
No personal tracking β the server does not transmit user identity, query history, or session data to the upstream sources
Terms of Service & Data Sources
Zefix API ToS: Usage of the Zefix REST API is governed by the zefix.admin.ch terms of use. The data is published under the Open Government Data (OGD) Switzerland principles.
SHAB: Swiss Official Gazette of Commerce β published by the Federal Chancellery (BK). Public by law.
Institutional use: This server is designed for read-only queries in public administration workflows. Not suitable for mass harvesting or automated surveillance use cases.
Security
No credentials are stored or transmitted (Phase 1)
Phase 2 credentials (
ZEFIX_USER,ZEFIX_PASSWORD) are passed via environment variables only β never hardcodedAll HTTP calls use HTTPS exclusively
Tool inputs are validated via Pydantic v2 before any API call is made
Demo

π½οΈ Terminal GIF coming soon β see
docs/demo/to generate it locally with vhs
Example interaction:
User: "Is Lehrmittelverlag ZΓΌrich AG active in the commercial register?"
β Tool: zefix_verify_company(name="Lehrmittelverlag ZΓΌrich AG")
Claude: β
Lehrmittelverlag ZΓΌrich AG is ACTIVE in the Handelsregister.
UID: CHE-404.020.972 | Canton: ZH | Legal form: AG
Last SHAB mutation: 2023-07-27β More use cases by audience β
To generate the demo GIF locally:
# Install vhs (macOS/Linux)
brew install vhs # macOS
# or: go install github.com/charmbracelet/vhs@latest
# Generate
vhs docs/demo/demo.tape
# β outputs docs/demo/demo.gifMCP 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. tests/test_streamable_http.py
measures both on the wire: it sends server/discover, tools/list and
tools/call as 2026-07-28 requests and an initialize asking for a future
revision through the app main() serves, and reads the responses. The CI
docker job sends the same tools/list to the running image.
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.
Testing
# Unit tests (no API key required)
PYTHONPATH=src pytest tests/ -m "not live"
# Integration tests (live API calls)
pytest tests/ -m "live"
# Re-record the fixtures from the live sources (writes tests/fixtures/PROVENANCE.md)
python scripts/record_fixtures.pyThe unit-test payloads are recorded, not invented. Source, retrieval date,
selection rule, redaction and SHA-256 per file are in
tests/fixtures/PROVENANCE.md.
Two things are stated there rather than papered over. Personal data: the
gazette carries debt-collection notices and Zefix carries the full SHAB text
naming registered persons with their place of residence β the recorded payloads
keep the shape and redact those values, with the complete list of redacted
fields alongside. Zefix needs no credentials: until 2026-08-08 this
repository recorded no Zefix fixtures because the recording script measured
HTTP 401. The measurement was right about the wrong address β the script asked
ZefixPublicREST, while the server speaks to ZefixREST, which answers with no
authentication at all.
The live suite
ci.yml runs -m "not live": a foreign 503 must not redden a stranger's pull
request, because a suite that does gets switched off, and a switched-off suite
checks nothing. The exclusion has a safety net β
.github/workflows/live-tests.yml runs
weekly (cron: "31 5 * * 1") plus workflow_dispatch.
The verdict is read from the JUnit XML rather than the exit code, by
scripts/classify_live_run.py, because a live
run has three answers and not two:
State | Meaning | Issue |
| the suite ran and was green | closes an open one |
| the suite ran and something fell | opens or updates one |
| the suite did not run β failed install, timeout, renamed marker, everything skipped | left untouched |
tests - skipped == 0 is unknown, not clear: pytest exits 0 when every test
was skipped, and a job that books that as green closes an issue on a comparison
that never happened.
One caveat when editing that workflow: the pull-request checks do not cover
it β it has no push or pull_request trigger, so a green PR says nothing about
it. Verify changes with a manual workflow_dispatch run on the branch before
merging.
Changelog
See CHANGELOG.md
Contributing
See CONTRIBUTING.md
Security
See SECURITY.md (Deutsch) for the security posture and how to report a vulnerability.
License
MIT License β see LICENSE
Author
Hayal Oezkan Β· malkreide
Credits & Related Projects
Zefix: zefix.admin.ch β Swiss Federal Commercial Register (BJ/FOJ)
Amtsblattportal: amtsblattportal.ch β SHAB and cantonal gazettes (SECO / Swiss Confederation)
Protocol: Model Context Protocol β Anthropic / Linux Foundation
Related: fedlex-mcp β Commercial register ordinance (HRegV)
Related: zurich-opendata-mcp β Company seat + geodata
Related: swiss-statistics-mcp β Industry statistics by NOGA
Related: swiss-snb-mcp β Economic indicators
Portfolio: 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": {
"register-mcp": {
"command": "uvx",
"args": [
"register-mcp"
]
}
}
}Available Tools
9 toolsgazette_company_publicationsARead-onlyIdempotent
Alle Amtsblatt-Publikationen (SHAB + kantonal) zu einer Firmen-UID.
Das Kernfeature: der Join zwischen Handelsregister und Amtsblatt ΓΌber die UID. Zefix sagt, ob eine Firma existiert β das Amtsblatt sagt, was ΓΌber sie publiziert wurde (HR-Mutationen, Schuldenrufe, Konkurse, Schuldbetreibungen β¦). Der Einstieg ist ausschliesslich die Firmen-UID (juristische Person); ein Personen-Sucheinstieg existiert bewusst nicht (siehe README Β«Data Protection & ScopeΒ»).
Args: params (GazettePublicationsInput): - uid (str): UID CHE-XXX.XXX.XXX (Pflicht, Regex-validiert) - rubric / sub_rubric (Optional[str]): Rubrik-/Subrubrik-Filter - date_start / date_end (Optional[str]): Zeitraum YYYY-MM-DD - limit (int): 1β100 (Standard 50) - response_format (str): 'markdown' oder 'json'
Returns: str: Publikationen (neueste zuerst) mit Datum, Rubrik, Titel, ID.
Inputs: params (required). Returns: result
gazette_get_publicationARead-onlyIdempotent
Einzelne Publikation inkl. amtlichem Volltext (aus dem XML, defensiv geparst).
Quirk 3: Die Listen-API liefert nur meta β der eigentliche Inhalt steht nur im rubrikspezifischen XML unter /publications/{id}/xml. Pflichtfelder: meta, publicationText. Bei HR-Rubriken zusΓ€tzlich company. Alles Γbrige landet best-effort in additional_fields.
Args: params (GazettePublicationInput): - id (str): Publikations-ID - response_format (str): 'markdown' oder 'json'
Returns: str: Volltext + Firmenangaben (falls HR) + Zusatzfelder.
Inputs: params (required). Returns: result
gazette_source_statusARead-onlyIdempotent
Status beider Datenquellen (Zefix + Amtsblattportal) und Cache-Alter.
PrΓΌft die Erreichbarkeit beider Upstreams und meldet das Alter der In-Memory-Caches (Rubriken, Rechtsformen).
Args: params (GazetteStatusInput): - response_format (str): 'markdown' oder 'json'
Returns: str: Erreichbarkeit, Latenz und Cache-Alter je Quelle.
Inputs: params (required). Returns: result
zefix_get_companyARead-onlyIdempotent
Ruft vollstΓ€ndige Firmendetails aus dem Handelsregister ab (nach interner EHRAID).
Liefert: Name, UID, Rechtsform, Sitz, Status, Zweck (Gesellschaftszweck), SHAB-Publikationshistorie (letzte 5 EintrΓ€ge) und Link zum kantonalen Auszug.
Die EHRAID wird aus zefix_search_companies oder zefix_get_company_by_uid zurΓΌckgegeben.
Args: params (CompanyByEhraIdInput): - ehraid (int): Interne Zefix-Firmen-ID - response_format (str): 'markdown' oder 'json'
Returns: str: VollstΓ€ndiges Firmenprofil inkl. Zweck und SHAB-Publikationen.
Inputs: params (required). Returns: result
zefix_get_company_by_uidARead-onlyIdempotent
Findet eine Firma im Handelsregister anhand ihrer UID (Unternehmensidentifikationsnummer).
Die UID ist die eindeutige Schweizer Unternehmens-ID (CHE-xxx.xxx.xxx), identisch mit der MwSt-Nummer. Gibt vollstΓ€ndige Firmendetails zurΓΌck.
Args: params (CompanyByUidInput): - uid (str): UID im Format CHE-xxx.xxx.xxx oder CHExxxxxxxxxxx - response_format (str): 'markdown' oder 'json'
Returns: str: VollstΓ€ndiges Firmenprofil (Name, Rechtsform, Status, Zweck, SHAB-Publikationen). EnthΓ€lt EHRAID fΓΌr Folgeabfragen mit zefix_get_company.
Inputs: params (required). Returns: result
zefix_list_legal_formsARead-onlyIdempotent
Listet alle im Schweizer Handelsregister verwendeten Rechtsformen auf.
NΓΌtzlich zur Ermittlung der legalFormId-Werte fΓΌr die Filterung in zefix_search_companies. HΓ€ufige IDs: 1=Einzelunternehmen, 2=KlG, 3=AG, 4=GmbH, 5=KmG, 6=Genossenschaft, 7=Stiftung, 8=ΓΆffentlich-rechtliche KΓΆrperschaft, 9=Verein.
Args: params (LegalFormsInput): - language (str): Sprache ('de', 'fr', 'it', 'en'). Standard: 'de' - response_format (str): 'markdown' oder 'json'
Returns: str: Alle Rechtsformen mit ID, Name (in gewΓ€hlter Sprache) und Kurzform.
Inputs: params (required). Returns: result
zefix_list_municipalitiesARead-onlyIdempotent
Listet Schweizer Gemeinden auf und lΓΆst die legalSeatId einer Firma auf.
legalSeatId ist eine BFS-Nummer. Sie trifft die Spalte BFS-ID, nicht
die interne ID der Gemeinde. Die beiden sind bei keiner der 2112
Gemeinden gleich, und beide Wertebereiche ΓΌberlappen sich β wer ΓΌber die
falsche Spalte nachschlΓ€gt, bekommt keinen Fehler, sondern eine andere,
echte Schweizer Gemeinde: legalSeatId=261 ist ZΓΌrich, ΓΌber ID gelesen
aber Aarwangen (BE); 2701 ist Basel, ΓΌber ID gelesen Embd (VS).
Deshalb macht legal_seat_id die AuflΓΆsung selbst, statt sie dem Aufrufer
und einer Tabelle mit zwei Γ€hnlich aussehenden Zahlenspalten zu ΓΌberlassen.
Args:
params (MunicipalitiesInput):
- legal_seat_id (Optional[int]): legalSeatId einer Firma β genau eine Gemeinde.
- canton (Optional[str]): Kanton-Filter (z.B. 'ZH'). Ohne Filter: alle ~2'100 Gemeinden.
- response_format (str): 'markdown' oder 'json'
Returns: str: Gemeindeliste mit Name, Kanton, BFS-ID und Handelsregisterkreis-ID.
Inputs: params (required). Returns: result
zefix_search_companiesARead-onlyIdempotent
Sucht Unternehmen im Schweizer Handelsregister (Zefix) nach Name, Kanton und Rechtsform.
Gibt eine Liste von Firmen zurΓΌck mit Name, UID, Status, Rechtsform, Sitz und SHAB-Datum. Ideal fΓΌr LieferantenprΓΌfungen, Vertragspartner-Screenings und Beschaffungs-Due-Diligence.
Args: params (CompanySearchInput): Suchparameter: - name (Optional[str]): Firmenname (mind. 2 Zeichen) - canton (Optional[str]): Kanton (z.B. 'ZH') - legal_form_ids (Optional[list[int]]): Rechtsform-IDs - active_only (bool): Nur aktive EintrΓ€ge (Standard: True) - search_type (str): CONTAINS, STARTS_WITH, EXACT, ENDS_WITH - max_results (int): 1β50 (Standard: 10) - offset (int): Paginierung (Standard: 0) - language (str): 'de', 'fr', 'it', 'en' - response_format (str): 'markdown' oder 'json'
Returns: str: Gefundene Firmen mit Name, UID, Status, Rechtsform, Sitz, SHAB-Datum, Auszug-URL. EnthΓ€lt Paginierungsinfo (hasMoreResults, offset, total).
Inputs: params (required). Returns: result
zefix_verify_companyARead-onlyIdempotent
Schnell-Verifikation: Ist ein Unternehmen im Handelsregister eingetragen und aktiv?
Gibt eine klare Ja/Nein-Antwort plus Basisdetails zurΓΌck. Ideal als erster Check vor VertragsabschlΓΌssen, Beschaffungen oder Subventionsvergaben.
Stellt fest:
Ist die Firma im Handelsregister eingetragen?
Ist sie aktiv (EXISTIEREND) oder gelΓΆscht?
Welche Rechtsform hat sie?
Wo ist sie domiziliert?
Gibt es mehrere Γ€hnliche Firmen (Verwechslungsgefahr)?
Args: params (VerifyCompanyInput): - name (str): Firmenname (mind. 3 Zeichen) - canton (Optional[str]): KantonskΓΌrzel zur Eingrenzung
Returns: str: Verifizierungsergebnis mit Status, Rechtsform, Sitz und Warnungen.
Inputs: params (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 9 tools
Each tool addresses a distinct task: company search, company detail by internal ID, company detail by UID, verification, legal form/municipality lookups, gazette publications, publication full text, and source status. The two get_company variants are clearly differentiated by their lookup key, and the descriptions explain exactly when to use each.
The zefix_ tools consistently follow a verb_noun pattern, which is clear and predictable. The gazette_ tools are less uniform: gazette_get_publication uses a verb, while gazette_company_publications and gazette_source_status are noun-style names, but the shared namespace prefix keeps them recognizable.
With 9 tools, the server is well-scoped for its purpose: covering Swiss register lookups and gazette publications without unnecessary redundancy. Each tool earns its place in the workflow, from company discovery through verification to publication detail retrieval.
The set covers the full read-only lifecycle of a Swiss company lookup: search, verify, get by ID or UID, resolve legal forms and municipalities, then retrieve gazette publications and individual full texts. The intentional lack of a person-search entry point is documented and does not represent a gap for the stated corporate-register scope.
Maintenance
Related MCP Connectors
Search and verify Swiss companies, UID status and register changes with dated official sources.
Verified Swiss company profiles for AI agents: search, read and contact firms via allowed actions.
Swiss business verification with per-check source provenance and evidence freshness.
Company search and enrichment from official business registers in 200+ countries.
Related MCP Servers
- AlicenseAqualityDmaintenanceSearch and retrieve detailed information about Swiss companies from the official Zefix register, including company profiles, corporate structures, and SHAB publications.635 PyPIMIT
- AlicenseBqualityDmaintenanceEnables AI assistants to search the Swiss Central Business Name Index (Zefix) for companies by name or UID, with optional filters, and retrieve full company details including address, legal form, history, and representatives.115 npm5MIT
- AlicenseBqualityDmaintenanceAn MCP server for interacting with the Swiss Commercial Register via Zefix REST API and UID Webservice, enabling company search, validation, SOGC publications, and due diligence reports.95MIT

@aiwerk/mcp-server-swissofficial
AlicenseAqualityCmaintenanceEnables querying Swiss company data from official public sources: commercial register, UID register, and Swiss Official Gazette of Commerce, with per-company lookups and request budgets.65 npmMIT