MCP for searching gov.uk
Project description
govuk-search-mcp
MCP server for searching GOV.UK. Exposes two tools:
search_gov_uk— keyword search ranked by relevancelatest_gov_uk— most recent publications, newest first
Uses the GOV.UK Search API.
The server runs over streamable-http.
Installation
pip install govuk-search-mcp
Or with uv:
uv add govuk-search-mcp
No install needed with uvx — see usage below.
Usage
The server runs over streamable-http. Start it first:
uvx govuk-search-mcp
# or, if installed via pip/uv:
govuk-search-mcp
By default it 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 |
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"gov-uk": {
"url": "http://localhost:8000/mcp"
}
}
}
Claude Code
claude mcp add --transport http gov-uk-search http://localhost:8000/mcp
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file govuk_search_mcp-0.1.0.tar.gz.
File metadata
- Download URL: govuk_search_mcp-0.1.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf9deb57156dc3589707905f76a4ef0d51b744b40a3b32eae3ee48e05616ccff
|
|
| MD5 |
cee1d794a06ef9d09fd0a83c9cf59e1f
|
|
| BLAKE2b-256 |
efd5993b4ca80b80a004fef45d5a8dbed2727fbeb84be21e9134cd1beedbd5a5
|
File details
Details for the file govuk_search_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: govuk_search_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb8b91ae38750f0fe2edd04eaa197ef509199d976cf558a2bde87084b81d3821
|
|
| MD5 |
5155627d71887c97d89e358986bfc663
|
|
| BLAKE2b-256 |
e9e14bafe530441fc5734a8d8282b6728d99fd3e001939249d96bae5861ba519
|