Lex (UK legislation)
i.AI's experimental UK legal API: semantic search over UK legislation, amendments and explanatory notes.
- Tools
- 13
- Last checked
- Nov 28, 2026
- Listed
- Nov 28, 2026
Install & connect
Third-party code: read it before you run it. HPSILab reviewed this guide but does not operate this server.
Install by client
claude mcp add --transport http lex-uk-legislation https://lex.lab.i.ai.gov.uk/mcp
Generated by HPSILab from this listing's endpoint and package, in each client's documented format. The official guide decides arguments, keys and versions.
Official guide
# From the project README: https://github.com/i-dot-ai/lex claude mcp add --transport http lex https://lex.lab.i.ai.gov.uk/mcp # Experimental service; client-specific setup: https://lex.lab.i.ai.gov.uk/docs
Remote endpoint
https://lex.lab.i.ai.gov.uk/mcpTools (13)
As listed by the server's public endpoint (tools/list), checked Nov 28, 2026. HPSILab never calls these tools.
Tool description check: no warning signs found
A rule-based check of the text for signs of prompt injection or unsafe requests. Not a security guarantee.
search_for_legislation_sectionsFind text within sections of Acts, SIs, or other legislation types. Use for detailed content searches.
Parameters (9)
query· string · requiredThe natural language query to search for sections of legislation. If empty will return all sections matching filters.legislation_idThe legislation_id to search within. Use this if you only want to search within a specific piece of legislation. Accepts both short format (e.g., 'ukpga/1994/13') and full URL format (e.g., 'http://www.legislation.gov.uk/id/ukpga/1994/13'). If not provided, all legislation will be included based on the other filters.legislation_categoryThe legislation category to filter by. If not provided, all categories will be included.legislation_typeThe legislation type to filter by. If not provided, all types will be included.year_fromThe starting year for the legislation to filter by. If not provided, no filtering will be applied.year_toThe ending year for the legislation to filter by. If not provided, no filtering will be applied.offset· integerThe number of results to skip (for pagination).size· integerThe number of results to return.include_text· booleanWhether to include full text in results. Set to False for faster performance when only metadata is needed.
search_for_legislation_actsFind legislation by title, content, or metadata. Returns full Acts and SIs with match scores.
Parameters (7)
query· string · requiredThe search query - can be a concept, question, or keywords.year_fromStarting year filter (optional).year_toEnding year filter (optional).legislation_typeList of legislation types to filter by (optional).offset· integerNumber of results to skip (pagination).limit· integerNumber of results to return.include_text· booleanWhether to include full section text in results. Set to False for faster performance when only metadata is needed.
lookup_legislationRetrieve a single Act or SI using its official citation (e.g. ukpga/2018/12).
Parameters (3)
legislation_type· string · requiredThe specific type of legislationyear· integer · requiredThe year the legislation was enacted.number· integer · requiredThe number of the legislation.
get_legislation_sectionsRetrieve the complete structure and content of all sections within a piece of legislation.
Parameters (2)
legislation_id· string · requiredThe ID of the legislation to retrieve sections for. Accepts short form (e.g., 'ukpga/1998/42') or full URL.limit· integerThe number of results to return.
get_legislation_full_textRetrieve the full text content of an Act or SI as a single document.
Parameters (2)
legislation_id· string · requiredThe ID of the legislation document. Accepts short form (e.g., 'ukpga/1998/42') or full URL.include_schedules· booleanWhether to include schedules in the response. If False, only sections are returned. If True, sections are returned first, then schedules. Only request schedules if you are sure you need them.
proxy_legislation_dataProxy endpoint to fetch enriched metadata from legislation.gov.uk. Args: legislation_id: The legislation ID (e.g., "ukpga/2018/12") Returns: HTML content from legislation.gov.uk with CORS headers
Parameters (1)
legislation_id· string · required
search_explanatory_noteFind explanatory notes by text content across all legislation types.
Parameters (5)
query· stringThe natural language query to search for explanatory notes. If empty, will return all notes matching the filters.legislation_idFilter by legislation ID to search within a specific piece of legislation. Accepts short form (e.g., 'ukpga/1998/42') or full URL. If not provided, all legislation will be included.note_typeFilter by note type (overview, policy_background, legal_background, extent, provisions, commencement, related_documents).section_typeFilter by section type (section, schedule, part).size· integerMaximum number of results to return.
get_explanatory_note_by_legislationRetrieve all explanatory notes associated with a particular Act or SI.
Parameters (2)
legislation_id· string · requiredThe ID of the legislation to look up explanatory notes for. Accepts short form (e.g., 'ukpga/1998/42') or full URL.limit· integerMaximum number of results to return.
get_explanatory_note_by_sectionRetrieve the explanatory note that explains a particular section of legislation.
Parameters (2)
legislation_id· string · requiredThe ID of the legislation to look up an explanatory note for. Accepts short form (e.g., 'ukpga/1998/42') or full URL.section_number· integer · requiredThe section number to look up an explanatory note for.
search_amendmentsFind amendments to Acts and SIs by content, title, or affected legislation.
Parameters (3)
legislation_id· string · requiredID of the legislation to search amendments for. Accepts short form (e.g., 'ukpga/1998/42') or full URL.search_amended· booleanIf True, search for amendments made to the legislation. If False, search for amendments made by the legislation.size· integerMaximum number of results to return.
search_amendment_sectionsFind text within specific sections of legislative amendments.
Parameters (3)
provision_id· string · requiredID of the provision/section to search amendments for. Accepts short form (e.g., 'ukpga/1998/42/section/3') or full URL.search_amended· booleanIf True, search for amendments made to the provision. If False, search for amendments made by the provision.size· integerMaximum number of results to return.
get_live_stats_api_stats_getGet live dataset statistics with 5-minute caching.
health_check_healthcheck_getHealth check with Qdrant connection verification.
Links
More Data & Databases MCP servers
- mcp-server-db
One server for PostgreSQL, MySQL, Redis, Elasticsearch, MongoDB and LDAP, with per-connection guardrails.
- tafsir-mcp
Scholarly Quran server with five classical tafsirs: verses, exegesis and search.
- leis-mcp
Search and cite Brazilian federal legislation from a local index.
- open-meteo-mcp
Open-Meteo weather APIs for agents: forecasts, historical weather, air quality, marine and more, no API key.
- hana-mcp-server
Query and explore SAP HANA databases (schemas, tables, SQL) from an AI client. Community-maintained; not an official SAP product.
- airtable-mcp (rashidazarang)
Airtable bases, tables and records for AI clients with your Airtable token. Community-maintained; not an official Airtable product.