UK Legal Research — Claude Code MCP server: setup guide
Connects AI assistants to UK legislation, case law, Hansard debates, and HMRC guidance. Generates verifiable evidence packs with primary source citations.
claude mcp add --transport http uk-legal-mcp https://uk-legal-mcp.fly.dev/mcpWhat UK Legal Research does
This server hooks your coding agent directly into primary British legal records, including legislation.gov.uk, The National Archives Find Case Law, and parliamentary debates. The agent fetches actual statutory provisions, territorial extent data, voting records, and OSCOLA citation details instead of guessing from memory. Standard queries require no external API keys. Only HMRC's optional Making Tax Digital checks need authentication.
Heavy documents stream through dedicated judgment://, legislation://, and hansard:// resource URIs. Massive statutes can stall over shared cloud IPs. Running uvx uk-legal-mcp locally avoids that bottleneck. Remember to verify the extent field, because UK statutes often apply differently across England, Wales, Scotland, and Northern Ireland.
What it helps with
- retrieve UK court judgments with neutral citations and paragraph references
- verify whether a statutory provision is currently in force
- inspect parliamentary committee evidence and division voting records
- parse legal citations according to OSCOLA standards
Example prompts for the agent
- Use uk-legal-mcp to find the territorial extent and commencement date of the Worker Protection Act.
- Search The National Archives for recent High Court rulings on contract repudiation and quote relevant paragraphs.
- Check the Hansard record for House of Lords amendments regarding the Automated Vehicles Bill.
How to install UK Legal Research
1Platform CLI: remote server
claude mcp add --transport http uk-legal-mcp https://uk-legal-mcp.fly.dev/mcp2Platform CLI
claude mcp add uk-legal-research -- uvx uk-legal-mcpuvx runs the command named after the package; if the README names another one, use uvx --from uk-legal-mcp <command>
1Platform CLI: remote server
codex mcp add uk-legal-research --url https://uk-legal-mcp.fly.dev/mcp2Platform CLI
codex mcp add uk-legal-research -- uvx uk-legal-mcpuvx runs the command named after the package; if the README names another one, use uvx --from uk-legal-mcp <command>
Config file
{
"mcpServers": {
"uk-legal-research": {
"url": "https://uk-legal-mcp.fly.dev/mcp"
}
}
}{
"mcpServers": {
"uk-legal-research": {
"command": "uvx",
"args": [
"uk-legal-mcp"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from uk-legal-mcp <command>
Config file
{
"servers": {
"uk-legal-research": {
"type": "http",
"url": "https://uk-legal-mcp.fly.dev/mcp"
}
}
}{
"servers": {
"uk-legal-research": {
"type": "stdio",
"command": "uvx",
"args": [
"uk-legal-mcp"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from uk-legal-mcp <command>
1Platform CLI: remote server
gemini mcp add -t http uk-legal-research https://uk-legal-mcp.fly.dev/mcp2Platform CLI
gemini mcp add uk-legal-research uvx uk-legal-mcpuvx runs the command named after the package; if the README names another one, use uvx --from uk-legal-mcp <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about UK Legal Research
How do I install UK Legal Research in Claude Code?
To connect the hosted server, run claude mcp add --transport http uk-legal-mcp https://uk-legal-mcp.fly.dev/mcp. If you prefer running locally, execute claude mcp add uk-legal-research -- uvx uk-legal-mcp.
Are API keys required to use this server?
No API tokens are required for legal databases, court records, or parliamentary sources. Only the optional HMRC Making Tax Digital endpoint requires authentication.
Why run the server locally instead of hosted?
The hosted Fly endpoint shares an IP across users, which may stall when fetching voluminous Acts. Running locally with uvx uk-legal-mcp uses your own network connection.