Ch Eli Mcp

io.github.matematicsolutions由 GitHub 账号 matematicsolutions 发布v0.3.3更新于 Oct 24, 2026

MCP server for Swiss federal legislation via Fedlex (native ELI), verifiable citations.

概览

AI 生成的概览

本地 MCP 服务器,让助手在 Fedlex 上检索瑞士联邦法规,并返回可核验的 ELI 引用与 SR 编号。

可以做什么
  • 以德、法、意、英四种语言对法规标题进行全文检索
  • 按 Fedlex ELI URI 获取单部法规的完整元数据
  • 说明覆盖范围:收录了哪些法规族、抓取时间,以及明确未覆盖的内容及对应替代方案
  • 在每次响应中附带原生 ELI URI、Fedlex 公开页面链接和含 SR 编号的可读引用
适用场景
适合需要识别瑞士联邦法规、其 SR 编号或官方 Fedlex 链接,或判断某个法律问题是否在该连接器覆盖范围内的场景。它不提供法律条文正文。
运行要求
以 Python 包形式在本地运行(pip install ch-eli-mcp 或 uvx),需要访问 Fedlex SPARQL 端点的网络连接。可选环境变量 CH_ELI_CACHE_DIR、CH_ELI_AUDIT_DIR 和 CH_ELI_BASE_URL 用于设置缓存、审计与端点地址。无需账号或 API 密钥。
安装前请注意
仅返回元数据而非法律正文,引用应通过所链接的 Fedlex 页面核对。在启用 Smart App Control 的 Windows 11 上,uvx.exe、pip.exe 等未签名启动器会被阻止;README 建议改用 python -m pip 安装,且不要关闭 Smart App Control。会在本地目录写入缓存与审计文件。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Ch Eli Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

ch-eli-mcp

MCP server for Swiss federal legislation via Fedlex, the Federal Chancellery's official publication platform. Fedlex is genuinely ELI-native (European Legislation Identifier) even though Switzerland is not an EU member. Multilingual: German, French, Italian, English.

What this is not

This connector returns metadata (title, SR number) via SPARQL - not the operative text of the law. source_url points to the public Fedlex page where the full text lives.

Tools

ToolPurpose
ch_search_actsFull-text search over act titles, in one of four languages
ch_get_actFull detail for one act by its Fedlex ELI URI
ch_coverageDeclare what this connector covers, when each family was captured, and - explicitly - what it does NOT cover. Every gap carries a fallback.

Every response carries lex_uri (the native ELI URI - not invented, taken directly from Fedlex), source_url (the public HTML page), and human_readable_citation (e.g. "Bundesverfassung der Schweizerischen Eidgenossenschaft (SR 101)" - the SR number is Switzerland's own Systematische Sammlung / Classified Compilation citation convention).

Install

bash
pip install ch-eli-mcp

Windows 11 with Smart App Control

Smart App Control blocks unsigned executables, which covers uvx.exe, pip.exe and the ch-eli-mcp.exe launcher that pip writes at install time. The python.exe and py.exe from the python.org installer are signed by the Python Software Foundation, so running the module through the interpreter works:

bash
python -m pip install ch-eli-mcppython -m ch_eli_mcp

pip.exe is blocked for the same reason, so install with python -m pip, not pip install. If python is not on PATH, use the Windows launcher: py -3 -m ch_eli_mcp.

json
{ "mcpServers": { "ch-eli-mcp": { "command": "python", "args": ["-m", "ch_eli_mcp"] } } }

Do not turn Smart App Control off to work around this - it cannot be re-enabled without reinstalling Windows.

Configuration

Env varDefault
CH_ELI_CACHE_DIR~/.matematic/cache/ch-eli
CH_ELI_AUDIT_DIR~/.matematic/audit
CH_ELI_BASE_URLhttps://fedlex.data.admin.ch/sparqlendpoint

License

Apache-2.0 (code). Fedlex content is official Swiss federal publication material (see SOURCES.md).

来源:README.md,提交 5f9eb4a

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.3.3最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分