Skip to main content
AllMCPs
BrowseBestCategoriesStackCompareToolsGuidesBlog Log in Submit MCP

Stay in the loop

Get new MCP servers and top picks in your inbox.

AllMCPs

The open directory for discovering and installing Model Context Protocol servers.

Explore

  • Browse servers
  • Best MCP servers
  • Categories
  • MCP clients
  • Agent prompts
  • Stack Builder
  • Compare servers
  • Tags index
  • Submit a server
  • Pricing

Learn

  • Guides hub
  • What is MCP?
  • Install guide
  • Troubleshooting
  • Security
  • Blog
  • Blog RSS

Tools

  • All tools
  • Config generator
  • Config validator
  • MCP playground
  • OpenAPI → MCP
  • Badge generator

For agents

  • API docs
  • Trust & traffic
  • llms.txt ↗ (opens in a new tab)
  • Catalog JSON ↗ (opens in a new tab)
  • Remote MCP ↗ (opens in a new tab)

Company

  • About
  • Contact
  • X (@AllMCPs) ↗ (opens in a new tab)
  • GitHub ↗ (opens in a new tab)
  • Terms
  • Privacy
AllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on BuildlistAllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on Buildlist
© 2026 Jackalope Digital LLC. All rights reserved.
  1. Home
  2. 💻 Developer Tools
  3. Fedlex Connector
F
Health: ActiveRecent health check succeeded.Last checked 8/10/2026, 11:13:11 PM

Fedlex Connector

Enrichment pendingWe haven’t run our AI enrichment pass on this listing yet, so the overview, use cases, and FAQ below may be sparse or missing. We work through the catalog over time — check back soon.
View Repository6 GitHub StarsTotal stargazers on GitHub for the source repository (6 stars).Visit Website

Search Swiss federal legislation: laws, articles, amendments via the Fedlex SPARQL endpoint.

Quick Install

Automated & IDE Setup

Copy the AI prompt to install this server into Claude Code, Cursor, or another agent — or use 1-click editor setup below.

Add to CursorAdd to VS Code
Manual Client & Custom JSON ConfigExpand JSON â–¾

Install Config Generator

Choose your client
claude_desktop_config.json
{
  "mcpServers": {
    "fedlex-connector": {
      "command": "npx",
      "args": [
        "-y",
        "https://www.fedlex.admin.ch"
      ]
    }
  }
}

💡 Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

Install Tool Schemas (4) Directory Badge Claim listing Alternatives💻 More in Developer Tools

Capabilities & Tool Schemas (4) ~109 tokensApproximate context cost of this server’s tool schemas (~4 chars/token), before any tool is called. Actual usage depends on your client and model.Self-reported Self-reportedParsed from the repository README, not verified against a live server — may be incomplete or out of date.

Inspect callable tools, capabilities, and parameters exposed to AI agents by Fedlex Connector.

search_by_title

Search Swiss federal legislation titles in the Classified Compilation (RS/SR). Returns only acts currently in force.

get_article

Retrieve the official consolidated text of a specific article.

get_law_text

Retrieve the full text of an act or a specific title/chapter. This is the primary tool for reading and analysing legislation from the source.

list_amendments

List recent amendments (consolidation versions) for a given act.

Documentation Overview

Fedlex Connector

Access Swiss Federal Law from Claude

A connector that gives Claude direct access to the official text of Swiss federal legislation on Fedlex, built on the Model Context Protocol (MCP). Covers all acts in the Classified Compilation (SR, RS) in German, French, and Italian.


Why This Exists

Swiss federal law is published exclusively on Fedlex, but the frontend is a JavaScript single-page application that Claude's built-in web tools cannot render. However, Fedlex exposes two machine-readable interfaces that work without JavaScript:

  • A SPARQL endpoint (fedlex.data.admin.ch/sparqlendpoint) for metadata queries
  • A static HTML filestore (fedlex.admin.ch/filestore/...) serving consolidated legislation

This MCP server bridges the gap: it queries SPARQL for metadata (RS numbers, consolidation dates, amendment history), fetches and parses the HTML for the actual legislative text, and returns it to Claude in a structured format. No proprietary database, no cache -- just a stateless bridge to Fedlex's open data infrastructure.


Setup

The server supports two transports: stdio for local use (Claude Code, Claude Desktop) and HTTP for remote use (claude.ai). You can use one or both.

The server is hosted at:

Code
https://mcp.fedlex-connector.ch

claude.ai / Claude Desktop:

  1. Go to claude.ai
  2. Click Customize (Anpassen / Personnaliser / Personalizza) in the sidebar
  3. Click Connectors
  4. Click + → Add connector
  5. Click Add custom connector and paste the URL: https://mcp.fedlex-connector.ch

We suggest naming it "Fedlex Connector".

Claude Code:

Terminal
claude mcp add --transport http fedlex https://mcp.fedlex-connector.ch

Once connected, Claude can answer questions like "What does art. 1 of the Swiss Civil Code say?" by pulling the text directly from Fedlex.

Deploying Your Own Instance

The server includes a Dockerfile for deploying to any cloud platform that supports Docker containers (Railway, Fly.io, Render, etc.). Set the PORT environment variable and the server runs in HTTP mode. Without PORT, it runs in stdio mode for local use.

Your MCP endpoint will be at https://your-domain. Verify with:

Terminal
curl https://your-domain/health

Tools

search_by_title

Search Swiss federal legislation titles in the Classified Compilation (RS/SR). Returns only acts currently in force.

ParameterTypeRequiredDescription
querystringYesKeywords to match against act titles
languagefr de itNoLanguage for results (default: de)

Example: Find the RS number for the data protection act.

Code
search_by_title(query="protection des données")
→ RS 235.1 — Loi fédérale sur la protection des données (LPD)

get_article

Retrieve the official consolidated text of a specific article.

ParameterTypeRequiredDescription
rs_numberstringYesRS number (e.g. "210" for CC, "220" for CO)
articlestringYesArticle number (e.g. "3", "28a", "260bis")
languagefr de itNoLanguage (default: de)
datestringNoConsolidation date (YYYY-MM-DD); defaults to latest

Example: Retrieve art. 1 CC in German.

Code
get_article(rs_number="210", article="1", language="de")
→ Art. 1: Das Gesetz findet auf alle Rechtsfragen Anwendung...

get_law_text

Retrieve the full text of an act or a specific title/chapter. This is the primary tool for reading and analysing legislation from the source.

ParameterTypeRequiredDescription
rs_numberstringYesRS number
sectionstringNoLimit to a title/chapter (e.g. "Titre huitième")
languagefr de itNoLanguage (default: de)
pagenumberNoPage for paginated results (default: 1)

Large acts are paginated automatically (splitting at article boundaries). Each response includes the total page count.

Example: Retrieve Swiss tenancy law (CO, Title 8).

Code
get_law_text(rs_number="220", section="Titre huitième", language="fr")
→ [Full text of tenancy provisions, art. 253 onwards]

list_amendments

List recent amendments (consolidation versions) for a given act.

ParameterTypeRequiredDescription
rs_numberstringYesRS number
sincestringNoStart date, YYYY-MM-DD (default: 1 year ago)
languagefr de itNoLanguage for titles (default: de)

Example: Check recent changes to the CO.

Code
list_amendments(rs_number="220", since="2024-01-01")
→ 2026-01-01 — Version in force from 2026-01-01 (current)
  2025-10-01 — Version in force from 2025-10-01 to 2025-12-31
  ...

How It Works

Code
Claude  ──MCP──>  Fedlex Connector  ──SPARQL──>  fedlex.data.admin.ch
                                      ──HTTP───>   fedlex.admin.ch/filestore/...

Metadata path (SPARQL): The server queries Fedlex's SPARQL endpoint (JOLux ontology) to resolve RS numbers to internal URIs, find the latest consolidation date, discover HTML file URLs, and list amendment history.

Text path (HTML filestore): Once the server knows which HTML file(s) to fetch, it retrieves them from the static filestore, parses the DOM with Cheerio, and extracts the requested article, section, or full text. Large acts (like the CO with 1,100+ articles) are split across multiple HTML files which the server discovers and stitches together automatically.

Data flow for a typical request:

  1. Claude calls get_article(rs_number="210", article="3")
  2. Server queries SPARQL: RS 210 → ConsolidationAbstract URI
  3. Server queries SPARQL: latest consolidation date for that URI
  4. Server queries SPARQL: HTML filestore URL(s) for that consolidation
  5. Server fetches HTML, parses it, extracts art. 3
  6. Server returns the article text to Claude with consolidation date and legal caveat

Every response includes a footer noting that only the Official Compilation (RO/AS) published by the Federal Chancellery is legally authoritative.


Development

Project Structure

Code
src/
  index.ts       # Entry point: picks stdio or HTTP transport based on PORT env var
  server.ts      # MCP server factory: tool definitions and request handlers
  types.ts       # TypeScript interfaces, error types, constants
  sparql.ts      # SPARQL endpoint queries (metadata, RS resolution, amendments)
  filestore.ts   # HTML fetching, parsing, article/section extraction, pagination
build/           # Compiled JavaScript (generated by tsc)
Dockerfile       # Container build for cloud deployment

Scripts

CommandDescription
npm run buildCompile TypeScript to ./build
npm startRun the MCP server (stdio mode)
npm run start:httpRun locally in HTTP mode on port 3000
npm run devWatch mode (auto-recompile on changes)

Dependencies

PackagePurpose
@modelcontextprotocol/sdkMCP server SDK (tool registration, stdio transport)
cheerioHTML parsing for extracting legislative text

Error Codes

The server returns structured errors with codes and actionable suggestions:

CodeMeaning
RS_NOT_FOUNDRS number not found in the SPARQL graph
ARTICLE_NOT_FOUNDArticle does not exist in the act (with nearby IDs listed)
SPARQL_UNAVAILABLESPARQL endpoint is down or returned an error
FILESTORE_ERRORHTML file not found or fetch failed
INVALID_INPUTMissing or malformed parameters
PARSE_ERRORHTML parsing failure

Known Limitations

  • Full act historical versions: get_law_text only retrieves full acts as they are currently in force and does not return past versions. For historical text, use get_article, which supports a date parameter.

  • HTML availability: Fedlex generally only provides HTML for consolidations from 2021 onwards. Older versions are only available as PDF or DOC on the Fedlex platform. The server returns a clear error with guidance when HTML is unavailable for a requested date.

  • Rate limiting: The SPARQL endpoint and filestore are public Swiss government services. The server limits itself to 10 requests/second per endpoint to be a responsible client.

  • Section filtering: The section parameter in get_law_text uses heading-text matching which works well for standard section names but may not match unusual headings. When filtering fails, the full act text is returned with a note.

  • Language coverage: Supports French (FR), German (DE), and Italian (IT). Romansch is not available.

  • Scope: Covers federal law in the Classified Compilation only. Cantonal law, the Federal Gazette, and court decisions are out of scope.


License

MIT

Related MCP Servers

View all in Developer Tools View all alternatives
  • Claude Task Master logoClaude Task Master

    AI-powered task management system for AI-driven development. Features PRD parsing, task expansion, multi-provider support (Claude, OpenAI, Gemini, Perplexity, xAI), and selective tool loading for optimized context usage.

    💻 Developer Tools7 views
    Compare vs Claude Task Master →
  • A
    Ai Netcafe

    Compare LLM cost & latency on one prompt, translate PDF keeping layout, cited research, make PPTX

    💻 Developer Tools0 views
    Compare vs Ai Netcafe →
  • Shadcn Ui Mcp Server logoShadcn Ui Mcp Server

    MCP server that gives AI assistants seamless access to shadcn/ui v4 components, blocks, demos, and metadata.

    💻 Developer Tools2 views
    Compare vs Shadcn Ui Mcp Server →
  • Globalping Mcp Server logoGlobalping Mcp Server

    The Globalping MCP server provides users and LLMs access to run network tools like ping, traceroute, mtr, HTTP and DNS resolve from thousands of locations around the world.

    💻 Developer Tools1 views
    Compare vs Globalping Mcp Server →

Frequently Asked Questions about Fedlex Connector

Add the following block to your claude_desktop_config.json under mcpServers: "mcpServers": { "fedlex-connector": { "command": "npx", "args": ["-y", "Fedlex Connector"] } }

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewFedlex Connector AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/fedlex-connector?style=directory)](https://allmcps.com/mcp/fedlex-connector)
HTML Embed
<a href="https://allmcps.com/mcp/fedlex-connector"><img src="https://allmcps.com/api/badge/fedlex-connector?style=directory" alt="Fedlex Connector on AllMCPs" /></a>

Technical Specs & Signals

Category💻Developer Tools
More technical detailsExpand â–¾
TransportSSE (Remote)
RuntimeNode.js
Views0
Unique ViewsTotal visits recorded for this listing page on AllMCPs.
Installs0
Installs & Copy ActionsTotal times users copied install commands or configuration snippets for this server.
GitHub stars6
GitHub Star CountTotal stargazers on GitHub representing community popularity (6 stars).
Last commit1mo ago
Last Repository CommitThe most recent commit or push recorded for this server's GitHub repository.Last commit on Jun 20, 2026
51Quality signal: Good · 51/100How this signal is calculated ▾
Server availabilityNot measured

Not scored for repo-hosted servers — we can't reach the running server, only its GitHub page. Hosted MCP endpoints are health-checked live.

Verified ownership10/20
Documentation & tools24/30
Adoption & activity4/15
Community engagement0/10

A guidance signal from public completeness & health data — not a user rating. New listings start lower and rise as they add docs, get verified, and grow adoption. Signals we can't observe for a listing are skipped, not counted against it.

★ Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge.

Free dofollow backlink: after claiming, verify your product site and place a dofollow AllMCPs badge — we recheck it stays live.

Claim & get free dofollow

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.

Explore more

More in 💻 Developer Tools →Best MCP servers for Developers →Alternatives to Fedlex Connector →Install in Claude DesktopInstall in CursorInstall in VS Code