@cyanheads/ensembl-mcp-server 0.4.1 → 0.4.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.
Files changed (47) hide show
  1. package/AGENTS.md +43 -35
  2. package/CLAUDE.md +43 -35
  3. package/Dockerfile +6 -5
  4. package/README.md +4 -3
  5. package/changelog/0.4.x/0.4.2.md +19 -0
  6. package/changelog/0.4.x/0.4.3.md +29 -0
  7. package/changelog/template.md +55 -16
  8. package/dist/config/server-config.d.ts.map +1 -1
  9. package/dist/config/server-config.js +1 -2
  10. package/dist/config/server-config.js.map +1 -1
  11. package/dist/index.js +8 -0
  12. package/dist/index.js.map +1 -1
  13. package/dist/mcp-server/resources/definitions/gene.resource.d.ts.map +1 -1
  14. package/dist/mcp-server/resources/definitions/gene.resource.js +3 -1
  15. package/dist/mcp-server/resources/definitions/gene.resource.js.map +1 -1
  16. package/dist/mcp-server/resources/definitions/species.resource.d.ts +2 -2
  17. package/dist/mcp-server/resources/definitions/transcript.resource.d.ts.map +1 -1
  18. package/dist/mcp-server/resources/definitions/transcript.resource.js +3 -1
  19. package/dist/mcp-server/resources/definitions/transcript.resource.js.map +1 -1
  20. package/dist/mcp-server/tools/definitions/get-homology.tool.d.ts +5 -1
  21. package/dist/mcp-server/tools/definitions/get-homology.tool.d.ts.map +1 -1
  22. package/dist/mcp-server/tools/definitions/get-homology.tool.js +52 -12
  23. package/dist/mcp-server/tools/definitions/get-homology.tool.js.map +1 -1
  24. package/dist/mcp-server/tools/definitions/get-sequence.tool.d.ts +1 -1
  25. package/dist/mcp-server/tools/definitions/get-sequence.tool.d.ts.map +1 -1
  26. package/dist/mcp-server/tools/definitions/get-sequence.tool.js +8 -4
  27. package/dist/mcp-server/tools/definitions/get-sequence.tool.js.map +1 -1
  28. package/dist/mcp-server/tools/definitions/get-xrefs.tool.d.ts.map +1 -1
  29. package/dist/mcp-server/tools/definitions/get-xrefs.tool.js +3 -1
  30. package/dist/mcp-server/tools/definitions/get-xrefs.tool.js.map +1 -1
  31. package/dist/mcp-server/tools/definitions/list-species.tool.d.ts +2 -2
  32. package/dist/mcp-server/tools/definitions/lookup-gene.tool.d.ts.map +1 -1
  33. package/dist/mcp-server/tools/definitions/lookup-gene.tool.js +13 -5
  34. package/dist/mcp-server/tools/definitions/lookup-gene.tool.js.map +1 -1
  35. package/dist/mcp-server/tools/definitions/predict-variant.tool.d.ts +8 -0
  36. package/dist/mcp-server/tools/definitions/predict-variant.tool.d.ts.map +1 -1
  37. package/dist/mcp-server/tools/definitions/predict-variant.tool.js +138 -16
  38. package/dist/mcp-server/tools/definitions/predict-variant.tool.js.map +1 -1
  39. package/dist/mcp-server/tools/definitions/query-region.tool.d.ts +1 -1
  40. package/dist/mcp-server/tools/definitions/query-region.tool.d.ts.map +1 -1
  41. package/dist/mcp-server/tools/definitions/query-region.tool.js +6 -2
  42. package/dist/mcp-server/tools/definitions/query-region.tool.js.map +1 -1
  43. package/dist/services/ensembl/ensembl-service.d.ts.map +1 -1
  44. package/dist/services/ensembl/ensembl-service.js +1 -1
  45. package/dist/services/ensembl/ensembl-service.js.map +1 -1
  46. package/package.json +10 -10
  47. package/server.json +4 -4
package/AGENTS.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # Developer Protocol
2
2
 
3
3
  **Server:** ensembl-mcp-server
4
- **Version:** 0.4.1
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.10.14`
4
+ **Version:** 0.4.3
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.12.3`
6
6
  **Engines:** Bun ≥1.3.0, Node ≥24.0.0
7
- **MCP SDK:** `@modelcontextprotocol/sdk` ^1.29.0
7
+ **MCP SDK:** `@modelcontextprotocol/server` ^2.0.0
8
8
  **Zod:** ^4.4.3
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.
@@ -36,7 +36,7 @@ Tailor suggestions to what's actually missing or stale — don't recite the full
36
36
  - **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.
37
37
  - **Use `ctx.log`** for request-scoped logging. No `console` calls.
38
38
  - **Use `ctx.state`** for tenant-scoped storage. Never access persistence directly.
39
- - **Check `ctx.elicit` / `ctx.sample`** for presence before calling.
39
+ - **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.
40
40
  - **Secrets in env vars only** — never hardcoded.
41
41
  - **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.
42
42
 
@@ -135,9 +135,11 @@ export function getServerConfig() {
135
135
 
136
136
  `parseEnvConfig` maps Zod schema paths → env var names so errors name the variable (`ENSEMBL_BASE_URL`) not the path (`baseUrl`). Throws `ConfigurationError`, which the framework prints as a clean startup banner.
137
137
 
138
- ### Server instructions
138
+ ### Server identity and instructions
139
139
 
140
- `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.
140
+ The canonical `createApp()` identity for this project is `name: 'ensembl-mcp-server'` plus `title: 'ensembl-mcp-server'`. Keep both bare and hyphenated; npm and install surfaces retain the published `@cyanheads/ensembl-mcp-server` identity. Package metadata supplies the description and website, so don't duplicate those fields in `createApp()`.
141
+
142
+ `instructions` is optional server-level orientation, sent 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.
141
143
 
142
144
  ---
143
145
 
@@ -147,14 +149,15 @@ Handlers receive a unified `ctx` object. Key properties:
147
149
 
148
150
  | Property | Description |
149
151
  |:---------|:------------|
150
- | `ctx.log` | Request-scoped logger — `.debug()`, `.info()`, `.notice()`, `.warning()`, `.error()`. Auto-correlates requestId, traceId, tenantId. |
151
- | `ctx.state` | Tenant-scoped KV — `.get(key)`, `.set(key, value, { ttl? })`, `.delete(key)`, `.list(prefix, { cursor, limit })`. Accepts any serializable value. |
152
- | `ctx.elicit` | Ask user for structured input. **Check for presence first:** `if (ctx.elicit) { ... }` |
153
- | `ctx.sample` | Request LLM completion from the client. **Check for presence first:** `if (ctx.sample) { ... }` |
152
+ | `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. |
153
+ | `ctx.state` | Tenant-scoped KV — `.get(key)`, `.set(key, value, { ttl? })`, `.delete(key)`, `.getMany(keys)`, `.list(prefix, { cursor, limit })`. Accepts any serializable value. |
154
+ | `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. |
155
+ | `ctx.inputs` | Reader over a retried request's responses — `.accepted(key, schema)`, `.view(key)`, `.state()`, `.dropped`. Empty on the first round. |
156
+ | `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). |
157
+ | `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`. |
154
158
  | `ctx.signal` | `AbortSignal` for cancellation. |
155
- | `ctx.progress` | Task progress (present when `task: true`) — `.setTotal(n)`, `.increment()`, `.update(message)`. |
156
159
  | `ctx.requestId` | Unique request ID. |
157
- | `ctx.tenantId` | Tenant ID from JWT or `'default'` for stdio. |
160
+ | `ctx.tenantId` | Tenant ID from JWT; `'default'` for stdio or HTTP with auth off. |
158
161
 
159
162
  ---
160
163
 
@@ -162,7 +165,7 @@ Handlers receive a unified `ctx` object. Key properties:
162
165
 
163
166
  Handlers throw — the framework catches, classifies, and formats.
164
167
 
165
- **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.
168
+ **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.
166
169
 
167
170
  ```ts
168
171
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
@@ -174,7 +177,7 @@ errors: [
174
177
  ],
175
178
  async handler(input, ctx) {
176
179
  const item = await db.find(input.id);
177
- if (!item) throw ctx.fail('no_match', `No item ${input.id}`);
180
+ if (!item) throw ctx.fail('no_match', `No item ${input.id}`, ctx.recoveryFor('no_match'));
178
181
  return item;
179
182
  }
180
183
  ```
@@ -245,7 +248,7 @@ src/
245
248
 
246
249
  ## Skills
247
250
 
248
- 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.
251
+ 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. `bun run list-skills` prints the full registry.
249
252
 
250
253
  **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.
251
254
 
@@ -273,12 +276,14 @@ Available skills:
273
276
  | `orchestrations` | Chain task skills into a gated multi-phase pipeline — build-out, QA-fix, update-ship — when you can spawn sub-agents |
274
277
  | `report-issue-framework` | File a bug or feature request against `@cyanheads/mcp-ts-core` via `gh` CLI |
275
278
  | `report-issue-local` | File a bug or feature request against this server's own repo via `gh` CLI |
279
+ | `techniques` | Catalog of response/data-shaping techniques — overflow handling, payload shaping, retrieval patterns |
276
280
  | `api-auth` | Auth modes, scopes, JWT/OAuth |
277
281
  | `api-canvas` | DataCanvas: register tabular data, run SQL, export, plus the `spillover()` helper for big result sets — Tier 3 opt-in |
278
282
  | `api-config` | AppConfig, parseConfig, env vars |
279
- | `api-context` | Context interface, logger, state, progress |
283
+ | `api-context` | Context interface, RequestContext, logger, state, multi-round-trip input |
280
284
  | `api-errors` | McpError, JsonRpcErrorCode, error patterns |
281
285
  | `api-linter` | Definition linter rule catalog — invoked by `bun run lint:mcp` and `devcheck` |
286
+ | `api-mirror` | MirrorService: persistent self-refreshing local mirror (embedded SQLite + FTS5) of a bulk upstream dataset — Tier 3 opt-in |
282
287
  | `api-services` | LLM, Speech, Graph services |
283
288
  | `api-testing` | createMockContext, test patterns |
284
289
  | `api-utils` | Formatting, parsing, security, pagination, scheduling, telemetry helpers |
@@ -293,30 +298,33 @@ When you complete a skill's checklist, check the boxes and add a completion time
293
298
 
294
299
  ## Commands
295
300
 
296
- **Runtime:** Scripts use `tsx` — both `npm run <cmd>` and `bun run <cmd>` work. `bun` is slightly faster for script invocation but not required.
301
+ **Runtime:** Scripts use Bun's native TypeScript execution — `bun run <cmd>` is the standard invocation. `npm run <cmd>` also works (npm delegates to bun).
297
302
 
298
303
  | Command | Purpose |
299
304
  |:--------|:--------|
300
- | `npm run build` | Compile TypeScript |
301
- | `npm run rebuild` | Clean + build |
302
- | `npm run clean` | Remove build artifacts |
303
- | `npm run devcheck` | Lint + format + typecheck + security + changelog sync |
305
+ | `bun run build` | Compile TypeScript |
306
+ | `bun run rebuild` | Clean + build |
307
+ | `bun run clean` | Remove build artifacts |
308
+ | `bun run devcheck` | Lint + format + typecheck + security + changelog sync |
304
309
  | `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. |
305
- | `npm run tree` | Generate directory structure doc |
306
- | `npm run format` | Auto-fix formatting (safe fixes only) |
307
- | `npm run format:unsafe` | Also apply Biome's unsafe autofixes — review the diff; they can change behavior |
308
- | `npm test` | Run tests |
309
- | `npm run start:stdio` | Production mode (stdio) |
310
- | `npm run start:http` | Production mode (HTTP) |
311
- | `npm run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |
312
- | `npm run changelog:check` | Verify `CHANGELOG.md` is in sync (used by devcheck) |
313
- | `npm run bundle` | Build, pack, and clean a `.mcpb` for one-click Claude Desktop install |
310
+ | `bun run lint:mcp` | Run the MCP definition linter standalone (rule catalog: `api-linter` skill) |
311
+ | `bun run lint:packaging` | Packaging surface checks — `server.json`/`manifest.json` env-var parity (run by devcheck) |
312
+ | `bun run list-skills` | Print the skill registry |
313
+ | `bun run tree` | Generate directory structure doc |
314
+ | `bun run format` | Auto-fix formatting (safe fixes only) |
315
+ | `bun run format:unsafe` | Also apply Biome's unsafe autofixes — review the diff; they can change behavior |
316
+ | `bun run test` | Run tests (Vitest — use `bun run test`, not `bun test`) |
317
+ | `bun run start:stdio` | Production mode (stdio) |
318
+ | `bun run start:http` | Production mode (HTTP) |
319
+ | `bun run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |
320
+ | `bun run changelog:check` | Verify `CHANGELOG.md` is in sync (used by devcheck) |
321
+ | `bun run bundle` | Build, pack, and clean a `.mcpb` for one-click Claude Desktop install |
314
322
 
315
323
  ---
316
324
 
317
325
  ## Bundling
318
326
 
319
- `npm 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 dependency-shipped agent docs (`node_modules/**` `skills/`, `.claude/`, `.agents/`, `SKILL.md`) that root-anchored `.mcpbignore` patterns cannot reach. 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.
327
+ `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 (`skills/`, `.claude/`, `.agents/`, `SKILL.md`) and platform-specific native bindings, which would otherwise lock the bundle to the platform it was packed on. A server using DataCanvas therefore ships a portable bundle without the DuckDB native — `@duckdb/node-api` is an optional peer loaded lazily, so canvas tools report an actionable install hint and every other tool works normally. 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.
320
328
 
321
329
  **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.
322
330
 
@@ -326,7 +334,7 @@ When you complete a skill's checklist, check the boxes and add a completion time
326
334
 
327
335
  ## Changelog
328
336
 
329
- 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.
337
+ 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.
330
338
 
331
339
  Each per-version file opens with YAML frontmatter:
332
340
 
@@ -334,14 +342,14 @@ Each per-version file opens with YAML frontmatter:
334
342
  ---
335
343
  summary: "One-line headline, ≤350 chars" # required — powers the rollup index
336
344
  breaking: false # optional — true flags breaking changes
337
- security: false # optional — true flags security fixes
345
+ security: false # optional — true ONLY for a source-code security fix, never a dependency CVE bump
338
346
  ---
339
347
 
340
348
  # 0.1.0 — YYYY-MM-DD
341
349
  ...
342
350
  ```
343
351
 
344
- `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`.
352
+ `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 — set it only for a security fix in this server's *own source code*, never for a routine dependency or transitive CVE bump (record those under `## Dependencies`). When both are set, badges render `· ⚠️ Breaking · 🛡️ Security`.
345
353
 
346
354
  `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.
347
355
 
@@ -380,4 +388,4 @@ import { getMyService } from '@/services/my-domain/my-service.js';
380
388
  - [ ] `.codex-plugin/plugin.json` populated — `name`, `version`, `description`, `repository`, `license` from `package.json`; `interface.displayName` = package name; `interface.shortDescription` from `package.json` description
381
389
  - [ ] `.codex-plugin/mcp.json` updated — server name key matches `package.json` name; env vars added for any required API keys
382
390
  - [ ] `.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
383
- - [ ] `npm run devcheck` passes
391
+ - [ ] `bun run devcheck` passes
package/CLAUDE.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # Developer Protocol
2
2
 
3
3
  **Server:** ensembl-mcp-server
4
- **Version:** 0.4.1
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.10.14`
4
+ **Version:** 0.4.3
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.12.3`
6
6
  **Engines:** Bun ≥1.3.0, Node ≥24.0.0
7
- **MCP SDK:** `@modelcontextprotocol/sdk` ^1.29.0
7
+ **MCP SDK:** `@modelcontextprotocol/server` ^2.0.0
8
8
  **Zod:** ^4.4.3
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.
@@ -36,7 +36,7 @@ Tailor suggestions to what's actually missing or stale — don't recite the full
36
36
  - **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.
37
37
  - **Use `ctx.log`** for request-scoped logging. No `console` calls.
38
38
  - **Use `ctx.state`** for tenant-scoped storage. Never access persistence directly.
39
- - **Check `ctx.elicit` / `ctx.sample`** for presence before calling.
39
+ - **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.
40
40
  - **Secrets in env vars only** — never hardcoded.
41
41
  - **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.
42
42
 
@@ -135,9 +135,11 @@ export function getServerConfig() {
135
135
 
136
136
  `parseEnvConfig` maps Zod schema paths → env var names so errors name the variable (`ENSEMBL_BASE_URL`) not the path (`baseUrl`). Throws `ConfigurationError`, which the framework prints as a clean startup banner.
137
137
 
138
- ### Server instructions
138
+ ### Server identity and instructions
139
139
 
140
- `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.
140
+ The canonical `createApp()` identity for this project is `name: 'ensembl-mcp-server'` plus `title: 'ensembl-mcp-server'`. Keep both bare and hyphenated; npm and install surfaces retain the published `@cyanheads/ensembl-mcp-server` identity. Package metadata supplies the description and website, so don't duplicate those fields in `createApp()`.
141
+
142
+ `instructions` is optional server-level orientation, sent 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.
141
143
 
142
144
  ---
143
145
 
@@ -147,14 +149,15 @@ Handlers receive a unified `ctx` object. Key properties:
147
149
 
148
150
  | Property | Description |
149
151
  |:---------|:------------|
150
- | `ctx.log` | Request-scoped logger — `.debug()`, `.info()`, `.notice()`, `.warning()`, `.error()`. Auto-correlates requestId, traceId, tenantId. |
151
- | `ctx.state` | Tenant-scoped KV — `.get(key)`, `.set(key, value, { ttl? })`, `.delete(key)`, `.list(prefix, { cursor, limit })`. Accepts any serializable value. |
152
- | `ctx.elicit` | Ask user for structured input. **Check for presence first:** `if (ctx.elicit) { ... }` |
153
- | `ctx.sample` | Request LLM completion from the client. **Check for presence first:** `if (ctx.sample) { ... }` |
152
+ | `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. |
153
+ | `ctx.state` | Tenant-scoped KV — `.get(key)`, `.set(key, value, { ttl? })`, `.delete(key)`, `.getMany(keys)`, `.list(prefix, { cursor, limit })`. Accepts any serializable value. |
154
+ | `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. |
155
+ | `ctx.inputs` | Reader over a retried request's responses — `.accepted(key, schema)`, `.view(key)`, `.state()`, `.dropped`. Empty on the first round. |
156
+ | `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). |
157
+ | `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`. |
154
158
  | `ctx.signal` | `AbortSignal` for cancellation. |
155
- | `ctx.progress` | Task progress (present when `task: true`) — `.setTotal(n)`, `.increment()`, `.update(message)`. |
156
159
  | `ctx.requestId` | Unique request ID. |
157
- | `ctx.tenantId` | Tenant ID from JWT or `'default'` for stdio. |
160
+ | `ctx.tenantId` | Tenant ID from JWT; `'default'` for stdio or HTTP with auth off. |
158
161
 
159
162
  ---
160
163
 
@@ -162,7 +165,7 @@ Handlers receive a unified `ctx` object. Key properties:
162
165
 
163
166
  Handlers throw — the framework catches, classifies, and formats.
164
167
 
165
- **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.
168
+ **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.
166
169
 
167
170
  ```ts
168
171
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
@@ -174,7 +177,7 @@ errors: [
174
177
  ],
175
178
  async handler(input, ctx) {
176
179
  const item = await db.find(input.id);
177
- if (!item) throw ctx.fail('no_match', `No item ${input.id}`);
180
+ if (!item) throw ctx.fail('no_match', `No item ${input.id}`, ctx.recoveryFor('no_match'));
178
181
  return item;
179
182
  }
180
183
  ```
@@ -245,7 +248,7 @@ src/
245
248
 
246
249
  ## Skills
247
250
 
248
- 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.
251
+ 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. `bun run list-skills` prints the full registry.
249
252
 
250
253
  **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.
251
254
 
@@ -273,12 +276,14 @@ Available skills:
273
276
  | `orchestrations` | Chain task skills into a gated multi-phase pipeline — build-out, QA-fix, update-ship — when you can spawn sub-agents |
274
277
  | `report-issue-framework` | File a bug or feature request against `@cyanheads/mcp-ts-core` via `gh` CLI |
275
278
  | `report-issue-local` | File a bug or feature request against this server's own repo via `gh` CLI |
279
+ | `techniques` | Catalog of response/data-shaping techniques — overflow handling, payload shaping, retrieval patterns |
276
280
  | `api-auth` | Auth modes, scopes, JWT/OAuth |
277
281
  | `api-canvas` | DataCanvas: register tabular data, run SQL, export, plus the `spillover()` helper for big result sets — Tier 3 opt-in |
278
282
  | `api-config` | AppConfig, parseConfig, env vars |
279
- | `api-context` | Context interface, logger, state, progress |
283
+ | `api-context` | Context interface, RequestContext, logger, state, multi-round-trip input |
280
284
  | `api-errors` | McpError, JsonRpcErrorCode, error patterns |
281
285
  | `api-linter` | Definition linter rule catalog — invoked by `bun run lint:mcp` and `devcheck` |
286
+ | `api-mirror` | MirrorService: persistent self-refreshing local mirror (embedded SQLite + FTS5) of a bulk upstream dataset — Tier 3 opt-in |
282
287
  | `api-services` | LLM, Speech, Graph services |
283
288
  | `api-testing` | createMockContext, test patterns |
284
289
  | `api-utils` | Formatting, parsing, security, pagination, scheduling, telemetry helpers |
@@ -293,30 +298,33 @@ When you complete a skill's checklist, check the boxes and add a completion time
293
298
 
294
299
  ## Commands
295
300
 
296
- **Runtime:** Scripts use `tsx` — both `npm run <cmd>` and `bun run <cmd>` work. `bun` is slightly faster for script invocation but not required.
301
+ **Runtime:** Scripts use Bun's native TypeScript execution — `bun run <cmd>` is the standard invocation. `npm run <cmd>` also works (npm delegates to bun).
297
302
 
298
303
  | Command | Purpose |
299
304
  |:--------|:--------|
300
- | `npm run build` | Compile TypeScript |
301
- | `npm run rebuild` | Clean + build |
302
- | `npm run clean` | Remove build artifacts |
303
- | `npm run devcheck` | Lint + format + typecheck + security + changelog sync |
305
+ | `bun run build` | Compile TypeScript |
306
+ | `bun run rebuild` | Clean + build |
307
+ | `bun run clean` | Remove build artifacts |
308
+ | `bun run devcheck` | Lint + format + typecheck + security + changelog sync |
304
309
  | `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. |
305
- | `npm run tree` | Generate directory structure doc |
306
- | `npm run format` | Auto-fix formatting (safe fixes only) |
307
- | `npm run format:unsafe` | Also apply Biome's unsafe autofixes — review the diff; they can change behavior |
308
- | `npm test` | Run tests |
309
- | `npm run start:stdio` | Production mode (stdio) |
310
- | `npm run start:http` | Production mode (HTTP) |
311
- | `npm run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |
312
- | `npm run changelog:check` | Verify `CHANGELOG.md` is in sync (used by devcheck) |
313
- | `npm run bundle` | Build, pack, and clean a `.mcpb` for one-click Claude Desktop install |
310
+ | `bun run lint:mcp` | Run the MCP definition linter standalone (rule catalog: `api-linter` skill) |
311
+ | `bun run lint:packaging` | Packaging surface checks — `server.json`/`manifest.json` env-var parity (run by devcheck) |
312
+ | `bun run list-skills` | Print the skill registry |
313
+ | `bun run tree` | Generate directory structure doc |
314
+ | `bun run format` | Auto-fix formatting (safe fixes only) |
315
+ | `bun run format:unsafe` | Also apply Biome's unsafe autofixes — review the diff; they can change behavior |
316
+ | `bun run test` | Run tests (Vitest — use `bun run test`, not `bun test`) |
317
+ | `bun run start:stdio` | Production mode (stdio) |
318
+ | `bun run start:http` | Production mode (HTTP) |
319
+ | `bun run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |
320
+ | `bun run changelog:check` | Verify `CHANGELOG.md` is in sync (used by devcheck) |
321
+ | `bun run bundle` | Build, pack, and clean a `.mcpb` for one-click Claude Desktop install |
314
322
 
315
323
  ---
316
324
 
317
325
  ## Bundling
318
326
 
319
- `npm 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 dependency-shipped agent docs (`node_modules/**` `skills/`, `.claude/`, `.agents/`, `SKILL.md`) that root-anchored `.mcpbignore` patterns cannot reach. 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.
327
+ `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 (`skills/`, `.claude/`, `.agents/`, `SKILL.md`) and platform-specific native bindings, which would otherwise lock the bundle to the platform it was packed on. A server using DataCanvas therefore ships a portable bundle without the DuckDB native — `@duckdb/node-api` is an optional peer loaded lazily, so canvas tools report an actionable install hint and every other tool works normally. 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.
320
328
 
321
329
  **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.
322
330
 
@@ -326,7 +334,7 @@ When you complete a skill's checklist, check the boxes and add a completion time
326
334
 
327
335
  ## Changelog
328
336
 
329
- 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.
337
+ 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.
330
338
 
331
339
  Each per-version file opens with YAML frontmatter:
332
340
 
@@ -334,14 +342,14 @@ Each per-version file opens with YAML frontmatter:
334
342
  ---
335
343
  summary: "One-line headline, ≤350 chars" # required — powers the rollup index
336
344
  breaking: false # optional — true flags breaking changes
337
- security: false # optional — true flags security fixes
345
+ security: false # optional — true ONLY for a source-code security fix, never a dependency CVE bump
338
346
  ---
339
347
 
340
348
  # 0.1.0 — YYYY-MM-DD
341
349
  ...
342
350
  ```
343
351
 
344
- `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`.
352
+ `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 — set it only for a security fix in this server's *own source code*, never for a routine dependency or transitive CVE bump (record those under `## Dependencies`). When both are set, badges render `· ⚠️ Breaking · 🛡️ Security`.
345
353
 
346
354
  `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.
347
355
 
@@ -380,4 +388,4 @@ import { getMyService } from '@/services/my-domain/my-service.js';
380
388
  - [ ] `.codex-plugin/plugin.json` populated — `name`, `version`, `description`, `repository`, `license` from `package.json`; `interface.displayName` = package name; `interface.shortDescription` from `package.json` description
381
389
  - [ ] `.codex-plugin/mcp.json` updated — server name key matches `package.json` name; env vars added for any required API keys
382
390
  - [ ] `.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
383
- - [ ] `npm run devcheck` passes
391
+ - [ ] `bun run devcheck` passes
package/Dockerfile CHANGED
@@ -4,7 +4,7 @@
4
4
  # This stage installs all dependencies (including dev), builds the TypeScript
5
5
  # source code into JavaScript, and prepares the production assets.
6
6
  # ==============================================================================
7
- FROM oven/bun:1.3.14 AS build
7
+ FROM --platform=$BUILDPLATFORM oven/bun:1.4.0 AS build
8
8
 
9
9
  WORKDIR /usr/src/app
10
10
 
@@ -30,7 +30,7 @@ RUN bun run build
30
30
  # application. It uses a slim base image and only includes production
31
31
  # dependencies and build artifacts.
32
32
  # ==============================================================================
33
- FROM oven/bun:1.3.14-slim AS production
33
+ FROM oven/bun:1.4.0-slim AS production
34
34
 
35
35
  WORKDIR /usr/src/app
36
36
 
@@ -41,7 +41,7 @@ ENV NODE_ENV=production
41
41
  # OCI image metadata (https://github.com/opencontainers/image-spec/blob/main/annotations.md)
42
42
  ARG APP_VERSION
43
43
  LABEL org.opencontainers.image.title="@cyanheads/ensembl-mcp-server"
44
- LABEL org.opencontainers.image.description="Look up genes, fetch sequences, predict variant consequences, find orthologs and cross-database xrefs via Ensembl REST via MCP. STDIO or Streamable HTTP."
44
+ LABEL org.opencontainers.image.description="Look up genes, fetch sequences, predict variant consequences, find orthologs, and retrieve cross-database xrefs from Ensembl REST via MCP. STDIO or Streamable HTTP."
45
45
  LABEL org.opencontainers.image.source="https://github.com/cyanheads/ensembl-mcp-server"
46
46
  LABEL org.opencontainers.image.licenses="Apache-2.0"
47
47
  LABEL org.opencontainers.image.version="${APP_VERSION}"
@@ -52,7 +52,7 @@ COPY package.json bun.lock ./
52
52
  # Install only production dependencies, ignoring any lifecycle scripts (like 'prepare')
53
53
  # that are not needed in the final production image.
54
54
  RUN --mount=type=cache,target=/root/.bun/install/cache \
55
- bun install --production --frozen-lockfile --ignore-scripts
55
+ bun install --production --frozen-lockfile --ignore-scripts --omit=peer
56
56
 
57
57
  # Conditionally install OpenTelemetry optional peer dependencies (Tier 3).
58
58
  # These are not bundled by default to keep the base image lean. Enable at build time
@@ -69,7 +69,8 @@ RUN --mount=type=cache,target=/root/.bun/install/cache \
69
69
  @opentelemetry/sdk-metrics \
70
70
  @opentelemetry/sdk-node \
71
71
  @opentelemetry/sdk-trace-node \
72
- @opentelemetry/semantic-conventions; \
72
+ @opentelemetry/semantic-conventions \
73
+ --omit=dev --omit=peer --ignore-scripts; \
73
74
  fi
74
75
 
75
76
  # Copy the compiled application code from the build stage
package/README.md CHANGED
@@ -1,13 +1,13 @@
1
1
  <div align="center">
2
2
  <h1>@cyanheads/ensembl-mcp-server</h1>
3
- <p><b>Look up genes, fetch sequences, predict variant consequences, find orthologs and cross-database xrefs via Ensembl REST via MCP. STDIO or Streamable HTTP.</b>
3
+ <p><b>Look up genes, fetch sequences, predict variant consequences, find orthologs, and retrieve cross-database xrefs from Ensembl REST via MCP. STDIO or Streamable HTTP.</b>
4
4
  <div>7 Tools • 4 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.4.1-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/ensembl-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/ensembl-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/ensembl-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.14-blueviolet.svg?style=flat-square)](https://bun.sh/)
10
+ [![Version](https://img.shields.io/badge/Version-0.4.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/ensembl-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/ensembl-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/ensembl-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/)
11
11
 
12
12
  </div>
13
13
 
@@ -235,7 +235,7 @@ MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http
235
235
 
236
236
  ### Prerequisites
237
237
 
238
- - [Bun v1.3.14](https://bun.sh/) or higher (or Node.js v24+).
238
+ - [Bun v1.4.0](https://bun.sh/) or higher (or Node.js v24+).
239
239
  - No API key required — Ensembl REST is fully public.
240
240
 
241
241
  ### Installation
@@ -275,6 +275,7 @@ All configuration is validated at startup via Zod schemas in `src/config/server-
275
275
  | `MCP_TRANSPORT_TYPE` | Transport: `stdio` or `http` | `stdio` |
276
276
  | `MCP_HTTP_PORT` | HTTP server port | `3010` |
277
277
  | `MCP_HTTP_ENDPOINT_PATH` | HTTP endpoint path | `/mcp` |
278
+ | `MCP_SESSION_MODE` | HTTP session mode: `auto`, `stateful`, or `stateless`. Schema default `auto` resolves to stateful; this server explicitly uses stateless. | `stateless` |
278
279
  | `MCP_AUTH_MODE` | Authentication: `none`, `jwt`, or `oauth` | `none` |
279
280
  | `MCP_LOG_LEVEL` | Log level (`debug`, `info`, `warning`, `error`, etc.) | `info` |
280
281
  | `LOGS_DIR` | Directory for log files (Node.js only) | `<project-root>/logs` |
@@ -0,0 +1,19 @@
1
+ ---
2
+ summary: "ensembl_predict_variant and ensembl_get_homology cap high-cardinality output (transcript consequences, PubMed IDs, homologs) by default with truthful totals and an uncap escape hatch; every declared ctx.fail site now surfaces a recovery hint"
3
+ breaking: false
4
+ security: false
5
+ ---
6
+
7
+ # 0.4.2 — 2026-07-09
8
+
9
+ ## Added
10
+
11
+ - **`ensembl_predict_variant`** gains `max_transcript_consequences` (default `10`, sentinel `0` = uncapped) and `max_pubmed_ids_per_variant` (default `10`, sentinel `0` = uncapped) input params, plus `include_all_colocated_pubmed` (default `false`) to bypass the PubMed cap regardless of the limit. Each VEP record gains output field `transcriptConsequencesTotal`; each colocated variant gains `pubmedTotal` — both report the true pre-cap count. ([#15](https://github.com/cyanheads/ensembl-mcp-server/issues/15))
12
+ - **`ensembl_get_homology`** gains `max_results` (default `25`, sentinel `0` = uncapped). ([#15](https://github.com/cyanheads/ensembl-mcp-server/issues/15))
13
+ - **`enrichment.truncated`/`shown`/`cap`** fields added to `ensembl_predict_variant` and `ensembl_get_homology` output, populated whenever a cap trims the response.
14
+ - **Every declared `ctx.fail` site** across 8 tool/resource files (24 call sites — `ensembl_predict_variant`, `ensembl_get_homology`, `ensembl_get_sequence`, `ensembl_get_xrefs`, `ensembl_lookup_gene`, `ensembl_query_region`, and the `gene`/`transcript` resources) now passes `{ ...ctx.recoveryFor(reason) }`, surfacing the tool's declared `recovery` guidance onto `data.recovery.hint` (mirrored into `content[0].text` as `Recovery: …`). ([#16](https://github.com/cyanheads/ensembl-mcp-server/issues/16))
15
+
16
+ ## Changed
17
+
18
+ - **Default output for `ensembl_predict_variant` and `ensembl_get_homology` is now capped** — transcript consequences, per-variant PubMed IDs, and homolog lists trim to their defaults instead of returning every match. A single composed `enrichment.notice` discloses what was omitted and how to retrieve the rest (raise the cap, or set it to `0` / `include_all_colocated_pubmed=true` for the full set).
19
+ - **`ensembl_get_homology`'s `totalCount`** now reports the true available homolog count rather than the returned page length — it can exceed `homologs.length` when the result was capped. ([#15](https://github.com/cyanheads/ensembl-mcp-server/issues/15))
@@ -0,0 +1,29 @@
1
+ ---
2
+ summary: "MCP 2026-07-28 and SDK v2 adoption adds strict tool inputs, public cache hints, and an explicit stateless HTTP deployment"
3
+ breaking: false
4
+ security: false
5
+ ---
6
+
7
+ # 0.4.3 — 2026-08-22
8
+
9
+ ## Added
10
+
11
+ - **Public cache hints** now mark tool, prompt, resource, and discovery catalogs cacheable for one hour and resource reads for five minutes on MCP 2026-07-28 clients.
12
+
13
+ ## Changed
14
+
15
+ - **MCP SDK v2 and protocol revision 2026-07-28** are available alongside the existing 2025-era clients. Tool calls reject undeclared top-level arguments, advertised schemas use JSON Schema 2020-12 and declare error envelopes, and `ctx.log` messages can reach clients that opt into MCP logging.
16
+ - **`MCP_SESSION_MODE=stateless`** is explicit across the Docker image, `.env.example`, and README, so source and container HTTP runs use the same session policy.
17
+ - **Request context propagation** now carries the handler's canonical trace, operation, tenant, and correlation fields into Ensembl upstream requests instead of retaining only the request ID.
18
+ - **Build and test configuration** typechecks `tests/` separately from the production emit; prompt/resource tests follow the SDK v2 async and optional-schema contracts.
19
+ - **Packaging and project templates** adopt Bun 1.4, production peer omission, portable MCPB cleanup, current dependency checks, community-health files, and the latest framework scripts, skills, and agent protocol.
20
+
21
+ ## Dependencies
22
+
23
+ - `@cyanheads/mcp-ts-core` `^0.10.14` → `^0.12.3`
24
+ - `@biomejs/biome` `^2.5.0` → `^2.5.9`
25
+ - `@types/node` `^26.0.0` → `^26.2.0`
26
+ - `ignore` `^7.0.5` → `^7.0.6`
27
+ - `tsc-alias` `^1.9.0` → `^1.9.2`
28
+ - `typescript` `^6.0.3` → `^7.0.2`
29
+ - `vitest` `^4.1.10` → `^4.1.11`