Legal
Data source: EUR-Lex CELLAR (publications.europa.eu)
MCP Protocol
Endpoint
https://context.gnist.ai/mcp/eurlex/
claude_desktop_config.json
{
"mcpServers": {
"gnist-eurlex": {
"url": "https://context.gnist.ai/mcp/eurlex/",
"headers": {
"Gnist-API-Key": "YOUR_API_KEY"
}
}
}
}
Shell
curl -X POST "https://context.gnist.ai/mcp/eurlex/" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "search_legislation", "arguments": {"query": "example"}}}'
REST API
API Root
https://context.gnist.ai/rest/eurlex/
5 endpoints available:
GET /rest/eurlex/search_legislationGET /rest/eurlex/get_documentGET /rest/eurlex/get_recentGET /rest/eurlex/search_by_subjectGET /rest/eurlex/report_feedback
Shell
curl "https://context.gnist.ai/rest/eurlex/search_legislation?query=example" \ -H "Gnist-API-Key: YOUR_API_KEY"
Python
import httpx
resp = httpx.get(
"https://context.gnist.ai/rest/eurlex/search_legislation",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
params={
"query": "example"
},
)
print(resp.json())
Command Line
Command
gc eurlex
CLI documentation will be available when the GnistAI SDK is published.
Install
pip install gnistai
Available Tools (5)
search_legislationSearch EU legislation by keyword.
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | required | Search term for EU legislation titles (e.g. "artificial intelligence", "data protection", "climate", "digital markets"). |
doc_type | any | optional | Filter by document type: "regulation", "directive", or "decision". Omit for all types. |
year | any | optional | Filter by year of publication (e.g. 2024). |
limit | integer | optional | Number of results to return (1-50, default 20). (default: 20) |
get_documentGet an EU legal document by its CELEX number.
| Parameter | Type | Required | Description |
|---|---|---|---|
celex | string | required | CELEX document number (e.g. "32024R1689" for the AI Act, "32016R0679" for GDPR). |
get_recentGet recently published EU legislation.
| Parameter | Type | Required | Description |
|---|---|---|---|
doc_type | any | optional | Filter by type: "regulation", "directive", or "decision". Omit for all types. |
days | integer | optional | Look back period in days (1-365, default 30). (default: 30) |
limit | integer | optional | Number of results to return (1-50, default 20). (default: 20) |
search_by_subjectSearch EU legislation by EuroVoc subject matter.
| Parameter | Type | Required | Description |
|---|---|---|---|
subject | string | required | EuroVoc subject descriptor (e.g. "environmental policy", "consumer protection", "competition", "transport"). |
limit | integer | optional | Number of results to return (1-50, default 20). (default: 20) |
report_feedbackReport a bug, feature request, or general feedback for this data source.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: "general") |