MCP Server Studio

LexAPI MCP server

EU and national law for AI: EUR-Lex legislation and case law, citation graph, semantic search.

Registry name: io.github.Lex-API/lexapi-mcp

Publisher
Lex-API
Runs
Local or hosted
Package
npm
Version
0.5.1
Category
Search & knowledge
Updated
2026-11-16

Source code on GitHub

Set up LexAPI (run locally)

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "lexapi-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@lexapi/[email protected]"
      ],
      "env": {
        "LEXAPI_API_KEY": "<LEXAPI_API_KEY>",
        "LEXAPI_BASE_URL": "<LEXAPI_BASE_URL>",
        "LEXAPI_MCP_READ_ONLY": "<LEXAPI_MCP_READ_ONLY>",
        "LEXAPI_TIMEOUT_MS": "<LEXAPI_TIMEOUT_MS>"
      }
    }
  }
}

Claude Code

Run in your terminal:

claude mcp add lexapi-mcp -e LEXAPI_API_KEY='<LEXAPI_API_KEY>' -e LEXAPI_BASE_URL='<LEXAPI_BASE_URL>' -e LEXAPI_MCP_READ_ONLY='<LEXAPI_MCP_READ_ONLY>' -e LEXAPI_TIMEOUT_MS='<LEXAPI_TIMEOUT_MS>' -- npx -y @lexapi/[email protected]

Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "lexapi-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@lexapi/[email protected]"
      ],
      "env": {
        "LEXAPI_API_KEY": "<LEXAPI_API_KEY>",
        "LEXAPI_BASE_URL": "<LEXAPI_BASE_URL>",
        "LEXAPI_MCP_READ_ONLY": "<LEXAPI_MCP_READ_ONLY>",
        "LEXAPI_TIMEOUT_MS": "<LEXAPI_TIMEOUT_MS>"
      }
    }
  }
}

VS Code

Add to .vscode/mcp.json:

{
  "servers": {
    "lexapi-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@lexapi/[email protected]"
      ],
      "env": {
        "LEXAPI_API_KEY": "<LEXAPI_API_KEY>",
        "LEXAPI_BASE_URL": "<LEXAPI_BASE_URL>",
        "LEXAPI_MCP_READ_ONLY": "<LEXAPI_MCP_READ_ONLY>",
        "LEXAPI_TIMEOUT_MS": "<LEXAPI_TIMEOUT_MS>"
      }
    }
  }
}

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "lexapi-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@lexapi/[email protected]"
      ],
      "env": {
        "LEXAPI_API_KEY": "<LEXAPI_API_KEY>",
        "LEXAPI_BASE_URL": "<LEXAPI_BASE_URL>",
        "LEXAPI_MCP_READ_ONLY": "<LEXAPI_MCP_READ_ONLY>",
        "LEXAPI_TIMEOUT_MS": "<LEXAPI_TIMEOUT_MS>"
      }
    }
  }
}

Set up LexAPI (hosted url)

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "lexapi-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://mcp.lex-api.com/v1",
        "--header",
        "Authorization: <Authorization>"
      ]
    }
  }
}

Claude Code

Run in your terminal:

claude mcp add --transport http lexapi-mcp https://mcp.lex-api.com/v1 --header 'Authorization: <Authorization>'

Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "lexapi-mcp": {
      "url": "https://mcp.lex-api.com/v1",
      "headers": {
        "Authorization": "<Authorization>"
      }
    }
  }
}

VS Code

Add to .vscode/mcp.json:

{
  "servers": {
    "lexapi-mcp": {
      "type": "http",
      "url": "https://mcp.lex-api.com/v1",
      "headers": {
        "Authorization": "<Authorization>"
      }
    }
  }
}

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "lexapi-mcp": {
      "serverUrl": "https://mcp.lex-api.com/v1",
      "headers": {
        "Authorization": "<Authorization>"
      }
    }
  }
}

Settings

NameRequiredWhat it is
LEXAPI_API_KEYYesLexAPI API key. Get one at https://lex-api.com/dashboard (FREE plan available; see https://lex-api.com/pricing).
LEXAPI_BASE_URLNoOverride the LexAPI base URL. Defaults to https://lex-api.com/api/v1.
LEXAPI_MCP_READ_ONLYNoSet to true to hide every non-read-only tool (webhook create/update/delete/test, citation extraction).
LEXAPI_TIMEOUT_MSNoDeadline per tool call in milliseconds, retries included (default 55000). Raise only together with the MCP client timeout.

More search & knowledge MCP servers