mcp-eu-sparql
The mcp-eu-sparql server provides access to EU legislation, CJEU case law (via EUR-Lex/Cellar), and national data-protection authority decisions (via GDPRhub).
search_by_celex: Retrieve a specific EU legal act or CJEU judgment by its CELEX number (e.g.,32016R0679for GDPR), with the title returned in your chosen language (English, French, German, or Polish).search_by_date_range: Find EU legal acts published within a date range (YYYY-MM-DD), optionally filtered by document type —REG(Regulation),DIR(Directive),DEC(Decision),RECO(Recommendation),OPIN(Opinion). Returns up to 50 results.search_cjeu: Search CJEU judgments (JUDG) and orders (ORDER), with optional keyword, date range, and document type filters. Returns CELEX numbers, publication dates, titles, and EUR-Lex URLs.search_cjeu_by_ecli: Look up a specific CJEU case by its ECLI identifier (e.g.,ECLI:EU:C:2020:559for Schrems II).search_gdprhub: Full-text search across GDPRhub for national data-protection authority decisions and GDPR article commentaries.
All tools are read-only and return structured citation metadata including title, URL, CELEX/ECLI, publication date, document type, and snippet.
mcp-eu-sparql
Installation (one command)
Published on npm + the MCP Registry (io.github.matematicsolutions/mcp-eu-sparql). Run without cloning:
npx -y @matematicsolutions/mcp-eu-sparqlMCP client configuration (stdio):
{ "mcpServers": { "mcp-eu-sparql": { "command": "npx", "args": ["-y", "@matematicsolutions/mcp-eu-sparql"] } } }(Building from source - below.)
MCP server for EU law and CJEU case law via the Publications Office SPARQL endpoint (Cellar / EUR-Lex), plus national data-protection authority decisions via GDPRhub.
CJEU corpus in Cellar (SPARQL COUNT, 2026-07-08): 34,261 judgments (JUDG), 8,362 orders (ORDER), 14,480 Advocate-General opinions (OPIN_AG) - 57,103 judgments and opinions in total, each with CELEX + ECLI.
Related MCP server: cellar-wrapper
Tools
search_by_celex(celex, lang?)- act or judgment by CELEX number (e.g.32016R0679= GDPR,62018CJ0311= Schrems II).search_by_date_range(date_from, date_to, document_type?, lang?, limit?)acts within a date range, optionally narrowed to a type (REG / DIR / DEC / RECO / OPIN).
search_cjeu(query?, date_from?, date_to?, document_type?, lang?, limit?)- judgments (JUDG), orders (ORDER) and Advocate-General opinions (OPIN_AG) of the Court of Justice of the EU; optional keyword in the title (parties to the case, case number, keywords of the judgment).search_cjeu_by_ecli(ecli, lang?)- CJEU judgment by ECLI identifier (e.g.ECLI:EU:C:2020:559= Schrems II).search_gdprhub(query, limit?)- full-text search in GDPRhub (the noyb project wiki): decisions of national data-protection authorities across the EU + commentary on GDPR articles. Content license: CC BY-NC-SA 4.0 - flagged in thelicensefield of every citation.
Every response includes structuredContent.citations with the fields title, url,
celex?, ecli?, publication_date?, document_type?, snippet?, license? -
Patron reads this field and renders it in the UI panel as the "EU legal acts (EUR-Lex / CJEU)" section.
Stack
Node 18+
@modelcontextprotocol/sdkStdio transport (like
mcp-saos)Backend: HTTP POST to
https://publications.europa.eu/webapi/rdf/sparqlwithformat=application/sparql-results+json; GET tohttps://gdprhub.eu/api.php(MediaWiki API)
Build + run
npm install
npm run build
node dist/index.js # starts the server on stdioWiring into Patron
In patron/backend/mcp-servers.json:
[
{
"name": "saos",
"transport": "stdio",
"command": "node",
"args": ["C:/Users/<YOUR-USER>/mcp-saos/dist/index.js"]
},
{
"name": "eu-sparql",
"transport": "stdio",
"command": "node",
"args": ["C:/Users/<YOUR-USER>/mcp-eu-sparql/dist/index.js"]
}
]Tests
npm run drift # offline: INSTRUCTIONS consistent with TOOLS and ErrorCode
npm run test:offline # offline: query builders + parsers on fixtures (no network)
npm run smoke # live: all 5 tools against Cellar + GDPRhubLicense
MIT.
Part of the MateMatic legal stack
This server is one of five MCP connectors covering Polish jurisdiction + EU law, used by Patron (AGPL-3.0) and any other MCP-aware legal AI agent.
mcp-eu-sparql (this repo) - EU law + CJEU (EUR-Lex / Cellar)
mcp-saos - common courts, SN, TK, KIO
mcp-nsa - NSA + 16 WSA administrative courts
mcp-isap - Polish legislation (Dz.U. + M.P.)
mcp-krs - Polish company registry (KRS)
All five MCP servers share the same structuredContent.citations
contract: each tool returns an array of {title, url, snippet?, ...metadata}
that legal agents can render directly in their citation panel.
See matematicsolutions/.github for the full org profile.
Available Tools
3 toolssearch_by_celexARead-onlyIdempotent
Znajdz akt prawny UE po numerze CELEX. Numer CELEX jest unikalny i identyfikuje akt niezaleznie od jezyka. Przyklady: 32016R0679 (RODO), 31995L0046 (uchylony dyrektywa o ochronie danych), 62022CJ0252 (orzeczenie CJEU). Zwraca tytul w wybranym jezyku + EUR-Lex URL.
| Name | Required | Description | Default |
|---|---|---|---|
| celex | Yes | Numer CELEX, np. '32016R0679' (RODO). | |
| lang | No | ISO 639-3 jezyka tytulu (POL/ENG/FRA/DEU). Domyslnie POL. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate read-only, idempotent, non-destructive operation. Description adds that it returns title and URL, but no further behavioral details like error handling or performance. Adequate given annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Description is concise with three short sentences, each adding value: purpose, uniqueness, examples. No unnecessary words. Front-loaded with main action.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple lookup tool with comprehensive annotations and schema, the description covers purpose, parameters (via examples), return value (title + URL), and usage context. No gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so parameters are already described. Description adds CELEX examples and explains uniqueness, but does not significantly extend schema documentation. Baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the tool finds an EU legal act by CELEX number, with examples. It implicitly distinguishes from sibling tools (search_by_date_range, search_cjeu) by focusing on unique identifier lookup, but does not explicitly contrast them.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides examples and emphasizes uniqueness of CELEX, but does not specify when to use alternatives or what to do if CELEX is unknown. Implied usage but lacks explicit guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_by_date_rangeARead-onlyIdempotent
Znajdz akty prawne UE z zakresu dat (po dacie dokumentu). Opcjonalnie filtruj po typie (REG=rozporzadzenie, DIR=dyrektywa, DEC=decyzja, RECO=zalecenie, OPIN=opinia). Maks. 50 wynikow na zapytanie. Uzyteczne do przegladu aktow z konkretnego okresu legislacyjnego.
| Name | Required | Description | Default |
|---|---|---|---|
| date_from | Yes | Data od (YYYY-MM-DD). | |
| date_to | Yes | Data do (YYYY-MM-DD). | |
| document_type | No | Skrot typu aktu: REG, DIR, DEC, RECO, OPIN. Pomin zeby objac wszystkie. | |
| lang | No | ISO 639-3 jezyka tytulow. Domyslnie POL. | |
| limit | No | Maks. liczba wynikow (1-50). Domyslnie 20. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true, and openWorldHint=true. The description adds a useful behavioral constraint (max 50 results per query), which goes beyond annotations. It does not describe pagination or return format, but the annotations cover the core safety profile.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences, each adding value. Purpose is front-loaded, options and limits are stated concisely. No unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has 5 parameters, 2 required, and no output schema. The description mentions max results and date range filtering, which is adequate. It does not explain ordering or error handling, but for a search tool with good annotations, this is nearly complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
All 5 parameters are documented in the schema (100% coverage). The description adds minimal extra value: it expands the type abbreviations (e.g., REG=rozporzadzenie) and clarifies that omitting type covers all. The baseline of 3 is appropriate since schema descriptions are already complete.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool finds EU legal acts within a date range, with optional type filtering. This distinguishes it from sibling tools 'search_by_celex' (by CELEX number) and 'search_cjeu' (Court of Justice documents).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives a clear use case (reviewing acts from a specific legislative period) and mentions optional filters and a maximum result limit. However, it does not explicitly state when not to use this tool or directly compare with siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_cjeuARead-onlyIdempotent
Wyszukaj orzeczenia Trybunalu Sprawiedliwosci UE (CJEU) - wyroki (JUDG) i postanowienia (ORDER). Opcjonalnie zawez do zakresu dat. Zwraca CELEX (np. 62022CJ0252), date wydania, tytul (jezyk wg lang) i EUR-Lex URL.
| Name | Required | Description | Default |
|---|---|---|---|
| date_from | No | Data od (YYYY-MM-DD). Opcjonalna. | |
| date_to | No | Data do (YYYY-MM-DD). Opcjonalna. | |
| lang | No | ISO 639-3 jezyka tytulow. Domyslnie POL. | |
| limit | No | Maks. liczba wynikow (1-50). Domyslnie 20. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare read-only, idempotent, not destructive. Description adds that it returns specific fields, but does not disclose pagination, sorting, or filtering by type. Adequate but not rich.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, front-loaded with purpose, no wasted words. Highly concise and structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Describes return values (CELEX, date, title, URL) since no output schema. Covers all parameters with descriptions. Missing details on sorting or default behavior, but sufficient for basic use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema covers all parameters with descriptions (100% coverage). Description adds no extra meaning beyond what schema provides, so baseline 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool searches CJEU judgments and orders, with optional date filtering, and lists returned fields. It distinguishes from sibling tools by being a general search, though it does not explicitly differentiate.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Implies usage for general CJEU search with optional date range, but no guidance on when to use sibling tools (search_by_celex, search_by_date_range) or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v1.1.0- First observed
search_by_celex - First observed
search_by_date_range - First observed
search_cjeu
TDQS
Scored across 3 tools
Each tool targets a distinct search dimension: CELEX number, date range with type filter, and CJEU rulings. There is no overlap in functionality.
Two tools follow 'search_by_<criterion>' pattern, while the third uses 'search_cjeu', which is slightly inconsistent but still clear and predictable.
Three tools cover the core search needs for EU law (specific ID, date range, case law), though a keyword search tool could be added for completeness.
The set covers specific ID lookup, date-based filtering, and case law search, but lacks a general free-text keyword search, which is a notable gap for a legal research server.
Maintenance
Related MCP Connectors
Eurlex MCP client: Access EU law & Official Journal. https://www.lexsocket.ai/
Temporal search and comparison for official Luxembourg and reviewed EU law, with provenance.
Auditable MCP server for PubMed, Europe PMC, ClinicalTrials.gov, and bioRxiv/medRxiv queries
Search EU legislation, CJEU case law, and treaties; traverse CELLAR graph; browse EuroVoc concepts.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceMCP server covering French law via the PISTE platform: 62 tools wrapping the full Légifrance API (legislation, codes, Journal Officiel, jurisprudence…)3AGPL 3.0
- AlicenseNot gradedqualityDmaintenanceA community-maintained MCP server that simplifies access to EU legal and legislative data from the CELLAR service, supporting lookups, metadata retrieval, relation checks, and monitoring.1MIT

conformi-searchofficial
AlicenseAqualityAmaintenanceInstallable MCP server for EU legal research with verifiable CELEX citations from the EUR-Lex corpus (DE/EN/FR).21MIT- AlicenseAqualityAmaintenanceMCP server for querying French legislation and case law via the Legifrance API, enabling search and retrieval of laws, codes, and court decisions with verifiable citations.82Apache 2.0