@cyanheads/openfoodfacts-mcp-server 0.1.0

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.
Files changed (49) hide show
  1. package/AGENTS.md +335 -0
  2. package/CLAUDE.md +335 -0
  3. package/Dockerfile +99 -0
  4. package/LICENSE +201 -0
  5. package/README.md +290 -0
  6. package/changelog/0.1.x/0.1.0.md +15 -0
  7. package/changelog/template.md +127 -0
  8. package/dist/config/server-config.d.ts +15 -0
  9. package/dist/config/server-config.d.ts.map +1 -0
  10. package/dist/config/server-config.js +35 -0
  11. package/dist/config/server-config.js.map +1 -0
  12. package/dist/index.d.ts +7 -0
  13. package/dist/index.d.ts.map +1 -0
  14. package/dist/index.js +23 -0
  15. package/dist/index.js.map +1 -0
  16. package/dist/mcp-server/tools/definitions/browse-taxonomy.tool.d.ts +27 -0
  17. package/dist/mcp-server/tools/definitions/browse-taxonomy.tool.d.ts.map +1 -0
  18. package/dist/mcp-server/tools/definitions/browse-taxonomy.tool.js +91 -0
  19. package/dist/mcp-server/tools/definitions/browse-taxonomy.tool.js.map +1 -0
  20. package/dist/mcp-server/tools/definitions/compare-products.tool.d.ts +36 -0
  21. package/dist/mcp-server/tools/definitions/compare-products.tool.d.ts.map +1 -0
  22. package/dist/mcp-server/tools/definitions/compare-products.tool.js +228 -0
  23. package/dist/mcp-server/tools/definitions/compare-products.tool.js.map +1 -0
  24. package/dist/mcp-server/tools/definitions/get-product.tool.d.ts +83 -0
  25. package/dist/mcp-server/tools/definitions/get-product.tool.d.ts.map +1 -0
  26. package/dist/mcp-server/tools/definitions/get-product.tool.js +420 -0
  27. package/dist/mcp-server/tools/definitions/get-product.tool.js.map +1 -0
  28. package/dist/mcp-server/tools/definitions/index.d.ts +175 -0
  29. package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -0
  30. package/dist/mcp-server/tools/definitions/index.js +15 -0
  31. package/dist/mcp-server/tools/definitions/index.js.map +1 -0
  32. package/dist/mcp-server/tools/definitions/search-products.tool.d.ts +54 -0
  33. package/dist/mcp-server/tools/definitions/search-products.tool.d.ts.map +1 -0
  34. package/dist/mcp-server/tools/definitions/search-products.tool.js +219 -0
  35. package/dist/mcp-server/tools/definitions/search-products.tool.js.map +1 -0
  36. package/dist/services/openfoodfacts/openfoodfacts-service.d.ts +54 -0
  37. package/dist/services/openfoodfacts/openfoodfacts-service.d.ts.map +1 -0
  38. package/dist/services/openfoodfacts/openfoodfacts-service.js +308 -0
  39. package/dist/services/openfoodfacts/openfoodfacts-service.js.map +1 -0
  40. package/dist/services/openfoodfacts/types.d.ts +89 -0
  41. package/dist/services/openfoodfacts/types.d.ts.map +1 -0
  42. package/dist/services/openfoodfacts/types.js +7 -0
  43. package/dist/services/openfoodfacts/types.js.map +1 -0
  44. package/dist/services/taxonomy/taxonomy-service.d.ts +24 -0
  45. package/dist/services/taxonomy/taxonomy-service.d.ts.map +1 -0
  46. package/dist/services/taxonomy/taxonomy-service.js +271 -0
  47. package/dist/services/taxonomy/taxonomy-service.js.map +1 -0
  48. package/package.json +102 -0
  49. package/server.json +141 -0
package/AGENTS.md ADDED
@@ -0,0 +1,335 @@
1
+ # Developer Protocol
2
+
3
+ **Server:** openfoodfacts-mcp-server
4
+ **Version:** 0.1.0
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.9.16`
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
+
15
+ ## Core Rules
16
+
17
+ - **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.
18
+ - **Use `ctx.log`** for request-scoped logging. No `console` calls.
19
+ - **Use `ctx.state`** for tenant-scoped storage. Never access persistence directly.
20
+ - **Check `ctx.elicit` / `ctx.sample`** for presence before calling.
21
+ - **Secrets in env vars only** — never hardcoded.
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.
23
+
24
+ ---
25
+
26
+ ## Patterns
27
+
28
+ ### Tool
29
+
30
+ ```ts
31
+ import { tool, z } from '@cyanheads/mcp-ts-core';
32
+ import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
33
+ import { getOpenFoodFactsService } from '@/services/openfoodfacts/openfoodfacts-service.js';
34
+
35
+ export const offGetProduct = tool('off_get_product', {
36
+ description: 'Fetch a packaged food product by barcode (EAN-13 or UPC).',
37
+ annotations: { readOnlyHint: true },
38
+ input: z.object({
39
+ barcode: z.string().regex(/^\d{8,14}$/).describe('EAN-13 or UPC barcode (8–14 digits).'),
40
+ fields: z.array(z.enum(['product_name', 'brands', 'nutriscore_grade', 'nutriments'])).optional()
41
+ .describe('Subset of fields to return. Omitting returns all standard fields.'),
42
+ }),
43
+ output: z.object({
44
+ barcode: z.string().describe('Barcode as returned by the API.'),
45
+ found: z.boolean().describe('False when the barcode has no contributor record.'),
46
+ product: z.object({ /* ... */ }).optional().describe('Product data. Absent when found is false.'),
47
+ }),
48
+ errors: [
49
+ {
50
+ reason: 'not_found',
51
+ code: JsonRpcErrorCode.NotFound,
52
+ when: 'Barcode status:0 — not present in any contributor record',
53
+ recovery: 'Try off_search_products with the product name or brand to find the correct barcode.',
54
+ },
55
+ ],
56
+
57
+ async handler(input, ctx) {
58
+ const svc = getOpenFoodFactsService();
59
+ const result = await svc.getProduct(input.barcode, input.fields);
60
+ if (!result.found) throw ctx.fail('not_found', `Barcode ${input.barcode} not found`);
61
+ return result;
62
+ },
63
+
64
+ format: (result) => [{
65
+ type: 'text',
66
+ text: result.found
67
+ ? `**${result.product?.product_name ?? 'Unknown'}** (${result.barcode})`
68
+ : `Not found: ${result.barcode}`,
69
+ }],
70
+ });
71
+ ```
72
+
73
+ ### Server config
74
+
75
+ ```ts
76
+ // src/config/server-config.ts — lazy-parsed, separate from framework config
77
+ import { z } from '@cyanheads/mcp-ts-core';
78
+ import { parseEnvConfig } from '@cyanheads/mcp-ts-core/config';
79
+
80
+ const ServerConfigSchema = z.object({
81
+ baseUrl: z.string().default('https://world.openfoodfacts.org').describe('Open Food Facts API base URL'),
82
+ rateLimitProduct: z.coerce.number().int().min(1).default(100).describe('Product read rate limit (requests/min)'),
83
+ rateLimitSearch: z.coerce.number().int().min(1).default(10).describe('Search rate limit (requests/min)'),
84
+ });
85
+
86
+ let _config: z.infer<typeof ServerConfigSchema> | undefined;
87
+ export function getServerConfig() {
88
+ _config ??= parseEnvConfig(ServerConfigSchema, {
89
+ baseUrl: 'OFF_BASE_URL',
90
+ rateLimitProduct: 'OFF_RATE_LIMIT_PRODUCT',
91
+ rateLimitSearch: 'OFF_RATE_LIMIT_SEARCH',
92
+ });
93
+ return _config;
94
+ }
95
+ ```
96
+
97
+ `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.
98
+
99
+ ### Server instructions
100
+
101
+ `createApp({ instructions })` — optional server-level orientation, sent to clients on every `initialize` as session-level context. Use it for deployment guidance (connection aliases, regional notes, scope hints) instead of repeating the same context across tool descriptions. Client adoption is uneven, but there's no downside when set.
102
+
103
+ ---
104
+
105
+ ## Context
106
+
107
+ Handlers receive a unified `ctx` object. Key properties:
108
+
109
+ | Property | Description |
110
+ |:---------|:------------|
111
+ | `ctx.log` | Request-scoped logger — `.debug()`, `.info()`, `.notice()`, `.warning()`, `.error()`. Auto-correlates requestId, traceId, tenantId. |
112
+ | `ctx.state` | Tenant-scoped KV — `.get(key)`, `.set(key, value, { ttl? })`, `.delete(key)`, `.list(prefix, { cursor, limit })`. Accepts any serializable value. |
113
+ | `ctx.elicit` | Ask user for structured input. **Check for presence first:** `if (ctx.elicit) { ... }` |
114
+ | `ctx.sample` | Request LLM completion from the client. **Check for presence first:** `if (ctx.sample) { ... }` |
115
+ | `ctx.signal` | `AbortSignal` for cancellation. |
116
+ | `ctx.progress` | Task progress (present when `task: true`) — `.setTotal(n)`, `.increment()`, `.update(message)`. |
117
+ | `ctx.requestId` | Unique request ID. |
118
+ | `ctx.tenantId` | Tenant ID from JWT or `'default'` for stdio. |
119
+
120
+ ---
121
+
122
+ ## Errors
123
+
124
+ Handlers throw — the framework catches, classifies, and formats.
125
+
126
+ **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.
127
+
128
+ ```ts
129
+ import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
130
+
131
+ errors: [
132
+ { reason: 'no_match', code: JsonRpcErrorCode.NotFound,
133
+ when: 'No item matched the query',
134
+ recovery: 'Broaden the query or check the spelling and try again.' },
135
+ ],
136
+ async handler(input, ctx) {
137
+ const item = await db.find(input.id);
138
+ if (!item) throw ctx.fail('no_match', `No item ${input.id}`);
139
+ return item;
140
+ }
141
+ ```
142
+
143
+ **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.
144
+
145
+ **Fallback (no contract entry fits):** throw via factories or plain `Error`.
146
+
147
+ ```ts
148
+ // Error factories — explicit code
149
+ import { notFound, serviceUnavailable } from '@cyanheads/mcp-ts-core/errors';
150
+ throw notFound('Item not found', { itemId });
151
+ throw serviceUnavailable('API unavailable', { url }, { cause: err });
152
+
153
+ // Plain Error — framework auto-classifies from message patterns
154
+ throw new Error('Item not found'); // → NotFound
155
+ throw new Error('Invalid query format'); // → ValidationError
156
+
157
+ // McpError — when no factory exists for the code
158
+ import { McpError, JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
159
+ throw new McpError(JsonRpcErrorCode.DatabaseError, 'Connection failed', { pool: 'primary' });
160
+ ```
161
+
162
+ See framework CLAUDE.md and the `api-errors` skill for the full auto-classification table, all available factories, and the contract reference.
163
+
164
+ ---
165
+
166
+ ## Structure
167
+
168
+ ```text
169
+ src/
170
+ index.ts # createApp() entry point
171
+ config/
172
+ server-config.ts # Server-specific env vars (OFF_BASE_URL, rate limits)
173
+ services/
174
+ openfoodfacts/
175
+ openfoodfacts-service.ts # Open Food Facts API client (HTTP, rate limiting, retry)
176
+ types.ts # Domain types
177
+ taxonomy/
178
+ taxonomy-service.ts # Embedded tag vocabulary (categories, labels, allergens, etc.)
179
+ mcp-server/
180
+ tools/definitions/
181
+ get-product.tool.ts # off_get_product
182
+ search-products.tool.ts # off_search_products
183
+ compare-products.tool.ts # off_compare_products
184
+ browse-taxonomy.tool.ts # off_browse_taxonomy
185
+ index.ts # Barrel export
186
+ ```
187
+
188
+ ---
189
+
190
+ ## Naming
191
+
192
+ | What | Convention | Example |
193
+ |:-----|:-----------|:--------|
194
+ | Files | kebab-case with suffix | `search-docs.tool.ts` |
195
+ | Tool/resource/prompt names | snake_case | `search_docs` |
196
+ | Directories | kebab-case | `src/services/doc-search/` |
197
+ | Descriptions | Single string or template literal, no `+` concatenation | `'Search items by query and filter.'` |
198
+
199
+ ---
200
+
201
+ ## Skills
202
+
203
+ 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.
204
+
205
+ **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.
206
+
207
+ Available skills:
208
+
209
+ | Skill | Purpose |
210
+ |:------|:--------|
211
+ | `setup` | Post-init project orientation |
212
+ | `design-mcp-server` | Design tool surface, resources, and services for a new server |
213
+ | `add-tool` | Scaffold a new tool definition |
214
+ | `add-app-tool` | Scaffold an MCP App tool + paired UI resource |
215
+ | `add-resource` | Scaffold a new resource definition |
216
+ | `add-prompt` | Scaffold a new prompt definition |
217
+ | `add-service` | Scaffold a new service integration |
218
+ | `add-test` | Scaffold test file for a tool, resource, or service |
219
+ | `field-test` | Exercise tools/resources/prompts with real inputs, verify behavior, report issues |
220
+ | `tool-defs-analysis` | Read-only audit of MCP definition language across the surface — voice, leaks, defaults, recovery hints, output descriptions |
221
+ | `security-pass` | Audit server for MCP-flavored security gaps: output injection, scope blast radius, input sinks, tenant isolation |
222
+ | `code-simplifier` | Post-session cleanup against `git diff` — modernize syntax, consolidate duplication, align with the codebase |
223
+ | `devcheck` | Lint, format, typecheck, audit |
224
+ | `polish-docs-meta` | Finalize docs, README, metadata, and agent protocol for shipping |
225
+ | `git-wrapup` | Land working-tree changes as a versioned commit + annotated tag — version bump, changelog, verify, tag. Local only. |
226
+ | `release-and-publish` | Push + npm + MCP Registry + GH Release + Docker. Picks up from `git-wrapup` |
227
+ | `maintenance` | Investigate changelogs, adopt upstream changes, sync skills to agent dirs |
228
+ | `report-issue-framework` | File a bug or feature request against `@cyanheads/mcp-ts-core` via `gh` CLI |
229
+ | `report-issue-local` | File a bug or feature request against this server's own repo via `gh` CLI |
230
+ | `api-auth` | Auth modes, scopes, JWT/OAuth |
231
+ | `api-canvas` | DataCanvas: register tabular data, run SQL, export, plus the `spillover()` helper for big result sets — Tier 3 opt-in |
232
+ | `api-config` | AppConfig, parseConfig, env vars |
233
+ | `api-context` | Context interface, logger, state, progress |
234
+ | `api-errors` | McpError, JsonRpcErrorCode, error patterns |
235
+ | `api-linter` | Definition linter rule catalog — invoked by `bun run lint:mcp` and `devcheck` |
236
+ | `api-services` | LLM, Speech, Graph services |
237
+ | `api-testing` | createMockContext, test patterns |
238
+ | `api-utils` | Formatting, parsing, security, pagination, scheduling, telemetry helpers |
239
+ | `api-telemetry` | OTel catalog: spans, metrics, completion logs, env config, cardinality rules |
240
+ | `api-workers` | Cloudflare Workers runtime |
241
+
242
+ When you complete a skill's checklist, check the boxes and add a completion timestamp at the end (e.g., `Completed: 2026-03-11`).
243
+
244
+ ---
245
+
246
+ ## Commands
247
+
248
+ **Runtime:** Scripts use `tsx` — both `npm run <cmd>` and `bun run <cmd>` work. `bun` is slightly faster for script invocation but not required.
249
+
250
+ | Command | Purpose |
251
+ |:--------|:--------|
252
+ | `npm run build` | Compile TypeScript |
253
+ | `npm run rebuild` | Clean + build |
254
+ | `npm run clean` | Remove build artifacts |
255
+ | `npm run devcheck` | Lint + format + typecheck + security + changelog sync |
256
+ | `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. |
257
+ | `npm run tree` | Generate directory structure doc |
258
+ | `npm run format` | Auto-fix formatting (safe fixes only) |
259
+ | `npm run format:unsafe` | Also apply Biome's unsafe autofixes — review the diff; they can change behavior |
260
+ | `npm test` | Run tests |
261
+ | `npm run start:stdio` | Production mode (stdio) |
262
+ | `npm run start:http` | Production mode (HTTP) |
263
+ | `npm run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |
264
+ | `npm run changelog:check` | Verify `CHANGELOG.md` is in sync (used by devcheck) |
265
+ | `npm run bundle` | Build and pack as `.mcpb` for one-click Claude Desktop install |
266
+
267
+ ---
268
+
269
+ ## Bundling
270
+
271
+ `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.
272
+
273
+ **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.
274
+
275
+ **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 `skills/polish-docs-meta/references/readme.md`.
276
+
277
+ ---
278
+
279
+ ## Changelog
280
+
281
+ 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.
282
+
283
+ Each per-version file opens with YAML frontmatter:
284
+
285
+ ```markdown
286
+ ---
287
+ summary: "One-line headline, ≤350 chars" # required — powers the rollup index
288
+ breaking: false # optional — true flags breaking changes
289
+ security: false # optional — true flags security fixes
290
+ ---
291
+
292
+ # 0.1.0 — YYYY-MM-DD
293
+ ...
294
+ ```
295
+
296
+ `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`.
297
+
298
+ `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.
299
+
300
+ **Section order** (Keep a Changelog): Added, Changed, Deprecated, Removed, Fixed, Security. Include only sections with entries — don't ship empty headers.
301
+
302
+ **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.
303
+
304
+ ---
305
+
306
+ ## Imports
307
+
308
+ ```ts
309
+ // Framework — z is re-exported, no separate zod import needed
310
+ import { tool, z } from '@cyanheads/mcp-ts-core';
311
+ import { McpError, JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
312
+
313
+ // Server's own code — via path alias
314
+ import { getMyService } from '@/services/my-domain/my-service.js';
315
+ ```
316
+
317
+ ---
318
+
319
+ ## Checklist
320
+
321
+ - [ ] 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()`)
322
+ - [ ] 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`.
323
+ - [ ] JSDoc `@fileoverview` + `@module` on every file
324
+ - [ ] `ctx.log` for logging, `ctx.state` for storage
325
+ - [ ] Handlers throw on failure — error factories or plain `Error`, no try/catch
326
+ - [ ] `format()` renders all data the LLM needs — different clients forward different surfaces (Claude Code → `structuredContent`, Claude Desktop → `content[]`); both must carry the same data
327
+ - [ ] If wrapping external API: raw/domain/output schemas reviewed against real upstream sparsity/nullability before finalizing required vs optional fields
328
+ - [ ] If wrapping external API: normalization and `format()` preserve uncertainty; do not fabricate facts from missing upstream data
329
+ - [ ] If wrapping external API: tests include at least one sparse payload case with omitted upstream fields
330
+ - [ ] Registered in `createApp()` arrays (directly or via barrel exports)
331
+ - [ ] Tests use `createMockContext()` from `@cyanheads/mcp-ts-core/testing`
332
+ - [ ] `.codex-plugin/plugin.json` populated — `name`, `version`, `description`, `repository`, `license` from `package.json`; `interface.displayName` = package name; `interface.shortDescription` from `package.json` description
333
+ - [ ] `.codex-plugin/mcp.json` updated — server name key matches `package.json` name; env vars added for any required API keys
334
+ - [ ] `.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
335
+ - [ ] `npm run devcheck` passes