eurlex-mcp-server
Enables 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.
README
eurlex-mcp-server
Search and retrieve EU law via the EUR-Lex Cellar API -- an MCP server that gives AI assistants direct access to EU regulations, directives, court decisions, and more. No API key required.
What You Can Do
Ask your AI assistant questions like:
- "Find EU regulations about artificial intelligence from 2024"
- "Show me the full text of the AI Act (32024R1689)"
- "What EuroVoc topics are assigned to the GDPR?"
- "Which documents cite the Digital Services Act?"
- "Search for directives about renewable energy"
- "Get the consolidated version of Regulation 2016/679 (GDPR)"
Features
- 6 specialized tools for searching, fetching, and analyzing EU legal documents
- EuroVoc thesaurus search -- find documents by EU taxonomy concepts
- Consolidated versions -- retrieve the latest in-force text of regulations, directives, and decisions
- Citation graph -- explore which documents cite or are cited by a given act
- Structured metadata -- access dates, EuroVoc descriptors, legal basis, and more
- Multi-language -- supports English, German, and French
- No API key required -- uses the public EUR-Lex Cellar SPARQL endpoint
Quick Start
pnpm dlx eurlex-mcp-server
Or with npx:
npx -y eurlex-mcp-server
Configuration
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"eurlex": {
"command": "npx",
"args": ["-y", "eurlex-mcp-server"]
}
}
}
Claude Code
claude mcp add eurlex-mcp-server -- npx -y eurlex-mcp-server
VS Code
Add to .vscode/mcp.json:
{
"servers": {
"eurlex": {
"command": "npx",
"args": ["-y", "eurlex-mcp-server"]
}
}
}
Cursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"eurlex": {
"command": "npx",
"args": ["-y", "eurlex-mcp-server"]
}
}
}
Windsurf
Add to ~/.windsurf/mcp.json:
{
"mcpServers": {
"eurlex": {
"command": "npx",
"args": ["-y", "eurlex-mcp-server"]
}
}
}
Tool Reference
eurlex_search
Full-text search across EUR-Lex documents.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
query |
string | yes | -- | Search term (3-500 chars), e.g. "artificial intelligence high risk" |
resource_type |
string | no | "any" |
Document type filter: REG, DIR, DEC, JUDG, REG_IMPL, REG_DEL, DIR_IMPL, DIR_DEL, DEC_IMPL, DEC_DEL, ORDER, OPIN_AG, RECO, any |
language |
string | no | "DEU" |
Language for titles and full text: DEU, ENG, FRA |
limit |
number | no | 10 |
Max results (1-50) |
date_from |
string | no | -- | Filter from date, format: YYYY-MM-DD |
date_to |
string | no | -- | Filter to date, format: YYYY-MM-DD |
eurlex_fetch
Retrieve the full text of a document by its CELEX identifier.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
celex_id |
string | yes | -- | CELEX identifier, e.g. "32024R1689" for the AI Act |
language |
string | no | "DEU" |
Language: DEU, ENG, FRA |
format |
string | no | "xhtml" |
Output format: xhtml (structured) or plain (tags stripped) |
max_chars |
number | no | 20000 |
Max characters returned (1000-50000) |
eurlex_metadata
Retrieve structured metadata for a document (dates, EuroVoc descriptors, legal basis, etc.).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
celex_id |
string | yes | -- | CELEX identifier, e.g. "32024R1689" |
language |
string | no | "DEU" |
Language for titles and EuroVoc labels: DEU, ENG, FRA |
eurlex_citations
Explore the citation graph of a document -- which acts it cites and which acts cite it.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
celex_id |
string | yes | -- | CELEX identifier, e.g. "32024R1689" |
language |
string | no | "DEU" |
Language for titles: DEU, ENG, FRA |
direction |
string | no | "both" |
cites (outgoing), cited_by (incoming), or both |
limit |
number | no | 20 |
Max results (1-100) |
eurlex_by_eurovoc
Find documents by EuroVoc thesaurus concept (label or URI).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
concept |
string | yes | -- | EuroVoc concept: label (e.g. "artificial intelligence") or URI (e.g. "http://eurovoc.europa.eu/4424") |
resource_type |
string | no | "any" |
Document type filter (same values as eurlex_search) |
language |
string | no | "DEU" |
Language: DEU, ENG, FRA |
limit |
number | no | 10 |
Max results (1-50) |
eurlex_consolidated
Retrieve the consolidated (in-force) version of a regulation, directive, or decision.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
doc_type |
string | yes | -- | Document type: reg (regulation), dir (directive), dec (decision) |
year |
number | yes | -- | Year of the act (1950-2100), e.g. 2024 |
number |
number | yes | -- | Document number, e.g. 1689 |
language |
string | no | "DEU" |
Language: DEU, ENG, FRA |
format |
string | no | "xhtml" |
Output format: xhtml or plain |
max_chars |
number | no | 20000 |
Max characters returned (1000-50000) |
CELEX Number Schema
CELEX identifiers uniquely identify EU legal documents. The format is:
[sector][year][type][number]
- Sector (1 digit):
3= legislation,6= case law,5= preparatory acts - Year (4 digits): year of the document
- Type (1-2 letters):
R= regulation,L= directive,D= decision,J= judgment, etc. - Number: sequential number
Examples:
| CELEX | Document |
|---|---|
32024R1689 |
AI Act (Regulation 2024/1689) |
32016R0679 |
GDPR (Regulation 2016/679) |
32022R2065 |
Digital Services Act (Regulation 2022/2065) |
62014CJ0131 |
Court of Justice case C-131/14 |
Development
Setup
git clone https://github.com/philrox/eurlex-mcp-server.git
cd eurlex-mcp-server
pnpm install
pnpm build
Commands
| Command | Description |
|---|---|
pnpm dev |
Start dev server with hot reload |
pnpm build |
Compile TypeScript |
pnpm test |
Run unit tests |
pnpm test:watch |
Run tests in watch mode |
pnpm test:integration |
Run integration tests (hits real API) |
pnpm start |
Start production server |
Testing
pnpm test # unit tests
pnpm test:integration # integration tests (hits real API)
Limitations
- Rate limits: The EUR-Lex Cellar API is public but may throttle excessive requests.
- Document availability: Not all documents have full text in all languages.
- Consolidated versions: Only available for regulations, directives, and decisions.
- Response size: Full text is truncated at
max_chars(default 20,000 characters) to stay within LLM context limits. - SPARQL timeouts: Complex EuroVoc queries may occasionally time out on the Cellar endpoint.
Contributing
See CONTRIBUTING.md for development setup, architecture overview, and submission guidelines.
License
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。