Lex API MCP Server

Model Context Protocol server for LexAPI - query EUR-Lex, EU case law, and the citation graph from Claude, Cursor, and other MCP-enabled clients. Its 10 documented tools cover lex, document, semantic. It runs locally over stdio via the published package.

People connecting this server to Claude, Cursor, VS Code, or another MCP client. The project is written in TypeScript.

VERIFIED ACTIVE

LAST COMMIT 2026-07-21 · ★ 3 · #425 OF 848 MAINTAINED OTHER · VERIFIED 2026-08-25

MIT · TypeScript servers · how we verify → /methodology

01 · Install Lex API

before you install - you'll need

LEXAPI_API_KEY

Environment variables documented in the project's README - it lists which are required and which have defaults.

Claude Code

claude mcp add lex-api-lexapi-mcp -- npx -y @lexapi/mcp

Claude Desktop / Cursor / VS Code - add to config

{
  "mcpServers": {
    "lex-api-lexapi-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@lexapi/mcp"
      ]
    }
  }
}

Same JSON for Cursor. For VS Code, rename the top-level key from `mcpServers` to `servers`.

Using another client? Same JSON, different key

Claude Desktop · mcpServers

Cursor · mcpServers

VS Code · servers

Windsurf · mcpServers

Zed · context_servers

Cline · mcpServers

Roo Code · mcpServers

Continue · mcpServers

LibreChat · mcpServers

Gemini CLI · mcpServers

Codex CLI · mcp_servers

Full setup guides: every client.

02 · Evidence

Security posture

What to check before giving this server access to your agent - from the registry, GitHub, and our own probes. We don't score safety; we show what's verifiable.

runs as local process (stdio) - runs on your machine with your user's permissions

license MIT - declared in the repository

npm package @lexapi/mcp - the @lexapi scope differs from the repo owner (lex-api); confirm it's the project's official package

registry namespace io.github.Lex-API is GitHub-verified and matches the repo owner

03 · What Lex API can do

Prose above is summarized from the project's README and registry record - no invented capabilities.

What you can build

An agent gets 10 documented tools spanning lex, document, semantic, including lex_search, lex_get_document, lex_get_metadata, lex_get_document_by_url.

The 10 tools it gives your agent

Extracted from the project's README - what LexAPI lets an agent do.

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).

04 · Who maintains Lex API

LexAPI is maintained by lex-api. It's the only MCP server we track from this author; the repo dates to Jun 2026.

05 · Facts

category
other - ranked #425 of 848 actively-maintained other servers as of 2026-08-25.
registry
io.github.Lex-API/lexapi-mcp (active, first published 2026-07-01)
packages
npm:@lexapi/mcp

06 · Lex API FAQ

Is Lex API still maintained?

Yes - as of 2026-08-25, its last commit was 2026-07-21. We re-verify nightly.

What can Lex API do?

An agent gets 10 documented tools spanning lex, document, semantic, including lex_search, lex_get_document, lex_get_metadata, lex_get_document_by_url.

How do I install Lex API?

Run `npx -y @lexapi/mcp`. The README documents one environment variable (LEXAPI_API_KEY) to set first. You can also paste the ready-made client config above.

Does Lex API run locally?

Yes - it's a stdio server: it runs on your machine (via npx) with your user's permissions. Your data stays local unless the server itself calls external APIs.

07 · Alternatives to Lex API