LexAPI MCP
OfficialThe LexAPI MCP server lets you query EU legal information — legislation, case law, and citation relationships — from MCP-enabled AI clients. Here's what you can do:
Search EUR-Lex (
lex_search): Structured searches across EU documents using free text, date ranges, document types, authors, and language filters.Fetch Full Documents (
lex_get_document): Retrieve the complete parsed content of any EU document by CELEX number, including metadata and structured body (articles, sections, tables, annexes).Fetch Metadata Only (
lex_get_metadata): Quickly retrieve only metadata (title, dates, type, author, keywords, subjects) for a CELEX — faster than fetching the full document.Fetch Document by URL (
lex_get_document_by_url): Parse and retrieve a document by pasting any EUR-Lex browser URL.Browse Recent Publications (
lex_recent_documents): List documents recently published in the Official Journal (default: last 7 days), filterable by type, author, and language.Find Inbound Citations (
lex_cited_by): Discover which documents cite a given CELEX (e.g., amendments, repeals, implementations), categorized by citation type.Find Outbound Citations (
lex_cites): See what documents a given CELEX cites or relies upon, categorized by citation type.Full Citation Network (
lex_citation_network): Get both inbound and outbound citations in a single call for a holistic view of a document's place in the citation graph.Semantic Case Law Search (
lex_semantic_case_law): Embedding-based search over EU case law by meaning — requires a paid plan.Semantic Legislation Search (
lex_semantic_legislation): Embedding-based search over EU legislation at the article level — requires a paid plan.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@LexAPI MCPsummarize Article 17 of the GDPR"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 clients.
Install once, get an API key, and ask your AI assistant: "summarize Article 17 of the GDPR" or "which regulations amend Directive 95/46/EC?" — the model calls LexAPI directly.
Install
You'll need a LexAPI API key. Create one for free at lex-api.com/dashboard (500 credits/month on the FREE tier, no card required).
Claude Desktop
Add to claude_desktop_config.json (location: ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"lexapi": {
"command": "npx",
"args": ["-y", "@lexapi/mcp"],
"env": {
"LEXAPI_API_KEY": "lex_..."
}
}
}
}Restart Claude Desktop.
Claude Code
claude mcp add lexapi --env LEXAPI_API_KEY=lex_... -- npx -y @lexapi/mcpCursor / other MCP clients
Any client that supports stdio MCP servers can run this. The command is npx -y @lexapi/mcp with LEXAPI_API_KEY in the environment.
Related MCP server: Slovak Law MCP Server
Tools
Tool | What it does |
| Structured EUR-Lex search (text, dates, document type, author, language). |
| Full parsed document by CELEX — metadata + articles, sections, tables, annexes. |
| Metadata only (faster than full content). |
| Fetch by EUR-Lex URL (pasted from a browser). |
| Recent Official Journal publications (default 7 days). |
| Documents citing this CELEX (inbound, typed edges). |
| Documents this CELEX cites (outbound, typed edges). |
| Both directions in one call. |
| Embedding search over EU case law (paid plans). |
| Embedding search over EU legislation (paid plans). |
Configuration
Env var | Default | Purpose |
| (required) | Your API key. Get one at lex-api.com/dashboard. |
|
| Override for self-hosted or staging. |
Troubleshooting
LEXAPI_API_KEY is not set — the env var isn't reaching the spawned process. Double-check the env block in your MCP client config.
LexAPI error (401 invalid_api_key) — the key is wrong or revoked. Generate a new one at the dashboard.
LexAPI error (429 …) — you hit your daily quota or per-minute rate limit. The server retries once automatically; if you see this in tool output, you're over quota. Upgrade your plan or wait for reset.
LexAPI error (403 …) on semantic tools — semantic search requires a paid plan. FREE tier returns 403 for those endpoints.
Local development
git clone https://github.com/Lex-API/lexapi-mcp.git
cd lexapi-mcp
npm install
npm run build
LEXAPI_API_KEY=lex_xxx node dist/index.jsLicense
MIT
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/Lex-API/lexapi-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server