Metadata-Version: 2.4
Name: govuk-mcp
Version: 0.1.0
Summary: MCP server for GOV.UK — search, content, organisations and postcode lookup
Project-URL: Homepage, https://github.com/paulieb89/govuk-mcp
Project-URL: Repository, https://github.com/paulieb89/govuk-mcp
Project-URL: Issues, https://github.com/paulieb89/govuk-mcp/issues
Author-email: Paul Boucher <paul@bouch.dev>
License: MIT
Keywords: fastmcp,government,govuk,mcp,model-context-protocol,uk
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.11
Requires-Dist: fastmcp>=2.0.0
Requires-Dist: httpx>=0.27.0
Requires-Dist: pydantic>=2.0.0
Description-Content-Type: text/markdown

# 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` | Retrieve the full structured content item for any GOV.UK page by base path |
| `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.

## Quick start

### Remote (no install)

Point any MCP client at the hosted server:

```json
{
  "mcpServers": {
    "govuk": {
      "type": "http",
      "url": "https://govuk-mcp.fly.dev/mcp"
    }
  }
}
```

### Local (pip install)

```bash
pip install govuk-mcp
govuk-mcp
# MCP endpoint: http://localhost:8000/mcp
```

### Local (Claude Desktop)

```bash
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
