MCP server for GOV.UK — search, content, organisations and postcode lookup
Project description
govuk-mcp
MCP server for GOV.UK — search, content retrieval, organisation lookup, and postcode resolution.
Tools
| Tool | Description |
|---|---|
govuk_search |
Full-text search across 700k+ GOV.UK pages, with format and organisation filters |
govuk_get_content |
Page metadata and navigable section index for any GOV.UK page by base path |
govuk_get_section |
Body HTML for a single named section (anchor) of a GOV.UK page |
govuk_grep_content |
Regex/substring search within the body of a specific GOV.UK page |
govuk_get_organisation |
Get details for a UK government organisation (type, parent, children, contacts) |
govuk_list_organisations |
Paginated list of all government organisations registered on GOV.UK |
govuk_lookup_postcode |
Resolve a UK postcode to local authority, region, constituency, and NHS board |
All data is sourced from official public GOV.UK APIs and postcodes.io. No API keys required.
Resources
For protocol-aware clients (Claude, Cursor, Inspector), the server also exposes govuk:// resource templates:
| URI | Returns |
|---|---|
govuk://content/{base_path*}/header |
Page metadata (title, doc type, dates) |
govuk://content/{base_path*}/index |
Section anchor:heading list |
govuk://content/{base_path*}/section/{anchor} |
Bounded HTML for one section |
govuk://content/{base_path*}/details/{field} |
Schema-specific details field |
govuk://content/{base_path*}/links/{rel} |
Related content by link type |
govuk://organisation/{slug} |
Organisation profile |
Quick start
Remote (no install)
Point any MCP client at the hosted server:
{
"mcpServers": {
"govuk": {
"type": "http",
"url": "https://govuk-mcp.fly.dev/mcp"
}
}
}
Local (pip install)
pip install govuk-mcp
govuk-mcp
# MCP endpoint: http://localhost:8000/mcp
Local (Claude Desktop)
fastmcp install claude-desktop govuk-mcp
APIs used
| API | Base URL | Auth |
|---|---|---|
| GOV.UK Search | https://www.gov.uk/api/search.json |
None |
| GOV.UK Content | https://www.gov.uk/api/content{path} |
None |
| GOV.UK Organisations | https://www.gov.uk/api/organisations |
None |
| postcodes.io | https://api.postcodes.io |
None |
License
MIT
Project details
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_mcp-0.2.1.tar.gz.
File metadata
- Download URL: govuk_mcp-0.2.1.tar.gz
- Upload date:
- Size: 206.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0dcb3f5008de721a468fd487b003b1c1bd24e16c1723cfd80c95ec6329e7421e
|
|
| MD5 |
d56bcad4b4cc392c8e66ffea540daca7
|
|
| BLAKE2b-256 |
3ec9965a2a23b1a8b91791538277963b97be973379a82db4cc5c3060e8a6126d
|
File details
Details for the file govuk_mcp-0.2.1-py3-none-any.whl.
File metadata
- Download URL: govuk_mcp-0.2.1-py3-none-any.whl
- Upload date:
- Size: 16.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8f611c96a4570c63b37ddd388fa97b6d079ac399d3a4782bad9d97b48ed0905
|
|
| MD5 |
aeb8237f8cc569a1e29a5a01b1dfe107
|
|
| BLAKE2b-256 |
6f78724e379e4502bb64d5b8d5c8af3ff42d3db197df20b1e80178f4d6c33e0b
|