Open Data

UK Legislation MCP Server

Use Studio chat to drive this server — credentials stay in your workspace.

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.

4 tools
Agent guide included
No auth required
Start Chatting

Opens MCPBundles Studio with this server selected. After sign-in, chat and run tools from the same thread.

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

What is MCP?

Model Context Protocol lets AI tools call external capabilities securely through a single URL. This bundle groups tools behind an MCP endpoint that many clients can use.

Use this bundle in 3 steps

  1. Copy the MCP URL above
  2. Open your AI tool and add a new MCP/connector
  3. Paste the URL and follow any auth prompts

Claude Desktop Users

Skip the manual setup! Use the .mcpb file format for one-click installation. Check the Claude Desktop tab for setup instructions.

Pick your tool tab for exact steps

Select ChatGPT, Cursor, Claude Code, or another tab for copy-paste config.

Ready to chat with UK Legislation?

Same flow: Studio opens on this server after sign-in. Keep chatting to call tools from the conversation.

UK Legislation MCP Server & Skill — 4 Tools