Open Data

UK Legislation MCP Server

Chat with AI and run tools instantly — no API key or third-party login needed.

Access UK legislation from legislation.gov.uk. Search Acts of Parliament, Statutory Instruments, and other legislation. Retrieve full text, individual sections, and tables of contents.

Managed
4 tools
Agent guide included

No API key or third-party login needed. Chat with AI and run tools instantly.

Browse all tools

AI Skill
SKILL.md

Domain knowledge for UK Legislation — workflow patterns, data models, and gotchas for your AI agent.

UK Legislation API (legislation.gov.uk)

Access UK primary and secondary legislation. No authentication required.

Data Model

  • Legislation types: ukpga (UK Public General Act), uksi (UK Statutory Instrument), asp (Act of Scottish Parliament), asc (Act of Senedd Cymru), nisi (Northern Ireland Order in Council), ukla (UK Local Act), ukppa (UK Personal/Private Act).
  • Identification: Each piece of legislation is identified by type, year, and number (e.g. ukpga/2010/15 = Equality Act 2010).
  • Sections: Individual provisions within an Act, identified by number (e.g. section 1, section 149).
  • Versions: Legislation can be viewed as enacted or as revised (with amendments applied). The default is the latest revised version.

Gotchas

  • XML-first API: The API returns XML (Atom feeds for search, Legislation XML for content). There is no JSON endpoint for individual legislation.
  • Search via Atom feed: Use /search/data.feed?title=...&type=...&results-count=N for structured results.
  • XHTML for readable text: Use /data.xht suffix for HTML-formatted legislation text (easier to parse than raw XML).
  • Large Acts: Some Acts (e.g. Companies Act 2006) are very large. Request specific sections rather than the whole Act.
  • Rate limiting: Be respectful of the public API. No formal rate limit is published but excessive requests may be throttled.
  • Section numbering: Sections may include subsections like 1A, 78A. Use the exact section identifier.

Tools in this Server (4)

Legislation Get Act

Get metadata for a specific UK Act or Statutory Instrument. Specify the legislation type (e.g. 'ukpga'), year, and number. Returns title, description,...

Legislation Get Contents

Get the table of contents for a UK Act or Statutory Instrument. Returns the hierarchical structure of parts, chapters, and sections with their titles ...

Legislation Get Section

Get the text of a specific section of UK legislation. Returns the section content as readable text with subsection numbering. Includes amendment notes...

Legislation Search

Search UK legislation (Acts of Parliament, Statutory Instruments, etc.) by title keyword. Returns matching legislation with title, summary, year, numb...

Frequently Asked Questions

What is the UK Legislation MCP server?

Access UK legislation from legislation.gov.uk. Search Acts of Parliament, Statutory Instruments, and other legislation. Retrieve full text, individual sections, and tables of contents. It provides 4 tools that AI agents can use through the Model Context Protocol (MCP).

How do I connect UK Legislation to my AI agent?

Add the MCPBundles server URL to your MCP client configuration (Claude Desktop, Cursor, VS Code, etc.). The URL format is: https://mcp.mcpbundles.com/bundle/uk-legislation. Authentication is handled automatically.

How many tools does UK Legislation provide?

UK Legislation provides 4 tools that can be called by AI agents, along with a SKILL.md that gives your AI agent domain knowledge about when and how to use them.

What authentication does UK Legislation require?

UK Legislation uses open data APIs — no authentication required.

Setup Instructions

Connect UK Legislation to any MCP client in minutes

https://mcp.mcpbundles.com/bundle/uk-legislation

One-click install:

The link prefills the Add custom connector dialog — you still review the values and click Add, then Connect to complete OAuth.

Or add manually

  1. Open claude.ai → Settings → Connectors.
  2. Click the + button and choose Add custom connector.
  3. Set Name to UK Legislation and paste the MCP URL into Remote MCP server URL.
  4. Click Add. UK Legislation will appear under Not connected — select it and click Connect to complete OAuth.
Name: UK Legislation
Remote MCP server URL: https://mcp.mcpbundles.com/bundle/uk-legislation
Authentication: OAuth

Custom connectors at claude.ai require a paid Claude plan (Pro, Max, Team, or Enterprise).

Try UK Legislation now

No API key or third-party login required. Chat with AI and run tools instantly.

UK Legislation MCP Server & Skill — 4 Tools