@cyanheads/nonprofit-explorer-mcp-server 0.1.9 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # Developer Protocol
2
2
 
3
3
  **Server:** nonprofit-explorer-mcp-server
4
- **Version:** 0.1.9
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.6`
4
+ **Version:** 0.1.10
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.14`
6
6
  **Engines:** Bun ≥1.4.0, Node ≥24.0.0
7
- **MCP SDK:** `@modelcontextprotocol/server` ^2.0.0
7
+ **MCP SDK:** `@modelcontextprotocol/server` ^2.2.0
8
8
  **Zod:** ^4.6.5
9
9
 
10
10
  > **Read the framework docs first:** `node_modules/@cyanheads/mcp-ts-core/CLAUDE.md` contains the full API reference — builders, Context, error codes, exports, patterns. This file covers server-specific conventions only.
@@ -18,6 +18,7 @@
18
18
  - **Use `ctx.state`** for tenant-scoped storage. Never access persistence directly.
19
19
  - **Need input the caller didn't supply?** `return ctx.requestInput(...)` and read `ctx.inputs` when the handler is re-entered. Never `await` for user input mid-handler.
20
20
  - **Secrets in env vars only** — never hardcoded.
21
+ - **Cut noise.** Add only what earns its place: no speculative generality, no guards for states the framework already prevents (Zod-validated params, classified errors), no abstraction until a third caller proves it, no option nothing sets.
21
22
  - **Close the loop on issues.** When implementing work tracked by a GitHub issue, comment on the issue with what landed and close it. Do both — a comment without a close leaves stale issues open; a close without a comment leaves no record of what shipped. The comment is for future readers — state the concrete changes, not the conversation that produced them.
22
23
 
23
24
  ---
@@ -75,6 +76,22 @@ export const nonprofitSearch = tool('nonprofit_search', {
75
76
 
76
77
  `createApp({ instructions })` — sent to clients on every `initialize` as session-level context. The nonprofit server uses this to orient agents on the search-first workflow and the filing-year lag.
77
78
 
79
+ ### Session posture and shutdown
80
+
81
+ Two more `createApp()` options shape how the server runs rather than how it presents itself:
82
+
83
+ ```ts
84
+ await createApp({
85
+ sessionMode: 'stateless', // or { default: 'stateful', require: 'stateful' }
86
+ setup(core) { startMyWatcher(core.config); },
87
+ async teardown() { await stopMyWatcher(); },
88
+ });
89
+ ```
90
+
91
+ `sessionMode` declares the HTTP session posture in `src/` instead of leaving it to a deployment's `MCP_SESSION_MODE`, which still wins whenever it carries a meaningful value (an empty string and an unsubstituted `${…}` placeholder read as unset and fall through to the option). Add `require: 'stateful'` when a tool asks the caller for input mid-handler via `ctx.requestInput`: startup then fails with a `ConfigurationError` rather than serving a mode in which a 2025-era client can never answer the prompt. Stdio is never refused. This server declares `sessionMode: 'stateless'`: no handler calls `ctx.requestInput`.
92
+
93
+ `teardown(core)` is the `setup()` counterpart — release a watcher, socket, or non-`unref()`'d timer there. It runs after the transport stops and before the logger closes, on every shutdown path, and a signal-triggered shutdown then exits the process explicitly (0, or 1 if a step never settles within the framework's 10 s ceiling).
94
+
78
95
  ---
79
96
 
80
97
  ## Context
@@ -84,11 +101,14 @@ Handlers receive a unified `ctx` object. Key properties:
84
101
  | Property | Description |
85
102
  |:---------|:------------|
86
103
  | `ctx.log` | Request-scoped logger — `.debug()`, `.info()`, `.notice()`, `.warning()`, `.error()`. Auto-correlates requestId, traceId, tenantId. Dual-sink: Pino **and** `notifications/message` to the client, so treat it as client-visible. |
87
- | `ctx.state` | Tenant-scoped KV — `.get(key)`, `.set(key, value, { ttl? })`, `.delete(key)`, `.getMany(keys)`, `.list(prefix, { cursor, limit })`. Accepts any serializable value. |
104
+ | `ctx.state` | Tenant-scoped KV — `.get(key)`, `.set(key, value, { ttl? })`, `.delete(key)`, `.getMany(keys)`, `.list(prefix, { cursor, limit })`. Accepts any JSON-serializable value; reads return its JSON form (a `Date` comes back as an ISO string). |
105
+ | `ctx.requestInput` | Suspend and ask the caller for more input — `return ctx.requestInput({ inputRequests: { key: inputRequired.elicit({ message, requestedSchema }) } })`. Never returns; the handler is re-entered with the answers. Always present. |
106
+ | `ctx.inputs` | The request's responses — `.accepted(key, schema)`, `.view(key)`, `.state()`, `.dropped` — limited to what the client declared (`elicitation` and its form/url modes, `sampling`, `roots`). Client-supplied: a consent gate trusts only a `ctx.state` record it stored when it asked, bound to the operation, caller, and target (see the `api-context` skill). |
107
+ | `ctx.clientCapabilities` | What the client declared for this request, `undefined` when no view exists. Decides whether to ask for optional context (e.g. roots); never a reason to skip a consent prompt. |
88
108
  | `ctx.enrich` | Success-path agent context (empty-result notices, query echo, pagination totals) — `ctx.enrich(...)` or `.notice()` / `.total()` / `.echo()` / `.truncated()`. Reaches `structuredContent` and `content[]`; lands only when the definition declares an `enrichment` block (no-op otherwise). |
89
109
  | `ctx.content` | Non-text content blocks — `.image(data, mimeType)`, `.audio(data, mimeType)`, or `ctx.content(block)` for a raw block. Prepended to `content[]` after `format()`; never enters `structuredContent`. |
90
110
  | `ctx.signal` | `AbortSignal` for cancellation. |
91
- | `ctx.requestId` | Unique request ID. |
111
+ | `ctx.requestId` | Request ID — the one every log record of the call carries and its error envelope returns as `data.requestId`. |
92
112
  | `ctx.tenantId` | Tenant ID from JWT; `'default'` for stdio or HTTP with auth off. |
93
113
 
94
114
  ---
@@ -97,7 +117,7 @@ Handlers receive a unified `ctx` object. Key properties:
97
117
 
98
118
  Handlers throw — the framework catches, classifies, and formats.
99
119
 
100
- **Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required (≥ 5 words, lint-validated) — the single source of truth for the agent's next move. Pass `ctx.recoveryFor('reason')` as the throw's data to put it on the wire (`data.recovery.hint`, mirrored into `content[]` text); override with an explicit `{ recovery: { hint: '...' } }` when dynamic runtime context matters. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`) bubble freely and don't need declaring.
120
+ **Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable?, severity?, thrownBy? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required (≥ 5 words, lint-validated) — the single source of truth for the agent's next move. The framework puts it on the wire whenever a failure carrying that `reason` arrives without a hint — a bare `ctx.fail('reason')` or a service throw with `data: { reason }` — as `data.recovery.hint`, mirrored into `content[]` text unless the message already contains it verbatim; override with an explicit `{ recovery: { hint: '...' } }` when dynamic runtime context matters. Every error envelope also carries `data.requestId`, the id the server's log records for that call carry, and `content[]` closes with `(reason … · request <id>)`. Mark an entry the service layer throws with `thrownBy: 'service'` so `error-contract-unthrown` skips it — lint-only metadata, nothing at runtime reads it. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`, `RequestCancelled`) bubble freely and don't need declaring.
101
121
 
102
122
  ```ts
103
123
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
@@ -217,7 +237,8 @@ When you complete a skill's checklist, check the boxes and add a completion time
217
237
  | `bun run rebuild` | Clean + build |
218
238
  | `bun run clean` | Remove build artifacts |
219
239
  | `bun run devcheck` | Lint + format + typecheck + security + changelog sync |
220
- | `bun run audit:refresh` | Delete `bun.lock`, reinstall, and re-run `bun audit`. Use when `devcheck` flags a transitive advisory — Bun's `update` is sticky on transitive resolutions, so the advisory may be a stale-lockfile false positive. If it survives the refresh, it's real. |
240
+ | `bun run audit:fix` | `bun audit fix` — upgrade vulnerable packages to the lowest safe version within existing ranges (`--dry-run` previews, `--latest` rewrites ranges). First response when `devcheck` flags a transitive advisory; then `bun update <name>`, then `bun dedupe` |
241
+ | `bun run audit:refresh` | Delete `bun.lock` and reinstall. Last resort after `audit:fix`, `bun update <name>`, and `bun dedupe` — re-resolves every ranged dep (the framework pin included) and rewrites the lockfile as `lockfileVersion: 2` |
221
242
  | `bun run lint:mcp` | Run the MCP definition linter standalone (rule catalog: `api-linter` skill) |
222
243
  | `bun run lint:packaging` | Packaging surface checks — `server.json`/`manifest.json` env-var parity (run by devcheck) |
223
244
  | `bun run list-skills` | Print the skill registry |
@@ -231,13 +252,15 @@ When you complete a skill's checklist, check the boxes and add a completion time
231
252
  | `bun run changelog:check` | Verify `CHANGELOG.md` is in sync (used by devcheck) |
232
253
  | `bun run bundle` | Build, pack, and clean a `.mcpb` for one-click Claude Desktop install |
233
254
 
255
+ **CI is one file.** `.github/workflows/codeql.yml` (scaffolded) is the only GitHub Actions workflow: CodeQL is GitHub-owned end to end, and the file runs only while the repo's CodeQL *default setup* is turned off. Verification — `devcheck`, tests, the release gates — runs locally; don't add a workflow that re-runs it.
256
+
234
257
  ---
235
258
 
236
259
  ## Bundling
237
260
 
238
261
  `bun run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. The pack step is followed by `scripts/clean-mcpb.ts`, which prunes dev dependencies (`mcpb clean`) and strips two classes of `node_modules/**` content that root-anchored `.mcpbignore` patterns cannot reach: dependency-shipped agent docs (`framework-skills/`, `skills/`, `.claude/`, `.agents/`, `SKILL.md`) and platform-specific native bindings, which would otherwise lock the bundle to the platform it was packed on. MCPB is stdio-only — HTTP and Cloudflare Workers deployments are unaffected. Consumers who don't need it can delete `manifest.json` and `.mcpbignore`; `lint:packaging` skips cleanly.
239
262
 
240
- **Adding an env var requires both files:** `server.json` (registry discovery, `environmentVariables[]`) and `manifest.json` (bundle install UX, `mcp_config.env` + `user_config`). `lint:packaging` (run by `devcheck`) verifies the env var names match.
263
+ **Adding an env var requires both files:** `server.json` (registry discovery, `environmentVariables[]`) and `manifest.json` (bundle install UX, `mcp_config.env` + `user_config`). `lint:packaging` (run by `devcheck`) verifies the env var names match, that every `user_config` option is wired into `mcp_config.env` as `"X": "${user_config.X}"` (the host substitutes nothing else — `"${X}"` reaches the server as that literal string), and that an optional string option carries `"default": ""`.
241
264
 
242
265
  **README install badges** (Claude Desktop `.mcpb`, Cursor, VS Code) and the `base64` / `encodeURIComponent` config-generation commands are ship-time concerns — run the `polish-docs-meta` skill, which carries the badge format, layout, and generation snippets in `framework-skills/polish-docs-meta/references/readme.md`.
243
266
 
@@ -264,7 +287,7 @@ security: false # optional — true ONLY for a source
264
287
 
265
288
  `agent-notes` is an optional free-form field for maintenance agents processing the release downstream. Content here won't appear in the rendered CHANGELOG — it's consumed by agents running the `maintenance` skill. Use it for adoption instructions that don't fit the human-facing sections: new files to create, fields to populate, one-time migration steps. Omit entirely when there's nothing to say.
266
289
 
267
- **Section order** (Keep a Changelog): Added, Changed, Deprecated, Removed, Fixed, Security. Include only sections with entries — don't ship empty headers.
290
+ **Section order:** the Keep a Changelog sequence — Added, Changed, Deprecated, Removed, Fixed, Security — then `Dependencies` last. Include only sections with entries — don't ship empty headers.
268
291
 
269
292
  **Tag annotations** render as GitHub Release bodies via `--notes-from-tag`. They must be structured markdown — never a flat comma-separated string. Subject omits the version number (GitHub prepends it). See `changelog/template.md` for the full format reference.
270
293
 
@@ -272,7 +295,7 @@ security: false # optional — true ONLY for a source
272
295
 
273
296
  ## Publishing
274
297
 
275
- **Every release goes through a release PR, straight-through** — `git-wrapup`'s "Release PR mode", mode `straight-through`. One run: `git-wrapup` lands the commit stack on `release/<version>`, pushes it, and opens the PR (title = the release commit subject, body = the changelog entry plus a gates section); `release-and-publish` then fast-forwards `main` locally with `git merge --ff-only`, creates the tag on `main`'s tip, pushes `main` and the tag, deletes the branch, and publishes. A caller's brief may run a given release as `gated` instead — a `release-pr-review` pass on the open PR before `release-and-publish`. **Never merge through the GitHub UI or `gh pr merge`**: squash and rebase-merge are disabled in the repo settings because both rewrite the stack (rebase-merge also strips the SSH signatures), and a merge commit breaks the linear history.
298
+ **Every release goes through a release PR, straight-through** — `git-wrapup`'s "Release PR mode", mode `straight-through`. One run: `git-wrapup` lands the commit stack on `release/<version>`, pushes it, and opens the PR (title = the release commit subject, body = the release digest: theme line, `## Changes`, `## Gates`, changelog link last); `release-and-publish` then fast-forwards `main` locally with `git merge --ff-only`, creates the tag on `main`'s tip, pushes `main` and the tag, deletes the branch, and publishes. A caller's brief may run a given release as `gated` instead — a `release-pr-review` pass on the open PR before `release-and-publish`. **Never merge through the GitHub UI or `gh pr merge`**: squash and rebase-merge are disabled in the repo settings because both rewrite the stack (rebase-merge also strips the SSH signatures), and a merge commit breaks the linear history.
276
299
 
277
300
  ---
278
301
 
@@ -302,7 +325,7 @@ import { getNonprofitExplorerService } from '@/services/nonprofit-explorer/nonpr
302
325
  - [ ] If wrapping external API: tests include at least one sparse payload case with omitted upstream fields
303
326
  - [ ] Registered in `createApp()` arrays (directly or via barrel exports)
304
327
  - [ ] Tests use `createMockContext()` from `@cyanheads/mcp-ts-core/testing`
305
- - [ ] `.codex-plugin/plugin.json` populated — `name`, `version`, `description`, `repository`, `license` from `package.json`; `interface.displayName` = package name; `interface.shortDescription` from `package.json` description
306
- - [ ] `.codex-plugin/mcp.json` updated — server name key matches `package.json` name; env vars added for any required API keys
307
- - [ ] `.claude-plugin/plugin.json` populated — `name`, `version`, `description`, `repository`, `license` from `package.json`; inline `mcpServers` entry with server name key, env vars for any required API keys
328
+ - [ ] `.codex-plugin/plugin.json` populated — `name`, `version`, `description`, `repository`, `license` from `package.json`; `interface.displayName` = the unscoped repo name (never the npm scope — `lint:packaging` enforces this); `interface.shortDescription` from `package.json` description
329
+ - [ ] `.codex-plugin/mcp.json` updated — server name key is the unscoped repo name; every user-supplied variable (API key, contact email, instance URL) is listed in `env_vars` so Codex forwards it from the user's environment. Never write `"KEY": ""` into `env` — an empty value replaces the user's exported key and is read as unset
330
+ - [ ] `.claude-plugin/plugin.json` populated — `name`, `version`, `description`, `author`, `repository`, `license`, `keywords` from `package.json`; inline `mcpServers` entry keyed by the unscoped repo name. Every user-supplied variable is declared under `userConfig` (`type`, `title`, `description`; `sensitive: true` for keys and tokens; `required: true` or `default: ""`) and referenced from `env` as `"KEY": "${user_config.<option>}"` — mirror the `user_config` block in `manifest.json`. Never write `"KEY": ""` into `env`
308
331
  - [ ] `bun run devcheck` passes
package/CLAUDE.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # Developer Protocol
2
2
 
3
3
  **Server:** nonprofit-explorer-mcp-server
4
- **Version:** 0.1.9
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.6`
4
+ **Version:** 0.1.10
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.14`
6
6
  **Engines:** Bun ≥1.4.0, Node ≥24.0.0
7
- **MCP SDK:** `@modelcontextprotocol/server` ^2.0.0
7
+ **MCP SDK:** `@modelcontextprotocol/server` ^2.2.0
8
8
  **Zod:** ^4.6.5
9
9
 
10
10
  > **Read the framework docs first:** `node_modules/@cyanheads/mcp-ts-core/CLAUDE.md` contains the full API reference — builders, Context, error codes, exports, patterns. This file covers server-specific conventions only.
@@ -18,6 +18,7 @@
18
18
  - **Use `ctx.state`** for tenant-scoped storage. Never access persistence directly.
19
19
  - **Need input the caller didn't supply?** `return ctx.requestInput(...)` and read `ctx.inputs` when the handler is re-entered. Never `await` for user input mid-handler.
20
20
  - **Secrets in env vars only** — never hardcoded.
21
+ - **Cut noise.** Add only what earns its place: no speculative generality, no guards for states the framework already prevents (Zod-validated params, classified errors), no abstraction until a third caller proves it, no option nothing sets.
21
22
  - **Close the loop on issues.** When implementing work tracked by a GitHub issue, comment on the issue with what landed and close it. Do both — a comment without a close leaves stale issues open; a close without a comment leaves no record of what shipped. The comment is for future readers — state the concrete changes, not the conversation that produced them.
22
23
 
23
24
  ---
@@ -75,6 +76,22 @@ export const nonprofitSearch = tool('nonprofit_search', {
75
76
 
76
77
  `createApp({ instructions })` — sent to clients on every `initialize` as session-level context. The nonprofit server uses this to orient agents on the search-first workflow and the filing-year lag.
77
78
 
79
+ ### Session posture and shutdown
80
+
81
+ Two more `createApp()` options shape how the server runs rather than how it presents itself:
82
+
83
+ ```ts
84
+ await createApp({
85
+ sessionMode: 'stateless', // or { default: 'stateful', require: 'stateful' }
86
+ setup(core) { startMyWatcher(core.config); },
87
+ async teardown() { await stopMyWatcher(); },
88
+ });
89
+ ```
90
+
91
+ `sessionMode` declares the HTTP session posture in `src/` instead of leaving it to a deployment's `MCP_SESSION_MODE`, which still wins whenever it carries a meaningful value (an empty string and an unsubstituted `${…}` placeholder read as unset and fall through to the option). Add `require: 'stateful'` when a tool asks the caller for input mid-handler via `ctx.requestInput`: startup then fails with a `ConfigurationError` rather than serving a mode in which a 2025-era client can never answer the prompt. Stdio is never refused. This server declares `sessionMode: 'stateless'`: no handler calls `ctx.requestInput`.
92
+
93
+ `teardown(core)` is the `setup()` counterpart — release a watcher, socket, or non-`unref()`'d timer there. It runs after the transport stops and before the logger closes, on every shutdown path, and a signal-triggered shutdown then exits the process explicitly (0, or 1 if a step never settles within the framework's 10 s ceiling).
94
+
78
95
  ---
79
96
 
80
97
  ## Context
@@ -84,11 +101,14 @@ Handlers receive a unified `ctx` object. Key properties:
84
101
  | Property | Description |
85
102
  |:---------|:------------|
86
103
  | `ctx.log` | Request-scoped logger — `.debug()`, `.info()`, `.notice()`, `.warning()`, `.error()`. Auto-correlates requestId, traceId, tenantId. Dual-sink: Pino **and** `notifications/message` to the client, so treat it as client-visible. |
87
- | `ctx.state` | Tenant-scoped KV — `.get(key)`, `.set(key, value, { ttl? })`, `.delete(key)`, `.getMany(keys)`, `.list(prefix, { cursor, limit })`. Accepts any serializable value. |
104
+ | `ctx.state` | Tenant-scoped KV — `.get(key)`, `.set(key, value, { ttl? })`, `.delete(key)`, `.getMany(keys)`, `.list(prefix, { cursor, limit })`. Accepts any JSON-serializable value; reads return its JSON form (a `Date` comes back as an ISO string). |
105
+ | `ctx.requestInput` | Suspend and ask the caller for more input — `return ctx.requestInput({ inputRequests: { key: inputRequired.elicit({ message, requestedSchema }) } })`. Never returns; the handler is re-entered with the answers. Always present. |
106
+ | `ctx.inputs` | The request's responses — `.accepted(key, schema)`, `.view(key)`, `.state()`, `.dropped` — limited to what the client declared (`elicitation` and its form/url modes, `sampling`, `roots`). Client-supplied: a consent gate trusts only a `ctx.state` record it stored when it asked, bound to the operation, caller, and target (see the `api-context` skill). |
107
+ | `ctx.clientCapabilities` | What the client declared for this request, `undefined` when no view exists. Decides whether to ask for optional context (e.g. roots); never a reason to skip a consent prompt. |
88
108
  | `ctx.enrich` | Success-path agent context (empty-result notices, query echo, pagination totals) — `ctx.enrich(...)` or `.notice()` / `.total()` / `.echo()` / `.truncated()`. Reaches `structuredContent` and `content[]`; lands only when the definition declares an `enrichment` block (no-op otherwise). |
89
109
  | `ctx.content` | Non-text content blocks — `.image(data, mimeType)`, `.audio(data, mimeType)`, or `ctx.content(block)` for a raw block. Prepended to `content[]` after `format()`; never enters `structuredContent`. |
90
110
  | `ctx.signal` | `AbortSignal` for cancellation. |
91
- | `ctx.requestId` | Unique request ID. |
111
+ | `ctx.requestId` | Request ID — the one every log record of the call carries and its error envelope returns as `data.requestId`. |
92
112
  | `ctx.tenantId` | Tenant ID from JWT; `'default'` for stdio or HTTP with auth off. |
93
113
 
94
114
  ---
@@ -97,7 +117,7 @@ Handlers receive a unified `ctx` object. Key properties:
97
117
 
98
118
  Handlers throw — the framework catches, classifies, and formats.
99
119
 
100
- **Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required (≥ 5 words, lint-validated) — the single source of truth for the agent's next move. Pass `ctx.recoveryFor('reason')` as the throw's data to put it on the wire (`data.recovery.hint`, mirrored into `content[]` text); override with an explicit `{ recovery: { hint: '...' } }` when dynamic runtime context matters. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`) bubble freely and don't need declaring.
120
+ **Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable?, severity?, thrownBy? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required (≥ 5 words, lint-validated) — the single source of truth for the agent's next move. The framework puts it on the wire whenever a failure carrying that `reason` arrives without a hint — a bare `ctx.fail('reason')` or a service throw with `data: { reason }` — as `data.recovery.hint`, mirrored into `content[]` text unless the message already contains it verbatim; override with an explicit `{ recovery: { hint: '...' } }` when dynamic runtime context matters. Every error envelope also carries `data.requestId`, the id the server's log records for that call carry, and `content[]` closes with `(reason … · request <id>)`. Mark an entry the service layer throws with `thrownBy: 'service'` so `error-contract-unthrown` skips it — lint-only metadata, nothing at runtime reads it. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`, `RequestCancelled`) bubble freely and don't need declaring.
101
121
 
102
122
  ```ts
103
123
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
@@ -217,7 +237,8 @@ When you complete a skill's checklist, check the boxes and add a completion time
217
237
  | `bun run rebuild` | Clean + build |
218
238
  | `bun run clean` | Remove build artifacts |
219
239
  | `bun run devcheck` | Lint + format + typecheck + security + changelog sync |
220
- | `bun run audit:refresh` | Delete `bun.lock`, reinstall, and re-run `bun audit`. Use when `devcheck` flags a transitive advisory — Bun's `update` is sticky on transitive resolutions, so the advisory may be a stale-lockfile false positive. If it survives the refresh, it's real. |
240
+ | `bun run audit:fix` | `bun audit fix` — upgrade vulnerable packages to the lowest safe version within existing ranges (`--dry-run` previews, `--latest` rewrites ranges). First response when `devcheck` flags a transitive advisory; then `bun update <name>`, then `bun dedupe` |
241
+ | `bun run audit:refresh` | Delete `bun.lock` and reinstall. Last resort after `audit:fix`, `bun update <name>`, and `bun dedupe` — re-resolves every ranged dep (the framework pin included) and rewrites the lockfile as `lockfileVersion: 2` |
221
242
  | `bun run lint:mcp` | Run the MCP definition linter standalone (rule catalog: `api-linter` skill) |
222
243
  | `bun run lint:packaging` | Packaging surface checks — `server.json`/`manifest.json` env-var parity (run by devcheck) |
223
244
  | `bun run list-skills` | Print the skill registry |
@@ -231,13 +252,15 @@ When you complete a skill's checklist, check the boxes and add a completion time
231
252
  | `bun run changelog:check` | Verify `CHANGELOG.md` is in sync (used by devcheck) |
232
253
  | `bun run bundle` | Build, pack, and clean a `.mcpb` for one-click Claude Desktop install |
233
254
 
255
+ **CI is one file.** `.github/workflows/codeql.yml` (scaffolded) is the only GitHub Actions workflow: CodeQL is GitHub-owned end to end, and the file runs only while the repo's CodeQL *default setup* is turned off. Verification — `devcheck`, tests, the release gates — runs locally; don't add a workflow that re-runs it.
256
+
234
257
  ---
235
258
 
236
259
  ## Bundling
237
260
 
238
261
  `bun run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. The pack step is followed by `scripts/clean-mcpb.ts`, which prunes dev dependencies (`mcpb clean`) and strips two classes of `node_modules/**` content that root-anchored `.mcpbignore` patterns cannot reach: dependency-shipped agent docs (`framework-skills/`, `skills/`, `.claude/`, `.agents/`, `SKILL.md`) and platform-specific native bindings, which would otherwise lock the bundle to the platform it was packed on. MCPB is stdio-only — HTTP and Cloudflare Workers deployments are unaffected. Consumers who don't need it can delete `manifest.json` and `.mcpbignore`; `lint:packaging` skips cleanly.
239
262
 
240
- **Adding an env var requires both files:** `server.json` (registry discovery, `environmentVariables[]`) and `manifest.json` (bundle install UX, `mcp_config.env` + `user_config`). `lint:packaging` (run by `devcheck`) verifies the env var names match.
263
+ **Adding an env var requires both files:** `server.json` (registry discovery, `environmentVariables[]`) and `manifest.json` (bundle install UX, `mcp_config.env` + `user_config`). `lint:packaging` (run by `devcheck`) verifies the env var names match, that every `user_config` option is wired into `mcp_config.env` as `"X": "${user_config.X}"` (the host substitutes nothing else — `"${X}"` reaches the server as that literal string), and that an optional string option carries `"default": ""`.
241
264
 
242
265
  **README install badges** (Claude Desktop `.mcpb`, Cursor, VS Code) and the `base64` / `encodeURIComponent` config-generation commands are ship-time concerns — run the `polish-docs-meta` skill, which carries the badge format, layout, and generation snippets in `framework-skills/polish-docs-meta/references/readme.md`.
243
266
 
@@ -264,7 +287,7 @@ security: false # optional — true ONLY for a source
264
287
 
265
288
  `agent-notes` is an optional free-form field for maintenance agents processing the release downstream. Content here won't appear in the rendered CHANGELOG — it's consumed by agents running the `maintenance` skill. Use it for adoption instructions that don't fit the human-facing sections: new files to create, fields to populate, one-time migration steps. Omit entirely when there's nothing to say.
266
289
 
267
- **Section order** (Keep a Changelog): Added, Changed, Deprecated, Removed, Fixed, Security. Include only sections with entries — don't ship empty headers.
290
+ **Section order:** the Keep a Changelog sequence — Added, Changed, Deprecated, Removed, Fixed, Security — then `Dependencies` last. Include only sections with entries — don't ship empty headers.
268
291
 
269
292
  **Tag annotations** render as GitHub Release bodies via `--notes-from-tag`. They must be structured markdown — never a flat comma-separated string. Subject omits the version number (GitHub prepends it). See `changelog/template.md` for the full format reference.
270
293
 
@@ -272,7 +295,7 @@ security: false # optional — true ONLY for a source
272
295
 
273
296
  ## Publishing
274
297
 
275
- **Every release goes through a release PR, straight-through** — `git-wrapup`'s "Release PR mode", mode `straight-through`. One run: `git-wrapup` lands the commit stack on `release/<version>`, pushes it, and opens the PR (title = the release commit subject, body = the changelog entry plus a gates section); `release-and-publish` then fast-forwards `main` locally with `git merge --ff-only`, creates the tag on `main`'s tip, pushes `main` and the tag, deletes the branch, and publishes. A caller's brief may run a given release as `gated` instead — a `release-pr-review` pass on the open PR before `release-and-publish`. **Never merge through the GitHub UI or `gh pr merge`**: squash and rebase-merge are disabled in the repo settings because both rewrite the stack (rebase-merge also strips the SSH signatures), and a merge commit breaks the linear history.
298
+ **Every release goes through a release PR, straight-through** — `git-wrapup`'s "Release PR mode", mode `straight-through`. One run: `git-wrapup` lands the commit stack on `release/<version>`, pushes it, and opens the PR (title = the release commit subject, body = the release digest: theme line, `## Changes`, `## Gates`, changelog link last); `release-and-publish` then fast-forwards `main` locally with `git merge --ff-only`, creates the tag on `main`'s tip, pushes `main` and the tag, deletes the branch, and publishes. A caller's brief may run a given release as `gated` instead — a `release-pr-review` pass on the open PR before `release-and-publish`. **Never merge through the GitHub UI or `gh pr merge`**: squash and rebase-merge are disabled in the repo settings because both rewrite the stack (rebase-merge also strips the SSH signatures), and a merge commit breaks the linear history.
276
299
 
277
300
  ---
278
301
 
@@ -302,7 +325,7 @@ import { getNonprofitExplorerService } from '@/services/nonprofit-explorer/nonpr
302
325
  - [ ] If wrapping external API: tests include at least one sparse payload case with omitted upstream fields
303
326
  - [ ] Registered in `createApp()` arrays (directly or via barrel exports)
304
327
  - [ ] Tests use `createMockContext()` from `@cyanheads/mcp-ts-core/testing`
305
- - [ ] `.codex-plugin/plugin.json` populated — `name`, `version`, `description`, `repository`, `license` from `package.json`; `interface.displayName` = package name; `interface.shortDescription` from `package.json` description
306
- - [ ] `.codex-plugin/mcp.json` updated — server name key matches `package.json` name; env vars added for any required API keys
307
- - [ ] `.claude-plugin/plugin.json` populated — `name`, `version`, `description`, `repository`, `license` from `package.json`; inline `mcpServers` entry with server name key, env vars for any required API keys
328
+ - [ ] `.codex-plugin/plugin.json` populated — `name`, `version`, `description`, `repository`, `license` from `package.json`; `interface.displayName` = the unscoped repo name (never the npm scope — `lint:packaging` enforces this); `interface.shortDescription` from `package.json` description
329
+ - [ ] `.codex-plugin/mcp.json` updated — server name key is the unscoped repo name; every user-supplied variable (API key, contact email, instance URL) is listed in `env_vars` so Codex forwards it from the user's environment. Never write `"KEY": ""` into `env` — an empty value replaces the user's exported key and is read as unset
330
+ - [ ] `.claude-plugin/plugin.json` populated — `name`, `version`, `description`, `author`, `repository`, `license`, `keywords` from `package.json`; inline `mcpServers` entry keyed by the unscoped repo name. Every user-supplied variable is declared under `userConfig` (`type`, `title`, `description`; `sensitive: true` for keys and tokens; `required: true` or `default: ""`) and referenced from `env` as `"KEY": "${user_config.<option>}"` — mirror the `user_config` block in `manifest.json`. Never write `"KEY": ""` into `env`
308
331
  - [ ] `bun run devcheck` passes
package/Dockerfile CHANGED
@@ -3,8 +3,18 @@
3
3
  #
4
4
  # This stage installs all dependencies (including dev), builds the TypeScript
5
5
  # source code into JavaScript, and prepares the production assets.
6
+ #
7
+ # Pinned to $BUILDPLATFORM rather than the target platform: `bun run build` emits
8
+ # JavaScript, and only `dist/` crosses into the production stage. Built for the
9
+ # target instead, the non-native leg of a `--platform linux/amd64,linux/arm64`
10
+ # build runs under QEMU, where bun >= 1.4 aborts with a JavaScriptCore allocator
11
+ # assertion and fails the multi-arch push.
12
+ #
13
+ # The constraint this assumes: the build stage produces platform-independent
14
+ # output. A stage that compiles a native addon needs the target-arch toolchain
15
+ # and cannot cross-compile this way — drop the flag there.
6
16
  # ==============================================================================
7
- FROM --platform=$BUILDPLATFORM oven/bun:1.4.0 AS build
17
+ FROM --platform=$BUILDPLATFORM oven/bun:1.4.2 AS build
8
18
 
9
19
  WORKDIR /usr/src/app
10
20
 
@@ -24,68 +34,132 @@ RUN bun run build
24
34
 
25
35
 
26
36
  # ==============================================================================
27
- # Production Stage
37
+ # Production Dependencies Stage
28
38
  #
29
- # This stage creates a minimal, optimized, and secure image for running the
30
- # application. It uses a slim base image and only includes production
31
- # dependencies and build artifacts.
39
+ # Installs the production dependency tree for the target platform. Every step
40
+ # here can run JavaScript — bunfig.toml's security scanner runs as a Bun
41
+ # program, and so do the OTel and musl-prune scripts — so the stage runs on
42
+ # $BUILDPLATFORM and cross-installs with `--os`/`--cpu`, which pick each
43
+ # platform-specific optional dependency (native bindings such as DuckDB's) for
44
+ # the target. Only `node_modules` leaves this stage.
45
+ #
46
+ # A clean image rather than `FROM build`: the build stage's node_modules holds
47
+ # devDependencies.
32
48
  # ==============================================================================
33
- FROM oven/bun:1.4.0-slim AS production
49
+ FROM --platform=$BUILDPLATFORM oven/bun:1.4.2 AS deps
34
50
 
35
51
  WORKDIR /usr/src/app
36
52
 
37
- # Set the environment to production for performance and to ensure only
38
- # production dependencies are installed.
39
- ENV NODE_ENV=production
40
-
41
- # OCI image metadata (https://github.com/opencontainers/image-spec/blob/main/annotations.md)
42
- ARG APP_VERSION=dev
43
- LABEL org.opencontainers.image.title="nonprofit-explorer-mcp-server"
44
- LABEL org.opencontainers.image.description="Search and explore 1.8M+ US nonprofits, fetch Form 990 financials, and access IRS filing history via MCP. STDIO or Streamable HTTP."
45
- LABEL org.opencontainers.image.licenses="Apache-2.0"
46
- LABEL org.opencontainers.image.source="https://github.com/cyanheads/nonprofit-explorer-mcp-server"
47
- LABEL org.opencontainers.image.version="${APP_VERSION}"
48
-
49
- # Copy dependency manifests
50
- COPY package.json bun.lock ./
53
+ # Copy dependency manifests. `bunfig.toml` rides along so every install below
54
+ # passes its release-age gate and security scanner, as a local install does.
55
+ COPY package.json bun.lock bunfig.toml ./
56
+
57
+ # The scanner bunfig.toml names is a devDependency, and Bun installs a missing
58
+ # scanner through the same production-filtered install, which omits it and
59
+ # aborts. Seed it from the build stage's full install instead. Remove this line,
60
+ # and the `rm` at the end of this stage, if bunfig.toml stops naming a scanner.
61
+ COPY --from=build /usr/src/app/node_modules/@socketsecurity/bun-security-scanner ./node_modules/@socketsecurity/bun-security-scanner
62
+
63
+ # Docker names the target architecture `amd64`/`arm64`; Bun's `--cpu` takes
64
+ # `x64`/`arm64`. Mapped once here, read by both installs below. `oven/bun`
65
+ # publishes only these two architectures, so any other target fails here.
66
+ ARG TARGETOS
67
+ ARG TARGETARCH
68
+ RUN case "$TARGETARCH" in \
69
+ amd64) echo x64 ;; \
70
+ arm64) echo arm64 ;; \
71
+ *) echo "Unsupported TARGETARCH '$TARGETARCH': expected amd64 or arm64" >&2; exit 1 ;; \
72
+ esac > .bun-cpu
51
73
 
52
74
  # Install only production dependencies, ignoring any lifecycle scripts (like 'prepare')
53
75
  # that are not needed in the final production image.
54
76
  # `--omit=peer` drops the framework's optional peer tiers (test runner, service
55
77
  # SDKs, parsers) that Bun would otherwise auto-install. Anything this server
56
78
  # actually imports belongs in its own `dependencies`, so nothing needed at
57
- # runtime is lost. The OTEL step below carries the same flag — without it, that
58
- # install re-resolves the graph and pulls every optional peer back in.
79
+ # runtime is lost.
59
80
  RUN --mount=type=cache,target=/root/.bun/install/cache \
60
- bun install --production --omit=peer --frozen-lockfile --ignore-scripts
81
+ bun install --production --omit=peer --frozen-lockfile --ignore-scripts \
82
+ --os="$TARGETOS" --cpu="$(cat .bun-cpu)"
61
83
 
62
84
  # Conditionally install OpenTelemetry optional peer dependencies (Tier 3).
63
- # These are not bundled by default to keep the base image lean. Enable at build time
64
- # with: docker build --build-arg OTEL_ENABLED=true
85
+ # Installed by default. Omit them for a leaner image at build time
86
+ # with: docker build --build-arg OTEL_ENABLED=false
87
+ # The script reads the list and each range from the installed framework's
88
+ # `peerDependencies` and passes the target flags on to its `bun install`.
89
+ COPY scripts/install-otel.ts ./scripts/
65
90
  ARG OTEL_ENABLED=true
66
91
  RUN --mount=type=cache,target=/root/.bun/install/cache \
67
92
  if [ "$OTEL_ENABLED" = "true" ]; then \
68
- bun add --omit=dev --omit=peer --ignore-scripts @hono/otel \
69
- @opentelemetry/instrumentation-http \
70
- @opentelemetry/exporter-metrics-otlp-http \
71
- @opentelemetry/exporter-trace-otlp-http \
72
- @opentelemetry/instrumentation-pino \
73
- @opentelemetry/resources \
74
- @opentelemetry/sdk-metrics \
75
- @opentelemetry/sdk-node \
76
- @opentelemetry/sdk-trace-node \
77
- @opentelemetry/semantic-conventions; \
93
+ bun scripts/install-otel.ts --os="$TARGETOS" --cpu="$(cat .bun-cpu)"; \
78
94
  fi
79
95
 
96
+ # `--os`/`--cpu` have no libc counterpart, so a native dependency published in
97
+ # glibc and musl variants (DuckDB's bindings, for one) installs both. The
98
+ # runtime image is Debian (glibc) and never loads the musl copy; the script
99
+ # deletes every package whose own `libc` admits only musl. It follows every
100
+ # install, since a later `bun install` restores what it removes. A server on a
101
+ # musl (Alpine) runtime image drops these two lines.
102
+ COPY scripts/prune-musl-packages.ts ./scripts/
103
+ RUN bun scripts/prune-musl-packages.ts
104
+
105
+ # The seeded scanner served only the installs above; keep it out of the image.
106
+ RUN rm -rf node_modules/@socketsecurity/bun-security-scanner
107
+
108
+
109
+ # ==============================================================================
110
+ # Production Stage
111
+ #
112
+ # This stage creates a minimal, optimized, and secure image for running the
113
+ # application. It uses a slim base image and only includes production
114
+ # dependencies and build artifacts. Its only Bun invocations are HEALTHCHECK
115
+ # and CMD, which run on the real target at container start.
116
+ # ==============================================================================
117
+ FROM oven/bun:1.4.2-slim AS production
118
+
119
+ WORKDIR /usr/src/app
120
+
121
+ # Set the environment to production for performance.
122
+ ENV NODE_ENV=production
123
+
124
+ # OCI image metadata (https://github.com/opencontainers/image-spec/blob/main/annotations.md)
125
+ ARG APP_VERSION
126
+ LABEL org.opencontainers.image.title="nonprofit-explorer-mcp-server"
127
+ LABEL org.opencontainers.image.description="Search and explore 1.8M+ US nonprofits, fetch Form 990 financials, and access IRS filing history via MCP. STDIO or Streamable HTTP."
128
+ LABEL org.opencontainers.image.licenses="Apache-2.0"
129
+ LABEL org.opencontainers.image.version="${APP_VERSION}"
130
+ LABEL org.opencontainers.image.source="https://github.com/cyanheads/nonprofit-explorer-mcp-server"
131
+
132
+ # The manifest comes from the build context: the deps stage's copy was rewritten
133
+ # by the OTel install, and the runtime reads only its name, version, and type.
134
+ COPY package.json ./
135
+ COPY --from=deps /usr/src/app/node_modules ./node_modules
136
+
80
137
  # Copy the compiled application code from the build stage
81
138
  COPY --from=build /usr/src/app/dist ./dist
82
139
 
140
+ # Mirror CLI (MirrorService adopters only — Tier 3, opt-in):
141
+ # Copy your mirror lifecycle scripts and emit a runtime tsconfig so Bun resolves
142
+ # the @/ path alias against ./dist/ rather than ./src/.
143
+ # See the api-mirror skill for the full recipe.
144
+ #
145
+ # COPY --from=build /usr/src/app/scripts/<your>-mirror-init.ts \
146
+ # /usr/src/app/scripts/<your>-mirror-refresh.ts \
147
+ # /usr/src/app/scripts/<your>-mirror-verify.ts \
148
+ # /usr/src/app/scripts/_mirror-context.ts \
149
+ # ./scripts/
150
+ # RUN echo '{"compilerOptions":{"baseUrl":".","paths":{"@/*":["./dist/*"]}}}' > tsconfig.json
151
+
83
152
  # The 'oven/bun' image already provides a non-root user named 'bun'.
84
153
  # We will use this existing user for enhanced security.
85
154
 
86
155
  # Create and set permissions for the log directory, assigning ownership to the 'bun' user.
87
156
  RUN mkdir -p /var/log/nonprofit-explorer-mcp-server && chown -R bun:bun /var/log/nonprofit-explorer-mcp-server
88
157
 
158
+ # Writable data dirs for on-disk SQLite stores (catalog index / observations
159
+ # mirror), owned by the runtime user. Mount a volume over either in production.
160
+ RUN mkdir -p /usr/src/app/.cache /usr/src/app/.mirror \
161
+ && chown -R bun:bun /usr/src/app/.cache /usr/src/app/.mirror
162
+
89
163
  # Switch to the non-root user
90
164
  USER bun
91
165
 
@@ -101,14 +175,12 @@ ENV MCP_TRANSPORT_TYPE="http"
101
175
  ENV MCP_SESSION_MODE="stateless"
102
176
  ENV MCP_LOG_LEVEL="info"
103
177
  ENV LOGS_DIR="/var/log/nonprofit-explorer-mcp-server"
104
- ENV MCP_FORCE_CONSOLE_LOGGING="true"
105
178
 
106
179
  # Expose the port the server listens on
107
180
  EXPOSE ${MCP_HTTP_PORT}
108
181
 
109
- # Health check against the /healthz endpoint
110
- HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
111
- CMD bun -e "fetch('http://localhost:' + (process.env.MCP_HTTP_PORT || 3010) + '/healthz').then(r => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1))"
182
+ # Health check using a bun-native fetch (slim image ships no curl/wget)
183
+ HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 CMD bun -e "fetch('http://localhost:'+(process.env.MCP_HTTP_PORT??'3010')+'/healthz').then((r)=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"
112
184
 
113
185
  # The command to start the server
114
186
  CMD ["bun", "run", "dist/index.js"]
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  <div align="center">
9
9
 
10
- [![Version](https://img.shields.io/badge/Version-0.1.9-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/)
10
+ [![Version](https://img.shields.io/badge/Version-0.1.10-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.2.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.2-blueviolet.svg?style=flat-square)](https://bun.sh/)
11
11
 
12
12
  </div>
13
13
 
@@ -173,7 +173,7 @@ MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http
173
173
 
174
174
  ### Prerequisites
175
175
 
176
- - [Bun v1.3.14](https://bun.sh/) or higher (or Node.js v24+).
176
+ - [Bun v1.4.0](https://bun.sh/) or higher (or Node.js v24+).
177
177
  - No API key required — ProPublica Nonprofit Explorer is a keyless public API.
178
178
 
179
179
  ### Installation
@@ -217,6 +217,7 @@ All configuration is validated at startup. Key environment variables:
217
217
  | `MCP_AUTH_MODE` | Authentication: `none`, `jwt`, or `oauth` | `none` |
218
218
  | `MCP_LOG_LEVEL` | Log level (`debug`, `info`, `warning`, `error`, etc.) | `info` |
219
219
  | `LOGS_DIR` | Directory for log files (Node.js only) | `<project-root>/logs` |
220
+ | `LOG_TOOL_FAILURE_PAYLOADS` | Log each failed tool call's arguments and result, redacted by key name and capped at `LOG_TOOL_FAILURE_PAYLOAD_MAX_BYTES` (default `16384`). A secret inside a free-form value is not redacted. | `false` |
220
221
  | `STORAGE_PROVIDER_TYPE` | Storage backend: `in-memory`, `filesystem`, `supabase`, `cloudflare-kv/r2/d1` | `in-memory` |
221
222
  | `OTEL_ENABLED` | Enable [OpenTelemetry instrumentation](https://github.com/cyanheads/mcp-ts-core/tree/main/docs/telemetry) | `false` |
222
223
 
@@ -0,0 +1,35 @@
1
+ ---
2
+ summary: "Adopts @cyanheads/mcp-ts-core ^0.13.14: an integer sent for query, a numeric-string page, and null optional filters are now repaired instead of rejected, and every tool error carries a request ID. The Docker image installs dependencies in a build-platform stage, and the MCP Registry HTTP entry now starts the HTTP transport."
3
+ breaking: false
4
+ security: false
5
+ ---
6
+
7
+ # 0.1.10 — 2026-10-08
8
+
9
+ ## Changed
10
+
11
+ - **Tool arguments are repaired instead of rejected in three cases**: an integer sent for `query` becomes its digits (`4711` searches for "4711"), a numeric string for `page` becomes the integer (`"1"` → page 1), and `null` at an optional filter (`state`, `ntee_category`, `subsection_code`) is treated as absent.
12
+ - **Tool error results carry `data.requestId`**, and the error text closes with `request <id>`.
13
+ - **Argument-rejection hints name the field path**, e.g. `Send page as a number, not a boolean.`
14
+ - **Service and tool throw sites no longer forward `ctx.recoveryFor(…)`**; the framework fills the declared `recovery` hint for the thrown `reason`. Callers see the same hint text as before.
15
+ - **`Dockerfile` installs production dependencies in a `deps` stage on `$BUILDPLATFORM`**, using the new `scripts/install-otel.ts` and `scripts/prune-musl-packages.ts`. Multi-arch builds no longer run Bun under emulation, and the image drops the unused musl native bindings.
16
+ - **Bun `1.4.0` → `1.4.2`** in `packageManager`, the Docker base images (`oven/bun:1.4.2`), and the README badge.
17
+ - **`package.json` `files` excludes `dist/*.mcpb`**; `.mcpbignore` excludes `.cache/`, `coverage/`, `tests/`, `docs/idea.md`, and `logs/`; `.gitignore` and `.dockerignore` ignore every `.env*` file except the templates.
18
+ - **`.github/workflows/codeql.yml` runs `actions` and `javascript-typescript` as a matrix**, each uploading under `/language:<language>`.
19
+ - **`.env.example` and the README document** the framework's logging, request-state, resumability, and OTLP variables, including `LOG_TOOL_FAILURE_PAYLOADS`.
20
+ - Framework skills, devcheck and lint scripts, `CLAUDE.md`, and `AGENTS.md` synced to `@cyanheads/mcp-ts-core` 0.13.14; `package.json` gains `audit:fix` and `start` scripts.
21
+
22
+ ## Fixed
23
+
24
+ - **MCP Registry `server.json`**: both npm package entries now use `"runtimeHint": "npx"` with no `packageArguments`, and the `streamable-http` entry sets `MCP_TRANSPORT_TYPE` to `http`. The package bin ignored the former `run start:*` arguments, so the HTTP entry never selected the HTTP transport.
25
+
26
+ ## Dependencies
27
+
28
+ - `@cyanheads/mcp-ts-core` `^0.13.6` → `^0.13.14`
29
+ - `pino-pretty` `^13.1.3` → `^13.2.0`
30
+ - `@biomejs/biome` `^2.5.14` → `^2.5.15` (dev)
31
+ - `@socketsecurity/bun-security-scanner` `^1.1.2` → `^1.1.3` (dev)
32
+ - `@types/node` `^26.6.1` → `^26.6.4` (dev)
33
+ - `ignore` `^7.0.9` → `^7.0.12` (dev)
34
+ - `tsc-alias` `^1.9.5` → `^1.9.7` (dev)
35
+ - `vitest` `^5.0.1` → `^5.0.3` (dev)
@@ -1,6 +1,6 @@
1
1
  ---
2
- summary: "Adopts @cyanheads/mcp-ts-core ^0.13.6 — bad tool arguments now reject as InvalidParams with a reason and recovery hint, tool error text states the reason and retryability, and a mid-flight cancellation classifies RequestCancelled instead of a generic error."
3
- breaking: true
2
+ summary: "Adopts @cyanheads/mcp-ts-core ^0.13.6 — a rejected tool call now names the reason and carries a schema-derived recovery hint, tool error text states the reason and retryability, unknown and misspelled argument keys are repaired before a call fails, and a mid-flight cancellation classifies RequestCancelled."
3
+ breaking: false
4
4
  security: false
5
5
  ---
6
6
 
@@ -8,7 +8,7 @@ security: false
8
8
 
9
9
  ## Changed
10
10
 
11
- - **Argument rejections return `InvalidParams` (-32602)** instead of `ValidationError` (-32007), carrying `data.reason: "invalid_arguments"` and a schema-derived recovery hint rendered as a `Recovery:` line in `content[]`.
11
+ - **An argument rejection carries `data.reason: "invalid_arguments"` and a schema-derived recovery hint**, rendered as a `Recovery:` line in `content[]`. A required field omitted from an enum now renders as missing rather than as a wrong choice, and a rejection against alternative shapes renders each branch's own message instead of a bare `Invalid input`.
12
12
  - **Tool error text closes with `(reason … · not retryable)`** whenever the thrown error's data carries a `reason` or a boolean `retryable`.
13
13
  - **Tool arguments pass a pre-validation step before schema parsing** — a client-added root key is dropped, a case-style key alias is rewritten, and a JSON-stringified array argument is repaired once before a call fails.
14
14
  - **A request cancelled mid-flight classifies `RequestCancelled` (-32011)** instead of a generic internal error.
@@ -1 +1 @@
1
- {"version":3,"file":"nonprofit-search.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/nonprofit-search.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAkBjE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuU1B,CAAC"}
1
+ {"version":3,"file":"nonprofit-search.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/nonprofit-search.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAkBjE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsU1B,CAAC"}
@@ -164,7 +164,7 @@ export const nonprofitSearch = tool('nonprofit_search', {
164
164
  const normalized = normalizeStateCode(input.state);
165
165
  if (normalized === null) {
166
166
  throw ctx.fail('invalid_state', `"${input.state}" is not a US state, territory, or military postal code. ` +
167
- 'ProPublica ignores an unrecognized state filter and returns unfiltered national results.', { ...ctx.recoveryFor('invalid_state') });
167
+ 'ProPublica ignores an unrecognized state filter and returns unfiltered national results.');
168
168
  }
169
169
  state = normalized;
170
170
  }
@@ -1 +1 @@
1
- {"version":3,"file":"nonprofit-search.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/nonprofit-search.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EACL,2BAA2B,EAC3B,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,6DAA6D,CAAC;AAErE,gFAAgF;AAChF,MAAM,MAAM,GAAG,CAAC,CAAS,EAAE,IAAY,EAAE,UAAU,GAAG,GAAG,IAAI,GAAG,EAAE,EAAE,CAClE,GAAG,CAAC,CAAC,cAA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CAAC,CAAC,cAAc,EAAE,CACnF,CAAC;YACF,KAAK,CAAC,IAAI,CAAC,iCAAiC,GAAG,CAAC,QAAQ,IAAI,aAAa,EAAE,CAAC,CAAC;YAC7E,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACjB,CAAC;QAED,KAAK,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,WAAW,GAAG,CAAC,CAAC;QAEtC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"nonprofit-search.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/nonprofit-search.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EACL,2BAA2B,EAC3B,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,6DAA6D,CAAC;AAErE,gFAAgF;AAChF,MAAM,MAAM,GAAG,CAAC,CAAS,EAAE,IAAY,EAAE,UAAU,GAAG,GAAG,IAAI,GAAG,EAAE,EAAE,CAClE,GAAG,CAAC,CAAC,cAAc,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC;AAEzD,mFAAmF;AACnF,MAAM,WAAW,GAAG,aAAa,CAAC;AAClC,iFAAiF;AACjF,MAAM,aAAa,GAAG,eAAe,CAAC;AACtC,kEAAkE;AAClE,MAAM,cAAc,GAAG,gBAAgB,CAAC;AAExC,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC,kBAAkB,EAAE;IACtD,KAAK,EAAE,mBAAmB;IAC1B,WAAW,EACT,wyBAAwyB;IAC1yB,WAA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-explorer-service.d.ts","sourceRoot":"","sources":["../../../src/services/nonprofit-explorer/nonprofit-explorer-service.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAO/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAOlF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,QAAS,CAAC;AAI5C,qBAAa,wBAAwB;IAGnC,YAAY,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc,EAAI;IAE5D;;;;OAIG;YACW,aAAa;IAmD3B,4DAA4D;IAC5D,MAAM,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAoDrE;IAED;;;OAGG;IACH,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,cAAc,CAAC,CAwClE;IAED,2FAA2F;IAC3F,OAAO,CAAC,SAAS;CAiBlB;AAMD,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI,CAE7F;AAED,wBAAgB,2BAA2B,IAAI,wBAAwB,CAOtE;AAqBD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAG/D;AAED,mFAAmF;AACnF,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAGzD;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAG7C"}
1
+ {"version":3,"file":"nonprofit-explorer-service.d.ts","sourceRoot":"","sources":["../../../src/services/nonprofit-explorer/nonprofit-explorer-service.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAO/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAOlF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,QAAS,CAAC;AAI5C,qBAAa,wBAAwB;IAGnC,YAAY,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc,EAAI;IAE5D;;;;OAIG;YACW,aAAa;IAkD3B,4DAA4D;IAC5D,MAAM,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,iBAAiB,CAAC,CA8CrE;IAED;;;OAGG;IACH,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,cAAc,CAAC,CAoClE;IAED,2FAA2F;IAC3F,OAAO,CAAC,SAAS;CAgBlB;AAMD,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI,CAE7F;AAED,wBAAgB,2BAA2B,IAAI,wBAAwB,CAOtE;AAqBD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAG/D;AAED,mFAAmF;AACnF,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAGzD;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAG7C"}
@@ -54,7 +54,6 @@ export class NonprofitExplorerService {
54
54
  url,
55
55
  statusCode: response.status,
56
56
  reason: 'upstream_error',
57
- ...ctx.recoveryFor('upstream_error'),
58
57
  });
59
58
  }
60
59
  return { status: response.status, text };
@@ -62,7 +61,7 @@ export class NonprofitExplorerService {
62
61
  catch (err) {
63
62
  if (err instanceof McpError)
64
63
  throw err;
65
- throw serviceUnavailable(`Network error reaching ProPublica API: ${err instanceof Error ? err.message : String(err)}`, { url, reason: 'upstream_error', ...ctx.recoveryFor('upstream_error') });
64
+ throw serviceUnavailable(`Network error reaching ProPublica API: ${err instanceof Error ? err.message : String(err)}`, { url, reason: 'upstream_error' });
66
65
  }
67
66
  finally {
68
67
  clearTimeout(timeoutId);
@@ -90,22 +89,16 @@ export class NonprofitExplorerService {
90
89
  * 400 shape is a hard boundary the caller must correct.
91
90
  */
92
91
  const { status, text } = await this.fetchTolerant(url.toString(), [400, 404], ctx);
93
- const data = this.parseJson(text, url.toString(), ctx);
92
+ const data = this.parseJson(text, url.toString());
94
93
  if (status === 400) {
95
94
  if (/pagination/i.test(data.error ?? '')) {
96
95
  throw validationError(`Page ${params.page} is at or beyond ProPublica's ${SEARCH_RESULT_CEILING.toLocaleString()}-result pagination ceiling. ` +
97
- `At ${SEARCH_RESULTS_PER_PAGE} results per page, pages 0–${MAX_SEARCH_PAGE} are reachable.`, {
98
- page: params.page,
99
- reason: 'pagination_ceiling',
100
- retryable: false,
101
- ...ctx.recoveryFor('pagination_ceiling'),
102
- });
96
+ `At ${SEARCH_RESULTS_PER_PAGE} results per page, pages 0–${MAX_SEARCH_PAGE} are reachable.`, { page: params.page, reason: 'pagination_ceiling', retryable: false });
103
97
  }
104
98
  throw serviceUnavailable('ProPublica API rejected the search request.', {
105
99
  url: url.toString(),
106
100
  statusCode: status,
107
101
  reason: 'upstream_error',
108
- ...ctx.recoveryFor('upstream_error'),
109
102
  });
110
103
  }
111
104
  return data;
@@ -128,7 +121,7 @@ export class NonprofitExplorerService {
128
121
  // inspect the body before deciding how to classify the error, rather than letting
129
122
  // the network layer throw a generic FetchHttpError.
130
123
  const { status, text } = await this.fetchTolerant(url, [404], ctx);
131
- const data = this.parseJson(text, url, ctx);
124
+ const data = this.parseJson(text, url);
132
125
  const org = data.organization;
133
126
  /**
134
127
  * Three upstream signatures all mean "no such EIN": HTTP 404 with an error body,
@@ -138,11 +131,7 @@ export class NonprofitExplorerService {
138
131
  !org ||
139
132
  org.id === 0 ||
140
133
  (org.name === 'Unknown Organization' && org.address === null)) {
141
- throw notFound(`No organization found for EIN ${ein}.`, {
142
- ein,
143
- reason: 'not_found',
144
- ...ctx.recoveryFor('not_found'),
145
- });
134
+ throw notFound(`No organization found for EIN ${ein}.`, { ein, reason: 'not_found' });
146
135
  }
147
136
  return data;
148
137
  }, {
@@ -153,9 +142,9 @@ export class NonprofitExplorerService {
153
142
  });
154
143
  }
155
144
  /** Parse JSON from an upstream response; throws serviceUnavailable on HTML error pages. */
156
- parseJson(text, url, ctx) {
145
+ parseJson(text, url) {
157
146
  if (/^\s*<(!DOCTYPE\s+html|html[\s>])/i.test(text)) {
158
- throw serviceUnavailable('ProPublica API returned HTML instead of JSON — likely a transient server error.', { url, reason: 'upstream_error', ...ctx.recoveryFor('upstream_error') });
147
+ throw serviceUnavailable('ProPublica API returned HTML instead of JSON — likely a transient server error.', { url, reason: 'upstream_error' });
159
148
  }
160
149
  try {
161
150
  return JSON.parse(text);
@@ -164,7 +153,6 @@ export class NonprofitExplorerService {
164
153
  throw serviceUnavailable('ProPublica API returned unparseable response.', {
165
154
  url,
166
155
  reason: 'upstream_error',
167
- ...ctx.recoveryFor('upstream_error'),
168
156
  });
169
157
  }
170
158
  }
@@ -1 +1 @@
1
- {"version":3,"file":"nonprofit-explorer-service.js","sourceRoot":"","sources":["../../../src/services/nonprofit-explorer/nonprofit-explorer-service.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,kBAAkB,EAClB,eAAe,GAChB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,SAAS,EAAE,MA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C5F,CAAC;IACJ,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;;GAIG;AACH,MAAM,eAAe,GAAwB,IAAI,GAAG,CAClD;IACE,YAAY;IACZ,4EAA4E;IAC5E,4EAA4E;IAC5E,kEAAkE;IAClE,4BAA4B;IAC5B,8EAA8E;IAC9E,aAAa;CACd;KACE,IAAI,CAAC,GAAG,CAAC;KACT,KAAK,CAAC,GAAG,CAAC,CACd,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAa;IAC9C,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IACxC,OAAO,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AACjD,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,YAAY,CAAC,GAAoB;IAC/C,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,GAAG,CAAC;IACxC,OAAO,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;AAC5C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,GAAW;IACnC,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACvC,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;AAC1C,CAAC"}
1
+ {"version":3,"file":"nonprofit-explorer-service.js","sourceRoot":"","sources":["../../../src/services/nonprofit-explorer/nonprofit-explorer-service.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,kBAAkB,EAClB,eAAe,GAChB,MAAM,+BAA+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I,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IACxC,OAAO,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AACjD,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,YAAY,CAAC,GAAoB;IAC/C,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,GAAG,CAAC;IACxC,OAAO,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;AAC5C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,GAAW;IACnC,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACvC,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;AAC1C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyanheads/nonprofit-explorer-mcp-server",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "mcpName": "io.github.cyanheads/nonprofit-explorer-mcp-server",
5
5
  "description": "Search and explore 1.8M+ US nonprofits, fetch Form 990 financials, and access IRS filing history via MCP. STDIO or Streamable HTTP.",
6
6
  "type": "module",
@@ -12,6 +12,7 @@
12
12
  "files": [
13
13
  "changelog/",
14
14
  "dist/",
15
+ "!dist/*.mcpb",
15
16
  "README.md",
16
17
  "LICENSE",
17
18
  "CLAUDE.md",
@@ -24,6 +25,7 @@
24
25
  "rebuild": "bun run scripts/clean.ts && bun run scripts/build.ts",
25
26
  "clean": "bun run scripts/clean.ts",
26
27
  "devcheck": "bun run scripts/devcheck.ts",
28
+ "audit:fix": "bun audit fix",
27
29
  "audit:refresh": "rm -f bun.lock && bun install && bun audit",
28
30
  "tree": "bun run scripts/tree.ts",
29
31
  "list-skills": "bun run scripts/list-skills.ts",
@@ -37,6 +39,7 @@
37
39
  "publish-mcp": "mcp-publisher login github -token \"$(security find-generic-password -a \"$USER\" -s mcp-publisher-github-pat -w)\" && mcp-publisher publish",
38
40
  "release:github": "bun run scripts/release-github.ts",
39
41
  "test": "bunx vitest run",
42
+ "start": "bun ./dist/index.js",
40
43
  "start:stdio": "MCP_TRANSPORT_TYPE=stdio bun ./dist/index.js",
41
44
  "start:http": "MCP_TRANSPORT_TYPE=http bun ./dist/index.js"
42
45
  },
@@ -76,7 +79,7 @@
76
79
  }
77
80
  ],
78
81
  "license": "Apache-2.0",
79
- "packageManager": "bun@1.4.0",
82
+ "packageManager": "bun@1.4.2",
80
83
  "engines": {
81
84
  "bun": ">=1.4.0",
82
85
  "node": ">=24.0.0"
@@ -85,18 +88,18 @@
85
88
  "access": "public"
86
89
  },
87
90
  "dependencies": {
88
- "@cyanheads/mcp-ts-core": "^0.13.6",
89
- "pino-pretty": "^13.1.3",
91
+ "@cyanheads/mcp-ts-core": "^0.13.14",
92
+ "pino-pretty": "^13.2.0",
90
93
  "zod": "^4.6.5"
91
94
  },
92
95
  "devDependencies": {
93
- "@biomejs/biome": "^2.5.14",
94
- "@socketsecurity/bun-security-scanner": "^1.1.2",
95
- "@types/node": "^26.6.1",
96
+ "@biomejs/biome": "^2.5.15",
97
+ "@socketsecurity/bun-security-scanner": "^1.1.3",
98
+ "@types/node": "^26.6.4",
96
99
  "depcheck": "^1.4.7",
97
- "ignore": "^7.0.9",
98
- "tsc-alias": "^1.9.5",
100
+ "ignore": "^7.0.12",
101
+ "tsc-alias": "^1.9.7",
99
102
  "typescript": "^7.0.2",
100
- "vitest": "^5.0.1"
103
+ "vitest": "^5.0.3"
101
104
  }
102
105
  }
package/server.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
3
  "name": "io.github.cyanheads/nonprofit-explorer-mcp-server",
4
- "description": "MCP server for nonprofit financials via ProPublica — IRS Form 990 data for 1.8M+ nonprofits.",
4
+ "description": "MCP server for nonprofit financials via ProPublica: IRS Form 990 data for 1.8M+ nonprofits.",
5
5
  "repository": {
6
6
  "url": "https://github.com/cyanheads/nonprofit-explorer-mcp-server",
7
7
  "source": "github"
8
8
  },
9
- "version": "0.1.9",
9
+ "version": "0.1.10",
10
10
  "remotes": [
11
11
  {
12
12
  "type": "streamable-http",
@@ -18,18 +18,8 @@
18
18
  "registryType": "npm",
19
19
  "registryBaseUrl": "https://registry.npmjs.org",
20
20
  "identifier": "@cyanheads/nonprofit-explorer-mcp-server",
21
- "runtimeHint": "bun",
22
- "version": "0.1.9",
23
- "packageArguments": [
24
- {
25
- "type": "positional",
26
- "value": "run"
27
- },
28
- {
29
- "type": "positional",
30
- "value": "start:stdio"
31
- }
32
- ],
21
+ "runtimeHint": "npx",
22
+ "version": "0.1.10",
33
23
  "environmentVariables": [
34
24
  {
35
25
  "name": "MCP_LOG_LEVEL",
@@ -47,19 +37,15 @@
47
37
  "registryType": "npm",
48
38
  "registryBaseUrl": "https://registry.npmjs.org",
49
39
  "identifier": "@cyanheads/nonprofit-explorer-mcp-server",
50
- "runtimeHint": "bun",
51
- "version": "0.1.9",
52
- "packageArguments": [
40
+ "runtimeHint": "npx",
41
+ "version": "0.1.10",
42
+ "environmentVariables": [
53
43
  {
54
- "type": "positional",
55
- "value": "run"
44
+ "name": "MCP_TRANSPORT_TYPE",
45
+ "description": "Selects the HTTP transport.",
46
+ "format": "string",
47
+ "value": "http"
56
48
  },
57
- {
58
- "type": "positional",
59
- "value": "start:http"
60
- }
61
- ],
62
- "environmentVariables": [
63
49
  {
64
50
  "name": "MCP_HTTP_HOST",
65
51
  "description": "The hostname for the HTTP server.",