Skip to main content

GOV.UK Search MCP Server

MCP server for searching GOV.UK. Exposes three tools:

  • search_gov_uk — keyword search ranked by relevance
  • latest_gov_uk — most recent publications, newest first
  • fetch_gov_uk_page — fetches the content and attachments on a specific gov UK page

Uses the GOV.UK Search API.
The server runs over streamable-http.

Usage (Deployed)

Installation

Install with pip:

pip install govuk-search-mcp

or with uv:

uv add govuk-search-mcp

or skip installation and use uvx (see below).

Run Server

The server runs over streamable-http.

If installed via pip/uv:

govuk-search-mcp

Or if using uvx:

uvx govuk-search-mcp

By default the server listens on http://127.0.0.1:8000/mcp. Override with env vars:

Variable Default Description
FASTMCP_HOST 127.0.0.1 Bind address
FASTMCP_PORT 8000 Port

Usage (Local)

If running locally, use just commands to run local code version (not release version).

# Start server using local code
just run_server
# Start inspector to manually test
just run_inspector
# Attach to claude code
just attach_claude
# Detach from calude code
just detach_claude

Tools

search_gov_uk

Search GOV.UK by keyword.

Parameter Type Default Description
query string — Search terms
count int 10 Max results (0–1500)
start int 0 Pagination offset
date_from string — Earliest date, YYYY-MM-DD (inclusive)
date_to string — Latest date, YYYY-MM-DD (inclusive)

latest_gov_uk

Get most recently updated GOV.UK publications.

Parameter Type Default Description
count int 10 Max results (0–1500)
start int 0 Pagination offset
date_from string — Earliest date, YYYY-MM-DD (inclusive)
date_to string — Latest date, YYYY-MM-DD (inclusive)

Development

uv sync
just test        # unit tests
just test_int    # integration tests (hits live GOV.UK API)
just lint        # ruff + mypy

Metadata

Release files for govuk-search-mcp 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for govuk-search-mcp 0.2.0
File Size Uploaded
govuk_search_mcp-0.2.0.tar.gz 6.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for govuk-search-mcp 0.2.0
File Interpreter ABI Platform
govuk_search_mcp-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.4 kB

Release files / govuk_search_mcp-0.2.0.tar.gz

Download URL govuk_search_mcp-0.2.0.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c02a5be42b2eac5a3ed8a3510d70093ce81743f2152642ddbe9c70fbdcfbfac0
BLAKE2b-256 checksum
How to use checksums
c3e5f11dda84b0b5a0b4cf1f14ea8e0c8277e838785ab3332988b969e4fa8878
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / govuk_search_mcp-0.2.0-py3-none-any.whl

Download URL govuk_search_mcp-0.2.0-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b1d25efcec79c3edcb244556b59a9cb660606949f2e17e0da4e9b7b33c734c1f
BLAKE2b-256 checksum
How to use checksums
003c9504a1f64e42bf3b734ef0bb6d576a63ae70b8115f70bf42745138217a34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page