{
  "markdown": "<div align=\"center\">\n  <h1>@cyanheads/nonprofit-explorer-mcp-server</h1>\n  <p><b>Search and explore 1.8M+ US nonprofits, fetch Form 990 financials, and access IRS filing history via MCP. STDIO or Streamable HTTP.</b>\n  <div>3 Tools</div>\n  </p>\n</div>\n\n<div align=\"center\">\n\n[![Version](https://img.shields.io/badge/Version-0.1.8-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/nonprofit-explorer-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^2.0.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/nonprofit-explorer-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/nonprofit-explorer-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^7.0.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.4.0-blueviolet.svg?style=flat-square)](https://bun.sh/)\n\n</div>\n\n<div align=\"center\">\n\n[![Install in Claude Desktop](https://img.shields.io/badge/Install_in-Claude_Desktop-D97757?style=for-the-badge&logo=anthropic&logoColor=white)](https://github.com/cyanheads/nonprofit-explorer-mcp-server/releases/latest/download/nonprofit-explorer-mcp-server.mcpb) [![Install in Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=nonprofit-explorer-mcp-server&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBjeWFuaGVhZHMvbm9ucHJvZml0LWV4cGxvcmVyLW1jcC1zZXJ2ZXIiXX0=) [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=for-the-badge&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect?url=vscode:mcp/install?%7B%22name%22%3A%22nonprofit-explorer-mcp-server%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40cyanheads%2Fnonprofit-explorer-mcp-server%22%5D%7D)\n\n[![Framework](https://img.shields.io/badge/Built%20on-@cyanheads/mcp--ts--core-67E8F9?style=flat-square)](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)\n\n</div>\n\n<div align=\"center\">\n\n**Public Hosted Server:** [https://nonprofit-explorer.caseyjhand.com/mcp](https://nonprofit-explorer.caseyjhand.com/mcp)\n\n</div>\n\n---\n\n## Tools\n\n3 tools for working with US nonprofit and IRS Form 990 data:\n\n| Tool | Description |\n|:---|:---|\n| `nonprofit_search` | Search 1.8M+ IRS-recognized tax-exempt organizations by name, keyword, city, or phrase with optional state, NTEE sector, and 501(c) filters |\n| `nonprofit_get_organization` | Full profile for one org by EIN: legal identity, IRS classification, ruling date, and a financial snapshot from the most recent Form 990 |\n| `nonprofit_get_filings` | All Form 990 filings for an org by EIN: year-by-year financials, revenue breakdown, executive compensation, and source PDF links |\n\n### `nonprofit_search`\n\nSearch for tax-exempt organizations across the IRS Nonprofit Explorer dataset.\n\n- Full-text search across org name, the IRS Business Master File secondary name line, and city with relevance ranking\n- Supports quoted phrases (`\"Red Cross\"`), required terms (`+evanston`), excluded terms (`-dental`)\n- Filter by US state, territory, or military postal code (`ZZ` for foreign entities); case-insensitive, and a code outside that set is rejected rather than silently returning national results\n- Filter by NTEE major sector (Arts, Education, Health, Human Services, etc., 1–10)\n- Filter by 501(c) subsection code (e.g., `3` = charitable organization — both public charities and private foundations, `4` = social welfare)\n- Paginated at 25 per page; use `page` (zero-indexed) with `num_pages`, `per_page`, and `page_offset` to walk large result sets\n- Zero matches and a page past the last one are both successful searches with an empty `organizations` array and a `notice` explaining which case it is\n- API caps total results at 10,000; `total_results === 10000` means the actual count may be higher, and a `page` whose offset reaches 10,000 is refused with the `pagination_ceiling` error\n- Returns EINs — pass to `nonprofit_get_organization` or `nonprofit_get_filings` for details\n\n---\n\n### `nonprofit_get_organization`\n\nFetch the full profile for a single tax-exempt org by EIN.\n\n- Accepts EIN as integer (`530196605`) or string with or without hyphen (`\"53-0196605\"`)\n- Returns legal name, address, NTEE code, 501(c) type, and IRS ruling date\n- IRS Business Master File standing: whether contributions are deductible (including the deductible-by-treaty case), exemption status, and public-charity vs. private-foundation classification — each decoded from its IRS code with the raw code retained\n- Financial snapshot from the most recent Form 990: revenue, expenses, assets, liabilities, net assets\n- Includes source 990 PDF link and IRS Business Master File summary figures\n- `filing_count` shows how many filings with extracted data are on record\n- Data lags 1–2 years; `tax_prd_yr` in the snapshot is the fiscal year of the filing, not the current year\n- Use `nonprofit_search` first if you only have an org name\n\n---\n\n### `nonprofit_get_filings`\n\nFetch the full filing history for an org by EIN.\n\n- All Form 990 filings with extracted financial data, sorted newest first\n- Per-filing: revenue, expenses, assets, liabilities, net assets, revenue breakdown (contributions, program service, investment income)\n- `program_expense_ratio` is always `null` — ProPublica returns no Form 990 Part IX program-service expense total, so the program/management/fundraising split is only in the source PDF\n- Executive compensation summary with field-name transparency and a note pointing to Schedule J for per-officer detail\n- Source 990 PDF link per filing\n- An EIN that resolves to a real org with no 990 on record returns an empty `filings` array plus a `notice` — a successful lookup, not an error\n- `filings_pdf_only` lists older filings with a PDF but no extracted data\n- Data lags 1–2 years; always cite `tax_prd_yr` (fiscal year) when presenting figures\n\n## Features\n\nBuilt on [`@cyanheads/mcp-ts-core`](https://www.npmjs.com/package/@cyanheads/mcp-ts-core):\n\n- Declarative tool definitions — single file per tool, framework handles registration and validation\n- Unified error handling — handlers throw, framework catches, classifies, and formats\n- Pluggable auth: `none`, `jwt`, `oauth`\n- Swappable storage backends: `in-memory`, `filesystem`, `Supabase`, `Cloudflare KV/R2/D1`\n- Structured logging with optional OpenTelemetry tracing\n- STDIO and Streamable HTTP transports\n\nProPublica Nonprofit Explorer / IRS-specific:\n\n- Keyless access — ProPublica Nonprofit Explorer API requires no API key\n- Covers 1.8M+ IRS-recognized tax-exempt organizations\n- IRS Form 990 data: annual filings for public charities (990), small orgs (990-EZ), and private foundations (990-PF)\n- Source filing PDF link on every filing record, except where IRS PDF processing lags the extracted data and `pdf_url` is still null\n- Data sourced from ProPublica Nonprofit Explorer, derived from IRS Form 990 filings; data lags 1–2 years\n\nAgent-friendly output:\n\n- Provenance on every response — `data_source` attribution on all tool outputs, ProPublica URL for direct verification\n- Filing-year clarity — `tax_prd_yr` prominently labeled as fiscal year with explicit lag caveat in every financial response\n- Null values are rendered, not dropped — the formatted text names why a value is absent (never recorded by the IRS, not extracted from the filing, not carried by that form type), and `structuredContent` keeps an explicit `null` rather than omitting the key\n- Field-name transparency on compensation — `field_name` and `form_type` exposed so agents know exactly which IRS field was read\n\n## Getting started\n\n### Public Hosted Instance\n\nA public instance is available at `https://nonprofit-explorer.caseyjhand.com/mcp` — no installation required. Point any MCP client at it via Streamable HTTP, with this client config:\n\n```json\n{\n  \"mcpServers\": {\n    \"nonprofit-explorer-mcp-server\": {\n      \"type\": \"streamable-http\",\n      \"url\": \"https://nonprofit-explorer.caseyjhand.com/mcp\"\n    }\n  }\n}\n```\n\nOr, install locally and add the following to your MCP client configuration file.\n\n```json\n{\n  \"mcpServers\": {\n    \"nonprofit-explorer-mcp-server\": {\n      \"type\": \"stdio\",\n      \"command\": \"bunx\",\n      \"args\": [\"@cyanheads/nonprofit-explorer-mcp-server@latest\"],\n      \"env\": {\n        \"MCP_TRANSPORT_TYPE\": \"stdio\",\n        \"MCP_LOG_LEVEL\": \"info\"\n      }\n    }\n  }\n}\n```\n\nOr with npx (no Bun required):\n\n```json\n{\n  \"mcpServers\": {\n    \"nonprofit-explorer-mcp-server\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@cyanheads/nonprofit-explorer-mcp-server@latest\"],\n      \"env\": {\n        \"MCP_TRANSPORT_TYPE\": \"stdio\",\n        \"MCP_LOG_LEVEL\": \"info\"\n      }\n    }\n  }\n}\n```\n\nOr with Docker:\n\n```json\n{\n  \"mcpServers\": {\n    \"nonprofit-explorer-mcp-server\": {\n      \"type\": \"stdio\",\n      \"command\": \"docker\",\n      \"args\": [\n        \"run\", \"-i\", \"--rm\",\n        \"-e\", \"MCP_TRANSPORT_TYPE=stdio\",\n        \"ghcr.io/cyanheads/nonprofit-explorer-mcp-server:latest\"\n      ]\n    }\n  }\n}\n```\n\nFor Streamable HTTP, set the transport and start the server:\n\n```sh\nMCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http\n# Server listens at http://localhost:3010/mcp\n```\n\n### Prerequisites\n\n- [Bun v1.3.14](https://bun.sh/) or higher (or Node.js v24+).\n- No API key required — ProPublica Nonprofit Explorer is a keyless public API.\n\n### Installation\n\n1. **Clone the repository:**\n\n```sh\ngit clone https://github.com/cyanheads/nonprofit-explorer-mcp-server.git\n```\n\n2. **Navigate into the directory:**\n\n```sh\ncd nonprofit-explorer-mcp-server\n```\n\n3. **Install dependencies:**\n\n```sh\nbun install\n```\n\n4. **Configure environment:**\n\n```sh\ncp .env.example .env\n# edit .env as needed (no required vars — server works out of the box)\n```\n\n## Configuration\n\nAll configuration is validated at startup. Key environment variables:\n\n| Variable | Description | Default |\n|:---------|:------------|:--------|\n| `MCP_TRANSPORT_TYPE` | Transport: `stdio` or `http` | `stdio` |\n| `MCP_HTTP_PORT` | HTTP server port | `3010` |\n| `MCP_HTTP_HOST` | HTTP server hostname | `127.0.0.1` |\n| `MCP_HTTP_ENDPOINT_PATH` | HTTP endpoint path | `/mcp` |\n| `MCP_PUBLIC_URL` | Public origin override for TLS-terminating reverse-proxy deployments | — |\n| `MCP_AUTH_MODE` | Authentication: `none`, `jwt`, or `oauth` | `none` |\n| `MCP_LOG_LEVEL` | Log level (`debug`, `info`, `warning`, `error`, etc.) | `info` |\n| `LOGS_DIR` | Directory for log files (Node.js only) | `<project-root>/logs` |\n| `STORAGE_PROVIDER_TYPE` | Storage backend: `in-memory`, `filesystem`, `supabase`, `cloudflare-kv/r2/d1` | `in-memory` |\n| `OTEL_ENABLED` | Enable [OpenTelemetry instrumentation](https://github.com/cyanheads/mcp-ts-core/tree/main/docs/telemetry) | `false` |\n\nNo server-specific required variables. ProPublica Nonprofit Explorer is a keyless public API.\n\nSee [`.env.example`](./.env.example) for the full list of optional overrides.\n\n## Running the server\n\n### Local development\n\n- **Build and run:**\n\n  ```sh\n  # One-time build\n  bun run rebuild\n\n  # Run the built server\n  bun run start:stdio\n  # or\n  bun run start:http\n  ```\n\n- **Run checks and tests:**\n\n  ```sh\n  bun run devcheck   # Lint, format, typecheck, security\n  bun run test       # Vitest test suite\n  bun run lint:mcp   # Validate MCP definitions against spec\n  ```\n\n### Docker\n\n```sh\ndocker build -t nonprofit-explorer-mcp-server .\ndocker run --rm -p 3010:3010 nonprofit-explorer-mcp-server\n```\n\nThe Dockerfile defaults to HTTP transport, stateless session mode, and logs to `/var/log/nonprofit-explorer-mcp-server`. OpenTelemetry peer dependencies are installed by default — build with `--build-arg OTEL_ENABLED=false` to omit them.\n\n## Project structure\n\n| Directory | Purpose |\n|:----------|:--------|\n| `src/index.ts` | `createApp()` entry point — registers tools and inits the service. |\n| `src/mcp-server/tools` | Tool definitions (`*.tool.ts`). Three tools for search and financial data. |\n| `src/services/nonprofit-explorer` | ProPublica Nonprofit Explorer API client and domain types. |\n| `tests/` | Unit and integration tests mirroring `src/`. |\n\n## Development guide\n\nSee [`CLAUDE.md`/`AGENTS.md`](./CLAUDE.md) for development guidelines and architectural rules. The short version:\n\n- Handlers throw, framework catches — no `try/catch` in tool logic\n- Use `ctx.log` for request-scoped logging, `ctx.state` for tenant-scoped storage\n- Register new tools via the arrays in `createApp()` in `src/index.ts`\n- Wrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields\n\n## Contributing\n\nIssues and pull requests are welcome. Run checks and tests before submitting:\n\n```sh\nbun run devcheck\nbun run test\n```\n\n## License\n\nApache-2.0 — see [LICENSE](LICENSE) for details.\n",
  "bytes": 13145,
  "sha": "8a7192c56a8570085e0e4e39a81b6e90abaa92955671effc0d65635af0d3c22b",
  "repo_slug": "cyanheads/nonprofit-explorer-mcp-server",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_cyanheads_nonprofit_explorer_m_475245c1/readme"
}