UK legal API for AI agents and researchers.
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"lex": {
"command": "<see-readme>",
"args": []
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
UK legal API for AI agents and researchers. Access comprehensive UK legislation data with semantic search and Model Context Protocol integration.
No automated test available for this server. Check the GitHub README for setup instructions.
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in legal
87 tools for Korean law — statutes, precedents, ordinances, interpretations | MCP Server · CLI · npm
Proof primitive for AI agents on MultiversX. Anchor file hashes on-chain as verifiable proofs.
AFIP — Argentine tax authority, electronic invoicing (Factura Electrónica)
956k Swiss court decisions: full-text search, citation graph, statute lookup (DE/FR/IT)
MCP Security Weekly
Get CVE alerts and security updates for Lex and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
UK legal API for AI agents and researchers. Access comprehensive UK legislation data with semantic search and Model Context Protocol integration.
Lex provides programmatic access to 8.4M+ UK legal documents - legislation, amendments, and explanatory notes - with hybrid semantic search.
This is an experimental service and should not be used as a production dependency.
Connect AI assistants to Lex via Model Context Protocol. See the live documentation for setup instructions for:
# Clone and setup
git clone https://github.com/i-dot-ai/lex.git && cd lex
cp .env.example .env # Add your Azure OpenAI keys
# Start services and load sample data
docker compose up -d
make ingest-all-sample
# Visit http://localhost:8000/docs for API documentation
# Quick samples (recommended for testing)
make ingest-legislation-sample
make ingest-all-sample
# Full datasets (production use)
make ingest-legislation-full
make ingest-all-full
# Create indexes for fast filtering
uv run python scripts/create_payload_indexes.py
make install # Install dependencies
make test # Run tests
make run # Start API locally (without Docker)
uv run ruff format . # Format code
lex/
├── src/
│ ├── lex/ # Data pipeline (scraping, parsing, indexing)
│ └── backend/ # API server (FastAPI + MCP)
├── infrastructure/ # Azure Bicep templates and deploy scripts
├── scripts/ # Maintenance, migration, and export utilities
├── tests/ # Test suite
└── docs/ # Documentation
Built with support from The National Archives and Ministry of Justice.
MIT - See LICENSE for details.