MCP server for querying UK Charity Commission data via CharityBase
Project description
UK Charities MCP Server
Query UK charity data directly from Claude using the official Charity Commission API.
Why I built this: MCP integration with UK public sector data APIs. See also: food-hygiene-mcp for FSA food hygiene ratings.
Features
Query registered charities with 4 specialized tools:
| Tool | Description |
|---|---|
get_charity_details |
Full charity info: contact, trustees, causes, finances |
get_charity_financials |
5 years of detailed income & spending breakdowns |
get_charity_trustees |
List of current trustees |
get_governing_document |
Charitable objects, governing doc, area of benefit |
Quick Start
- Get your free API key from api-portal.charitycommission.gov.uk
- Add to Claude Desktop config (see below)
- Restart Claude Desktop
- Ask: "Get details for Oxfam (charity 202918)"
Claude Desktop Configuration
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
Option 1: Via PyPI (recommended)
{
"mcpServers": {
"uk-charities": {
"command": "uvx",
"args": ["uk-charities-mcp"],
"env": {
"CCEW_API_KEY": "your-api-key-here"
}
}
}
}
Option 2: From source
git clone https://github.com/w4sspr/uk-charities-mcp.git
cd uk-charities-mcp
uv sync
{
"mcpServers": {
"uk-charities": {
"command": "uv",
"args": ["run", "--directory", "/path/to/uk-charities-mcp", "uk-charities-mcp"],
"env": {
"CCEW_API_KEY": "your-api-key-here"
}
}
}
}
Note: If you get
spawn uvx ENOENTorspawn uv ENOENT, use the full path. Runwhich uvxorwhich uvto find it, then use that path in thecommandfield.
Prerequisites
- uv package manager
- CCEW API key (free at api-portal.charitycommission.gov.uk)
Finding Charity Registration Numbers
This MCP requires charity registration numbers. Find them at: https://register-of-charities.charitycommission.gov.uk/
Example Charities
| Charity | Registration # |
|---|---|
| Oxfam | 202918 |
| British Heart Foundation | 225971 |
| Cancer Research UK | 1089464 |
| RSPCA | 219099 |
| Barnardo's | 216250 |
| Save the Children | 213890 |
| British Red Cross | 220949 |
Example Prompts
Once connected, try asking Claude:
- "Get details for charity 202918" (Oxfam)
- "Show me the financial history for the British Heart Foundation (225971)"
- "Who are the trustees of Cancer Research UK?"
- "What are the charitable objects of the RSPCA?"
Development
Running Tests
export CCEW_API_KEY=your-api-key
uv run pytest tests/ -v
Testing with MCP Inspector
CCEW_API_KEY=your-api-key uv run mcp dev src/uk_charities_mcp/server.py
API Details
This server uses the official Charity Commission API, which provides live data from the Register of Charities.
Tool Specifications
get_charity_details
get_charity_details(registration_number: int) -> CharityDetails
Returns: name, registration number, charity type, status, registration date, contact info, trustees, causes, beneficiaries, operations, latest income/spending.
get_charity_financials
get_charity_financials(registration_number: int) -> CharityFinancials
Returns up to 5 years of detailed financial records with breakdowns:
- Income: donations & legacies, charitable activities, trading, investments, government grants
- Spending: charitable activities, fundraising, governance, grants to institutions
get_charity_trustees
get_charity_trustees(registration_number: int) -> CharityTrustees
Returns the charity name and list of current trustees.
get_governing_document
get_governing_document(registration_number: int) -> GoverningDocument
Returns the charity's charitable objects (mission statement), governing document description, and area of benefit.
Limitations
What This MCP Cannot Do
| Limitation | Reason |
|---|---|
| Search by name | CCEW API has no search endpoint. You must provide the registration number. |
| Scotland charities | Only covers England & Wales. Scottish charities are regulated by OSCR. |
| Northern Ireland charities | Only covers England & Wales. NI charities are regulated by CCNI. |
| Sector-wide statistics | Cannot aggregate across all charities without downloading the full register. |
| Historical trustees | API only provides current trustees, not historical records. |
Prompts That Won't Work
These types of requests require search functionality or aggregation that the API doesn't support:
- "Find mental health charities in London" (no search by cause/location)
- "List the largest charities by income" (no ranking/sorting)
- "How many charities are there in the UK?" (no aggregate stats)
- "Compare Oxfam and Save the Children" (works, but you need both reg numbers)
Workaround
To find a charity's registration number:
- Go to register-of-charities.charitycommission.gov.uk
- Search for the charity by name
- Copy the registration number from the results
- Use that number with this MCP
Roadmap
- Scotland charities via OSCR API
- Northern Ireland charities via CCNI API
- Caching layer to reduce API calls
- Bulk lookup for comparing multiple charities
License
MIT
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 uk_charities_mcp-0.1.0.tar.gz.
File metadata
- Download URL: uk_charities_mcp-0.1.0.tar.gz
- Upload date:
- Size: 30.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4d5bebece5404cf5cd0f2d8e0fe18f1efd32e5d01395375401032ce574d8542
|
|
| MD5 |
0745e1d5dd006925ef8e920fdf3fe404
|
|
| BLAKE2b-256 |
7117afeb25033c45120185b2b0a063c4107208ac3645e69156c0ce4aae00985e
|
File details
Details for the file uk_charities_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: uk_charities_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89ac14217223d829a7ba7887fb46950f6fb3a6cb076d53bd2d7d7e5bd4c70cfa
|
|
| MD5 |
facc9bc7237c4765f6c677f9a2899998
|
|
| BLAKE2b-256 |
3250770a1c47345f27bfdf189be2571f6039d99372e04a14c26943291f32890a
|