@cyanheads/eur-lex-mcp-server
Provides access to European Union legal information, including searching and retrieving EU legislation, CJEU case law, and treaties, traversing amendment and citation relationships, and browsing EuroVoc subjects via EUR-Lex and CELLAR.
Public Hosted Server: https://eur-lex.caseyjhand.com/mcp
Overview
EU legislation, CJEU case law, and treaties from EUR-Lex. Search documents and case law, fetch full text, resolve citations, trace how acts amend and cite each other, and browse the EuroVoc subject thesaurus.
Tools
Tool | Description |
| Search EU legislation, treaties, international agreements, preparatory acts, and Commission communications, reports, and staff working documents by type, date, EuroVoc subject, author institution, and in-force status |
| Fetch metadata (including ELI, Official Journal reference, dates of effect, and the legislative procedures an act belongs to with their status) and full text (HTML, Markdown, or Formex4 XML) for an act or case by CELEX, ELI, or work URI, with a section outline of either |
| Resolve a CELEX number, ELI URI, ECLI, OJ citation ( |
| Search CJEU and General Court case law by case number, court, case type, member state, procedure type and outcome, subject, and date range |
| Traverse the CELLAR relationship graph — amendments, repeals, consolidations, legal basis and the works adopted under it, the proposal an act adopts, interpreting rulings (by article), citations, transpositions |
| Search the EuroVoc thesaurus to resolve terms to concept URIs for legislation searches (CJEU rulings carry no EuroVoc concept; search them by |
| Run a raw, read-only SPARQL SELECT against the CELLAR endpoint |
Resources
Resource | Description |
| Metadata snapshot for a CELLAR work |
| One-hop relationship summary for a CELLAR work |
All resource data is also reachable via tools.
Prompts
Prompt | Description |
| Frame a comparative EU/US legal analysis for a policy domain |
Skills
Skill | Description |
| For agents calling the tools: where each CELEX, ELI, ECLI, and case-number form comes from, the checks to run before concluding an act is in force, repealed, uninterpreted, or final, and a CELLAR SPARQL and CDM reference for |
The skill is in skills/. Plugin installs, the .mcpb bundle, the npm package, and the Docker image include it, and the server serves it to MCP clients through the Skills extension (skills/list, skill:// resources).
Related MCP server: eurlex-mcp-server
Capability reference
eurlex_search_documents tool
At least one filter:
keyword(English titles, plus CELEX numbers or fragments such as2016R0679; a keyword with letters and no digit, such asR(01), scans every CELEX and can take tens of seconds; no body search),document_type(REG,DIR,DEC,TREATYfor the Treaties with their annexed protocols and declarations,JUDG,OPIN_AG,PROP,REC,COMMUNIC,REPORT,SWD,AGREE),date_from/date_to,eurovoc_concept(fromeurlex_browse_subjects),author_institution, orin_force(true/false;falsecovers repealed, expired, and not-yet-in-force acts)Pages of up to 100 via
offset/limit(a largerlimitis served at 100 and reported inlimit_clamp), newest first; each row flagsis_consolidatedandis_corrigendum, and corrigenda and consolidated texts appear only underinclude_corrigendaandinclude_consolidated. Paging stops at row 10,000: the last page carries nonext_offsetand anoticegiving thedate_from/date_towindow that continues past itNo match returns an empty page with a
noticeon how to broaden the filters; foreurovoc_conceptwithdocument_typeJUDGorOPIN_AG, where CELLAR indexes no Court of Justice or General Court ruling by EuroVoc concept, thenoticeinstead points toeurlex_get_casessubject; typed errors:no_filters,invalid_date_range,invalid_author_institutionandinvalid_keyword(no letters or digits),offset_past_window(offset10,000 or more),request_too_large(the query is over CELLAR's 8,192-byte request limit: shortenkeyword, or give a partial CELEX that opens with type letters more of its number,R0679rather thanR0)author_institutionmatches English authority labels and national-court names returned byeurlex_get_document, such asEuropean ParliamentorSupremo Tribunal de Justiça, with or without date bounds
eurlex_get_document tool
Exactly one of
celex_number,eli_uri, orwork_uri(pasted forms such as aCELEX:prefix or EUR-Lex URL are accepted); body ashtml(default),markdown, orxml(Formex4) in any of the 24 EUR-Lex languages, falling back to English. Case law also carriesecli,formation,referring_court,subject_matter, andcase_reference, pluscountries,procedure_types,subjects, andprocedure_languageswhere CELLAR records them, aseurlex_get_casesrows carry them; a consolidated text reports its base act asbase_act_celexcontent_mode"paged"(default),"full", or"metadata_only", capped at 100,000 characters per call (a largerlimitis reported inlimit_clamp) withcontent_chars_total/has_moreto page on;outline: truelists headings with offsets, andselect(e.g.{ articles: "1,5,17" }) returns just those sections. For judgments and AG opinions the outline lists section headings, andselect: { operative_part: true }returns the ruling aloneis_supersededflags a newer consolidated version (current_consolidated_celex,consolidated_as_of), andresolve: "current_consolidated"serves it;in_force: falsecomes withrepealed_by,end_of_validity, orentry_into_forcewhere CELLAR records one. Acelex_numberno work holds but CELLAR holds one numbering convention away (a consolidated CELEX with no date or a date no version carries, a(nn)suffix missing or extra, a number not zero-padded to four digits, or to three for a Lisbon treaty article,12016E35for12016E035) failsnot_foundnaming each held CELEX in the message and indata.held_celex, or withresolve: "current_consolidated"serves the current version of the one act whose versions carry the number. Typed errors:invalid_identifier_args,not_found,content_challenge(a WAF bot-challenge in place of text),request_too_large(an identifier thousands of characters long)Citation facts, each absent when CELLAR records none:
eli(a consolidated text keeps its own point-in-time ELI);oj_reference, the Official Journal reference (OJ L 119, 4.5.2016, p. 1–88; no series letter before 1968, a class letter as inOJ L 42I,OJ L, 2024/1689, 12.7.2024for act-by-act publication), with pages from the English edition or, before 1973, the original-language editions, and the earliest issue for a reprinted act;dates_of_effect, every recorded date (not CELLAR's1001-01-01and1002-02-02for an unknown one, whichtransposition_deadlinesandend_of_validityomit too) as{ date, type?, provision? }withtypeone ofentry_into_force,application,partial_application,provisional_application,takes_effect,takes_partial_effect(an act applying in stages lists its general date of application asapplicationand each date covering only some provisions aspartial_application) andprovisionthe clause that sets the date, numbered as CELLAR records it (Article 113(a),Article 93.1); andtransposition_deadlinesfor a directive.entry_into_forcekeeps its meaning of an entry still ahead on a not-in-force act. CELLAR can lag an amending act that moves a date, so when an amending act changed an article setting a date indates_of_effect, anoticenames that act (CELEX) and the article and says to confirm the date incurrent_consolidated_celexor, for an amendment that version does not merge yet, in the amending act; the list itself is unchanged, and a read that finds no such act carries no notice. A consolidated text reports its base act'soj_reference,dates_of_effect, andtransposition_deadlinesprocedureslists the interinstitutional procedures an act belongs to, reached from a proposal or from the act a procedure adopted, each as{ reference, status?, withdrawal_date?, adopted_acts? }:referencein its cited form (2021/0106(COD), whicheurlex_lookup_celexresolves),statusone ofadopted,withdrawn,pending,not_adoptedfrom the flag CELLAR sets (absent when it sets none or several, so a missingadopted_byedge or status never means pending),withdrawal_dateon a procedure flagged withdrawn, andadopted_actsthe CELEX numbers it produced. A consolidated text reports its base act's; case law belongs to noneAvailable legacy HTML/Markdown bodies may carry
content_omissions: { tables }: missing-table markers counted across the full source, including outside the returned window. Paging cannot recover these tables.alternative_representationslists PDF streams advertised for the served work and language when discovery succeeds; XML availability remains independent. Metadata-only calls do not inspect source omissionsNational implementing measures carry sparse
national_measurecitation fields:journal,number,pages,publication_date, andnotification_date, including metadata-only calls. Numbers and pages retain their source spelling; publication, notification, and document dates are distinct, and each is omitted where CELLAR records its1001-01-01placeholder for an unknown date. When the body is unavailable, use the gazette citation to retrieve it; no national-portal URL is inferred, and notification does not prove complete transposition
eurlex_lookup_celex tool
A CELEX number, ELI URI, ECLI, or OJ citation naming its act type and year (
Regulation (EU) 2016/679,Directive 95/46/EC, optionally followed by its parenthesized OJ reference,Directive 95/46/EC (OJ L 281, 23.11.1995, p. 31), or by the period ending a sentence); pasted forms (aCELEX:prefix, a EUR-Lex page URL, an ELI with or without scheme or language segment) are normalized and echoed incelex_number. A citation without its act type (95/46/EC) or year (Regulation No 17) is not parsedAn Official Journal reference resolves to the act starting on the cited page: issue, publication date, and first page (
OJ L 281, 23.11.1995, p. 31, alsoof 23.11.1995, a page range, a class letter as inOJ L 42I,OJ C, and before 1968 the series-lessOJ 13, 21.2.1962, p. 204/62); the year-firstOJ 1995 L 281, p. 31,OJ 1995 L 281/31, and[1995] OJ L281/31; and act-by-actOJ L, 2024/1689, 12.7.2024andOJ C, C/2024/2664, 29.4.2024. The spellings EUR-Lex act texts and the Court use read the same:OJ No L 281,O.J. L 281, a spaced date (23. 11. 1995),pp. 1–88orp 31, andOJ L 2024/1689without its comma. A cited date must equal the issue's publication date. Pages are matched on the English edition, or on any language before 1973 when the issue has no English pages. A reference without its year or first page (OJ L 281,OJ L 119/1) is not parsed. Recognized only underautoA Commission document number resolves to the work carrying it:
COM(2021) 206 final, alsoCOM(2021)206,COM/2021/206,final/2for a later version, a two-digit year as 19YY (COM(90) 314 final), and SEC, SWD, and JOIN numbers (notC(…)decisions). An interinstitutional procedure reference resolves to the act that initiated it:2021/0106(COD),2021/106 (COD), or2021/0106/COD; one without its type is not read. Recognized only underautoA treaty-article citation resolves to that article in the current (2016) consolidated version of the TFEU, the TEU, or the Charter of Fundamental Rights:
Article 102 TFEUis12016E102,Article 4(3) TEUis12016M004, andArticle 47 of the Charteris12016P047. Accepted forms areArticle,Art., orArt, the abbreviation first (TFEU Article 102), paragraph designators dropped,oforof thebefore the treaty, the full treaty names, andCharter,CFR, orCFREU, in any case. Several articles (Articles 101 and 102 TFEU), text after the treaty, and pre-Lisbon numbering (Art 82 EC) are not parsed. An article the treaty lacks returnsfound: falsewith anoticenaming the CELEX and the treaty, after one query. Recognized only underautoidentifier_typeauto-detects the format or sets it;ambiguous_identifierfires when auto-detection can't classify the input (including an OJ reference without its year or first page). A case number (C-131/12) returnsfound: falsewith anoticepointing toeurlex_get_casesReturns work URI, confirmed CELEX number, resource type (every type of a work filed under several, such as
Corrigendum, Regulation), date, English title, and the case's ECLI;found: falsewith anoticefor a well-formed identifier that matches no work, for an OJ reference whose date or page matches nothing, for one whose first page starts several acts, for a document number held in several parts or a procedure with several initiating acts (thenoticenames each CELEX), for a procedure with no initiating act (thenoticenames each act it produced, if any), and for a CELEX one numbering convention away from one CELLAR holds, such as a consolidated CELEX with no date, a(nn)suffix missing or extra, or a number not zero-padded to four digits, or to three for a Lisbon treaty article (12016E35for12016E035; thenoticenames each held CELEX)
eurlex_get_cases tool
Filters:
case_number(C-131/12,T-22/20,F-12/05, or a pre-198926/62; reaches every judgment, order, and AG opinion filed under it),court(CJEUorGC),case_type(judgment,order,ag_opinion),keyword(English titles, plus CELEX numbers or fragments such as2013CJ0131), anddate_from/date_to; primary records only unlessinclude_derivativeadds notices, abstracts, summaries, and corrigenda; a case number searched alone or with its owncourtthat has no primary record (pending, or closed by an order published only as a notice) returns its notices instead, with a noticeCase-law facts CELLAR records:
member_state(alpha-3 or two-letter code, any case; the referring court's state on a preliminary reference, the defendant on an infringement action, the applicant's state on a direct action),procedure_type(preliminary_ruling,annulment,staff_case,appeal,failure_to_fulfil_obligations,damages,interim_measures,appeal_against_penalty,failure_to_act,arbitration_clause),outcome(successful,unfounded,inadmissible,decision_unnecessary; withprocedure_type, on the same procedure), andsubject(a phrase matched against the English labels of CELLAR's case-law subject classification, every word required:"trade mark"reaches "Trade marks";query_echo.subject_labelsnames the subjects matched)Pages of up to 100 via
offset/limit(a largerlimitis served at 100 and reported inlimit_clamp), newest first; each case carries its ECLI where recorded,countries,procedure_types,subjects, andprocedure_languageswhere CELLAR records them, plusformation,advocate_general,display_title,parties,referring_court,subject_matter, andcase_reference, and the rawtitleonly when those fields miss part of it. Paging stops at row 10,000: the last page carries nonext_offsetand anoticegiving thedate_from/date_towindow that continues past itNo match returns an empty page with a
noticeon how to broaden the filters, as does asubjectmatching no label (then no case is searched); typed errors:invalid_case_number,invalid_date_range,invalid_keywordandinvalid_subject(no letters or digits),offset_past_window(offset10,000 or more),request_too_large(the query is over CELLAR's 8,192-byte request limit: shortenkeywordorcase_number, or give a partial CELEX that opens with type letters more of its number,C0131rather thanC0)case_type: "ag_opinion"includes Advocate General opinions (OPIN_AG) and views (VIEW_AG);resource_typedistinguishesAG OpinionfromAG View
eurlex_get_relations tool
Exactly one of
celex_numberorwork_uri;relation_typesnarrows to any ofcites,amends,amended_by,repeals,repealed_by,implicitly_repeals,implicitly_repealed_by,legal_basis,basis_for,interprets,interpreted_by,consolidated_version,national_transposition,adopts,adopted_by(omit for all fifteen)basis_forlists the works naming the act among their legal bases;interpreted_bylists the CJEU and General Court rulings interpreting it, andinterpretswhat a ruling interprets;adoptslists the works an act adopts (usually its Commission proposal) andadopted_bythe act that adopted a work.member_statesnarrowsnational_transpositionto named member states (ISO 3166-1 alpha-3 or two-letter codes, echoed as alpha-3); using it withoutnational_transpositionfails asmember_states_not_applicableA first page (
offset0) that traversesnational_transpositioncarriestransposition_summary, counted over every measure rather than the page:by_member_statelists each member state with measures (GBRincluded) with its measure count and newestlatest_date, andmember_states_without_measuresnames the states in scope with none — themember_statesfilter, else the 27 current member states. A missing record is not proof of non-transposition. It is absent when no state in scope has a measure; a count CELLAR fails leaves the page without it, named in thenoticeA TFEU, TEU, or Charter article (
12016E102) or whole text (12016E/TXT) of any Lisbon version (TFEU and TEU 2008, 2010, 2012, 2016; Charter 2007, 2010, 2012, 2016) reads every incoming type exceptnational_transpositionacross all four versions: one row per related work, withrecorded_againstlisting the version CELEX numbers its edge is recorded against. On awork_uricall the CELEX identity is resolved for any incoming type and echoed incelex_number. An empty first page with no filter notice names the versions it readarticlenarrowsinterpreted_byto rulings with a recorded provision in one article of the act (17,6a,Article 17,Art. 17, any case; blank is omitted; a paragraph, range, or Roman numeral is rejected). It matches at any depth, ignores leading zeros, and a letter also matches its Latin ordinal (28creaches Article 28 quater); rulings CELLAR records no provision for are left out, as thenoticesays, and the echoedarticleis the normalized form. On a treaty whole text (12016E/TXT) it lists that article's rulings in all four versions, every one of them, since CELLAR records no provision on a whole text; on a treaty article CELEX, naming that article filters nothing and naming another article lists no ruling, with anotice. Using it withoutinterpreted_byfails asarticle_not_applicablerelated_sectorskeeps, in every requested type, the related works whose CELEX opens with one of the listed sectors:0consolidated texts,1treaties,2international agreements,3legal acts,4complementary legislation,5preparatory acts,6case law,7national transposition,8national case law,9parliamentary questions,COJ C documents,EEFTA documents (candeare read asCandE; anything else is rejected). Paging counts matching works only, related works with no CELEX are left out, and the sectors are echoed. Without7,national_transpositionandtransposition_summaryare skipped;member_stateswithout7andarticlewithout6fail asmember_states_not_applicableandarticle_not_applicable. A first page names the requested types with no related work in those sectors in thenoticeAmendment, repeal, interpretation, and adoption rows carry
provisions, the provisions CELLAR records the edge as targeting, in compact codes (A17P1LCis Article 17(1)(c)) or authority-token codes (AR 43 PA 4); a row without them records none, which does not mean the edge reaches the whole act. A provisions lookup CELLAR fails returns the rows without them, named in thenoticeOne hop, paged per relation type and direction via
offset/limit(up to 100, default 10; a largerlimitis reported inlimit_clamp), newest first.limitis the only page boundary: every type and direction returns up to that many whole rows, titles and provisions included, andnext_offsetis the offset plus the limit served. Each type and direction pages to row 10,000, then anoticeroutes older works toeurlex_query_sparqlwith a ready-to-run query. Omittingrelation_typesequals listing all fifteen typesEach relation carries
relation_type,direction(outgoing/incoming),related_work_uri, and where knownrelated_celex_number,related_date,related_title(English only),related_member_stateonnational_transpositionrows, andrecorded_againston incoming rows of a treaty article or text;empty_relation_typeslists the requested types with no rows on the page, whether the act has no such edges, they are paged out, or a filter (member_states,article,related_sectors) matched none of them. Typed errors:invalid_identifier_args,member_states_not_applicable,article_not_applicable,not_found,offset_past_window
eurlex_browse_subjects tool
Matches preferred and alternative EuroVoc labels, so a common synonym resolves to its concept, in any EU official
language(default English);offset/limitpagination (up to 50; a largerlimitis served at 50 and reported inlimit_clamp), to row 10,000 (offset_past_windowbeyond)Returns concept URI, preferred label, code, broader (parent) label, and the alternative label that matched when one did; an empty page with a
noticewhen nothing matchesExact label matches rank first, then label or word-start matches, then other substring matches, so
"AI"leads with artificial intelligence
eurlex_query_sparql tool
Read-only SELECT only (update forms and ASK/CONSTRUCT/DESCRIBE are rejected);
cdm:,skos:, andxsd:prefixes are auto-injected; optionaltimeout_hint(1000–55000 ms)Results capped at
MAX_SPARQL_RESULTS(default 100); a truncated result'snoticesays to addORDER BYand repeat with a higherOFFSET, up to row 10,000. A zero-row result from an untyped string literal gets anoticeto type it (^^xsd:string,^^xsd:anyURIfor an ELI) or language-tag itTyped errors:
not_read_only(a SPARQL Update),unsupported_query_form(ASK, CONSTRUCT, DESCRIBE, or no SELECT),sparql_error,sparql_timeout,request_too_large(the form-encoded request, injected prefixes andLIMITincluded, is over CELLAR's 8,192 bytes)
eurlex://document/{celexNumber} resource
Metadata snapshot as
application/json— resource type, author institution(s) labelled aseurlex_get_documentlabels them, Advocates General, date, English title, in-force flag,eli,oj_reference,dates_of_effect,transposition_deadlines, legal basis, EuroVoc subjects, andprocedures(the four citation fields and the procedures as ineurlex_get_document); a consolidated text keeps its owneli, addsbase_act_celex, and reads authors, in-force flag,oj_reference,dates_of_effect,transposition_deadlines, legal basis, subjects, and procedures from that actcelexNumbercomes fromeurlex_search_documents,eurlex_get_cases, oreurlex_lookup_celex; a CELEX containing/goes with each/encoded as%2F(eurlex://document/12016E%2FTXT)
eurlex://document/{celexNumber}/relations resource
One-hop relationship summary over all fifteen
eurlex_get_relationstypes, with noprovisions, each related work with itsrelated_dateand Englishrelated_titlewhere it has them, capped at 25 per relation type and direction (newest kept)truncatedplus acontinuationpointer toeurlex_get_relationswhen more relations exist, itsinputnaming the CELEX andoffset25 so the tool continues each type and direction where the summary stoppedA CELEX containing
/goes with each/encoded as%2F(eurlex://document/12016P%2FTXT/relations)
eurlex_comparative_analysis prompt
Arguments:
domainrequired;focusoptional, folded into its matching analysis axis or added as its own sectionReturns a research plan that restates the domain in EU legal vocabulary ("antitrust" → "competition law"), chains
eurlex_browse_subjects→eurlex_search_documents→eurlex_get_document→eurlex_get_relations→eurlex_get_cases(by case-lawsubject) →eurlex_get_relations(interpreted_byon the key acts, their legal-basis treaty articles, and Articles 101 and 102 TFEU) for the EU side andcourtlistener_search_opinionsfor the US side, plus a six-axis analysis framework
Features
Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.
EUR-Lex-specific:
No API key required — CELLAR SPARQL and the EUR-Lex REST content endpoints are both publicly accessible
SPARQL is POSTed with CDM prefix declarations built in; server-side LIMIT enforcement (max 100) guards against Virtuoso timeouts
Act text is fetched via CELLAR content negotiation; HTML passes through as served, multi-part Formex4 XML is assembled into one document, and Markdown is converted server-side
Syntax, compile, and sort-window errors fail at once as
sparql_error(a sort-window error,SR353, hints to lowerOFFSETor narrow the query) and timeouts assparql_timeout, neither retried within the call; asparql_timeoutfor running out of time is marked retryable, since a later call can finish, and Virtuoso's refusal of a too-costly query is not. A request over CELLAR's 8,192-byte form-encoded limit is refused before it is sent asrequest_too_large(ValidationError, not retryable), and a request CELLAR answers with HTTP 403 is not sent again (ServiceUnavailable,status: 403). Gateway pages and other transient failures are retried inside the call's shared query budget (SPARQL_QUERY_TIMEOUT_MS), as is a lookup with no complete response after 20 s, sent once more (search and relation pages andeurlex_query_sparqlqueries are sent once), and a retry ladder the budget cuts short reports the last attempt's own failure, orsparql_timeoutafter a stallAutomatic English fallback when a requested translation is unavailable, with requested/effective language reported
Agent-friendly output:
EuroVoc prerequisite guidance in server-level instructions — agents are directed to
eurlex_browse_subjectsbefore concept-filtered searcheseurlex_lookup_celexconfirms CELEX/ELI/ECLI existence upfront, preventing downstream errors in document or relation fetchescontent_status,content_unavailability_reason, and requested/effective language fields distinguish skipped, available, absent, upstream-failed, and incomplete content without string parsingTyped
reasoncodes on every tool's error contract let agents branch on outcomes programmatically
Getting started
Connect to the hosted instance, no install:
claude mcp add --transport http eur-lex-mcp-server https://eur-lex.caseyjhand.com/mcpOr run it locally:
claude mcp add eur-lex-mcp-server -- npx -y @cyanheads/eur-lex-mcp-serverFor other clients, add this to the MCP config file:
{
"mcpServers": {
"eur-lex-mcp-server": {
"command": "npx",
"args": ["-y", "@cyanheads/eur-lex-mcp-server"]
}
}
}No API key is required. For Docker or a source build, see Running the server.
Configuration
All configuration is validated at startup via Zod schemas in src/config/server-config.ts.
Variable | Description | Default |
| CELLAR SPARQL endpoint URL override (e.g., for a local Virtuoso mirror). |
|
| EU Publications Office CELLAR content resolver base URL override. |
|
| Client-side timeout in milliseconds, an integer from 1 to 2147483647: the budget a call's CELLAR queries share (a call that chains queries spends it once, not per query) and the ceiling on any single query; an EUR-Lex content fetch gets its own timeout of this length, outside the shared budget. |
|
| Enforced ceiling on LIMIT in all generated SPARQL queries. |
|
| Transport: |
|
| Port for HTTP server. |
|
| Auth mode: |
|
| Session handling: |
|
| Log level (RFC 5424). |
|
| Directory for log files (Node.js only). |
|
| Log failed tool calls' arguments and result, redacted by key name (free-form values are not), capped at |
|
| Enable OpenTelemetry instrumentation. |
|
See .env.example for the full list of optional overrides.
Running the server
Local development
Requires Bun v1.4.4 or higher (or Node.js v24+).
Clone and install:
git clone https://github.com/cyanheads/eur-lex-mcp-server.git cd eur-lex-mcp-server && bun install cp .env.example .env # optional: every variable has a defaultBuild and run:
# One-time build bun run rebuild # Run the built server bun run start:stdio # or bun run start:http # listens at http://localhost:3010/mcpRun checks and tests:
bun run devcheck # Lint, format, typecheck, security bun run test # Vitest test suite bun run lint:mcp # Validate MCP definitions against spec
Docker
docker run --rm -p 3010:3010 ghcr.io/cyanheads/eur-lex-mcp-server:latestThe image defaults to HTTP transport, stateless session mode, and logs to /var/log/eur-lex-mcp-server. To run it over stdio from an MCP client, use "command": "docker" with "args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/eur-lex-mcp-server:latest"]. To build locally, docker build -t eur-lex-mcp-server . then docker run --rm -p 3010:3010 eur-lex-mcp-server; OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.
Project structure
Directory | Purpose |
|
|
| Server-specific environment variable parsing and validation with Zod. |
| CELLAR SPARQL service — POST client, binding mapper, LIMIT enforcement, CDM PREFIX declarations. |
| CELLAR content service — content-negotiation GET client for |
| Tool definitions ( |
| Resource definitions ( |
| Prompt definitions ( |
| Agent Skills published to the agents that call the tools ( |
| Unit and integration tests mirroring |
Development guide
See CLAUDE.md for development guidelines and architectural rules. The short version:
Handlers throw, framework catches — no
try/catchin tool logicUse
ctx.logfor request-scoped logging,ctx.statefor tenant-scoped storageRegister new tools and resources via the barrels in
src/mcp-server/*/definitions/index.tsWrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields
Contributing
Issues are welcome. Run checks and tests before submitting:
bun run devcheck
bun run testLicense
Apache-2.0 — see LICENSE for details.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Search Swiss federal legislation: laws, articles, amendments via the Fedlex SPARQL endpoint.
Temporal search and comparison for official Luxembourg and reviewed EU law, with provenance.
Search and cite official European legislation and court decisions, by article. Read-only.
Resolve, search and verify legal citations against the official sources, with provenance.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA 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.2MIT
- AlicenseAqualityBmaintenanceEnables searching and retrieving EU legal documents (regulations, directives, court decisions) via the EUR-Lex Cellar API, supporting full-text search, metadata, citations, and consolidated versions without requiring an API key.11107 npm7MIT
- AlicenseAqualityCmaintenanceMCP server for EU law via the EUR-Lex / Cellar SPARQL endpoint — legislation (ELI/CELEX) and CJEU case-law (ECLI) with verifiable citations.3106 npm1MIT

LexAPI MCPofficial
AlicenseAqualityBmaintenanceEnables querying EU legal documents, case law, and citation graphs through natural language using the LexAPI.10556 npm3MIT