Skip to main content

MCP Server for Swiss commercial register (Zefix/Handelsregister) and UID register

Project description

๐Ÿ‡จ๐Ÿ‡ญ Part of the Swiss Public Data MCP Portfolio

๐Ÿ›๏ธ register-mcp

Version License: MIT Python 3.11+ MCP No Auth Required CI

MCP Server for the Swiss Federal Commercial Register (Zefix/Handelsregister) and supporting reference data

๐Ÿ‡ฉ๐Ÿ‡ช Deutsche Version


Overview

register-mcp provides AI-native access to the Swiss Federal Commercial Register via the Zefix REST API, all without authentication:

Source Data API
Zefix (Handelsregister) Swiss companies, legal forms, SHAB mutations ZefixREST v1
SHAB Official Gazette of Commerce โ€” mutation publications Embedded in Zefix

Designed for Swiss public administration use cases: vendor verification, contract partner due diligence, procurement screening, and supplier onboarding โ€” all via natural language queries.

Anchor demo query: "We want to sign a framework agreement with Lehrmittelverlag Zรผrich AG. Is the company active in the commercial register, what is its stated corporate purpose, and have there been any SHAB mutations in the past two years?"


Features

  • ๐Ÿ›๏ธ 6 tools for company search, verification, and reference data
  • ๐Ÿ” zefix_verify_company โ€” quick active/dissolved status check
  • ๐ŸŒ Bilingual output (Markdown / JSON)
  • ๐Ÿ”“ No API key required โ€” open data from zefix.admin.ch
  • โ˜๏ธ Dual transport โ€” stdio (Claude Desktop) + SSE (cloud)

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-mcp

Quickstart

# stdio (for Claude Desktop)
python -m register_mcp.server

# SSE (cloud deployment)
MCP_TRANSPORT=sse PORT=8000 python -m register_mcp.server

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.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Cloud Deployment (SSE for browser access)

For use via claude.ai in the browser (e.g. on managed workstations without local software):

Render.com (recommended):

  1. Push/fork the repository to GitHub
  2. On render.com: New Web Service โ†’ connect GitHub repo
  3. Set start command: python -m register_mcp.server --http --port 8000
  4. In claude.ai under Settings โ†’ MCP Servers, add: https://your-app.onrender.com/sse

๐Ÿ’ก "stdio for the developer laptop, SSE for the browser."


Available Tools

Tool Description
zefix_search_companies Search companies by name, canton, legal form
zefix_get_company Full company profile by internal EHRAID
zefix_get_company_by_uid Company lookup by UID (CHE-xxx.xxx.xxx)
zefix_verify_company Quick active/dissolved status check
zefix_list_legal_forms All Swiss legal forms with IDs
zefix_list_municipalities Swiss municipalities with BFS IDs

Example Use Cases

Query Tool
"Is Lehrmittelverlag Zรผrich AG active?" zefix_verify_company
"Look up CHE-108.954.978" zefix_get_company_by_uid
"Find companies named Migros in canton ZH" zefix_search_companies
"List all Swiss legal forms" zefix_list_legal_forms
"Show municipalities in canton Bern" zefix_list_municipalities

Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Claude / AI   โ”‚โ”€โ”€โ”€โ”€โ–ถโ”‚       register-mcp            โ”‚โ”€โ”€โ”€โ”€โ–ถโ”‚  Zefix (Handelsregister)  โ”‚
โ”‚   (MCP Host)    โ”‚โ—€โ”€โ”€โ”€โ”€โ”‚       (MCP Server)            โ”‚โ—€โ”€โ”€โ”€โ”€โ”‚  ZefixREST/api/v1        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ”‚                              โ”‚     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                        โ”‚  6 Tools                     โ”‚
                        โ”‚  Stdio | SSE                 โ”‚
                        โ”‚  No authentication required  โ”‚
                        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Data Source Characteristics

Source Protocol Coverage Auth
Zefix (Phase 1) REST/JSON Swiss companies, legal forms, SHAB None
ZefixPublicREST (Phase 2) REST/JSON Signatories, capital, full history Basic Auth (free)
UID Register (Phase 3) SOAP MwSt, NOGA codes, cross-validation Public (20 req/min)

Phased Implementation

Phase API Auth Status
Phase 1 ZefixREST/api/v1 None Current
Phase 2 ZefixPublicREST/api/v1 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                # 6 tools (Zefix + reference data)
โ”œโ”€โ”€ tests/
โ”‚   โ””โ”€โ”€ test_server.py           # Unit + integration tests (mocked HTTP)
โ”œโ”€โ”€ .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 version

Known Limitations

  • Search by canton without a name filter may return API errors (Zefix API limitation)
  • SHAB publication message text contains XML-style markup (<FT TYPE="F">...)
  • Phase 1 API may be rate-limited under heavy load; retry after a short delay
  • ZefixPublicREST (new API) requires registration: email zefix@bj.admin.ch

Testing

# Unit tests (no API key required)
PYTHONPATH=src pytest tests/ -m "not live"

# Integration tests (live API calls)
pytest tests/ -m "live"

Changelog

See CHANGELOG.md


Contributing

See CONTRIBUTING.md


License

MIT License โ€” see LICENSE


Author

Hayal Oezkan ยท malkreide


Credits & Related Projects

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

register_mcp-0.1.0.tar.gz (20.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

register_mcp-0.1.0-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file register_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: register_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 20.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for register_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 83990d9fb59972a3bcc452be3e70c3c68207c20598d4ed886206229aeb530b0f
MD5 83e7447a66cc5922cd3f1907451be5b8
BLAKE2b-256 75a0bfddc4368305d0fe20c180aade9ef0141a41fc966a3da184343af302ebb5

See more details on using hashes here.

Provenance

The following attestation bundles were made for register_mcp-0.1.0.tar.gz:

Publisher: publish.yml on malkreide/register-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file register_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: register_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for register_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 286381ecf09d0a230b0e4cccb7a7244204a62a316381f774f93912be35854bbd
MD5 a294bd29c17410d97b35ddc0a715f1db
BLAKE2b-256 03b5f1615d84fa059233d3e44b4f464a062d90802ce9a448230910bc6cfcc5a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for register_mcp-0.1.0-py3-none-any.whl:

Publisher: publish.yml on malkreide/register-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page