{
  "markdown": "# LexAPI MCP\n\n[Model Context Protocol](https://modelcontextprotocol.io) server for [LexAPI](https://lex-api.com/?ref=npm-mcp) — query EUR-Lex, EU case law, and the citation graph from Claude, Cursor, and other MCP-enabled clients.\n\nInstall 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.\n\n## Install\n\nYou'll need a LexAPI API key. Create one for free at [lex-api.com/dashboard](https://lex-api.com/dashboard?ref=npm-mcp) (500 credits/month on the FREE tier, no card required).\n\n### Claude Desktop\n\nAdd to `claude_desktop_config.json` (location: `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):\n\n```json\n{\n  \"mcpServers\": {\n    \"lexapi\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@lexapi/mcp\"],\n      \"env\": {\n        \"LEXAPI_API_KEY\": \"lex_...\"\n      }\n    }\n  }\n}\n```\n\nRestart Claude Desktop.\n\n### Claude Code\n\n```bash\nclaude mcp add lexapi --env LEXAPI_API_KEY=lex_... -- npx -y @lexapi/mcp\n```\n\n### Cursor / other MCP clients\n\nAny client that supports stdio MCP servers can run this. The command is `npx -y @lexapi/mcp` with `LEXAPI_API_KEY` in the environment.\n\n## Tools\n\n| Tool | What it does |\n|---|---|\n| `lex_search` | Structured EUR-Lex search (text, dates, document type, author, language). |\n| `lex_get_document` | Full parsed document by CELEX — metadata + articles, sections, tables, annexes. |\n| `lex_get_metadata` | Metadata only (faster than full content). |\n| `lex_get_document_by_url` | Fetch by EUR-Lex URL (pasted from a browser). |\n| `lex_recent_documents` | Recent Official Journal publications (default 7 days). |\n| `lex_cited_by` | Documents citing this CELEX (inbound, typed edges). |\n| `lex_cites` | Documents this CELEX cites (outbound, typed edges). |\n| `lex_citation_network` | Both directions in one call. |\n| `lex_semantic_case_law` | Embedding search over EU case law (paid plans). |\n| `lex_semantic_legislation` | Embedding search over EU legislation (paid plans). |\n\n## Configuration\n\n| Env var | Default | Purpose |\n|---|---|---|\n| `LEXAPI_API_KEY` | *(required)* | Your API key. Get one at [lex-api.com/dashboard](https://lex-api.com/dashboard?ref=npm-mcp). |\n| `LEXAPI_BASE_URL` | `https://lex-api.com/api/v1` | Override for self-hosted or staging. |\n\n## Troubleshooting\n\n**`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.\n\n**`LexAPI error (401 invalid_api_key)`** — the key is wrong or revoked. Generate a new one at the dashboard.\n\n**`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.\n\n**`LexAPI error (403 …)` on semantic tools** — semantic search requires a paid plan. FREE tier returns 403 for those endpoints.\n\n## Local development\n\n```bash\ngit clone https://github.com/Lex-API/lexapi-mcp.git\ncd lexapi-mcp\nnpm install\nnpm run build\n\nLEXAPI_API_KEY=lex_xxx node dist/index.js\n```\n\n## License\n\nMIT\n",
  "bytes": 3139,
  "sha": "9cc7fd4597a31e093630d7920b08e424e861d935ef92c6e8e493c1f6d25d62fd",
  "repo_slug": "lex-api/lexapi-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_lex_api_lexapi_mcp_46c66cad/readme"
}