DutyKit
EU business duties for AI agents: legal obligations with sources and pre-checks (DE, LU, EU)
Description from the maker (original English)
Canton Zurich legislation via ZH-Lex with full-text search and article extraction
These three are never merged into one score: opinions, measurements and popularity are different things.
We have not written a plain-language summary for this one yet. Below are the facts we read from the registry.
Pick the AI app you use, then copy the settings.
You need
Which app do you use?
Pick your app above. We remember it, so next time the button says “Install in …”.
Open Claude Desktop → Settings → Developer → Edit Config, and paste this into claude_desktop_config.json
{
"mcpServers": {
"openlex": {
"command": "uvx",
"args": [
"openlex-mcp"
]
}
}
}Run this in your terminal
claude mcp add openlex -- uvx openlex-mcpPaste into .cursor/mcp.json in your project, or ~/.cursor/mcp.json
{
"mcpServers": {
"openlex": {
"command": "uvx",
"args": [
"openlex-mcp"
]
}
}
}Your browser asks to open the app, then the app shows the settings and asks you to confirm. Key values are left empty for you to fill in.
Paste into .vscode/mcp.json in your project
{
"servers": {
"openlex": {
"type": "stdio",
"command": "uvx",
"args": [
"openlex-mcp"
]
}
}
}Your browser asks to open the app, then the app shows the settings and asks you to confirm. Key values are left empty for you to fill in.
This one runs on your computer, and ChatGPT can only connect to servers on the internet. Pick another app.
Your choice stays on this device in a cookie; no account needed.
These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.
Runs on your computer; the tool list appears in your AI app after you install it.
We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 7, 2026
The registry name was verified with the GitHub account malkreide, which owns the repo
We have not read this repo from GitHub yet
We have not read this repo from GitHub yet
This one runs on your computer; there is no internet endpoint
Runs on your computer and uses local settings instead
Runs on your computer; we can only read tool lists from internet endpoints
Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.
It passed 1 of 1 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.
The registry does not list a required key, though some servers ask you to sign in on first use.
It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).
The GitHub repo last changed –, and the latest version (0.3.0) reached the registry 41 days ago.
Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Python (uv) on your computer.
In the same category: DutyKit, Agent Data Tools: Company, compliance and checks, Agent Data Tools
Servers in the same category from other makers, sorted by stars.
Reading a card:★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi
EU business duties for AI agents: legal obligations with sources and pre-checks (DE, LU, EU)
38 tools: OFAC sanctions, counterparty checks, company, domain, email. 25 free calls.
641 agent tools: chain data, prices, sanctions, web, PDF. 25 free calls, then from $0.002.
Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.
🇨🇭 Part of the [Swiss Public Data MCP Portfolio](https://github.com/malkreide)
MCP Server for Canton Zurich legislation (ZH-Lex) — full-text search, article extraction, and education law tools for ~970 cantonal laws
🇩🇪 Deutsche Version
openlex-mcp provides AI-native access to the entire legal collection of Canton Zurich (Zürcher Gesetzessammlung). It combines full-text data from HuggingFace with live metadata from the official zh.ch website, storing everything in a local SQLite database with FTS5 full-text indexing for sub-50ms search performance.
| Source | Data | Access |
|---|---|---|
| HuggingFace | 974 ZH laws — full text (PDF extracts) | Cached locally as SQLite + FTS5 |
| zh.ch ZH-Lex | Current metadata, PDF links, validity status | Live HTTP requests |
Built for the Schulamt (school department) of the City of Zurich, but covers all areas of cantonal law — from tax law to building regulations.
Anchor demo query: *"What does the Volksschulgesetz say about parental involvement? Show me Art. 55 VSG and find all articles that mention 'Elternrat'."*
Current phase: Phase 1 — Read-Only. All tools are read-only (readOnlyHint: true); no writes to external systems. See ROADMAP.md for the phase plan and transition gates before any write or multi-agent capability is added.
# Clone the repository
git clone https://github.com/malkreide/openlex-mcp.git cd openlex-mcp
pip install -e .
uv pip install -e .
# stdio (for Claude Desktop)
python -m openlex_mcp.server
python -m openlex_mcp.server --http --port 8000
By default the HTTP transport binds to `127.0.0.1` (localhost only). The host and port are configurable via the MCP_HOST / MCP_PORT environment variables (or the --host / --port CLI flags, which take precedence).
Never bind to 0.0.0.0 outside a container — it exposes the server to your local network (NeighborJack risk). For containerized/cloud deployments set MCP_HOST=0.0.0.0 explicitly; when that happens outside a detected container the server logs a warning.
Try it immediately in Claude Desktop:
*"What is the Volksschulgesetz (VSG)?"*
*"Find all Zurich laws about data protection"*
*"Show me Art. 1 of the Volksschulgesetz"*
*"Which education laws mention 'Schulleitung'?"*
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": { "openlex": { "command": "python", "args": ["-m", "openlex_mcp.server"] } } }
Or with the installed entry point:
{
"mcpServers": { "openlex": { "command": "openlex-mcp" } } }
Config file locations:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsonFor use via claude.ai in the browser (e.g. on managed workstations without local software):
Render.com (recommended):
python -m openlex_mcp.server --http --port 8000MCP_HOST=0.0.0.0 so the container is reachable (the code default is 127.0.0.1; Render sets the RENDER env var, so no NeighborJack warning is logged)MCP_CORS_ORIGINS=https://claude.ai so the browser can read the Mcp-Session-Id header (comma-separated list; no wildcard — defaults to empty, i.e. no cross-origin access)https://your-app.onrender.com/sse💡 *"stdio for the developer laptop, SSE for the browser."*
| Tool | Description |
|---|---|
openlex__zhlaw_search_laws | Full-text search across all ~970 ZH laws (FTS5 + BM25 ranking) |
openlex__zhlaw_get_law | Retrieve a law by LS number (e.g. 412.100) or abbreviation (e.g. VSG) |
openlex__zhlaw_list_laws | List and filter laws by legal area prefix |
openlex__zhlaw_find_education_laws | Specialized search in education law (LS 412.x series) |
| Tool | Description |
|---|---|
openlex__zhlaw_get_article | Extract a specific article from a law (e.g. Art. 28 VSG) |
openlex__zhlaw_search_articles | Search within all articles of a specific law |
| Tool | Description |
|---|---|
openlex__zhlaw_get_law_metadata | Get live metadata from zh.ch (PDF links, validity status) |
openlex__zhlaw_update_cache | Refresh the local data cache from HuggingFace |
| Prefix | Legal Area | Example |
|---|---|---|
131 | Constitution and popular rights | Kantonsverfassung |
170 | Administrative procedure | Datenschutzgesetz |
331 | Tax law | Steuergesetz |
412 | Education and schools | Volksschulgesetz (VSG) |
700 | Spatial planning and building | Planungs- und Baugesetz |
810 | Health | Gesundheitsgesetz |
| Query | Tool |
|---|---|
| *"What is the Volksschulgesetz?"* | openlex__zhlaw_get_law |
| *"Find laws about data protection"* | openlex__zhlaw_search_laws |
| *"Show me Art. 55 VSG"* | openlex__zhlaw_get_article |
| *"Which education laws mention Schulleitung?"* | openlex__zhlaw_find_education_laws |
| *"Find all articles about Elternrat in the VSG"* | openlex__zhlaw_search_articles |
| *"Is LS 412.100 still in force?"* | openlex__zhlaw_get_law_metadata |
┌─────────────────┐ ┌──────────────────────────────┐ ┌──────────────────────────┐
│ Claude / AI │────▶│ OpenLex MCP │────▶│ HuggingFace │ │ (MCP Host) │◀────│ (MCP Server) │◀────│ rcds/swiss_legislation │ └─────────────────┘ │ │ │ (974 ZH laws, cached) │ │ 8 Tools │ ├──────────────────────────┤ │ SQLite + FTS5 Cache │────▶│ zh.ch ZH-Lex │ │ Stdio | HTTP │◀────│ (live metadata + PDFs) │ │ │ ├──────────────────────────┤ │ No authentication required │ │ LexFind.ch │ └──────────────────────────────┘ │ (links only) │ └──────────────────────────┘
| Source | Protocol | Coverage | Auth | License |
|---|---|---|---|---|
HuggingFace rcds/swiss_legislation | Datasets API | 974 ZH laws (full text) | None | CC-BY-SA 4.0 |
| zh.ch ZH-Lex | HTTP/HTML | Current metadata, PDFs | None | Public |
| LexFind.ch | HTTP | Cross-cantonal links | None | Public |
All 8 endpoints are exposed as Tools rather than MCP Resources. Rationale:
zhlex://laws/{sr_number}) are a future consideration for Phase 2 if clients benefit from resource-level caching or subscriptions.The constraint depends on the protocol era the client speaks:
_meta envelope; the server answers without issuing an Mcp-Session-Id and keeps no session between requests. Any replica can answer any request; no shared store, no sticky routing. (subscriptions/listen streams live on the replica that opened them — this server's lists are fixed at import, so there is nothing to fan out.)Before scaling handshake-era clients beyond one instance: either add a shared session store or configure your edge load balancer to route on the Mcp-Session-Id header with a stick-table and an appropriate TTL.
| Item | Value |
|---|---|
| Served via the `initialize` handshake | 2024-11-05 … `2025-11-25` — the handshake ceiling |
| Served via the per-request envelope | `2026-07-28` |
| Who picks | The client's first request, once per connection. A request carrying the 2026-07-28 _meta envelope opens a modern connection; anything else opens a handshake connection. |
| SDK | mcp[cli]>=2.0.0,<3 |
| Cache hints | tools/list, prompts/list, resources/list, resources/templates/list and server/discover: ttlMs 300000, cacheScope public |
| `serverInfo.version` | The package version (openlex_mcp.__version__), in every server/discover result |
| Deprecated in `2026-07-28`, not used | Logging (ctx.info/ctx.warning, SEP-2577) — status goes into the tool result, diagnostics into the server log |
| Pinned in | src/openlex_mcp/server.py — MCP_PROTOCOL_VERSION constant |
mcp is upgraded (via Dependabot PR), verify the protocol version in the SDK release notes.MCP_PROTOCOL_VERSION in server.py, regenerate docs/tool-hashes.json (PYTHONPATH=src python scripts/gen_tool_hashes.py --write), and note the change in CHANGELOG.md.pytest tests/ -m "not live" to confirm compatibility before merging.openlex-mcp/
├── src/openlex_mcp/ │ ├── init.py # Pa
Only the beginning is shown; read the rest in the repo