AITeamGuide

AITeamGuide Hub · MCP server

Lex (UK legislation MCP)

An API and MCP server from the UK government's i.AI team that lets an AI assistant search UK legislation, amendments and explanatory notes with hybrid semantic search, so answers can be grounded in the official text.

MCP server★ 82 starsMITLegalResearch

View on GitHub

Short answer: how to install Lex (UK legislation MCP)

Lex (UK legislation MCP) is an MIT-licensed, open-source MCP server on GitHub (i-dot-ai/lex) with 82 stars as of November 21, 2026. Its last push was on November 21, 2026. To install it, run git clone https://github.com/i-dot-ai/lex.git && cd lex. It works with Claude Desktop, Claude Code, Cursor, VS Code, Any MCP client, Python, Self-hosted.

Key facts

Type
MCP server
Jobs it fits
Research UK legislation; Track how a UK law has been amended
Fields
Legal, Research
Works with
Claude Desktop, Claude Code, Cursor, VS Code, Any MCP client, Python, Self-hosted
GitHub
i-dot-ai/lex
Licence
MIT
Stars
82 as of November 21, 2026
Last updated
November 21, 2026 (last push to GitHub)
Author
@i-dot-ai
Submitted by
@aiteamguide
Added to the Hub
November 3, 2026

The README calls Lex an experimental service that should not be used as a production dependency. Case law is temporarily disabled pending a licence from The National Archives. Self-hosting needs Docker and Azure OpenAI keys; the live docs at lex.lab.i.ai.gov.uk/docs cover connecting Claude, Cursor, Copilot Studio and VS Code.

Install / Use it

MIT

Download ZIP View source

Run locally (from the README)

git clone https://github.com/i-dot-ai/lex.git && cd lex
docker compose up -d
make ingest-all-sample

Safety: Runs code from a third-party repo. Review the source and the permissions before installing.

Commands and configs are taken from the project's README and re-wrapped in each app's documented format. If they differ, the README wins.

How to add MCP servers in your app, step by step: Claude Code · Cursor · VS Code · Claude Desktop · Codex · Gemini CLI · Copilot CLI · OpenCode · Cline · Roo Code · Kilo Code · Zed · LM Studio · Antigravity · Windsurf · Hermes Agent · ChatGPT.

FAQ

How do I install Lex (UK legislation MCP)?

run git clone https://github.com/i-dot-ai/lex.git && cd lex. Full steps for each app are in the install panel on this page and in the project's README.

Is Lex (UK legislation MCP) free?

The code is open source under the MIT licence, so it's free to use. Any account or API key the connected service needs is billed by that service, not by the project; see the README.

Is Lex (UK legislation MCP) still maintained?

Its last push to GitHub was on November 21, 2026, and it had 82 stars as of November 21, 2026. We re-check GitHub daily.

Prefer a ready-made product?

Commercial agents for the same job, with real prices: Harvey, CoCounsel Legal, all legal ai agents, all research agents.

Get new open-source AI tools like Lex (UK legislation MCP) in one weekly email

One email a week: new open-source agents, skills, MCP servers and playbooks from the Hub, plus AI agent price changes and new free plans. Free; unsubscribe anytime.

Free, no signup needed: the AI agent pricing cheat sheet, the cheapest listed plan for every job on one printable page.

The pricing cheat sheet is a free page on this site (no signup needed). Not sure yet? Read the latest issue first.

More from the Hub

Summary written by AITeamGuide in our own words. GitHub numbers come from the public GitHub API and refresh daily. Maintainer and want a correction or removal? Tell us. Got something similar? Submit it to the Hub.

Featured in our guide: Best MCP servers for legal research.