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.
Maintenance
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/matematicsolutions/mcp-eu-sparql'
If you have feedback or need assistance with the MCP directory API, please join our Discord server