Query EUR-Lex and EU case law from Claude, Cursor, and other MCP-enabled tools. 10 tools for structured search, CELEX/URL document fetch, recent Official Journal, citation graph, and semantic search over case law + legislation.
Overview
LexAPI MCP
Model Context Protocol server for LexAPI — query EUR-Lex, EU case law, and the citation graph from Claude, Cursor, and other MCP-enabled AI tools.
Ask your assistant: "summarize Article 17 of the GDPR" or "which regulations amend Directive 95/46/EC?" and the model calls LexAPI directly.
Tools
| Tool | What it does |
|---|---|
lex_search | Structured EUR-Lex search (text, dates, document type, author, language). |
lex_get_document | Full parsed document by CELEX — metadata + articles, sections, tables, annexes. |
lex_get_metadata | Metadata only (faster than full content). |
lex_get_document_by_url | Fetch by EUR-Lex URL (pasted from a browser). |
lex_recent_documents | Recent Official Journal publications (default 7 days). |
lex_cited_by | Documents citing this CELEX (inbound, typed edges). |
lex_cites | Documents this CELEX cites (outbound, typed edges). |
lex_citation_network | Both directions in one call. |
lex_semantic_case_law | Embedding search over EU case law (paid plans). |
lex_semantic_legislation | Embedding search over EU legislation. |
Install
Get a LexAPI API key at lex-api.com/dashboard (50 calls/day on the FREE tier; semantic tools require a paid plan).
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"lexapi": {
"command": "npx",
"args": ["-y", "@lexapi/mcp"],
"env": { "LEXAPI_API_KEY": "lex_..." }
}
}
}
Claude Code
claude mcp add lexapi --env LEXAPI_API_KEY=lex_... -- npx -y @lexapi/mcp
Cursor / other MCP clients
Any client that supports stdio MCP servers can run npx -y @lexapi/mcp with LEXAPI_API_KEY in the environment.
Configuration
| Env var | Default | Purpose |
|---|---|---|
LEXAPI_API_KEY | (required) | Your API key. Get one at lex-api.com/dashboard. |
LEXAPI_BASE_URL | https://lex-api.com/api/v1 | Override for self-hosted or staging. |
Links
- npm: https://www.npmjs.com/package/@lexapi/mcp
- Source: https://github.com/Lex-API/lexapi-mcp
- Official MCP Registry:
io.github.Lex-API/lexapi-mcp - Get an API key: https://lex-api.com/dashboard
MIT licensed.
Server Config
{
"mcpServers": {
"lexapi": {
"command": "npx",
"args": [
"-y",
"@lexapi/mcp"
],
"env": {
"LEXAPI_API_KEY": "<YOUR_LEXAPI_API_KEY>"
}
}
}
}