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.

AllMCPs on GitHub (opens in a new tab)
Launched onTiny Startupstinystartups.com
Explore
  • Browse servers
  • Best MCP servers
  • Categories
  • MCP clients
  • Agent prompts
  • Stack Builder
  • Compare servers
  • Random discovery New
  • Submit a server
  • Pricing & Boost Boost
Learn
  • Guides hub
  • What is MCP?
  • Install guide
  • Build an MCP server
  • Deploy an MCP server
  • Security guide
  • Troubleshooting
  • MCP for SEO & AEO
  • Protocol versioning
  • Transports: stdio vs HTTP
  • State of MCP (stats)
  • Blog & updates
Tools
  • All developer tools
  • Config generator
  • Config validator
  • Config auditor
  • MCP playground
  • Token calculator
  • OpenAPI → MCP
  • Badge generator
For agents
  • REST API docs
  • Trust & traffic Live
  • Remote MCP server SSE ↗ (opens in a new tab)
  • llms.txt ↗ (opens in a new tab)
  • Catalog JSON ↗ (opens in a new tab)
Company
  • About
  • Advertise Sponsor
  • Contact
  • 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 BuildlistLaunched on Tiny StartupsFeatured on ShowMeBestAIFeatured on ShowMeBestAIFind us on LaunchZoneFind us on LaunchZoneAllMCPs 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 BuildlistLaunched on Tiny StartupsFeatured on ShowMeBestAIFeatured on ShowMeBestAIFind us on LaunchZoneFind us on LaunchZone
© 2026 Jackalope Digital LLC. All rights reserved.
  1. Home
  2. 💻 Developer Tools
  3. Fedlex Connector
Fedlex Connector logo
Health: ActiveRecent health check succeeded.Last checked 9/21/2026, 7:16:14 PM

Fedlex Connector

User RatingsBe the first to rate and review this MCP server! 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 â–¾

Client Config & Setup

Remote HTTP
Choose your client or environment
Target File:~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "fedlex-connector": {
      "url": "https://mcp.fedlex-connector.ch"
    }
  }
}

💡 Paste the JSON block into your client's configuration file under mcpServers, then restart the application.

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.

Read the full README →View source on GitHub →

Related MCP Servers

View all in Developer Tools View all alternatives
  • Andrea9293 MCP logoAndrea9293 MCP

    Local-first document management and semantic search for AI coding agents

    💻 Developer Tools2 views
    Compare vs Andrea9293 MCP →
  • Openapi MCP Server logoOpenapi MCP Server

    Connect any HTTP/REST API server using an Open API spec (v3)

    💻 Developer Tools3 views
    Compare vs Openapi MCP Server →
  • Next Devtools MCP logoNext Devtools MCP
    Verified

    Official Next.js MCP server for coding agents. Provides runtime diagnostics, route inspection, dev server logs, docs search, and upgrade guides. Requires Next.js 16+ dev server for full runtime features.

    💻 Developer Tools5 views
    Compare vs Next Devtools MCP →
  • MCP Server Docker logoMCP Server Docker

    Integrate with Docker to manage containers, images, volumes, and networks.

    💻 Developer Tools3 views
    Compare vs MCP Server Docker →

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars
6
Stargazers on the source repository.
Last commit
25d ago
Most recent push to the default branch.
Tools exposed
4
Callable tools this server registers over MCP.
Directory activity
1 views
Config copies, upvotes, and views on AllMCPs.

Reviews

No reviews yet — be the first to share how this listing worked for you.

Frequently Asked Questions about Fedlex Connector

Fedlex Connector is a hosted MCP server. Add it as a remote server in your client's config: "mcpServers": { "fedlex-connector": { "url": "https://mcp.fedlex-connector.ch" } }

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)
Last updatedAug 30, 2026
12/12 checks healthy over the last 45d
Views1
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 commit25d ago
Last Repository CommitThe most recent commit or push recorded for this server's GitHub repository.Last commit on Aug 30, 2026
52Quality signal: Good · 52/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 & activity5/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 unlock edit access and the Official badge — proof is checked automatically, then reviewed by our team.

Free dofollow backlink: add your website and place the AllMCPs badge on it — no claim needed. We detect it automatically and keep it verified as long as the badge 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 CodeSetup guides for all 13 MCP clients