Lexapi MCP logo

Lexapi MCP

by Lex-API

Researches EUR-Lex content, EU case law, legislation, and citation relationships through MCP tools.

Install Lexapi MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "lex-api-lexapi-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@lexapi/mcp"
      ],
      "env": {
        "LEXAPI_API_KEY": "YOUR_VALUE_HERE",
        "LEXAPI_BASE_URL": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

Lex-API/lexapi-mcp MCP server connects MCP-compatible assistants to LexAPI for research across EUR-Lex, EU case law, EU legislation, and citation relationships. It provides structured searches, CELEX and URL-based document retrieval, metadata lookup, recent Official Journal queries, citation graph traversal, and semantic search. Run it as a stdio server with an API key, using `npx -y @lexapi/mcp`. Reach for it when an agent needs primary EU legal materials or relationships between cited and citing documents.

Use cases

  • Search EUR-Lex by legal text, date, type, author, or language
  • Retrieve EU documents by CELEX number or EUR-Lex URL
  • Trace inbound and outbound citations between legal documents
  • Find recent Official Journal publications
  • Search EU case law or legislation semantically on a paid plan

Key features

  • Structured EUR-Lex search
  • Parsed document and metadata retrieval
  • Official Journal publication lookup
  • Typed citation graph queries
  • Embedding search for EU case law and legislation

Tools10

What Lexapi MCP lets your agent do. Expand a tool for its parameters.

Self-reported~173 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 2d ago

Recent health check succeeded.

18/18 checks healthy over the last 76d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 10d ago via OSV.dev · @lexapi/mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars3Stargazers on the source repository.
npm downloads138Package downloads in the last 30 days.
Last commit3mo agoMost recent push to the default branch.
Tools exposed10Callable tools this server registers over MCP.
Directory activity4 viewsConfig copies, upvotes, and views on AllMCPs.

How Lexapi MCP works

What Lex-API/lexapi-mcp MCP server does

The Lex-API/lexapi-mcp MCP server exposes LexAPI research functions through the Model Context Protocol. It is aimed at assistants that need to find and inspect EU legal materials rather than rely only on general web search. The service covers EUR-Lex documents, EU case law, EU legislation, Official Journal publications, and citation relationships.

The available operations support both targeted retrieval and broader discovery. An assistant can search using structured fields such as text, dates, document type, author, and language; retrieve a document by CELEX number or EUR-Lex URL; or request metadata without downloading the full parsed content. Citation tools identify documents that cite a given CELEX, documents cited by it, or both directions together.

How it works

The Lex-API/lexapi-mcp MCP server runs as a stdio process and forwards tool requests to LexAPI. MCP-compatible clients start the package with npx -y @lexapi/mcp, while the API key is supplied through the process environment. The default API endpoint is LexAPI's versioned API URL, with an environment variable available for staging or self-hosted deployments.

Document retrieval returns parsed legal content where applicable, including metadata, articles, sections, tables, and annexes. The metadata-only operation is intended for cases where full text is unnecessary. Recent-document queries cover Official Journal publications and use a seven-day default window.

Semantic search is separate from the structured and graph operations. lex_semantic_case_law searches EU case law using embeddings, and lex_semantic_legislation does the same for EU legislation. These two tools require a paid plan; the free tier returns an authorization error for them.

Setup and configuration

To run the Lex-API/lexapi-mcp MCP server, create a LexAPI API key and expose it as LEXAPI_API_KEY. The documented free tier provides 500 credits per month without requiring a card. In Claude Desktop, add the package as an MCP server with npx as the command and place the key in the env object. Claude Code can add the same process with its MCP command, and other clients can launch the stdio command directly.

LEXAPI_BASE_URL is optional. It overrides the default https://lex-api.com/api/v1 endpoint and can point to a staging or self-hosted service. For local development, the repository can be cloned, installed with npm, built, and started with node dist/index.js.

Tools and capabilities

  • lex_search: structured EUR-Lex search by text, date, document type, author, or language.
  • lex_get_document: retrieves a parsed document by CELEX, including its substantive sections and metadata.
  • lex_get_metadata: returns document metadata without full content.
  • lex_get_document_by_url: retrieves a document from a pasted EUR-Lex URL.
  • lex_recent_documents: lists recent Official Journal publications, using seven days by default.
  • lex_cited_by, lex_cites, and lex_citation_network: inspect inbound, outbound, or combined typed citation edges.
  • lex_semantic_case_law and lex_semantic_legislation: perform embedding-based searches on paid plans.

Limitations and notes

An API key is required, and invalid or revoked keys produce an authentication error. Requests are subject to daily quotas and per-minute rate limits; the server retries a rate-limit response once. Semantic tools are unavailable on the free tier and return a 403 response. The package is designed for MCP clients that can run standard stdio servers, including Claude Desktop, Claude Code, and Cursor.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Lexapi MCP

Lex-API/lexapi-mcp is an MCP server that connects AI assistants to LexAPI for EUR-Lex, EU case law, EU legislation, and citation-graph research. Its main tools support structured search, CELEX or URL document retrieval, metadata lookup, recent Official Journal queries, citation traversal, and paid-plan semantic search.

Install it by configuring your MCP client to run `npx -y @lexapi/mcp` with `LEXAPI_API_KEY` in the environment. Claude Desktop uses an MCP configuration entry, while Claude Code supports `claude mcp add`; other stdio-compatible clients can use the same command.

Yes, Lex-API/lexapi-mcp works with Cursor because Cursor can run stdio MCP servers. Configure the command as `npx -y @lexapi/mcp` and provide `LEXAPI_API_KEY` in the environment.

No, semantic legal search requires a paid LexAPI plan. The `lex_semantic_case_law` and `lex_semantic_legislation` tools return a 403 response on the free tier, while the other documented tools use the available API access and quota.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewLexapi MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/lex-api-lexapi-mcp?style=directory)](https://allmcps.com/mcp/lex-api-lexapi-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/lex-api-lexapi-mcp"><img src="https://allmcps.com/api/badge/lex-api-lexapi-mcp?style=directory" alt="Lexapi MCP on AllMCPs" /></a>