# Nonprofit Grant Intelligence MCP Server (`ryanclinton/nonprofit-grant-intelligence-mcp`) Actor

Philanthropic due diligence intelligence for foundations, corporate giving programs, and grant writers. This MCP server orchestrates 7 data sources across IRS 990 financial data, federal grant opportunities, federal award history, UK charity registrations, and multi-jurisdiction sanctions screening.

- **URL**: https://apify.com/ryanclinton/nonprofit-grant-intelligence-mcp.md
- **Developed by:** [Ryan Clinton](https://apify.com/ryanclinton) (community)
- **Categories:** AI, Developer tools
- **Stats:** 4 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $300.00 / 1,000 full due diligence reports

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Nonprofit Grant Intelligence MCP Server

Nonprofit grant intelligence for foundations, corporate giving teams, and compliance officers — this MCP server connects your AI assistant to 7 authoritative public data sources to automate philanthropic due diligence. It replaces hours of manual 990 filing reviews, federal award searches, and sanctions checks with structured scores and a clear funding recommendation.

The server runs 7 specialized Apify actors in parallel: ProPublica Nonprofit Explorer, Grants.gov, USAspending, UK Charity Commission, OpenSanctions, OFAC, and OpenCorporates. Four independent scoring models assess nonprofit financial health, federal grant compliance, organizational integrity, and cross-jurisdiction verification. Each call returns a structured JSON result with scores, risk signals, and — for full due diligence — a weighted composite recommendation of APPROVE, CONDITIONAL, ENHANCED REVIEW, or DECLINE.

### What data can you access?

| Data Point | Source | Example |
|------------|--------|---------|
| 📄 IRS 990 financial filings | ProPublica Nonprofit Explorer | Revenue, expenses, officer compensation, program ratios |
| 💰 Total revenue and expense trends | ProPublica Nonprofit Explorer | $4.2M revenue, 78% program expense ratio |
| 📋 Federal grant opportunities | Grants.gov | Active CFDA listings with deadlines and eligibility |
| 🏛️ Federal award history | USAspending | Award amounts, awarding agency, period of performance |
| 🇬🇧 UK charity registrations | Charity Commission | Income, spending, trustee data, regulatory status |
| 🔍 International sanctions matches | OpenSanctions | 40+ PEP and watchlist sources consolidated |
| 🚫 OFAC SDN list matches | US Treasury OFAC | Specially Designated Nationals — blocked/restricted entities |
| 🏢 Corporate entity registries | OpenCorporates | Global entity presence, jurisdictions, dissolution status |
| 📊 Nonprofit Health Score | Composite model | 0-100 score with POOR to EXCELLENT classification |
| ⚖️ Compliance Risk Index | Composite model | 0-100 risk score with LOW to CRITICAL classification |
| 🛡️ Integrity Risk Score | Composite model | 0-100 risk score with CLEAR to CRITICAL classification |
| 🌐 Cross-Jurisdiction Verification Score | Composite model | 0-100 score with UNVERIFIED to MULTI_JURISDICTION status |

### Why use Nonprofit Grant Intelligence MCP Server?

Manual philanthropic due diligence is slow and fragmented. Reviewing a single grant applicant typically means logging into ProPublica to pull 990 filings, checking USAspending for award history, searching Grants.gov for compliance history, running an OFAC check, cross-referencing OpenSanctions, and verifying the entity in OpenCorporates — each in a separate browser tab, each requiring manual interpretation. For a program officer reviewing 20 applicants per cycle, that is 20–40 hours of grunt work per grant round.

This server automates the entire research layer. Ask your AI assistant a single question — "screen Pinnacle Community Foundation for our Q3 grant cycle" — and get a structured due diligence report in under 90 seconds, sourced from the same authoritative databases your compliance team would use manually.

- **Scheduling** — run quarterly grantee health checks automatically to catch deteriorating financials before renewal
- **API access** — trigger due diligence from your grants management system via Python, JavaScript, or any HTTP client
- **Parallel execution** — all 7 data sources query simultaneously, not sequentially, keeping response times under 90 seconds
- **Monitoring** — get Slack or email alerts when a grantee's integrity screen flags a new sanctions match
- **Integrations** — connect to Zapier, Make, HubSpot, or your CRM via webhooks to log due diligence results automatically

### Features

- **Nonprofit Health Score (0-100)** — Four-component financial model: program expense ratio (75%+ meets best practice), revenue growth trajectory, financial sustainability ratio (expenses vs revenue), and audit findings penalty of up to 15 points
- **Program expense ratio scoring** — Scores up to 30 points for charities spending 75%+ on mission delivery; flags organizations below 50% as a low-efficiency signal
- **Grant Compliance Risk Index (0-100)** — Analyzes federal award volume, debarment/suspension/exclusion status flags from USAspending, grant concentration risk from single large awards
- **Integrity Risk Score (0-100)** — OFAC SDN match (up to 40 points), OpenSanctions international match (up to 30 points), dissolved/inactive corporate entities in network (up to 15 points)
- **Cross-Jurisdiction Verification Score (0-100)** — US presence via IRS 990 (30 points), UK presence via Charity Commission (25 points), international corporate presence (up to 25 points), multi-jurisdiction bonus (up to 20 points)
- **Composite due diligence recommendation** — Weighted formula: Health 25% + Compliance inverted 25% + Integrity inverted 30% + Jurisdiction 20%, with hard overrides (any OFAC match forces DECLINE)
- **Automatic action items** — The due diligence report generates specific action items: "BLOCKED: OFAC sanctions match — do not proceed without OFAC license", "Low program expense ratio — request detailed budget breakdown"
- **Parallel actor orchestration** — Uses `Promise.allSettled` so a single slow data source does not block results from the other six
- **Federal funding landscape analysis** — Aggregates total federal funding by awarding agency, ranks top agencies by award count, surfaces active grant programs for a topic area
- **Grant opportunity search** — Queries Grants.gov by keyword, CFDA number, agency, or program area with optional status filtering (posted, closed, forecasted)
- **Officer-level integrity screening** — Pass individual officer names directly to `screen_organizational_integrity` for personal sanctions and PEP list checks
- **Spending limit enforcement** — Each tool checks the Apify charge limit before executing, returning a structured error rather than silently failing

### Use cases for nonprofit grant intelligence

#### Foundation grant due diligence

Program officers at private and community foundations review dozens to hundreds of grant applications per cycle. The `generate_due_diligence_report` tool delivers a structured APPROVE/CONDITIONAL/ENHANCED REVIEW/DECLINE recommendation from all 7 data sources. A program officer can ask Claude to screen every applicant overnight and arrive the next morning with a ranked shortlist — instead of spending a week on manual research.

#### Corporate CSR and matching gift screening

Corporate social responsibility teams need to verify nonprofit partners before sponsoring events, launching employee giving programs, or approving donation matches. The integrity screen checks leadership against OFAC and 40+ international watchlists, while cross-jurisdiction verification confirms the organization appears in the registries it claims. This protects the company from reputational and legal exposure from inadvertently funding restricted entities.

#### Grant writing and funding discovery

Development directors and grant writers can use `search_grant_opportunities` to find active federal grant programs matching their organization's mission. The `analyze_funding_landscape` tool shows which agencies are funding a cause area, how much total federal money is flowing, and which programs are most active — informing grant strategy and proposal prioritization.

#### Grantee compliance monitoring

Program managers at foundations with active grant portfolios can schedule quarterly health checks on all current grantees. A declining Nonprofit Health Score, new compliance flags from USAspending, or a changed integrity screen result triggers an alert before the problem reaches renewal — giving the program team time to request documentation or initiate a conversation.

#### Nonprofit M&A and affiliation due diligence

When a foundation facilitates a nonprofit merger, acquisition, or formal affiliation, both parties need financial verification. The composite due diligence report provides an independently sourced financial health picture, grant compliance history, sanctions clean bill, and multi-jurisdiction verification — covering the core due diligence checklist in a single tool call.

#### Philanthropic compliance and audit support

Internal audit teams and legal counsel supporting philanthropic entities can use this server to document that due diligence was conducted on grant recipients. The structured JSON output — with source citations, score breakdowns, and action items — creates an auditable record of the screening process.

### How to run nonprofit grant due diligence

1. **Connect the MCP server to your AI client** — Add the server URL `https://nonprofit-grant-intelligence-mcp.apify.actor/mcp` to your Claude Desktop, Cursor, or Windsurf config. You need an Apify API token (free tier available at apify.com).

2. **Ask a plain-language question** — Tell your AI assistant: "Run a due diligence report on [Organization Name] for our grant review." The AI will call the right tool with the right parameters automatically.

3. **Review the structured output** — The server returns a JSON report with four dimension scores, a composite score, a recommendation, all risk signals, and a list of required action items. For a clean organization, this takes 30–90 seconds.

4. **Export or log the result** — Copy the JSON output into your grants management system, CRM, or document store. Connect via webhook to log results to HubSpot, Airtable, or your existing workflow automatically.

### MCP tools

| Tool | Price | Description |
|------|-------|-------------|
| `assess_nonprofit_health` | $0.045 | IRS 990 financial health analysis: revenue trends, program expense ratio, sustainability, audit findings. Returns Nonprofit Health Score 0-100. |
| `verify_grant_compliance` | $0.045 | Federal award history via Grants.gov and USAspending. Debarment/suspension flags, award volume, concentration risk. Returns Grant Compliance Risk Index 0-100. |
| `screen_organizational_integrity` | $0.045 | OFAC SDN screening, OpenSanctions international watchlists, OpenCorporates corporate structure. Returns Integrity Risk Score 0-100. |
| `search_grant_opportunities` | $0.045 | Search active Grants.gov listings by keyword, CFDA number, agency, or status (posted/closed/forecasted). Returns up to 30 matching opportunities. |
| `verify_cross_jurisdiction` | $0.045 | Verify entity across US (IRS 990), UK (Charity Commission), and international (OpenCorporates) registries. Returns Cross-Jurisdiction Verification Score 0-100. |
| `analyze_funding_landscape` | $0.045 | Federal funding landscape for a cause area: total federal funding, award count, active grants, top awarding agencies. |
| `generate_due_diligence_report` | $0.045 | Full philanthropic due diligence: all 7 sources, 4 scoring models, composite score, APPROVE/CONDITIONAL/ENHANCED REVIEW/DECLINE recommendation, action items. |

#### Tool parameters

| Tool | Parameter | Type | Required | Description |
|------|-----------|------|----------|-------------|
| `assess_nonprofit_health` | `organization` | string | Yes | Nonprofit name or EIN |
| `verify_grant_compliance` | `organization` | string | Yes | Organization name |
| `verify_grant_compliance` | `grantProgram` | string | No | Specific program name or CFDA number |
| `screen_organizational_integrity` | `organization` | string | Yes | Organization name or individual officer name |
| `search_grant_opportunities` | `query` | string | Yes | Topic, agency, program area, or CFDA number |
| `search_grant_opportunities` | `status` | string | No | Grant status filter: posted, closed, forecasted |
| `verify_cross_jurisdiction` | `organization` | string | Yes | Organization name |
| `analyze_funding_landscape` | `query` | string | Yes | Sector, topic, or program area |
| `generate_due_diligence_report` | `organization` | string | Yes | Nonprofit name or EIN |

### How to connect this MCP server

#### Claude Desktop

Add to your `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "nonprofit-grant-intelligence": {
      "url": "https://nonprofit-grant-intelligence-mcp.apify.actor/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_APIFY_TOKEN"
      }
    }
  }
}
````

#### Cursor / Windsurf / Cline

Add to your MCP settings:

```json
{
  "nonprofit-grant-intelligence": {
    "url": "https://nonprofit-grant-intelligence-mcp.apify.actor/mcp",
    "headers": {
      "Authorization": "Bearer YOUR_APIFY_TOKEN"
    }
  }
}
```

#### JavaScript / Python (direct HTTP)

```javascript
import { ApifyClient } from "apify-client";

const client = new ApifyClient({ token: "YOUR_API_TOKEN" });

// Connect your MCP client to the standby endpoint
const mcpEndpoint = "https://nonprofit-grant-intelligence-mcp.apify.actor/mcp";

// Example: call generate_due_diligence_report directly via HTTP
const response = await fetch(mcpEndpoint, {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": `Bearer YOUR_API_TOKEN`,
  },
  body: JSON.stringify({
    jsonrpc: "2.0",
    method: "tools/call",
    params: {
      name: "generate_due_diligence_report",
      arguments: { organization: "Pinnacle Community Foundation" },
    },
    id: 1,
  }),
});

const result = await response.json();
console.log(JSON.parse(result.result.content[0].text));
```

#### cURL

```bash
## Full due diligence report
curl -X POST "https://nonprofit-grant-intelligence-mcp.apify.actor/mcp" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_APIFY_TOKEN" \
  -d '{
    "jsonrpc": "2.0",
    "method": "tools/call",
    "params": {
      "name": "generate_due_diligence_report",
      "arguments": { "organization": "Horizon Education Foundation" }
    },
    "id": 1
  }'

## Search grant opportunities
curl -X POST "https://nonprofit-grant-intelligence-mcp.apify.actor/mcp" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_APIFY_TOKEN" \
  -d '{
    "jsonrpc": "2.0",
    "method": "tools/call",
    "params": {
      "name": "search_grant_opportunities",
      "arguments": { "query": "early childhood education", "status": "posted" }
    },
    "id": 2
  }'
```

### Output example

Below is an example response from `generate_due_diligence_report` for a clean organization:

```json
{
  "organization": "Horizon Education Foundation",
  "compositeScore": 74,
  "recommendation": "APPROVE",
  "nonprofitHealth": {
    "score": 82,
    "totalRevenue": 4200000,
    "totalExpenses": 3850000,
    "programExpenseRatio": 78.4,
    "revenueGrowth": 11.2,
    "hasAuditFindings": false,
    "healthLevel": "EXCELLENT",
    "signals": [
      "78% program expense ratio — meets best practice threshold",
    ]
  },
  "grantCompliance": {
    "score": 18,
    "grantCount": 6,
    "federalAwards": 4,
    "totalFederalFunding": 920000,
    "complianceFlags": 0,
    "riskLevel": "LOW",
    "signals": []
  },
  "integrityScreen": {
    "score": 0,
    "sanctionsMatches": 0,
    "ofacMatches": 0,
    "openSanctionsMatches": 0,
    "corporateEntities": 2,
    "riskLevel": "CLEAR",
    "signals": []
  },
  "crossJurisdiction": {
    "score": 71,
    "usPresence": true,
    "ukPresence": false,
    "internationalPresence": true,
    "jurisdictionCount": 3,
    "verificationLevel": "MULTI_JURISDICTION",
    "signals": [
      "US nonprofit verified — 3 IRS 990 record(s)",
      "International presence across 2 jurisdictions"
    ]
  },
  "allSignals": [
    "78% program expense ratio — meets best practice threshold",
    "US nonprofit verified — 3 IRS 990 record(s)",
    "International presence across 2 jurisdictions"
  ],
  "actionItems": []
}
```

Example response from `screen_organizational_integrity` for a flagged entity:

```json
{
  "organization": "Redstone Aid Network",
  "integrityScreen": {
    "score": 40,
    "sanctionsMatches": 2,
    "ofacMatches": 0,
    "openSanctionsMatches": 2,
    "corporateEntities": 11,
    "riskLevel": "ELEVATED",
    "signals": [
      "2 international sanctions match(es) from OpenSanctions",
      "11 associated corporate entities — complex organizational structure"
    ]
  },
  "ofacMatches": [],
  "sanctionsMatches": [
    {
      "id": "Q7193422",
      "caption": "Redstone Aid Network",
      "schema": "Organization",
      "datasets": ["eu_fsf"],
      "score": 0.91
    }
  ],
  "corporateEntities": [...]
}
```

### Output fields

#### Due diligence report

| Field | Type | Description |
|-------|------|-------------|
| `organization` | string | Organization name as queried |
| `compositeScore` | number | Weighted composite score 0-100 (Health 25% + Compliance inverted 25% + Integrity inverted 30% + Jurisdiction 20%) |
| `recommendation` | string | APPROVE, CONDITIONAL, ENHANCED\_REVIEW, or DECLINE |
| `nonprofitHealth.score` | number | Nonprofit Health Score 0-100 |
| `nonprofitHealth.totalRevenue` | number | Aggregated total revenue from IRS 990 records |
| `nonprofitHealth.totalExpenses` | number | Aggregated total expenses from IRS 990 records |
| `nonprofitHealth.programExpenseRatio` | number | Percentage of expenses directed to program delivery |
| `nonprofitHealth.revenueGrowth` | number | Revenue growth percentage across available filing years |
| `nonprofitHealth.hasAuditFindings` | boolean | Whether IRS 990 audit findings are on record |
| `nonprofitHealth.healthLevel` | string | POOR, BELOW\_AVERAGE, AVERAGE, GOOD, or EXCELLENT |
| `grantCompliance.score` | number | Grant Compliance Risk Index 0-100 (higher = more risk) |
| `grantCompliance.grantCount` | number | Number of Grants.gov listings matched |
| `grantCompliance.federalAwards` | number | Number of USAspending awards found |
| `grantCompliance.totalFederalFunding` | number | Total federal funding in USD |
| `grantCompliance.complianceFlags` | number | Number of debarment/suspension/exclusion flags detected |
| `grantCompliance.riskLevel` | string | LOW, MODERATE, HIGH, or CRITICAL |
| `integrityScreen.score` | number | Integrity Risk Score 0-100 (higher = more risk) |
| `integrityScreen.sanctionsMatches` | number | Total OFAC + OpenSanctions matches |
| `integrityScreen.ofacMatches` | number | OFAC SDN list matches (any value triggers DECLINE) |
| `integrityScreen.openSanctionsMatches` | number | International sanctions/PEP matches |
| `integrityScreen.corporateEntities` | number | Corporate entities found in OpenCorporates |
| `integrityScreen.riskLevel` | string | CLEAR, WATCHLIST, ELEVATED, or CRITICAL |
| `crossJurisdiction.score` | number | Cross-Jurisdiction Verification Score 0-100 |
| `crossJurisdiction.usPresence` | boolean | Verified in US via IRS 990 |
| `crossJurisdiction.ukPresence` | boolean | Verified in UK via Charity Commission |
| `crossJurisdiction.internationalPresence` | boolean | Corporate entities found in OpenCorporates |
| `crossJurisdiction.jurisdictionCount` | number | Total number of jurisdictions verified |
| `crossJurisdiction.verificationLevel` | string | UNVERIFIED, PARTIAL, VERIFIED, or MULTI\_JURISDICTION |
| `allSignals` | string\[] | All risk and verification signals from all four models |
| `actionItems` | string\[] | Specific required actions before grant disbursement |

### How much does it cost to run nonprofit grant due diligence?

Nonprofit Grant Intelligence MCP uses **pay-per-event pricing** — you pay **$0.045 per tool call**. Platform compute costs are included. There are no monthly subscriptions.

| Scenario | Tool calls | Cost per call | Total cost |
|----------|------------|---------------|------------|
| Single integrity screen | 1 | $0.045 | $0.045 |
| Full due diligence report | 1 | $0.045 | $0.045 |
| Screen 10 grant applicants | 10 | $0.045 | $0.45 |
| Quarterly check on 50 grantees | 50 | $0.045 | $2.25 |
| Annual review cycle, 200 applicants | 200 | $0.045 | $9.00 |

You can set a **maximum spending limit** per run to control costs. The server stops when your budget is reached and returns a structured error message rather than failing silently.

Compare this to commercial grant management platforms charging $200–800/month for screening features — most foundations running quarterly due diligence cycles will spend under $5/month with this server.

Apify's free tier includes **$5 of monthly platform credits**, covering approximately 110 tool calls with no credit card required.

### How Nonprofit Grant Intelligence MCP Server works

#### Phase 1: Parallel data collection

When a tool is called, the server dispatches requests to relevant Apify actors simultaneously using `Promise.allSettled`. The `generate_due_diligence_report` tool launches all 7 actors in parallel: ProPublica Nonprofit Explorer for IRS 990 data (actor ID `AGJVz4LZzmjeDkK8P`), Grants.gov search (`DMC8HyLcbAQnzRGB5`), USAspending (`duGhhKevB8g6WhyJC`), UK Charity Commission (`p7z9PXpRsLmOmAhlw`), OpenSanctions (`6Zlkz0wjdXewfq3yK`), OFAC (`t398ffhJgct2clv9s`), and OpenCorporates (`x0a1Q4g0MLc7h15Im`). Each actor runs with a 256 MB memory cap and 120-second timeout. `Promise.allSettled` ensures a timeout on one source does not block results from the others.

#### Phase 2: Four independent scoring models

Each scoring model operates on the data slice relevant to it:

**Nonprofit Health Score** pulls from ProPublica 990 records. It extracts `totrevenue`, `totfuncexpns`, and `totprgmrevnue` fields (with fallbacks for alternate field names across filing years). The program expense ratio component scores up to 30 points — organizations at 75%+ earn full marks. Revenue health applies `Math.log10(totalRevenue) * 4` capped at 25 points. Financial sustainability scores up to 20 points, declining linearly when expenses exceed revenue. Revenue growth across multi-year records contributes up to 15 points. Audit findings incur a hard 15-point deduction.

**Grant Compliance Risk Index** processes USAspending award records. It checks `status`, `recipientStatus` fields for the strings "debarr", "suspend", and "excluded". Each flag adds 15 points to the compliance score. Award concentration risk — the ratio of the largest single award to total funding — adds up to 20 additional points.

**Integrity Risk Score** scores OFAC SDN matches at 20 points each (capped at 40). OpenSanctions matches score 10 points each (capped at 30). Corporate network complexity — entities above 5 in OpenCorporates — scores 3 points per entity above the threshold. Dissolved and inactive entities identified by "dissolv", "inactive", or "struck" status strings score 5 points each.

**Cross-Jurisdiction Verification Score** awards 30 points for US presence (IRS 990 records found), 25 for UK (Charity Commission records), up to 25 for OpenCorporates corporate entities, and a multi-jurisdiction bonus of 7 points per verified jurisdiction.

#### Phase 3: Composite recommendation

The composite score formula weights Integrity (inverted, 30%) most heavily because a sanctions match is the highest-consequence finding. Any OFAC match triggers an unconditional DECLINE regardless of the composite score. Composite scores of 60+ yield APPROVE, 40-59 yield CONDITIONAL, and below 40 or with elevated compliance risk yield ENHANCED\_REVIEW. The output includes specific action items generated from conditions detected across all four models.

#### Phase 4: Standby mode delivery

The server runs as an Apify Standby actor (Express HTTP server on `ACTOR_STANDBY_PORT`), keeping the MCP endpoint persistent. Each request to `POST /mcp` creates a fresh `McpServer` instance connected via `StreamableHTTPServerTransport`. The transport closes cleanly when the response stream ends via the `res.on('close')` handler, preventing resource leaks under concurrent load.

### Tips for best results

1. **Use EINs for unambiguous matching** — Common organization names like "Community Foundation" or "United Way" will match many organizations. Providing the IRS EIN in the `organization` field eliminates ambiguity and returns more accurate 990 data.

2. **Run `assess_nonprofit_health` before the full report for large batches** — At $0.045 per call, you can triage a list of 100 applicants by health score alone ($4.50), then run full due diligence only on organizations that pass the financial threshold. This is more cost-efficient than running `generate_due_diligence_report` on every applicant.

3. **Screen individual officers for high-risk grants** — The `screen_organizational_integrity` tool accepts individual names. For large grants (over $500K), consider running separate integrity checks on the Executive Director and Board Chair names in addition to the organization name.

4. **Account for 990 data lag** — IRS 990 filings have a typical 6–18 month lag from fiscal year end to ProPublica availability. For organizations that filed recently, supplement with the organization's own financial statements.

5. **Use `analyze_funding_landscape` before writing grant proposals** — Before investing proposal writing time, check whether federal funding is active and growing in your program area. A declining total funding figure or agency consolidation may signal a less competitive opportunity.

6. **Set a spending limit for large batch workflows** — When running automated nightly screening of a large portfolio, set the Apify run spending limit to prevent unexpected cost overruns if a query expansion produces more results than expected.

7. **Combine with scheduling for ongoing portfolio monitoring** — Set up a monthly Apify schedule to run `assess_nonprofit_health` on all active grantees. A drop of 15+ points in the health score since the last run is a meaningful signal worth reviewing before the next disbursement.

### Combine with other Apify actors

| Actor | How to combine |
|-------|---------------|
| [Company Deep Research](https://apify.com/ryanclinton/company-deep-research) | Run deep research on nonprofit leadership names surfaced by the integrity screen, to find news coverage, board affiliations, or prior legal history |
| [Waterfall Contact Enrichment](https://apify.com/ryanclinton/waterfall-contact-enrichment) | Enrich grant applicant contact records with verified email and phone before due diligence outreach |
| [Trustpilot Review Analyzer](https://apify.com/ryanclinton/trustpilot-review-analyzer) | For nonprofits operating service programs, supplement financial due diligence with public beneficiary sentiment data |
| [Website Contact Scraper](https://apify.com/ryanclinton/website-contact-scraper) | Extract leadership team contact information from nonprofit websites to complete the organizational profile before site visits |
| [WHOIS Domain Lookup](https://apify.com/ryanclinton/whois-domain-lookup) | Verify domain registration details match claimed organizational age and location for recently registered entities |
| [B2B Lead Qualifier](https://apify.com/ryanclinton/b2b-lead-qualifier) | Score nonprofit applicants across 30+ signals when building a prioritized grant pipeline from unsolicited proposals |

### Limitations

- **IRS 990 data lag is 6–18 months** — ProPublica Nonprofit Explorer reflects the most recently filed 990, which may be 1–2 fiscal years behind current operations. Organizations in financial distress may look healthier in the data than they are today.
- **No 990-N (e-postcard) coverage** — Small organizations with under $50,000 in annual gross receipts file 990-N, which contains no financial detail. These organizations return minimal data from the health assessment tool.
- **Grants.gov covers federal grants only** — State, local, foundation, and corporate grant sources are not included. The funding landscape analysis reflects federal spending only and will undercount total philanthropic funding in most sectors.
- **USAspending debarment flags are indicative, not definitive** — The server checks status fields for debarment-related strings, but the authoritative exclusion source is the SAM.gov exclusion list. Confirm any flags against SAM.gov before taking formal adverse action.
- **OpenSanctions matching is name-based** — Sanctions matches are returned for names similar to the query. Review match scores and aliases before treating a result as a confirmed sanctions match — common names produce false positives.
- **UK charity coverage is England and Wales only** — Scotland (OSCR) and Northern Ireland (CCNI) charity registers are not included in the cross-jurisdiction verification.
- **No real-time monitoring** — The server queries data sources at call time. It does not maintain a persistent watch on entities or push alerts when data changes. Use Apify scheduling to approximate ongoing monitoring.
- **Parallel execution timeouts** — If one of the 7 underlying actors fails or times out, its data contribution is zero rather than causing a full failure. The composite score will be computed from available data, which may underweight dimensions with missing source data.

### Integrations

- [Apify API](https://docs.apify.com/api/v2) — Trigger due diligence runs programmatically from your grants management system, CRM, or internal compliance tooling
- [Zapier](https://apify.com/integrations/zapier) — Log due diligence results to Google Sheets, notify the grants team in Slack, or update a Salesforce record when a report is complete
- [Make](https://apify.com/integrations/make) — Build automated grant cycle workflows: new applicant triggers a due diligence report, result routes to an approval or review queue
- [Webhooks](https://docs.apify.com/platform/integrations/webhooks) — Fire a webhook when an integrity screen returns an elevated or critical risk level, routing the case to your compliance officer automatically
- [Google Sheets](https://apify.com/integrations/google-sheets) — Maintain a live applicant screening tracker with composite scores, recommendations, and action items exported per row
- [LangChain / LlamaIndex](https://docs.apify.com/platform/integrations) — Incorporate nonprofit due diligence as a retrieval tool in an AI grant review agent that reads applications, screens applicants, and drafts decision memos

### Troubleshooting

- **Returns low scores for a well-known organization** — The organization name may be matching multiple entities across the 990 dataset. Try appending the state abbreviation ("United Way of Greater Atlanta GA") or use the EIN directly. Name disambiguation is particularly important for federated organizations with multiple chapters.

- **Integrity screen returns no OFAC results for a clearly sanctioned entity** — OFAC matching is based on the query string passed to the underlying actor. Try the formal legal name as it appears on the OFAC SDN list, without abbreviations. Also run `screen_organizational_integrity` with the individual officer name separately.

- **`generate_due_diligence_report` returns `verificationLevel: UNVERIFIED`** — No records were found in any of the three jurisdiction sources (IRS 990, UK Charity Commission, OpenCorporates). This may mean the organization is too small to appear in ProPublica, uses a different legal name, or is incorporated in a jurisdiction not covered. Request incorporation documents directly from the applicant.

- **Tool call returns `{ "error": true, "message": "Spending limit reached" }`** — Your Apify account has hit the per-run spending limit. Increase the limit in your run configuration or upgrade your plan. The server handles this gracefully and returns a structured error rather than crashing.

- **Slow response times over 90 seconds** — One or more of the 7 underlying actors is taking longer than expected. This is most common for OpenCorporates and OpenSanctions during peak hours. The `Promise.allSettled` pattern ensures the server returns with available data rather than timing out entirely. Retry the call if a critical dimension shows zero records.

### Responsible use

- This server accesses only publicly available government databases and public registry data.
- IRS 990 filings, federal grant data, sanctions lists, and charity registers are public records intended for due diligence use.
- Sanctions screening results are indicative — confirm any match against the authoritative source before taking adverse action against an organization.
- Comply with applicable data protection laws when storing or processing personal data about organizational officers returned from sanctions databases.
- For guidance on responsible use of public data, see [Apify's guide](https://blog.apify.com/is-web-scraping-legal/).

### FAQ

**How many grant applicants can I screen with nonprofit grant intelligence in one workflow?**
There is no batch limit on the number of organizations you can screen. For large grant cycles, use the Apify API to loop through your applicant list and call `generate_due_diligence_report` for each. 200 full due diligence reports costs $9.00 at $0.045 per call.

**Does nonprofit grant intelligence screen individual board members and officers?**
Yes. Pass individual officer names directly to `screen_organizational_integrity`. For high-value grants, run separate screens on the Executive Director and Board Chair in addition to the organization. The tool searches OFAC SDN, OpenSanctions international watchlists, and OpenCorporates for the name provided.

**How accurate is the Nonprofit Health Score for small nonprofits?**
Less accurate for very small organizations. Nonprofits with under $50,000 in gross receipts file Form 990-N (e-postcard), which contains no financial detail. The health scoring model is most reliable for organizations with over $200,000 in revenue that file full Form 990 or 990-EZ with complete financial schedules.

**How current is the nonprofit financial data used in due diligence reports?**
IRS 990 data from ProPublica Nonprofit Explorer typically lags 6–18 months behind the organization's fiscal year end. For time-sensitive decisions, the 990 data provides a reliable historical baseline, but you should request the organization's most recent financial statements or audit for the current year.

**Is it legal to use this data for grant due diligence?**
Yes. All data sources are legally accessible public records. IRS 990 filings are public by law (IRC Section 6104). Federal award data from USAspending and Grants.gov is published under the DATA Act. Sanctions lists are published by the US Treasury and international regulators for public screening purposes. UK Charity Commission data is published under open government license.

**How is nonprofit grant intelligence different from Candid GuideStar or GrantStation?**
GuideStar/Candid requires a subscription (starting at $130/month) and is primarily a self-reported database. This server queries the same underlying IRS 990 data via ProPublica, but adds federal award compliance data from USAspending, live OFAC and international sanctions screening, UK charity verification, and corporate structure analysis — dimensions not available in GuideStar. You pay only for what you query, with no monthly subscription.

**Can I verify a UK charity with this server?**
Yes. The `verify_cross_jurisdiction` tool queries the UK Charity Commission for England and Wales. Note that Scottish charities (OSCR) and Northern Ireland charities (CCNI) are not currently covered — for UK-wide verification, request registration documentation directly from organizations claiming Scottish or Northern Irish registration.

**What does a DECLINE recommendation mean in practice?**
A DECLINE recommendation is automatically issued when any OFAC SDN match is found for the queried name. OFAC-listed entities are blocked by US law — transacting with them without an OFAC license constitutes a federal violation. For non-OFAC cases, DECLINE reflects a combination of very poor financial health, failed verification across all jurisdictions, and elevated integrity risk. The recommendation is an intelligence output to inform human decision-making, not a legally binding determination.

**Can I schedule nonprofit grant intelligence to monitor my existing grantee portfolio?**
Yes. Use Apify's built-in scheduling to run `assess_nonprofit_health` on all current grantees on a quarterly or annual cadence. Combine with webhooks to receive a notification if a score drops more than 15 points from the previous run, flagging organizations that need a mid-grant check-in before the next disbursement.

**How does the composite scoring handle a missing data source?**
The server uses `Promise.allSettled` so a failed or timed-out data source contributes an empty array rather than causing a full error. The four scoring models operate on whatever data is available. If a key source like OFAC returns no data (possibly due to a temporary API issue), the integrity score will be lower than the true risk. The `actionItems` field will not include sanctions-related items if the source was unavailable — so retry the full report if you see zero records for a dimension you expect to have data.

**What CFDA numbers or agency codes can I use to search Grants.gov?**
The `search_grant_opportunities` tool accepts free-text queries including CFDA numbers (e.g., "84.027" for Special Education Grants), agency abbreviations (HHS, DOJ, USDA), and plain-language program descriptions. CFDA numbers produce the most precise results. The tool returns up to 30 matching opportunities, with an optional `status` filter to restrict to posted, closed, or forecasted listings.

### Help us improve

If you encounter issues, you can help us debug faster by enabling run sharing in your Apify account:

1. Go to [Account Settings > Privacy](https://console.apify.com/account/privacy)
2. Enable **Share runs with public Actor creators**

This lets us see your run details when something goes wrong, so we can fix issues faster. Your data is only visible to the actor developer, not publicly.

### Support

Found a bug or have a feature request? Open an issue in the [Issues tab](https://console.apify.com/actors/nonprofit-grant-intelligence-mcp/issues) on this actor's page. For custom solutions or enterprise integrations, reach out through the Apify platform.

# Actor input Schema

## Actor input object example

```json
{}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("ryanclinton/nonprofit-grant-intelligence-mcp").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("ryanclinton/nonprofit-grant-intelligence-mcp").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call ryanclinton/nonprofit-grant-intelligence-mcp --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=ryanclinton/nonprofit-grant-intelligence-mcp",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Nonprofit Grant Intelligence MCP Server",
        "description": "Philanthropic due diligence intelligence for foundations, corporate giving programs, and grant writers. This MCP server orchestrates 7 data sources across IRS 990 financial data, federal grant opportunities, federal award history, UK charity registrations, and multi-jurisdiction sanctions screening.",
        "version": "1.0",
        "x-build-id": "ubp22ahaO3QH3rAKT"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/ryanclinton~nonprofit-grant-intelligence-mcp/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-ryanclinton-nonprofit-grant-intelligence-mcp",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/ryanclinton~nonprofit-grant-intelligence-mcp/runs": {
            "post": {
                "operationId": "runs-sync-ryanclinton-nonprofit-grant-intelligence-mcp",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/ryanclinton~nonprofit-grant-intelligence-mcp/run-sync": {
            "post": {
                "operationId": "run-sync-ryanclinton-nonprofit-grant-intelligence-mcp",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {}
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
