@cyanheads/reliefweb-mcp-server 0.1.1 → 0.1.3

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 ADDED
@@ -0,0 +1,395 @@
1
+ # Developer Protocol
2
+
3
+ **Server:** @cyanheads/reliefweb-mcp-server
4
+ **Version:** 0.1.3
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.9.7`
6
+ **Engines:** Bun ≥1.3.0, Node ≥24.0.0
7
+ **MCP SDK:** `@modelcontextprotocol/sdk` ^1.29.0
8
+ **Zod:** ^4.4.3
9
+
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.
11
+
12
+ ---
13
+
14
+ ## What's Next?
15
+
16
+ When the user asks what's next or needs direction, suggest options based on the current project state. Common next steps:
17
+
18
+ 1. **Re-run the `setup` skill** — ensures CLAUDE.md, skills, structure, and metadata are populated and up to date with the current codebase
19
+ 2. **Run the `design-mcp-server` skill** — if the tool/resource surface hasn't been mapped yet, work through domain design
20
+ 3. **Add tools/resources/prompts** — scaffold new definitions using the `add-tool`, `add-app-tool`, `add-resource`, `add-prompt` skills
21
+ 4. **Add services** — scaffold domain service integrations using the `add-service` skill
22
+ 5. **Add tests** — scaffold tests for existing definitions using the `add-test` skill
23
+ 6. **Field-test definitions** — exercise tools/resources/prompts with real inputs using the `field-test` skill, get a report of issues and pain points
24
+ 7. **Run `devcheck`** — lint, format, typecheck, and security audit
25
+ 8. **Run the `security-pass` skill** — audit handlers for MCP-specific security gaps: output injection, scope blast radius, input sinks, tenant isolation
26
+ 9. **Run the `polish-docs-meta` skill** — finalize README, CHANGELOG, metadata, and agent protocol for shipping
27
+ 10. **Run the `maintenance` skill** — investigate changelogs, adopt upstream changes, and sync skills after `bun update --latest`
28
+
29
+ Tailor suggestions to what's actually missing or stale — don't recite the full list every time.
30
+
31
+ ---
32
+
33
+ ## Core Rules
34
+
35
+ - **Logic throws, framework catches.** Tool/resource handlers are pure — throw on failure, no `try/catch`. Plain `Error` is fine; the framework catches, classifies, and formats. Use error factories (`notFound()`, `validationError()`, etc.) when the error code matters.
36
+ - **Use `ctx.log`** for request-scoped logging. No `console` calls.
37
+ - **Use `ctx.state`** for tenant-scoped storage. Never access persistence directly.
38
+ - **Check `ctx.elicit` / `ctx.sample`** for presence before calling.
39
+ - **Secrets in env vars only** — never hardcoded.
40
+
41
+ ---
42
+
43
+ ## Patterns
44
+
45
+ ### Tool
46
+
47
+ ```ts
48
+ import { tool, z } from '@cyanheads/mcp-ts-core';
49
+
50
+ export const searchItems = tool('search_items', {
51
+ description: 'Search inventory items by query.',
52
+ annotations: { readOnlyHint: true },
53
+ input: z.object({
54
+ query: z.string().describe('Search terms'),
55
+ limit: z.number().default(10).describe('Max results'),
56
+ }),
57
+ output: z.object({
58
+ items: z.array(z.object({
59
+ id: z.string().describe('Item ID'),
60
+ name: z.string().describe('Item name'),
61
+ })).describe('Matching items'),
62
+ }),
63
+ auth: ['inventory:read'],
64
+
65
+ async handler(input, ctx) {
66
+ const items = await findItems(input.query, input.limit);
67
+ ctx.log.info('Search completed', { query: input.query, count: items.length });
68
+ return { items };
69
+ },
70
+
71
+ // format() populates content[] — the markdown twin of structuredContent.
72
+ // Different clients read different surfaces (Claude Code → structuredContent,
73
+ // Claude Desktop → content[]); both must carry the same data.
74
+ // Enforced at lint time: every field in `output` must appear in the rendered text.
75
+ format: (result) => [{
76
+ type: 'text',
77
+ text: result.items.map(i => `**${i.id}**: ${i.name}`).join('\n'),
78
+ }],
79
+ });
80
+ ```
81
+
82
+ ### Resource
83
+
84
+ ```ts
85
+ import { resource, z } from '@cyanheads/mcp-ts-core';
86
+ import { notFound } from '@cyanheads/mcp-ts-core/errors';
87
+
88
+ export const itemData = resource('inventory://{itemId}', {
89
+ description: 'Fetch an inventory item by ID.',
90
+ params: z.object({ itemId: z.string().describe('Item identifier') }),
91
+ auth: ['inventory:read'],
92
+ async handler(params, ctx) {
93
+ const item = await ctx.state.get(`item:${params.itemId}`);
94
+ if (!item) throw notFound(`Item ${params.itemId} not found`, { itemId: params.itemId });
95
+ return item;
96
+ },
97
+ });
98
+ ```
99
+
100
+ ### Prompt
101
+
102
+ ```ts
103
+ import { prompt, z } from '@cyanheads/mcp-ts-core';
104
+
105
+ export const reviewCode = prompt('review_code', {
106
+ description: 'Review code for issues and best practices.',
107
+ args: z.object({
108
+ code: z.string().describe('Code to review'),
109
+ language: z.string().optional().describe('Programming language'),
110
+ }),
111
+ generate: (args) => [
112
+ { role: 'user', content: { type: 'text', text: `Review this ${args.language ?? ''} code:\n${args.code}` } },
113
+ ],
114
+ });
115
+ ```
116
+
117
+ ### Server config
118
+
119
+ ```ts
120
+ // src/config/server-config.ts — lazy-parsed, separate from framework config
121
+ import { z } from '@cyanheads/mcp-ts-core';
122
+ import { parseEnvConfig } from '@cyanheads/mcp-ts-core/config';
123
+
124
+ const ServerConfigSchema = z.object({
125
+ apiKey: z.string().describe('External API key'),
126
+ maxResults: z.coerce.number().default(100),
127
+ });
128
+
129
+ let _config: z.infer<typeof ServerConfigSchema> | undefined;
130
+ export function getServerConfig() {
131
+ _config ??= parseEnvConfig(ServerConfigSchema, {
132
+ apiKey: 'MY_API_KEY',
133
+ maxResults: 'MY_MAX_RESULTS',
134
+ });
135
+ return _config;
136
+ }
137
+ ```
138
+
139
+ `parseEnvConfig` maps Zod schema paths → env var names so errors name the variable (`MY_API_KEY`) not the path (`apiKey`). Throws `ConfigurationError`, which the framework prints as a clean startup banner.
140
+
141
+ ---
142
+
143
+ ## Context
144
+
145
+ Handlers receive a unified `ctx` object. Key properties:
146
+
147
+ | Property | Description |
148
+ |:---------|:------------|
149
+ | `ctx.log` | Request-scoped logger — `.debug()`, `.info()`, `.notice()`, `.warning()`, `.error()`. Auto-correlates requestId, traceId, tenantId. |
150
+ | `ctx.state` | Tenant-scoped KV — `.get(key)`, `.set(key, value, { ttl? })`, `.delete(key)`, `.list(prefix, { cursor, limit })`. Accepts any serializable value. |
151
+ | `ctx.elicit` | Ask user for structured input. **Check for presence first:** `if (ctx.elicit) { ... }` |
152
+ | `ctx.sample` | Request LLM completion from the client. **Check for presence first:** `if (ctx.sample) { ... }` |
153
+ | `ctx.signal` | `AbortSignal` for cancellation. |
154
+ | `ctx.progress` | Task progress (present when `task: true`) — `.setTotal(n)`, `.increment()`, `.update(message)`. |
155
+ | `ctx.requestId` | Unique request ID. |
156
+ | `ctx.tenantId` | Tenant ID from JWT or `'default'` for stdio. |
157
+
158
+ ---
159
+
160
+ ## Errors
161
+
162
+ Handlers throw — the framework catches, classifies, and formats.
163
+
164
+ **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 descriptive metadata for the agent's next move (≥ 5 words, lint-validated); for the wire `data.recovery.hint` (mirrored into `content[]` text), pass explicitly at the throw site when dynamic context matters: `ctx.fail('reason', msg, { recovery: { hint: '...' } })`. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`) bubble freely and don't need declaring.
165
+
166
+ ```ts
167
+ errors: [
168
+ { reason: 'no_match', code: JsonRpcErrorCode.NotFound,
169
+ when: 'No item matched the query',
170
+ recovery: 'Broaden the query or check the spelling and try again.' },
171
+ ],
172
+ async handler(input, ctx) {
173
+ const item = await db.find(input.id);
174
+ if (!item) throw ctx.fail('no_match', `No item ${input.id}`);
175
+ return item;
176
+ }
177
+ ```
178
+
179
+ **Declare contracts inline on each tool.** The contract is part of the tool's public surface — one file should give the full picture. Don't extract a shared `errors[]` constant; per-tool repetition is the intended cost of locality.
180
+
181
+ **Fallback (no contract entry fits):** throw via factories or plain `Error`.
182
+
183
+ ```ts
184
+ // Error factories — explicit code
185
+ import { notFound, serviceUnavailable } from '@cyanheads/mcp-ts-core/errors';
186
+ throw notFound('Item not found', { itemId });
187
+ throw serviceUnavailable('API unavailable', { url }, { cause: err });
188
+
189
+ // Plain Error — framework auto-classifies from message patterns
190
+ throw new Error('Item not found'); // → NotFound
191
+ throw new Error('Invalid query format'); // → ValidationError
192
+
193
+ // McpError — when no factory exists for the code
194
+ import { McpError, JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
195
+ throw new McpError(JsonRpcErrorCode.DatabaseError, 'Connection failed', { pool: 'primary' });
196
+ ```
197
+
198
+ See framework CLAUDE.md and the `api-errors` skill for the full auto-classification table, all available factories, and the contract reference.
199
+
200
+ ---
201
+
202
+ ## Structure
203
+
204
+ ```text
205
+ src/
206
+ index.ts # createApp() entry point
207
+ config/
208
+ server-config.ts # Server-specific env vars (Zod schema)
209
+ services/
210
+ [domain]/
211
+ [domain]-service.ts # Domain service (init/accessor pattern)
212
+ types.ts # Domain types
213
+ mcp-server/
214
+ tools/definitions/
215
+ [tool-name].tool.ts # Tool definitions
216
+ resources/definitions/
217
+ [resource-name].resource.ts # Resource definitions
218
+ prompts/definitions/
219
+ [prompt-name].prompt.ts # Prompt definitions
220
+ ```
221
+
222
+ ---
223
+
224
+ ## Naming
225
+
226
+ | What | Convention | Example |
227
+ |:-----|:-----------|:--------|
228
+ | Files | kebab-case with suffix | `search-docs.tool.ts` |
229
+ | Tool/resource/prompt names | snake_case | `search_docs` |
230
+ | Directories | kebab-case | `src/services/doc-search/` |
231
+ | Descriptions | Single string or template literal, no `+` concatenation | `'Search items by query and filter.'` |
232
+
233
+ ---
234
+
235
+ ## Skills
236
+
237
+ Skills are modular instructions in `skills/` at the project root. Read them directly when a task matches — e.g., `skills/add-tool/SKILL.md` when adding a tool.
238
+
239
+ **Agent skill directory:** Copy skills into the directory your agent discovers (Claude Code: `.claude/skills/`, others: equivalent). Skills then load as context without referencing `skills/` paths. After framework updates, run the `maintenance` skill — Phase B re-syncs the agent directory.
240
+
241
+ Available skills:
242
+
243
+ | Skill | Purpose |
244
+ |:------|:--------|
245
+ | `setup` | Post-init project orientation |
246
+ | `design-mcp-server` | Design tool surface, resources, and services for a new server |
247
+ | `add-tool` | Scaffold a new tool definition |
248
+ | `add-app-tool` | Scaffold an MCP App tool + paired UI resource |
249
+ | `add-resource` | Scaffold a new resource definition |
250
+ | `add-prompt` | Scaffold a new prompt definition |
251
+ | `add-service` | Scaffold a new service integration |
252
+ | `add-test` | Scaffold test file for a tool, resource, or service |
253
+ | `field-test` | Exercise tools/resources/prompts with real inputs, verify behavior, report issues |
254
+ | `tool-defs-analysis` | Read-only audit of definition language: voice, leaks, defaults, recovery hints, examples |
255
+ | `security-pass` | Audit server for MCP-flavored security gaps: output injection, scope blast radius, input sinks, tenant isolation |
256
+ | `devcheck` | Lint, format, typecheck, audit |
257
+ | `polish-docs-meta` | Finalize docs, README, metadata, and agent protocol for shipping |
258
+ | `maintenance` | Investigate changelogs, adopt upstream changes, and sync skills after `bun update --latest` |
259
+ | `release-and-publish` | Ship a release: verification gate, push commits+tags, publish to npm / MCP Registry / GHCR / `.mcpb` bundle on GitHub Releases |
260
+ | `api-auth` | Auth modes, scopes, JWT/OAuth |
261
+ | `api-canvas` | DataCanvas: register tabular data, run SQL, export, plus the `spillover()` helper for big result sets — Tier 3 opt-in |
262
+ | `api-config` | AppConfig, parseConfig, env vars |
263
+ | `api-context` | Context interface, logger, state, progress |
264
+ | `api-errors` | McpError, JsonRpcErrorCode, error patterns |
265
+ | `api-linter` | Definition lint rules reference (`format-parity`, `schema-*`, `server-json-*`, …) |
266
+ | `api-services` | LLM, Speech, Graph services |
267
+ | `api-telemetry` | OTel catalog: spans, metrics, completion logs, env config, cardinality rules |
268
+ | `api-testing` | createMockContext, test patterns |
269
+ | `api-utils` | Formatting, parsing, security, pagination, scheduling, telemetry helpers |
270
+ | `api-workers` | Cloudflare Workers runtime |
271
+ | `report-issue-framework` | File bug/feature request against @cyanheads/mcp-ts-core |
272
+ | `report-issue-local` | File bug/feature request against this server's repo |
273
+
274
+ When you complete a skill's checklist, check the boxes and add a completion timestamp at the end (e.g., `Completed: 2026-03-11`).
275
+
276
+ ---
277
+
278
+ ## Commands
279
+
280
+ | Command | Purpose |
281
+ |:--------|:--------|
282
+ | `bun run build` | Compile TypeScript |
283
+ | `bun run rebuild` | Clean + build |
284
+ | `bun run clean` | Remove build artifacts |
285
+ | `bun run devcheck` | Lint + format + typecheck + security + packaging alignment |
286
+ | `bun run audit:refresh` | Delete `bun.lock`, reinstall, and re-run `bun audit`. Use when `devcheck` flags a transitive advisory — `bun update` is sticky on transitive resolutions, so the advisory may be a stale-lockfile false positive. If it survives the refresh, it's real. |
287
+ | `bun run tree` | Generate directory structure doc |
288
+ | `bun run format` | Auto-fix formatting |
289
+ | `bun run test` | Run tests |
290
+ | `bun run lint:mcp` | Validate MCP definitions against spec |
291
+ | `bun run lint:packaging` | Validate env var alignment between `manifest.json` and `server.json` (skipped cleanly when `manifest.json` is absent) |
292
+ | `bun run list-skills` | List skills in `skills/` with name + description |
293
+ | `bun run start:stdio` | Production mode (stdio) |
294
+ | `bun run start:http` | Production mode (HTTP) |
295
+ | `bun run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |
296
+ | `bun run changelog:check` | Verify `CHANGELOG.md` is in sync (used by devcheck) |
297
+ | `bun run bundle` | Build and pack as `dist/reliefweb-mcp-server.mcpb` for one-click Claude Desktop install |
298
+
299
+ ---
300
+
301
+ ## Bundling
302
+
303
+ `bun run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. 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.
304
+
305
+ **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.
306
+
307
+ **README install badges.** Drop these into the project README to give users one-click install paths. Fill in `<OWNER>` / `<REPO>` / `<PACKAGE_NAME>` and encode the per-server config. Cursor + VS Code badges assume the server is published to npm; Claude Desktop downloads the `.mcpb` directly so npm publishing isn't required.
308
+
309
+ | Client | Mechanism |
310
+ |:-------|:----------|
311
+ | Claude Desktop | Browser downloads the `.mcpb` from the latest GitHub Release; OS file handler routes it to Claude Desktop, which opens the install dialog. No deep-link URL scheme yet — this is the canonical path. |
312
+ | Cursor | Official `https://cursor.com/en/install-mcp` endpoint with base64 JSON config. |
313
+ | VS Code / Insiders | Official `vscode:mcp/install?...` deep link, wrapped in `https://vscode.dev/redirect?url=` so GitHub-rendered markdown doesn't strip the non-HTTP scheme. |
314
+ | Claude Code / Codex | CLI only (`claude mcp add` / `codex mcp add`); no URL scheme. |
315
+
316
+ ```markdown
317
+ [![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/<OWNER>/<REPO>/releases/latest/download/<PACKAGE_NAME>.mcpb)
318
+ [![Install in Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=<PACKAGE_NAME>&config=<BASE64_CONFIG>)
319
+ [![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?<URLENCODED_JSON>)
320
+ ```
321
+
322
+ Both install links route through HTTPS endpoints (`cursor.com/en/install-mcp` and `vscode.dev/redirect`) — GitHub-rendered markdown strips non-HTTP URL schemes from anchors, so a raw `cursor://` or `vscode:` link won't click through from github.com.
323
+
324
+ Generate the encoded configs (replace `<PACKAGE_NAME>` and add env vars for any required API keys):
325
+
326
+ ```bash
327
+ # Cursor: base64-encoded JSON. Split command/args, add env when keys are needed.
328
+ echo -n '{"command":"npx","args":["-y","<PACKAGE_NAME>"],"env":{"API_KEY":"your-api-key"}}' | base64
329
+ # Without env (no required keys):
330
+ echo -n '{"command":"npx","args":["-y","<PACKAGE_NAME>"]}' | base64
331
+
332
+ # VS Code: URL-encoded JSON. Same shape plus a `name` field.
333
+ node -p 'encodeURIComponent(JSON.stringify({name:"<SHORT_NAME>",command:"npx",args:["-y","<PACKAGE_NAME>"],env:{API_KEY:"your-api-key"}}))'
334
+ # Without env:
335
+ node -p 'encodeURIComponent(JSON.stringify({name:"<SHORT_NAME>",command:"npx",args:["-y","<PACKAGE_NAME>"]}))'
336
+ ```
337
+
338
+ Both clients use the same `{command, args, env}` shape (matching `mcp.json` schema). VS Code adds a top-level `name` field. Omit `env` entirely when no API keys are needed — don't include empty objects or framework-only vars like `MCP_TRANSPORT_TYPE`.
339
+
340
+ The Claude Desktop badge requires the bundle to ship with a stable filename — `bun run bundle` outputs `dist/<PACKAGE_NAME>.mcpb`, and `release-and-publish` attaches that file to the GitHub Release. `releases/latest/download/<PACKAGE_NAME>.mcpb` then redirects to the most recent release.
341
+
342
+ ---
343
+
344
+ ## Changelog
345
+
346
+ Directory-based, grouped by minor series via the `.x` semver-wildcard convention. Source of truth: `changelog/<major.minor>.x/<version>.md` (e.g. `changelog/0.1.x/0.1.0.md`) — one file per release, shipped in the npm package. At release, author the per-version file with a concrete version and date, then run `bun run changelog:build` to regenerate the rollup. `changelog/template.md` is a **pristine format reference** — never edited or moved; read it for the frontmatter + section layout when scaffolding. `CHANGELOG.md` is a **navigation index** (header + link + summary per version), regenerated by `bun run changelog:build` — devcheck hard-fails on drift; never hand-edit it.
347
+
348
+ Each per-version file opens with YAML frontmatter:
349
+
350
+ ```markdown
351
+ ---
352
+ summary: "One-line headline, ≤350 chars" # required — powers the rollup index
353
+ breaking: false # optional — true flags breaking changes
354
+ security: false # optional — true flags security fixes
355
+ ---
356
+
357
+ # 0.1.0 — YYYY-MM-DD
358
+ ...
359
+ ```
360
+
361
+ `breaking: true` renders a `· ⚠️ Breaking` badge — use it when consumers must update code on upgrade (signature changes, removed APIs, config renames). `security: true` renders a `· 🛡️ Security` badge and pairs with a `## Security` body section. When both are set, badges render `· ⚠️ Breaking · 🛡️ Security`.
362
+
363
+ **Section order** (Keep a Changelog): Added, Changed, Deprecated, Removed, Fixed, Security. Include only sections with entries — don't ship empty headers.
364
+
365
+ **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.
366
+
367
+ ---
368
+
369
+ ## Imports
370
+
371
+ ```ts
372
+ // Framework — z is re-exported, no separate zod import needed
373
+ import { tool, z } from '@cyanheads/mcp-ts-core';
374
+ import { McpError, JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
375
+
376
+ // Server's own code — via path alias
377
+ import { getMyService } from '@/services/my-domain/my-service.js';
378
+ ```
379
+
380
+ ---
381
+
382
+ ## Checklist
383
+
384
+ - [ ] Zod schemas: all fields have `.describe()`, only JSON-Schema-serializable types (no `z.custom()`, `z.date()`, `z.transform()`, `z.bigint()`, `z.symbol()`, `z.void()`, `z.map()`, `z.set()`, `z.function()`, `z.nan()`)
385
+ - [ ] Optional nested objects: handler guards for empty inner values from form-based clients (`if (input.obj?.field && ...)`, not just `if (input.obj)`). When regex/length constraints matter, use `z.union([z.literal(''), z.string().regex(...).describe(...)])` — literal variants are exempt from `describe-on-fields`.
386
+ - [ ] JSDoc `@fileoverview` + `@module` on every file
387
+ - [ ] `ctx.log` for logging, `ctx.state` for storage
388
+ - [ ] Handlers throw on failure — error factories or plain `Error`, no try/catch
389
+ - [ ] `format()` renders all data the LLM needs — different clients forward different surfaces (Claude Code → `structuredContent`, Claude Desktop → `content[]`); both must carry the same data
390
+ - [ ] If wrapping external API: raw/domain/output schemas reviewed against real upstream sparsity/nullability before finalizing required vs optional fields
391
+ - [ ] If wrapping external API: normalization and `format()` preserve uncertainty; do not fabricate facts from missing upstream data
392
+ - [ ] If wrapping external API: tests include at least one sparse payload case with omitted upstream fields
393
+ - [ ] Registered in `createApp()` arrays (directly or via barrel exports)
394
+ - [ ] Tests use `createMockContext()` from `@cyanheads/mcp-ts-core/testing`
395
+ - [ ] `bun run devcheck` passes
package/CLAUDE.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Developer Protocol
2
2
 
3
3
  **Server:** @cyanheads/reliefweb-mcp-server
4
- **Version:** 0.1.1
4
+ **Version:** 0.1.3
5
5
  **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.9.7`
6
6
  **Engines:** Bun ≥1.3.0, Node ≥24.0.0
7
7
  **MCP SDK:** `@modelcontextprotocol/sdk` ^1.29.0
@@ -251,22 +251,25 @@ Available skills:
251
251
  | `add-service` | Scaffold a new service integration |
252
252
  | `add-test` | Scaffold test file for a tool, resource, or service |
253
253
  | `field-test` | Exercise tools/resources/prompts with real inputs, verify behavior, report issues |
254
+ | `tool-defs-analysis` | Read-only audit of definition language: voice, leaks, defaults, recovery hints, examples |
254
255
  | `security-pass` | Audit server for MCP-flavored security gaps: output injection, scope blast radius, input sinks, tenant isolation |
255
256
  | `devcheck` | Lint, format, typecheck, audit |
256
257
  | `polish-docs-meta` | Finalize docs, README, metadata, and agent protocol for shipping |
257
- | `maintenance` | Investigate changelogs, adopt upstream changes, sync skills to agent dirs |
258
- | `report-issue-framework` | File a bug or feature request against `@cyanheads/mcp-ts-core` via `gh` CLI |
259
- | `report-issue-local` | File a bug or feature request against this server's own repo via `gh` CLI |
258
+ | `maintenance` | Investigate changelogs, adopt upstream changes, and sync skills after `bun update --latest` |
259
+ | `release-and-publish` | Ship a release: verification gate, push commits+tags, publish to npm / MCP Registry / GHCR / `.mcpb` bundle on GitHub Releases |
260
260
  | `api-auth` | Auth modes, scopes, JWT/OAuth |
261
261
  | `api-canvas` | DataCanvas: register tabular data, run SQL, export, plus the `spillover()` helper for big result sets — Tier 3 opt-in |
262
262
  | `api-config` | AppConfig, parseConfig, env vars |
263
263
  | `api-context` | Context interface, logger, state, progress |
264
264
  | `api-errors` | McpError, JsonRpcErrorCode, error patterns |
265
+ | `api-linter` | Definition lint rules reference (`format-parity`, `schema-*`, `server-json-*`, …) |
265
266
  | `api-services` | LLM, Speech, Graph services |
267
+ | `api-telemetry` | OTel catalog: spans, metrics, completion logs, env config, cardinality rules |
266
268
  | `api-testing` | createMockContext, test patterns |
267
269
  | `api-utils` | Formatting, parsing, security, pagination, scheduling, telemetry helpers |
268
- | `api-telemetry` | OTel catalog: spans, metrics, completion logs, env config, cardinality rules |
269
270
  | `api-workers` | Cloudflare Workers runtime |
271
+ | `report-issue-framework` | File bug/feature request against @cyanheads/mcp-ts-core |
272
+ | `report-issue-local` | File bug/feature request against this server's repo |
270
273
 
271
274
  When you complete a skill's checklist, check the boxes and add a completion timestamp at the end (e.g., `Completed: 2026-03-11`).
272
275
 
@@ -274,29 +277,30 @@ When you complete a skill's checklist, check the boxes and add a completion time
274
277
 
275
278
  ## Commands
276
279
 
277
- **Runtime:** Scripts use `tsx` — both `npm run <cmd>` and `bun run <cmd>` work. `bun` is slightly faster for script invocation but not required.
278
-
279
280
  | Command | Purpose |
280
281
  |:--------|:--------|
281
- | `npm run build` | Compile TypeScript |
282
- | `npm run rebuild` | Clean + build |
283
- | `npm run clean` | Remove build artifacts |
284
- | `npm run devcheck` | Lint + format + typecheck + security + changelog sync |
285
- | `bun run audit:refresh` | Delete `bun.lock`, reinstall, re-audit. Use when `devcheck` flags a transitive advisory — stale lockfile can mask already-patched deps. If advisory survives, it's real. |
286
- | `npm run tree` | Generate directory structure doc |
287
- | `npm run format` | Auto-fix formatting |
288
- | `npm test` | Run tests |
289
- | `npm run start:stdio` | Production mode (stdio) |
290
- | `npm run start:http` | Production mode (HTTP) |
291
- | `npm run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |
292
- | `npm run changelog:check` | Verify `CHANGELOG.md` is in sync (used by devcheck) |
293
- | `npm run bundle` | Build and pack as `.mcpb` for one-click Claude Desktop install |
282
+ | `bun run build` | Compile TypeScript |
283
+ | `bun run rebuild` | Clean + build |
284
+ | `bun run clean` | Remove build artifacts |
285
+ | `bun run devcheck` | Lint + format + typecheck + security + packaging alignment |
286
+ | `bun run audit:refresh` | Delete `bun.lock`, reinstall, and re-run `bun audit`. Use when `devcheck` flags a transitive advisory — `bun update` is sticky on transitive resolutions, so the advisory may be a stale-lockfile false positive. If it survives the refresh, it's real. |
287
+ | `bun run tree` | Generate directory structure doc |
288
+ | `bun run format` | Auto-fix formatting |
289
+ | `bun run test` | Run tests |
290
+ | `bun run lint:mcp` | Validate MCP definitions against spec |
291
+ | `bun run lint:packaging` | Validate env var alignment between `manifest.json` and `server.json` (skipped cleanly when `manifest.json` is absent) |
292
+ | `bun run list-skills` | List skills in `skills/` with name + description |
293
+ | `bun run start:stdio` | Production mode (stdio) |
294
+ | `bun run start:http` | Production mode (HTTP) |
295
+ | `bun run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |
296
+ | `bun run changelog:check` | Verify `CHANGELOG.md` is in sync (used by devcheck) |
297
+ | `bun run bundle` | Build and pack as `dist/reliefweb-mcp-server.mcpb` for one-click Claude Desktop install |
294
298
 
295
299
  ---
296
300
 
297
301
  ## Bundling
298
302
 
299
- `npm run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. 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.
303
+ `bun run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. 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.
300
304
 
301
305
  **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.
302
306
 
@@ -339,7 +343,7 @@ The Claude Desktop badge requires the bundle to ship with a stable filename —
339
343
 
340
344
  ## Changelog
341
345
 
342
- Directory-based, grouped by minor series via the `.x` semver-wildcard convention. Source of truth: `changelog/<major.minor>.x/<version>.md` (e.g. `changelog/0.1.x/0.1.0.md`) — one file per release, shipped in the npm package. At release, author the per-version file with a concrete version and date, then run `npm run changelog:build` to regenerate the rollup. `changelog/template.md` is a **pristine format reference** — never edited or moved; read it for the frontmatter + section layout when scaffolding. `CHANGELOG.md` is a **navigation index** (header + link + summary per version), regenerated by `npm run changelog:build` — devcheck hard-fails on drift; never hand-edit it.
346
+ Directory-based, grouped by minor series via the `.x` semver-wildcard convention. Source of truth: `changelog/<major.minor>.x/<version>.md` (e.g. `changelog/0.1.x/0.1.0.md`) — one file per release, shipped in the npm package. At release, author the per-version file with a concrete version and date, then run `bun run changelog:build` to regenerate the rollup. `changelog/template.md` is a **pristine format reference** — never edited or moved; read it for the frontmatter + section layout when scaffolding. `CHANGELOG.md` is a **navigation index** (header + link + summary per version), regenerated by `bun run changelog:build` — devcheck hard-fails on drift; never hand-edit it.
343
347
 
344
348
  Each per-version file opens with YAML frontmatter:
345
349
 
@@ -388,4 +392,4 @@ import { getMyService } from '@/services/my-domain/my-service.js';
388
392
  - [ ] If wrapping external API: tests include at least one sparse payload case with omitted upstream fields
389
393
  - [ ] Registered in `createApp()` arrays (directly or via barrel exports)
390
394
  - [ ] Tests use `createMockContext()` from `@cyanheads/mcp-ts-core/testing`
391
- - [ ] `npm run devcheck` passes
395
+ - [ ] `bun run devcheck` passes
package/Dockerfile CHANGED
@@ -37,9 +37,10 @@ WORKDIR /usr/src/app
37
37
  ENV NODE_ENV=production
38
38
 
39
39
  # OCI image metadata (https://github.com/opencontainers/image-spec/blob/main/annotations.md)
40
- LABEL org.opencontainers.image.title="reliefweb-mcp-server"
41
- LABEL org.opencontainers.image.description=""
40
+ LABEL org.opencontainers.image.title="@cyanheads/reliefweb-mcp-server"
41
+ LABEL org.opencontainers.image.description="Search ReliefWeb humanitarian reports, disasters, jobs, and training from OCHA via MCP. STDIO or Streamable HTTP."
42
42
  LABEL org.opencontainers.image.licenses="Apache-2.0"
43
+ LABEL org.opencontainers.image.source="https://github.com/cyanheads/reliefweb-mcp-server"
43
44
 
44
45
  # Copy dependency manifests
45
46
  COPY package.json bun.lock ./
package/README.md CHANGED
@@ -1,13 +1,13 @@
1
1
  <div align="center">
2
2
  <h1>@cyanheads/reliefweb-mcp-server</h1>
3
- <p><b>Search ReliefWeb humanitarian reports, disasters, jobs, training, and country profiles via MCP. STDIO or Streamable HTTP.</b>
3
+ <p><b>Search ReliefWeb humanitarian reports, disasters, jobs, and training from OCHA via MCP. STDIO or Streamable HTTP.</b>
4
4
  <div>9 Tools • 3 Resources • 1 Prompt</div>
5
5
  </p>
6
6
  </div>
7
7
 
8
8
  <div align="center">
9
9
 
10
- [![Version](https://img.shields.io/badge/Version-0.1.1-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^1.29.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/reliefweb-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/reliefweb-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^6.0.3-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.3.0-blueviolet.svg?style=flat-square)](https://bun.sh/)
10
+ [![Version](https://img.shields.io/badge/Version-0.1.3-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/reliefweb-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^1.29.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/reliefweb-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/reliefweb-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^6.0.3-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.3.2-blueviolet.svg?style=flat-square)](https://bun.sh/)
11
11
 
12
12
  </div>
13
13
 
@@ -175,7 +175,7 @@ Agent-friendly output:
175
175
 
176
176
  ### Prerequisites
177
177
 
178
- - [Bun v1.3.0](https://bun.sh/) or higher, or Node.js v24.0.0 or higher.
178
+ - [Bun v1.3.2](https://bun.sh/) or higher.
179
179
  - A **pre-approved ReliefWeb appname** — register at [ReliefWeb API](https://reliefweb.int/help/api) and set `RELIEFWEB_APP_NAME`. The API has required pre-approved appnames since November 2025; requests without one are rejected.
180
180
 
181
181
  ### Self-Hosted / Local
@@ -245,8 +245,6 @@ cd reliefweb-mcp-server
245
245
  bun install
246
246
  ```
247
247
 
248
- 4. **Copy `.env.example` to `.env` and set `RELIEFWEB_APP_NAME`.**
249
-
250
248
  ## Configuration
251
249
 
252
250
  All configuration is validated at startup via Zod schemas. Key environment variables:
@@ -0,0 +1,24 @@
1
+ ---
2
+ summary: "Metadata alignment — package.json, Dockerfile, manifest.json, server.json, README, AGENTS.md, bunfig.toml"
3
+ breaking: false
4
+ security: false
5
+ ---
6
+
7
+ # 0.1.2 — 2026-05-23
8
+
9
+ Metadata-only patch: aligns all metadata files to the pubmed gold standard.
10
+
11
+ ## Added
12
+
13
+ - `AGENTS.md` — agent protocol file for non-Claude Code consumers
14
+ - `bunfig.toml` — Bun configuration file
15
+
16
+ ## Changed
17
+
18
+ - `package.json` — description, scripts, and fields aligned to standard
19
+ - `Dockerfile` — LABEL metadata updated
20
+ - `manifest.json` — description and fields updated
21
+ - `server.json` — description, runtimeHint, and env var entries updated
22
+ - `README.md` — tagline and badges updated
23
+ - `CLAUDE.md` — developer protocol updated
24
+ - `docs/tree.md` — regenerated to reflect new files
@@ -0,0 +1,12 @@
1
+ ---
2
+ summary: "Fix empty RELIEFWEB_APP_NAME validation and crisis_briefing country/disaster disambiguation"
3
+ breaking: false
4
+ security: false
5
+ ---
6
+
7
+ # 0.1.3 — 2026-05-24
8
+
9
+ ## Fixed
10
+
11
+ - **`RELIEFWEB_APP_NAME`** — changed `z.string()` to `z.string().min(1)` in `server-config.ts`; empty string now fails validation at startup rather than silently passing.
12
+ - **`reliefweb_crisis_briefing` prompt** — added disambiguation logic for the jobs and training sections: when `target` is a disaster name or GLIDE number, `reliefweb_search_jobs` and `reliefweb_search_training` are called with `text=` instead of `country=` (the `country=` filter expects an ISO3 code; passing a disaster name returns no results).
@@ -7,7 +7,7 @@
7
7
  import { z } from '@cyanheads/mcp-ts-core';
8
8
  import { parseEnvConfig } from '@cyanheads/mcp-ts-core/config';
9
9
  const ServerConfigSchema = z.object({
10
- appName: z.string().describe('Pre-approved appname for the ReliefWeb API v2.'),
10
+ appName: z.string().min(1).describe('Pre-approved appname for the ReliefWeb API v2.'),
11
11
  });
12
12
  let _config;
13
13
  export function getServerConfig() {
@@ -1 +1 @@
1
- {"version":3,"file":"server-config.js","sourceRoot":"","sources":["../../src/config/server-config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gDAAgD,CAAC;CAC/E,CAAC,CAAC;AAIH,IAAI,OAAiC,CAAC;AAEtC,MAAM,UAAU,eAAe;IAC7B,OAAO,KAAK,cAAc,CAAC,kBAAkB,EAAE;QAC7C,OAAO,EAAE,oBAAoB;KAC9B,CAAC,CAAC;IACH,OAAO,OAAO,CAAC;AACjB,CAAC"}
1
+ {"version":3,"file":"server-config.js","sourceRoot":"","sources":["../../src/config/server-config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,gDAAgD,CAAC;CACtF,CAAC,CAAC;AAIH,IAAI,OAAiC,CAAC;AAEtC,MAAM,UAAU,eAAe;IAC7B,OAAO,KAAK,cAAc,CAAC,kBAAkB,EAAE;QAC7C,OAAO,EAAE,oBAAoB;KAC9B,CAAC,CAAC;IACH,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"crisis-briefing.prompt.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/prompts/definitions/crisis-briefing.prompt.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAU,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEnD,eAAO,MAAM,uBAAuB;;;;;;;kBAgElC,CAAC"}
1
+ {"version":3,"file":"crisis-briefing.prompt.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/prompts/definitions/crisis-briefing.prompt.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAU,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEnD,eAAO,MAAM,uBAAuB;;;;;;;kBAoElC,CAAC"}
@@ -28,12 +28,16 @@ export const reliefwebCrisisBriefing = prompt('reliefweb_crisis_briefing', {
28
28
  - List active disasters with status, GLIDE number, and primary type.
29
29
  - List key appeals and response plans from the country/disaster profile.`;
30
30
  const jobsSection = `## Open Positions
31
- - Search for open humanitarian jobs with reliefweb_search_jobs filtered by country="${target}".
31
+ - Determine whether "${target}" is a country/ISO3 code or a disaster name/GLIDE number.
32
+ - If it is a country or ISO3 code: call reliefweb_search_jobs with country="${target}".
33
+ - If it is a disaster name or GLIDE number: call reliefweb_search_jobs with text="${target}" (the country= filter expects an ISO3 code; passing a disaster name returns no results).
32
34
  - Group by organization and career category.
33
35
  - List title, organization, closing date, and URL for each position.
34
36
  - Note total count and any recurring roles (e.g., multiple UNHCR positions).`;
35
37
  const trainingSection = `## Training Opportunities
36
- - Search for upcoming training with reliefweb_search_training filtered by country or text.
38
+ - Determine whether "${target}" is a country/ISO3 code or a disaster name/GLIDE number.
39
+ - If it is a country or ISO3 code: call reliefweb_search_training with country="${target}".
40
+ - If it is a disaster name or GLIDE number: call reliefweb_search_training with text="${target}".
37
41
  - List title, organizer, start date, format, and URL for each opportunity.`;
38
42
  let sections;
39
43
  if (focus === 'situation') {
@@ -1 +1 @@
1
- {"version":3,"file":"crisis-briefing.prompt.js","sourceRoot":"","sources":["../../../../src/mcp-server/prompts/definitions/crisis-briefing.prompt.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,2BAA2B,EAAE;IACzE,WAAW,EACT,yEAAyE;QACzE,+IAA+I;QAC/I,gDAAgD;QAChD,6HAA6H;IAC/H,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;QACb,mBAAmB,EAAE,CAAC;aACnB,MAAM,EAAE;aACR,QAAQ,CACP,+IAA+I,CAChJ;QACH,KAAK,EAAE,CAAC;aACL,IAAI,CAAC,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;aACnC,QAAQ,EAAE;aACV,QAAQ,CACP,kNAAkN,CACnN;KACJ,CAAC;IACF,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE;QACjB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,MAAM,CAAC;QACnC,MAAM,MAAM,GAAG,IAAI,CAAC,mBAAmB,CAAC;QAExC,MAAM,gBAAgB,GAAG;;6FAEgE,MAAM;;;;yEAI1B,CAAC;QAEtE,MAAM,WAAW,GAAG;sFAC8D,MAAM;;;6EAGf,CAAC;QAE1E,MAAM,eAAe,GAAG;;2EAE+C,CAAC;QAExE,IAAI,QAAgB,CAAC;QACrB,IAAI,KAAK,KAAK,WAAW,EAAE,CAAC;YAC1B,QAAQ,GAAG,gBAAgB,CAAC;QAC9B,CAAC;aAAM,IAAI,KAAK,KAAK,MAAM,EAAE,CAAC;YAC5B,QAAQ,GAAG,GAAG,WAAW,OAAO,eAAe,EAAE,CAAC;QACpD,CAAC;aAAM,CAAC;YACN,QAAQ,GAAG,GAAG,gBAAgB,OAAO,WAAW,OAAO,eAAe,EAAE,CAAC;QAC3E,CAAC;QAED,MAAM,OAAO,GAAG,oDAAoD,MAAM;;;;EAI5E,QAAQ;;;;;;gCAMsB,CAAC;QAE7B,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;IACtE,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"crisis-briefing.prompt.js","sourceRoot":"","sources":["../../../../src/mcp-server/prompts/definitions/crisis-briefing.prompt.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,2BAA2B,EAAE;IACzE,WAAW,EACT,yEAAyE;QACzE,+IAA+I;QAC/I,gDAAgD;QAChD,6HAA6H;IAC/H,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;QACb,mBAAmB,EAAE,CAAC;aACnB,MAAM,EAAE;aACR,QAAQ,CACP,+IAA+I,CAChJ;QACH,KAAK,EAAE,CAAC;aACL,IAAI,CAAC,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;aACnC,QAAQ,EAAE;aACV,QAAQ,CACP,kNAAkN,CACnN;KACJ,CAAC;IACF,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE;QACjB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,MAAM,CAAC;QACnC,MAAM,MAAM,GAAG,IAAI,CAAC,mBAAmB,CAAC;QAExC,MAAM,gBAAgB,GAAG;;6FAEgE,MAAM;;;;yEAI1B,CAAC;QAEtE,MAAM,WAAW,GAAG;uBACD,MAAM;gFACmD,MAAM;sFACA,MAAM;;;6EAGf,CAAC;QAE1E,MAAM,eAAe,GAAG;uBACL,MAAM;oFACuD,MAAM;0FACA,MAAM;2EACrB,CAAC;QAExE,IAAI,QAAgB,CAAC;QACrB,IAAI,KAAK,KAAK,WAAW,EAAE,CAAC;YAC1B,QAAQ,GAAG,gBAAgB,CAAC;QAC9B,CAAC;aAAM,IAAI,KAAK,KAAK,MAAM,EAAE,CAAC;YAC5B,QAAQ,GAAG,GAAG,WAAW,OAAO,eAAe,EAAE,CAAC;QACpD,CAAC;aAAM,CAAC;YACN,QAAQ,GAAG,GAAG,gBAAgB,OAAO,WAAW,OAAO,eAAe,EAAE,CAAC;QAC3E,CAAC;QAED,MAAM,OAAO,GAAG,oDAAoD,MAAM;;;;EAI5E,QAAQ;;;;;;gCAMsB,CAAC;QAE7B,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;IACtE,CAAC;CACF,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@cyanheads/reliefweb-mcp-server",
3
- "version": "0.1.1",
4
- "description": "MCP server for the ReliefWeb humanitarian data API — search reports, disasters, jobs, training, and country profiles.",
3
+ "version": "0.1.3",
4
+ "mcpName": "io.github.cyanheads/reliefweb-mcp-server",
5
+ "description": "Search ReliefWeb humanitarian reports, disasters, jobs, training, and country profiles via MCP. STDIO or Streamable HTTP.",
5
6
  "type": "module",
6
7
  "main": "dist/index.js",
7
8
  "types": "dist/index.d.ts",
@@ -19,23 +20,23 @@
19
20
  "server.json"
20
21
  ],
21
22
  "scripts": {
22
- "build": "tsx scripts/build.ts",
23
- "rebuild": "tsx scripts/clean.ts && tsx scripts/build.ts",
24
- "clean": "tsx scripts/clean.ts",
25
- "devcheck": "tsx scripts/devcheck.ts",
23
+ "build": "bun run scripts/build.ts",
24
+ "rebuild": "bun run scripts/clean.ts && bun run scripts/build.ts",
25
+ "clean": "bun run scripts/clean.ts",
26
+ "devcheck": "bun run scripts/devcheck.ts",
26
27
  "audit:refresh": "rm -f bun.lock && bun install && bun audit",
27
- "tree": "tsx scripts/tree.ts",
28
- "list-skills": "tsx scripts/list-skills.ts",
28
+ "tree": "bun run scripts/tree.ts",
29
+ "list-skills": "bun run scripts/list-skills.ts",
29
30
  "format": "biome check --write --unsafe .",
30
- "lint:mcp": "tsx scripts/lint-mcp.ts",
31
- "lint:packaging": "tsx scripts/lint-packaging.ts",
32
- "bundle": "npm run build && npx -y @anthropic-ai/mcpb pack . dist/reliefweb-mcp-server.mcpb",
33
- "changelog:build": "tsx scripts/build-changelog.ts",
34
- "changelog:check": "tsx scripts/build-changelog.ts --check",
35
- "test": "vitest run",
36
- "start": "node dist/index.js",
37
- "start:stdio": "MCP_TRANSPORT_TYPE=stdio node dist/index.js",
38
- "start:http": "MCP_TRANSPORT_TYPE=http node dist/index.js"
31
+ "lint:mcp": "bun run scripts/lint-mcp.ts",
32
+ "lint:packaging": "bun run scripts/lint-packaging.ts",
33
+ "bundle": "bun run build && npx -y @anthropic-ai/mcpb pack . dist/reliefweb-mcp-server.mcpb",
34
+ "changelog:build": "bun run scripts/build-changelog.ts",
35
+ "changelog:check": "bun run scripts/build-changelog.ts --check",
36
+ "publish-mcp": "mcp-publisher login github -token \"$(security find-generic-password -a \"$USER\" -s mcp-publisher-github-pat -w)\" && mcp-publisher publish",
37
+ "test": "bunx vitest run",
38
+ "start:stdio": "MCP_TRANSPORT_TYPE=stdio bun ./dist/index.js",
39
+ "start:http": "MCP_TRANSPORT_TYPE=http bun ./dist/index.js"
39
40
  },
40
41
  "keywords": [
41
42
  "mcp",
@@ -46,15 +47,34 @@
46
47
  "disasters",
47
48
  "humanitarian-aid",
48
49
  "ocha",
49
- "crisis-data"
50
+ "crisis-data",
51
+ "typescript",
52
+ "bun",
53
+ "ai-agent"
50
54
  ],
51
55
  "repository": {
52
56
  "type": "git",
53
- "url": "https://github.com/cyanheads/reliefweb-mcp-server"
57
+ "url": "git+https://github.com/cyanheads/reliefweb-mcp-server.git"
54
58
  },
59
+ "bugs": {
60
+ "url": "https://github.com/cyanheads/reliefweb-mcp-server/issues"
61
+ },
62
+ "homepage": "https://github.com/cyanheads/reliefweb-mcp-server#readme",
63
+ "author": "cyanheads <casey@caseyjhand.com> (https://github.com/cyanheads/reliefweb-mcp-server#readme)",
64
+ "funding": [
65
+ {
66
+ "type": "github",
67
+ "url": "https://github.com/sponsors/cyanheads"
68
+ },
69
+ {
70
+ "type": "buy_me_a_coffee",
71
+ "url": "https://www.buymeacoffee.com/cyanheads"
72
+ }
73
+ ],
55
74
  "license": "Apache-2.0",
75
+ "packageManager": "bun@1.3.2",
56
76
  "engines": {
57
- "bun": ">=1.3.0",
77
+ "bun": ">=1.3.2",
58
78
  "node": ">=24.0.0"
59
79
  },
60
80
  "publishConfig": {
package/server.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
- "name": "cyanheads/reliefweb-mcp-server",
4
- "description": "ReliefWeb humanitarian data API — search reports, disasters, jobs, training, and country profiles.",
3
+ "name": "io.github.cyanheads/reliefweb-mcp-server",
4
+ "description": "Search ReliefWeb humanitarian reports, disasters, jobs, and training from OCHA.",
5
5
  "repository": {
6
6
  "url": "https://github.com/cyanheads/reliefweb-mcp-server",
7
7
  "source": "github"
8
8
  },
9
- "version": "0.1.1",
9
+ "version": "0.1.3",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "registryBaseUrl": "https://registry.npmjs.org",
14
14
  "identifier": "@cyanheads/reliefweb-mcp-server",
15
- "runtimeHint": "node",
16
- "version": "0.1.1",
15
+ "runtimeHint": "bun",
16
+ "version": "0.1.3",
17
17
  "packageArguments": [
18
18
  {
19
19
  "type": "positional",
@@ -47,8 +47,8 @@
47
47
  "registryType": "npm",
48
48
  "registryBaseUrl": "https://registry.npmjs.org",
49
49
  "identifier": "@cyanheads/reliefweb-mcp-server",
50
- "runtimeHint": "node",
51
- "version": "0.1.1",
50
+ "runtimeHint": "bun",
51
+ "version": "0.1.3",
52
52
  "packageArguments": [
53
53
  {
54
54
  "type": "positional",
@@ -87,6 +87,12 @@
87
87
  "isRequired": false,
88
88
  "default": "/mcp"
89
89
  },
90
+ {
91
+ "name": "MCP_PUBLIC_URL",
92
+ "description": "Public origin override for deployments behind a TLS-terminating reverse proxy (e.g. https://mcp.example.com).",
93
+ "format": "string",
94
+ "isRequired": false
95
+ },
90
96
  {
91
97
  "name": "MCP_AUTH_MODE",
92
98
  "description": "Authentication mode to use: 'none', 'jwt', or 'oauth'.",