Zefix MCP Server

Zefix MCP Server

An 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.

Category
访问服务器

README

<div align="center"> <img src="logo.png" alt="Schwaizer Logo" width="100"/> <h1>Schwaizer</h1> <h2>MCP Server: Zefix & UID Webservice</h2> <p> <strong>An unofficial MCP server for interacting with the Swiss Commercial Register.</strong> </p> <p> <em>This is a community project by Schwaizer and is not an official implementation by the Swiss government.</em> </p> </div>


About Schwaizer

SHAPING SWITZERLAND'S AI FUTURE Empowering Swiss businesses and society through responsible AI adoption. Founded in 2025, Schwaizer is a non-profit organization dedicated to accelerating the responsible adoption of artificial intelligence across Switzerland.

Website: https://www.schwaizer.ch


Zefix MCP Server

MCP (Model Context Protocol) server providing access to Swiss Company Registry data through Zefix REST API and UID Webservice.

Features

Dual API Integration

  • Zefix REST API: Fast company searches and SOGC (Official Gazette) tracking
  • UID Webservice: Rich company data including NOGA codes, VAT details, and commercial register information

Available Tools (9 tools)

Zefix API Tools

  1. zefix_search_companies - Search for Swiss companies using the Zefix API.
  2. zefix_get_company_by_uid - Get detailed company information from Zefix by UID, with optional UID Webservice enrichment.
  3. zefix_get_daily_registrations - Get all company registrations and publications from SOGC for a specific date.
  4. zefix_get_company_publications - Get all SOGC publications for a specific company by UID.

UID Webservice Tools

  1. uid_advanced_search - Advanced company search using the UID Webservice.
  2. uid_validate_uid - Validate a Swiss UID.
  3. uid_validate_vat_number - Validate a Swiss VAT number.
  4. uid_get_company_details - Get detailed company information using only the UID Webservice.

Combined API Tools

  1. generate_due_diligence_report - Generate a comprehensive due diligence report combining data from both Zefix and UID Webservice.

Installation

npm install

Configuration

Copy .env.example to .env and configure:

# Zefix REST API Credentials (required for Zefix tools)
# Note: Credentials must be requested from Federal Registry of Commerce
ZEFIX_USERNAME=your_username
ZEFIX_PASSWORD=your_password

# UID Webservice (no auth needed for Public Services)
UID_PUBLIC_URL=https://www.uid-wse.admin.ch/V5.0/PublicServices.svc?wsdl

# Optional settings
CACHE_ENABLED=true
CACHE_TTL=3600
LOG_LEVEL=info

Usage

Running the Server

npm start

Example Tool Calls

Search for companies (Zefix)

{
  "name": "zefix_search_companies",
  "arguments": {
    "name": "Migros",
    "canton": "ZH",
    "activeOnly": true
  }
}

Get company details (Zefix + UID)

{
  "name": "zefix_get_company_by_uid",
  "arguments": {
    "uid": "CHE-123.456.789",
    "enrichWithUidData": true
  }
}

Validate UID (UID Webservice)

{
  "name": "uid_validate_uid",
  "arguments": {
    "uid": "CHE-123.456.789"
  }
}

Generate due diligence report (Zefix + UID)

{
  "name": "generate_due_diligence_report",
  "arguments": {
    "uid": "CHE-123.456.789",
    "includePublications": true
  }
}

Get daily registrations (Zefix)

{
  "name": "zefix_get_daily_registrations",
  "arguments": {
    "date": "2025-11-15"
  }
}

API Documentation

Zefix REST API

  • Base URL: https://www.zefix.admin.ch/ZefixPublicREST/api/v1
  • Authentication: Basic Auth
  • SOGC publications:
    • Per-company publications are returned via GET /api/v1/company/uid/{uid} in the sogcPub[] field of the company payload (there is no GET /api/v1/sogc/uid/{uid} endpoint).
    • Daily publications are available via GET /api/v1/sogc/bydate/{date}.

UID Webservice

  • Public Services URL: https://www.uid-wse.admin.ch/V5.0/PublicServices.svc?wsdl
  • Protocol: SOAP
  • Authentication: None required for Public Services

Data Sources

  • Zefix: Federal Commercial Register (Handelsregister)
  • UID Register: Federal Business and Enterprise Register
  • SOGC/SHAB: Swiss Official Gazette of Commerce

Caching

The server implements intelligent caching:

  • Search results: 30 minutes
  • Company details: 1 hour
  • SOGC data: 6 hours
  • UID/VAT validation: 1-24 hours
  • Reference data: 24 hours

Error Handling

All tools include comprehensive error handling:

  • Input validation with Zod schemas
  • API error handling with retries
  • Graceful fallbacks when enrichment fails
  • Detailed error messages in responses

Development

Project Structure

zefix-mcp-server/
├── src/
│   ├── index.js              # MCP server entry point
│   ├── config.js             # Configuration
│   ├── api/
│   │   ├── zefix-client.js   # Zefix REST client
│   │   ├── uid-client.js     # UID SOAP client
│   │   └── schemas.js        # Validation schemas
│   ├── tools/
│   │   ├── company-search.js # Search tools
│   │   ├── validation.js     # Validation tools
│   │   ├── sogc.js          # SOGC tools
│   │   └── due-diligence.js # Due diligence tool
│   └── utils/
│       ├── logger.js         # Logging
│       ├── cache.js          # Caching
│       └── formatting.js     # Formatting utilities
├── .env                      # Environment variables
├── package.json
└── README.md

Running Tests

npm test

Linting

npm run lint

Scripts

Helper scripts (for local development and manual checks):

  • scripts/describe-wsdl.mjs — Inspect/describe UID Webservice WSDL structure
  • scripts/test-uid-search.mjs — Exercise UID search endpoints with sample queries
  • scripts/test-uid-search-variants.mjs — Try multiple UID search variants

Run examples:

node scripts/describe-wsdl.mjs
node scripts/test-uid-search.mjs "CHE-123.456.789"
node scripts/test-uid-search-variants.mjs "Migros"

License

MIT

Support

For issues with:

  • Zefix API: Contact Zefix support zefix@bj.admin.ch
  • UID Webservice: Contact uid@bfs.admin.ch
  • This MCP Server: Open an issue on GitHub

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选