mcp-server-zefix

mcp-server-zefix

Search and retrieve detailed information about Swiss companies from the official Zefix register, including company profiles, corporate structures, and SHAB publications.

Category
Visit Server

README

mcp-server-zefix

Look up any Swiss company directly from Claude.

PyPI License: MIT Tests

An MCP server that connects Claude to Zefix, Switzerland's official company register (Handelsregister). Zefix is operated by the Federal Office of Justice and provides authoritative data from all 26 cantonal commercial registers -- company details, legal forms, audit firms, corporate history, and official gazette publications.

What you can ask

  • "Search for Novartis on Zefix"
  • "Find all foundations in Basel"
  • "Who audits Novartis AG?"
  • "What companies has Novartis taken over?"
  • "Show me all branches of KIBAG Bauleistungen AG"
  • "Get the corporate structure for CHE-467.005.033"
  • "Show me the corporate history of Huber Baustoffe AG"
  • "What capital changes has cohaga AG had recently?"
  • "Find all GmbHs in Zurich"
  • "List all Swiss legal forms in German"

Quick Start

Hosted (no installation)

Connect directly -- no API key, no credentials, just the URL.

Claude.ai:

Settings > Customize > Connectors > Add custom connector:

  • URL: https://mcp-server-zefix.contextfor.ai/mcp

Claude Code:

claude mcp add --transport http zefix https://mcp-server-zefix.contextfor.ai/mcp

Local

claude mcp add zefix -- uvx mcp-server-zefix

Or add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "zefix": {
      "command": "uvx",
      "args": ["mcp-server-zefix"]
    }
  }
}

Tools

Tool Description
search_companies Search by name (wildcards supported), filter by canton and legal form
get_company_by_uid Full company profile: address, purpose, audit firm, takeover history, branch offices, previous names
get_company_by_chid Same as above, using the CH-ID identifier
get_company_structure Head office and all branch offices in a table with full addresses. Works from any branch UID.
get_company_publications SHAB timeline: board changes, capital changes, mergers, address changes, and more
list_legal_forms All Swiss legal forms (AG, GmbH, Stiftung, etc.) with IDs for filtering

All tools accept a language parameter (de, fr, it, en). Output labels use official Zefix terminology in the selected language.

What you get

A company lookup returns:

  • Identifiers -- name, UID, CH-ID, status, legal form
  • Location -- registered office, full address
  • Purpose -- the company's stated business purpose
  • Audit firm -- name and UID of the auditor
  • Corporate history -- companies absorbed, acquisitions, previous names
  • Corporate structure -- head office and all branch offices with addresses, displayed as a table
  • Branch offices -- all registered branch locations
  • SHAB publications -- timeline of legally significant events from the Swiss Official Gazette (board changes, capital changes, mergers, purpose changes)
  • Cantonal register link -- direct link to the full excerpt with board members and signatories

Configuration

Works with zero configuration using the public Zefix API. For the official authenticated API, set these environment variables:

Variable Default Description
ZEFIX_BASE_URL https://www.zefix.ch/ZefixREST/api/v1 API base URL
ZEFIX_USERNAME (none) Username for ZefixPublicREST API
ZEFIX_PASSWORD (none) Password for ZefixPublicREST API

To use the official API, request credentials from zefix@bj.admin.ch, then:

{
  "mcpServers": {
    "zefix": {
      "command": "uvx",
      "args": ["mcp-server-zefix"],
      "env": {
        "ZEFIX_BASE_URL": "https://www.zefix.admin.ch/ZefixPublicREST/api/v1",
        "ZEFIX_USERNAME": "your-username",
        "ZEFIX_PASSWORD": "your-password"
      }
    }
  }
}

Development

git clone https://github.com/johnphilipp/mcp-server-zefix.git
cd mcp-server-zefix
uv sync --all-extras

uv run ruff check .           # lint
uv run pytest tests/ -v       # test (68 tests, all use fakes, no network)
npx @modelcontextprotocol/inspector uv --directory . run mcp-server-zefix  # interactive

Architecture

Follows Architecture Patterns with Python (Percival & Gregory):

  • Domain models (models.py) -- frozen dataclasses (Company, LegalForm, ShabPublication), domain exceptions, no infrastructure imports
  • Port + adapter (zefix_client.py) -- AbstractZefixClient protocol; HttpZefixClient translates HTTP to domain objects and httpx exceptions to domain exceptions
  • Service layer (server.py) -- handle_* functions accept the abstract client, never import httpx
  • Localization (i18n.py) -- centralized label translations (de/fr/it/en) using official Zefix terminology
  • Fakes over mocks -- tests use FakeZefixClient, a working in-memory implementation; test files never import httpx

Self-hosting

The server supports remote deployment via Streamable HTTP transport. See Dockerfile, docker-compose.prod.yml, and Caddyfile for a Docker + Caddy setup with auto-HTTPS.

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured