UK Legislation MCP Server
by cyanheadsio.github.cyanheads/uk-legislation-mcp-serverv0.1.1
Search and read UK legislation at any date, resolve citations, list amendments, track changes.
context tax
queued
security
queued
cold start
queued
freshness
Active13d ago
Install UK Legislation MCP server
Install in Claude Code
claude mcp add uk-legislation -- npx -y @cyanheads/uk-legislation-mcp-server run start:stdioInstall in Cursor
{
"mcpServers": {
"uk-legislation": {
"command": "npx",
"args": [
"-y",
"@cyanheads/uk-legislation-mcp-server",
"run",
"start:stdio"
]
}
}
}Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project).
Install in Claude Desktop
{
"mcpServers": {
"uk-legislation": {
"command": "npx",
"args": [
"-y",
"@cyanheads/uk-legislation-mcp-server",
"run",
"start:stdio"
]
}
}
}Settings → Developer → Edit Config (claude_desktop_config.json), then restart.
Install in VS Code
{
"servers": {
"uk-legislation": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@cyanheads/uk-legislation-mcp-server",
"run",
"start:stdio"
]
}
}
}Add to .vscode/mcp.json in your workspace.
Install in Windsurf
{
"mcpServers": {
"uk-legislation": {
"command": "npx",
"args": [
"-y",
"@cyanheads/uk-legislation-mcp-server",
"run",
"start:stdio"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json.
Configuration
| Variable | Required | Secret | Description |
|---|---|---|---|
| UK_LEGISLATION_CONTACT | — | — | Email or URL appended to the User-Agent so legislation.gov.uk can reach the operator. Optional; set it on hosted deployments. |
| UK_LEGISLATION_MIN_REQUEST_GAP_MS | — | — | Minimum gap between legislation.gov.uk request starts, in ms (minimum 250). Replicas sharing one User-Agent divide the fair use limit: use at least 250 ms x replica count. |
| UK_LEGISLATION_CACHE_MAX_MB | — | — | Response cache size bound, in MB (8-1024). |
| MCP_LOG_LEVEL | — | — | Sets the minimum log level for output (e.g., 'debug', 'info', 'warn'). |
| MCP_HTTP_HOST | — | — | The hostname for the HTTP server. |
| MCP_HTTP_PORT | — | — | The port to run the HTTP server on. |
| MCP_HTTP_ENDPOINT_PATH | — | — | The endpoint path for the MCP server. |
| MCP_AUTH_MODE | — | — | Authentication mode to use: 'none', 'jwt', or 'oauth'. |
Freshness
Active — last maintenance signal 13d ago. The newest of the signals below sets the band.
Last commit (default branch)
2026-09-27 · 13d ago · GitHub
Latest release
2026-09-27 · 13d ago · GitHub · v0.1.1
Package published
no data · npm/PyPI
Registry entry updated
2026-09-27 · 13d ago · official registry · v0.1.1
FAQ
›How do I install the UK Legislation MCP server in Claude Code?
Run: claude mcp add uk-legislation -- npx -y @cyanheads/uk-legislation-mcp-server run start:stdio. For Cursor, VS Code, Claude Desktop and Windsurf, use the install tabs above.
›Does UK Legislation require an API key?
No required environment variables are declared in its published metadata.
›Can I use UK Legislation as a remote (hosted) MCP server?
Yes — it offers both a hosted endpoint and a local stdio package.
›Is UK Legislation in the official MCP registry?
Yes, as io.github.cyanheads/uk-legislation-mcp-server.