“Find the GDPR articles on data portability and summarise the obligations, citing each article.”
lex_semantic_legislation · lex_get_documentAn MCP server
for EU law.
LexAPI's MCP server gives Claude, Cursor, VS Code and other MCP clients that accept an API key direct access to EU law — search, fetch articles, follow citations — with your LexAPI key.
26 tools over EUR-Lex legislation, Court of Justice case law and the Official Journal, as an npm package that runs locally or a hosted endpoint at mcp.lex-api.com.
Running in a minute.
claude_desktop_config.json (Settings → Developer → Edit Config), then restart Claude
{
"mcpServers": {
"lexapi": {
"command": "npx",
"args": ["-y", "@lexapi/mcp"],
"env": { "LEXAPI_API_KEY": "lex_your_key" }
}
}
}npm: @lexapi/mcp·source: Lex-API/lexapi-mcp·MCP Registry: io.github.Lex-API/lexapi-mcp
- N° 01
Get a key
Create a free account and an API key in your dashboard. No credit card.
- N° 02
Add the server
Paste the snippet for your client and replace
lex_your_keywith your key. The npm package needs Node.js 20+; the hosted endpoint needs nothing installed. - N° 03
Ask
Ask about EU law in plain language. The model picks the tools; every tool description states its credit cost.
Add your API key to claude_desktop_config.json
Claude Desktop runs the npm package on your machine and passes your key to it from its config file. Open the file from Settings → Developer → Edit Config, or find it at:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add the lexapi entry under mcpServers (inside the existing object if the file already has one) and replace lex_your_key with your key: the package reads it from LEXAPI_API_KEY and does not start without it. Save the file and restart Claude Desktop.
{
"mcpServers": {
"lexapi": {
"command": "npx",
"args": ["-y", "@lexapi/mcp"],
"env": { "LEXAPI_API_KEY": "lex_your_key" }
}
}
}The key sits in plain text in this file: use a key just for Claude Desktop, and revoke it from your dashboard if the file is ever shared or exposed.
26 tools, six groups.
| Group & use | Tools |
|---|---|
| SearchKeyword search over EUR-Lex with filters, and the latest publications. | lex_search, lex_recent_documents |
| DocumentsFull text and metadata by CELEX number or EUR-Lex URL, batches, version history, bulk export. | lex_get_document, lex_get_documents_batch, lex_get_metadata, lex_get_document_by_url, lex_resolve, lex_document_versions, lex_get_document_version, lex_export |
| CitationsWhat an act cites and what cites it, typed (amends, repeals, legal basis…), paths and related acts. | lex_cites, lex_cited_by, lex_citation_network, lex_citation_path, lex_related, lex_citation_stats, lex_extract_citations |
| Semantic searchSearch legislation at article level and CJEU case law by meaning, not keywords. | lex_semantic_legislation, lex_semantic_case_law |
| WebhooksNotifications for new documents matching a search or a watch list of acts (paid plans). | lex_list_webhooks, lex_get_webhook, lex_create_webhook, lex_update_webhook, lex_delete_webhook, lex_test_webhook |
| AccountYour plan and remaining credits. | lex_info |
Each tool calls the REST endpoint it wraps and returns what that endpoint returns — documents with their CELEX numbers, article text and typed citation links. Plan gates apply as over REST: lex_export needs Business or above, webhooks need a paid plan, semantic search works on every credit plan, Free included.
Questions it answers with sources.
“Find Court of Justice judgments on automated decision-making under the GDPR and give me each case name, CELEX number and holding.”
lex_semantic_case_law · lex_get_document“What did the Capital Requirements Regulation say about own funds requirements on 1 June 2019?”
lex_semantic_legislation · lex_document_versions“Map the citation network around the NIS2 Directive: what it amends, what it repeals and which acts cite it.”
lex_citation_network · lex_cites · lex_cited_by“List the EU regulations published on EUR-Lex this week and flag anything on sustainability reporting.”
lex_recent_documents · lex_search“Compare how the Digital Services Act and the Digital Markets Act define the platforms they regulate, quoting the definition articles.”
lex_search · lex_get_documentMCP calls draw on the same monthly credit pool as REST calls, at the same price — a search page 3 credits, a document 5 or less, a semantic search 5. The Free plan starts with 500 credits, then 150 a month; no credit card.
Asked &
answered.
The full reference — every tool, auth, errors and costs — is in the MCP docs.