Skip to main content

MCP server for querying UK Charity Commission data via CharityBase

Project description

UK Charities MCP Server

Python 3.14+ License: MIT MCP

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

  1. Get your free API key from api-portal.charitycommission.gov.uk
  2. Add to Claude Desktop config (see below)
  3. Restart Claude Desktop
  4. 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 ENOENT or spawn uv ENOENT, use the full path. Run which uvx or which uv to find it, then use that path in the command field.

Prerequisites

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:

  1. Go to register-of-charities.charitycommission.gov.uk
  2. Search for the charity by name
  3. Copy the registration number from the results
  4. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uk_charities_mcp-0.1.0.tar.gz (30.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

uk_charities_mcp-0.1.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

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

Hashes for uk_charities_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d4d5bebece5404cf5cd0f2d8e0fe18f1efd32e5d01395375401032ce574d8542
MD5 0745e1d5dd006925ef8e920fdf3fe404
BLAKE2b-256 7117afeb25033c45120185b2b0a063c4107208ac3645e69156c0ce4aae00985e

See more details on using hashes here.

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

Hashes for uk_charities_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 89ac14217223d829a7ba7887fb46950f6fb3a6cb076d53bd2d7d7e5bd4c70cfa
MD5 facc9bc7237c4765f6c677f9a2899998
BLAKE2b-256 3250770a1c47345f27bfdf189be2571f6039d99372e04a14c26943291f32890a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page