LexAPI MCP
Enables querying EU legal documents, case law, and citation graphs through natural language using the LexAPI.
README
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 (50 calls/day on the FREE tier).
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/mcp
Cursor / 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.
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 (paid plans). |
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. |
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/lexapi/lexapi-mcp.git
cd lexapi-mcp
npm install
npm run build
LEXAPI_API_KEY=lex_xxx node dist/index.js
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.