@cyanheads/mcp-ts-core 0.9.9 → 0.9.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CLAUDE.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Developer Protocol
2
2
 
3
3
  **Package:** `@cyanheads/mcp-ts-core`
4
- **Version:** 0.9.9
4
+ **Version:** 0.9.10
5
5
  **Engines:** Bun ≥1.3.0, Node ≥24.0.0
6
6
  **MCP SDK:** `@modelcontextprotocol/sdk` ^1.29.0
7
7
  **Zod:** ^4.4.3
@@ -36,7 +36,7 @@ Both paths share the same public API. Init copies starter `package.json`, config
36
36
  - **Runtime parity.** All features work across `stdio`/`http`/Worker. Guard non-portable deps via `runtimeCaps` from `/utils` (`isNode`, `isBun`, `isWorkerLike`, `hasBuffer`, `hasProcess`, etc.). Prefer runtime-agnostic abstractions (Hono, Fetch APIs).
37
37
  - **Definition linting is build-time only.** Run `bun run lint:mcp` (standalone) or `bun run devcheck` (gate). Not invoked at server startup — new lint rules are additive and never break deployed servers. Every diagnostic links to the rule reference in `api-linter` skill; see that skill for the full rule catalog.
38
38
  - **Elicitation for missing input.** Use `ctx.elicit` when the client supports it.
39
- - **Close the loop on issues.** When implementing work tracked by a GitHub issue, comment on the issue with what landed before moving on. The comment is for future readers — state the concrete changes, not the conversation that produced them.
39
+ - **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.
40
40
 
41
41
  ---
42
42
 
package/README.md CHANGED
@@ -5,12 +5,12 @@
5
5
 
6
6
  <div align="center">
7
7
 
8
- [![Framework](https://img.shields.io/badge/Built%20on-@cyanheads/mcp--ts--core-67E8F9?style=flat-square)](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)
9
-
10
- [![Version](https://img.shields.io/badge/Version-0.9.9-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![MCP Spec](https://img.shields.io/badge/MCP%20Spec-2025--11--25-8A2BE2.svg?style=flat-square)](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/docs/specification/2025-11-25/changelog.mdx)
8
+ [![Version](https://img.shields.io/badge/Version-0.9.10-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![MCP Spec](https://img.shields.io/badge/MCP%20Spec-2025--11--25-8A2BE2.svg?style=flat-square)](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/docs/specification/2025-11-25/changelog.mdx)
11
9
 
12
10
  [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^1.29.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![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%2B-blueviolet.svg?style=flat-square)](https://bun.sh/)
13
11
 
12
+ [![Framework](https://img.shields.io/badge/Built%20on-@cyanheads/mcp--ts--core-67E8F9?style=flat-square)](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)
13
+
14
14
  </div>
15
15
 
16
16
  ---
@@ -61,7 +61,7 @@ cd my-mcp-server
61
61
  bun install
62
62
  ```
63
63
 
64
- You get a scaffolded project with `CLAUDE.md`, Agent Skills, and a `src/` tree ready for your tools. Infrastructure — transports, auth, storage, telemetry, lifecycle, linting — lives in `node_modules`. What's left is domain: which APIs to wrap, which workflows to expose.
64
+ You get a scaffolded project with `CLAUDE.md`, Agent Skills, plugin metadata (Codex + Claude Code), and a `src/` tree ready for your tools. Infrastructure — transports, auth, storage, telemetry, lifecycle, linting — lives in `node_modules`. What's left is domain: which APIs to wrap, which workflows to expose.
65
65
 
66
66
  Start your coding agent (i.e. Claude Code, Codex) and describe what you want. The agent knows what to do from there. The included Agent Skills cover the full cycle: `setup`, `design-mcp-server`, scaffolding, testing, `security-pass`, `release-and-publish`, `maintenance`, & more.
67
67
 
@@ -0,0 +1,37 @@
1
+ ---
2
+ summary: "HTTP session-init gate, expected client error log-level split, plugin metadata scaffolding, skill updates"
3
+ breaking: false
4
+ security: false
5
+ agent-notes: |
6
+ New scaffold templates added: templates/.claude-plugin/ and templates/.codex-plugin/.
7
+ templates/AGENTS.md and templates/CLAUDE.md now include a plugin file checklist item.
8
+ changelog/template.md has a new optional agent-notes frontmatter field.
9
+ Skills updated: maintenance (plugin metadata step), polish-docs-meta (plugin metadata step),
10
+ design-mcp-server (new patterns), git-wrapup, release-and-publish.
11
+ ---
12
+
13
+ # 0.9.10 — 2026-05-26
14
+
15
+ ## Added
16
+
17
+ - **`templates/.claude-plugin/`** and **`templates/.codex-plugin/`** — scaffold templates for Claude Code and Codex plugin metadata files, copied into new servers via `bunx @cyanheads/mcp-ts-core init`.
18
+ - **`templates/AGENTS.md`** and **`templates/CLAUDE.md`** — plugin file checklist item added to the orient block.
19
+ - **`changelog/template.md`** — `agent-notes` frontmatter field documented; optional free-form notes for maintenance agents processing a release.
20
+ - **`skills/maintenance/SKILL.md`** — plugin metadata step added to Phase B.
21
+ - **`skills/polish-docs-meta/SKILL.md`** — plugin metadata verification step added.
22
+ - **`skills/design-mcp-server/SKILL.md`** — tool design patterns and API prior art guidance expanded.
23
+
24
+ ## Fixed
25
+
26
+ - **HTTP session-init gate** (`httpTransport.ts`) — stateful HTTP mode now rejects non-`initialize` requests that arrive without an `Mcp-Session-Id` header with HTTP 400, preventing uninitialized sessions from being minted on first contact ([#154](https://github.com/cyanheads/mcp-ts-core/issues/154)).
27
+ - **`httpErrorHandler`** — expected client errors (401, 403, 400, 404) now use `classifyOnly` + `logger.warning` instead of full `ErrorHandler.handleError` pipeline with stack traces, reducing noise in error logs ([#158](https://github.com/cyanheads/mcp-ts-core/issues/158)).
28
+
29
+ ## Changed
30
+
31
+ - **`skills/git-wrapup/SKILL.md`** and **`skills/release-and-publish/SKILL.md`** — minor clarifications.
32
+ - **Dependency bumps:**
33
+ - `hono` ^4.12.22 → ^4.12.23
34
+ - `@cloudflare/vitest-pool-workers` ^0.16.9 → ^0.16.10
35
+ - `@cloudflare/workers-types` ^4.20260524.1 → ^4.20260527.1
36
+ - `@duckdb/node-api` ^1.5.3-r.1 → ^1.5.3-r.2
37
+ - `@supabase/supabase-js` ^2.106.1 → ^2.106.2
@@ -19,6 +19,14 @@ breaking: false
19
19
  # `## Security` section below. Flagged as `Security` in the rollup so
20
20
  # users can triage upgrade urgency at a glance.
21
21
  security: false
22
+
23
+ # Optional free-form notes for maintenance agents processing this release.
24
+ # Not rendered in CHANGELOG — consumed by agents running `maintenance` on
25
+ # downstream servers. Use for adoption instructions that don't fit the
26
+ # human-facing sections: new files to create, fields to populate, one-time
27
+ # migration steps. Omit the field entirely when there's nothing to say.
28
+ # agent-notes: |
29
+ # <instructions for downstream maintenance agents>
22
30
  ---
23
31
 
24
32
  # <version> — YYYY-MM-DD
@@ -0,0 +1,4 @@
1
+ {"level":40,"time":1779856368095,"env":"testing","version":"0.9.10","pid":42668,"transport":"http","requestId":"K0H0F-OGJCX","timestamp":"2026-05-27T04:32:48.095Z","operation":"TransportManager.start","component":"HttpTransportSetup","msg":"MCP_ALLOWED_ORIGINS is not set — CORS is wildcard for CLI clients; browser Origin headers are restricted to loopback. Set MCP_ALLOWED_ORIGINS for production deployments accepting remote browser origins."}
2
+ {"level":40,"time":1779856369836,"env":"testing","version":"0.9.10","pid":42668,"transport":"http","requestId":"K0H0F-OGJCX","timestamp":"2026-05-27T04:32:48.095Z","operation":"TransportManager.start","component":"HttpTransportSetup","sessionId":"not-a-real-session-1779856369835","msg":"Session validation failed - invalid or hijacked session"}
3
+ {"level":50,"time":1779856373661,"env":"testing","version":"0.0.0-test","pid":42886,"requestId":"S73IT-N51J4","timestamp":"2026-05-27T04:32:53.660Z","operation":"HandleToolRequest","critical":false,"errorCode":-32005,"originalErrorType":"McpError","finalErrorType":"McpError","sessionId":"d403b6f5b5a1acd6bef09780d848eb07995f35133a797a95095b91d16ad63d5f","toolName":"scoped_echo","tenantId":"authz-tenant","auth":{"sub":"authz-user","scopes":["tool:other:read"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"errorData":{"sessionId":"d403b6f5b5a1acd6bef09780d848eb07995f35133a797a95095b91d16ad63d5f","toolName":"scoped_echo","requestId":"S73IT-N51J4","timestamp":"2026-05-27T04:32:53.660Z","tenantId":"authz-tenant","operation":"HandleToolRequest","auth":{"sub":"authz-user","scopes":["tool:other:read"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"originalErrorName":"McpError","originalMessage":"Insufficient permissions.","originalStack":"McpError: Insufficient permissions.\n at forbidden (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:84:58)\n at withRequiredScopes (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/lib/authUtils.js:68:15)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:146:17)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:231:34)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Insufficient permissions.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:170:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:184:26)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:231:34)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at processTicksAndRejections (native:7:39)","msg":"Error in tool:scoped_echo: Insufficient permissions."}
4
+ {"level":50,"time":1779856373668,"env":"testing","version":"0.0.0-test","pid":42886,"requestId":"2Z3AI-0NEMI","timestamp":"2026-05-27T04:32:53.668Z","operation":"HandleToolRequest","critical":false,"errorCode":-32005,"originalErrorType":"McpError","finalErrorType":"McpError","sessionId":"f6f091b254ded43dfd3db766e8ea167db6d7ba526bad1931f50f0ffc40f5a2e4","toolName":"scoped_echo","tenantId":"authz-tenant","auth":{"sub":"authz-user","scopes":["openid","email","profile","offline_access"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"errorData":{"sessionId":"f6f091b254ded43dfd3db766e8ea167db6d7ba526bad1931f50f0ffc40f5a2e4","toolName":"scoped_echo","requestId":"2Z3AI-0NEMI","timestamp":"2026-05-27T04:32:53.668Z","tenantId":"authz-tenant","operation":"HandleToolRequest","auth":{"sub":"authz-user","scopes":["openid","email","profile","offline_access"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"originalErrorName":"McpError","originalMessage":"Insufficient permissions.","originalStack":"McpError: Insufficient permissions.\n at forbidden (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:84:58)\n at withRequiredScopes (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/lib/authUtils.js:68:15)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:146:17)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:231:34)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Insufficient permissions.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:170:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:184:26)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:231:34)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at processTicksAndRejections (native:7:39)","msg":"Error in tool:scoped_echo: Insufficient permissions."}
@@ -0,0 +1,2 @@
1
+ {"level":50,"time":1779856373661,"env":"testing","version":"0.0.0-test","pid":42886,"requestId":"S73IT-N51J4","timestamp":"2026-05-27T04:32:53.660Z","operation":"HandleToolRequest","critical":false,"errorCode":-32005,"originalErrorType":"McpError","finalErrorType":"McpError","sessionId":"d403b6f5b5a1acd6bef09780d848eb07995f35133a797a95095b91d16ad63d5f","toolName":"scoped_echo","tenantId":"authz-tenant","auth":{"sub":"authz-user","scopes":["tool:other:read"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"errorData":{"sessionId":"d403b6f5b5a1acd6bef09780d848eb07995f35133a797a95095b91d16ad63d5f","toolName":"scoped_echo","requestId":"S73IT-N51J4","timestamp":"2026-05-27T04:32:53.660Z","tenantId":"authz-tenant","operation":"HandleToolRequest","auth":{"sub":"authz-user","scopes":["tool:other:read"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"originalErrorName":"McpError","originalMessage":"Insufficient permissions.","originalStack":"McpError: Insufficient permissions.\n at forbidden (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:84:58)\n at withRequiredScopes (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/lib/authUtils.js:68:15)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:146:17)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:231:34)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Insufficient permissions.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:170:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:184:26)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:231:34)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at processTicksAndRejections (native:7:39)","msg":"Error in tool:scoped_echo: Insufficient permissions."}
2
+ {"level":50,"time":1779856373668,"env":"testing","version":"0.0.0-test","pid":42886,"requestId":"2Z3AI-0NEMI","timestamp":"2026-05-27T04:32:53.668Z","operation":"HandleToolRequest","critical":false,"errorCode":-32005,"originalErrorType":"McpError","finalErrorType":"McpError","sessionId":"f6f091b254ded43dfd3db766e8ea167db6d7ba526bad1931f50f0ffc40f5a2e4","toolName":"scoped_echo","tenantId":"authz-tenant","auth":{"sub":"authz-user","scopes":["openid","email","profile","offline_access"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"errorData":{"sessionId":"f6f091b254ded43dfd3db766e8ea167db6d7ba526bad1931f50f0ffc40f5a2e4","toolName":"scoped_echo","requestId":"2Z3AI-0NEMI","timestamp":"2026-05-27T04:32:53.668Z","tenantId":"authz-tenant","operation":"HandleToolRequest","auth":{"sub":"authz-user","scopes":["openid","email","profile","offline_access"],"clientId":"authz-client","tenantId":"authz-tenant","token":"[REDACTED]"},"originalErrorName":"McpError","originalMessage":"Insufficient permissions.","originalStack":"McpError: Insufficient permissions.\n at forbidden (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:84:58)\n at withRequiredScopes (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/lib/authUtils.js:68:15)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:146:17)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:231:34)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Insufficient permissions.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:170:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:184:26)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:231:34)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at processTicksAndRejections (native:7:39)","msg":"Error in tool:scoped_echo: Insufficient permissions."}
File without changes
@@ -1 +1 @@
1
- {"version":3,"file":"httpErrorHandler.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/transports/http/httpErrorHandler.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAKpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAOlF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,gBAAgB,GAAU,SAAS,SAAS,MAAM,GAAG,gBAAgB,EAChF,KAAK,KAAK,EACV,GAAG,OAAO,CAAC;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,CAAC,KAClC,OAAO,CAAC,QAAQ,CAoIlB,CAAC"}
1
+ {"version":3,"file":"httpErrorHandler.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/transports/http/httpErrorHandler.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAKpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAOlF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,gBAAgB,GAAU,SAAS,SAAS,MAAM,GAAG,gBAAgB,EAChF,KAAK,KAAK,EACV,GAAG,OAAO,CAAC;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,CAAC,KAClC,OAAO,CAAC,QAAQ,CA2JlB,CAAC"}
@@ -56,11 +56,32 @@ export const httpErrorHandler = async (err, c) => {
56
56
  // Capture original McpError data before enrichment — handleError adds internal
57
57
  // details (stack traces, cause chains, operation context) that must not leak.
58
58
  const originalData = err instanceof McpError ? err.data : undefined;
59
- const handledError = ErrorHandler.handleError(err, {
60
- operation: 'httpTransport',
61
- context,
62
- });
63
- const errorCode = handledError instanceof McpError ? handledError.code : -32603;
59
+ // Pre-classify to split expected client errors (4xx) from unexpected server
60
+ // errors (5xx). Client errors get a compact warning log without stack traces;
61
+ // server errors go through the full ErrorHandler pipeline with stacks + OTel.
62
+ const classified = ErrorHandler.classifyOnly(err);
63
+ const EXPECTED_CLIENT_CODES = new Set([
64
+ JsonRpcErrorCode.Unauthorized,
65
+ JsonRpcErrorCode.Forbidden,
66
+ JsonRpcErrorCode.InvalidParams,
67
+ JsonRpcErrorCode.ValidationError,
68
+ JsonRpcErrorCode.InvalidRequest,
69
+ JsonRpcErrorCode.NotFound,
70
+ ]);
71
+ const isExpectedClientError = EXPECTED_CLIENT_CODES.has(classified.code);
72
+ if (isExpectedClientError) {
73
+ logger.warning(`Client error: ${classified.message}`, {
74
+ ...context,
75
+ errorCode: classified.code,
76
+ });
77
+ }
78
+ else {
79
+ ErrorHandler.handleError(err, {
80
+ operation: 'httpTransport',
81
+ context,
82
+ });
83
+ }
84
+ const errorCode = classified.code;
64
85
  let status = 500;
65
86
  switch (errorCode) {
66
87
  case JsonRpcErrorCode.NotFound:
@@ -135,7 +156,7 @@ export const httpErrorHandler = async (err, c) => {
135
156
  jsonrpc: '2.0',
136
157
  error: {
137
158
  code: errorCode,
138
- message: handledError.message,
159
+ message: classified.message,
139
160
  ...(originalData !== undefined && { data: originalData }),
140
161
  },
141
162
  id: requestId,
@@ -1 +1 @@
1
- {"version":3,"file":"httpErrorHandler.js","sourceRoot":"","sources":["../../../../src/mcp-server/transports/http/httpErrorHandler.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,gDAAgD,CAAC;AAC9E,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,EACnC,GAAU,EACV,CAAmC,EAChB,EAAE;IACrB,qFAAqF;IACrF,uFAAuF;IACvF,IAAI,GAAG,YAAY,aAAa,EAAE,CAAC;QACjC,MAAM,UAAU,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC;QACzC,IAAI,UAAU,EAAE,CAAC;YACf,UAAU,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;YAChC,UAAU,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;QAC7E,CAAC;QACD,MAAM,CAAC,KAAK,CACV,wBAAwB,GAAG,CAAC,MAAM,EAAE,EACpC,qBAAq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MAAM,IAAI,GAAY,MAAM,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;YACzC,MAAM,EAAE,GAAG,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACnC,SAAS,GAAG,OAAO,EAAE,KAAK,QAAQ,IAAI,OAAO,EAAE,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;YACzE,MAAM,CAAC,KAAK,CAAC,0CAA0C,EAAE;gBACvD,GAAG,OAAO;gBACV,SAAS,EAAE,SAAS;aACrB,CAAC,CAAC;QACL,CAAC;QAAC,MAAM,CAAC;YACP,MAAM,CAAC,OAAO,CAAC,sDAAsD,EAAE,OAAO,CAAC,CAAC;YAChF,oDAAoD;QACtD,CAAC;IACH,CAAC;SAAM,CAAC;QACN,MAAM,CAAC,KAAK,CAAC,4DAA4D,EAAE,OAAO,CAAC,CAAC;IACtF,CAAC;IAED,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACjB,MAAM,aAAa,GAAG;QACpB,OAAO,EAAE,KAAK;QACd,KAAK,EAAE;YACL,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,YAAY,CAAC,OAAO;YAC7B,GAAG,CAAC,YAAY,KAAK,SAAS,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;SAC1D;QACD,EAAE,EAAE,SAAS;KACd,CAAC;IACF,MAAM,CAAC,IAAI,CAAC,+CAA+C,EAAE;QAC3D,GAAG,OAAO;QACV,MAAM;QACN,SAAS;QACT,SAAS,EAAE,SAAS;KACrB,CAAC,CAAC;IACH,OAAO,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;AAC/B,CAAC,CAAC"}
1
+ {"version":3,"file":"httpErrorHandler.js","sourceRoot":"","sources":["../../../../src/mcp-server/transports/http/httpErrorHandler.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,oB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AAC,IAAI,CAAC,aAAa,CAAC,CAAC;AAC/B,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"httpTransport.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/transports/http/httpTransport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAG5B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAK/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAMlF,OAAO,EAAwB,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAElG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AA8IzE;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,aAAa,CAAC,SAAS,SAAS,MAAM,GAAG,gBAAgB,EAC7E,aAAa,EAAE,MAAM,OAAO,CAAC,SAAS,CAAC,EACvC,aAAa,EAAE,cAAc,EAC7B,QAAQ,EAAE,cAAc,GACvB,OAAO,CAAC;IAAE,GAAG,EAAE,IAAI,CAAC;QAAE,QAAQ,EAAE,SAAS,CAAA;KAAE,CAAC,CAAC;IAAC,YAAY,EAAE,YAAY,GAAG,IAAI,CAAA;CAAE,CAAC,CAkdpF"}
1
+ {"version":3,"file":"httpTransport.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/transports/http/httpTransport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAG5B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAK/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAMlF,OAAO,EAAwB,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAElG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AA8IzE;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,aAAa,CAAC,SAAS,SAAS,MAAM,GAAG,gBAAgB,EAC7E,aAAa,EAAE,MAAM,OAAO,CAAC,SAAS,CAAC,EACvC,aAAa,EAAE,cAAc,EAC7B,QAAQ,EAAE,cAAc,GACvB,OAAO,CAAC;IAAE,GAAG,EAAE,IAAI,CAAC;QAAE,QAAQ,EAAE,SAAS,CAAA;KAAE,CAAC,CAAC;IAAC,YAAY,EAAE,YAAY,GAAG,IAAI,CAAA;CAAE,CAAC,CAkfpF"}
@@ -429,10 +429,35 @@ export async function createHttpApp(serverFactory, parentContext, manifest) {
429
429
  });
430
430
  return c.json({ error: 'Session not found or expired' }, 404);
431
431
  }
432
- // Defer session minting for stateful mode: only assign a session ID to
433
- // requests that already carry one (returning clients) or after the SDK
434
- // processes the request (new initialize handshakes). This prevents
435
- // allocating sessions for requests that will fail protocol validation.
432
+ // MCP Spec 2025-06-18: stateful sessions require Mcp-Session-Id on all
433
+ // non-initialize requests. Without this gate, the SDK processes the RPC
434
+ // on a fresh per-request McpServer (no protocol state to reject against)
435
+ // and the session store mints an uninitialized session on response.ok.
436
+ if (sessionStore && !providedSessionId) {
437
+ let isInitialize = false;
438
+ if (c.req.method === 'POST') {
439
+ try {
440
+ const rawBody = await c.req.json();
441
+ const messages = Array.isArray(rawBody) ? rawBody : [rawBody];
442
+ isInitialize = messages.some((msg) => typeof msg === 'object' &&
443
+ msg !== null &&
444
+ 'method' in msg &&
445
+ msg.method === 'initialize');
446
+ }
447
+ catch {
448
+ // Malformed body — let the SDK surface the parse error downstream
449
+ }
450
+ }
451
+ if (!isInitialize) {
452
+ logger.warning('Rejected non-initialize request without session in stateful mode', {
453
+ ...transportContext,
454
+ method: c.req.method,
455
+ });
456
+ return c.json({
457
+ error: 'Bad Request: Mcp-Session-Id header is required. Send an initialize request first.',
458
+ }, 400);
459
+ }
460
+ }
436
461
  const sessionId = providedSessionId ?? generateSecureSessionId();
437
462
  const transport = new McpSessionTransport(sessionId);
438
463
  trackPerRequestInstance(transport, 'transport');
@@ -1 +1 @@
1
- {"version":3,"file":"httpTransport.js","sourceRoot":"","sources":["../../../../src/mcp-server/transports/http/httpTransport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAEpD,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,MAAM,iDAAiD,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kDAAkD,CAAC;AAEpF,OAAO,EAAE,wBAAwB,EAAE,MAAM,oDAAoD,CAAC;AAC9F,OAAO,EAAE,gCAAgC,EAAE,MAAM,2DAA2D,CAAC;AAC7G,OAAO,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACnF,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,EAAE,uBAAuB,EAAE,MAAM,gDAAgD,CAAC;AACzF,OAAO,EAAwB,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAClG,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEpD,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAEpF;;GAEG;AACH,MAAM,mBAAoB,SAAQ,uBAAuB;IAChD,SAAS,CAAS;IAEzB,YAAY,SAAiB;QAC3B,KAAK,EAAE,CAAC;QACR,IAAI,CAAC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AE,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;gBAC5E,MAAM,CAAC,OAAO,CAAC,uCAAuC,EAAE;oBACtD,GAAG,gBAAgB;oBACnB,SAAS;oBACT,KAAK,EAAE,QAAQ,YAAY,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;iBACvE,CAAC,CAAC;YACL,CAAC,CACF,CAAC;YACF,MAAM,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;QAC5D,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,IAAI,CAAC,kCAAkC,EAAE,gBAAgB,CAAC,CAAC;IAClE,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,CAAC;AAC/B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyanheads/mcp-ts-core",
3
- "version": "0.9.9",
3
+ "version": "0.9.10",
4
4
  "mcpName": "io.github.cyanheads/mcp-ts-core",
5
5
  "description": "Agent-native TypeScript framework for building MCP servers. Declarative definitions with auth, multi-backend storage, OpenTelemetry, and first-class support for Bun/Node/Cloudflare Workers.",
6
6
  "main": "dist/core/index.js",
@@ -168,9 +168,9 @@
168
168
  },
169
169
  "devDependencies": {
170
170
  "@biomejs/biome": "2.4.15",
171
- "@cloudflare/vitest-pool-workers": "^0.16.9",
172
- "@cloudflare/workers-types": "^4.20260524.1",
173
- "@duckdb/node-api": "^1.5.3-r.1",
171
+ "@cloudflare/vitest-pool-workers": "^0.16.10",
172
+ "@cloudflare/workers-types": "^4.20260527.1",
173
+ "@duckdb/node-api": "^1.5.3-r.2",
174
174
  "@hono/otel": "^1.1.2",
175
175
  "@opentelemetry/exporter-metrics-otlp-http": "^0.218.0",
176
176
  "@opentelemetry/exporter-trace-otlp-http": "^0.218.0",
@@ -181,7 +181,7 @@
181
181
  "@opentelemetry/sdk-node": "^0.218.0",
182
182
  "@opentelemetry/sdk-trace-node": "^2.7.1",
183
183
  "@opentelemetry/semantic-conventions": "^1.41.1",
184
- "@supabase/supabase-js": "^2.106.1",
184
+ "@supabase/supabase-js": "^2.106.2",
185
185
  "@types/bun": "^1.3.14",
186
186
  "@types/js-yaml": "^4.0.9",
187
187
  "@types/node": "^25.9.1",
@@ -207,7 +207,7 @@
207
207
  "partial-json": "^0.1.7",
208
208
  "pdf-lib": "^1.17.1",
209
209
  "pino-pretty": "^13.1.3",
210
- "repomix": "^1.14.0",
210
+ "repomix": "^1.14.1",
211
211
  "sanitize-html": "^2.17.4",
212
212
  "tsc-alias": "^1.8.17",
213
213
  "typedoc": "^0.28.19",
@@ -272,7 +272,7 @@
272
272
  "@modelcontextprotocol/sdk": "^1.29.0",
273
273
  "@opentelemetry/api": "^1.9.1",
274
274
  "dotenv": "^17.4.2",
275
- "hono": "^4.12.22",
275
+ "hono": "^4.12.23",
276
276
  "jose": "^6.2.3",
277
277
  "pino": "^10.3.1",
278
278
  "zod": "^4.4.3"
@@ -293,7 +293,7 @@
293
293
  "chrono-node": "^2.9.0",
294
294
  "defuddle": "^0.18.1",
295
295
  "diff": "latest",
296
- "fast-check": "^4.8.0",
296
+ "fast-check": "latest",
297
297
  "fast-xml-parser": "^5.8.0",
298
298
  "js-yaml": "^4.1.1",
299
299
  "linkedom": "^0.18.12",
@@ -4,7 +4,7 @@ description: >
4
4
  Design the tool surface, resources, and service layer for a new MCP server. Use when starting a new server, planning a major feature expansion, or when the user describes a domain/API they want to expose via MCP. Produces a design doc at docs/design.md that drives implementation.
5
5
  metadata:
6
6
  author: cyanheads
7
- version: "2.11"
7
+ version: "2.12"
8
8
  audience: external
9
9
  type: workflow
10
10
  ---
@@ -29,6 +29,23 @@ Gather before designing. Ask the user if not obvious from context:
29
29
 
30
30
  If the domain has a public API, read its docs before designing. For internal-only servers, skip API research and go straight to user goals. Don't design from vibes either way.
31
31
 
32
+ ### Server scope and audience
33
+
34
+ Before committing to a server boundary, answer: **what workflow does this server serve, and who is the audience?**
35
+
36
+ The unit of a server is a *user workflow*, not an API. A single rich API can earn its own server when the audience is large and the API surface supports a full workflow (PubMed for literature research, SEC EDGAR for financial analysis, Shodan for internet-wide device intelligence). Multiple APIs should collapse into one server when they serve the same workflow from different angles — a "threat intelligence" server that aggregates VirusTotal, AbuseIPDB, and GreyNoise is more useful than three separate servers because the user's goal is "assess this indicator," not "query VirusTotal."
37
+
38
+ **Don't default to one-API-one-server.** That's the right call when the API is deep enough and the audience is large enough, but it's not the starting point. The starting point is the workflow:
39
+
40
+ | Signal | Server boundary |
41
+ |:-------|:----------------|
42
+ | Single API with rich surface, large audience | Standalone server named for the platform (`pubmed-mcp-server`, `secedgar-mcp-server`) |
43
+ | Multiple APIs serving the same workflow | One server named for the workflow (`threat-intel-mcp-server`), APIs are internal sources |
44
+ | Domain with distinct sub-audiences | Consider splitting — a pentester and a SOC analyst have different workflows even in the same domain |
45
+ | Pure computation, no external deps | Standalone server named for the capability (`calculator-mcp-server`, `redteam-mcp-server`) |
46
+
47
+ When multiple APIs collapse into one server, the tool surface is organized around what the user is doing, not which API gets called. The agent says "investigate this domain" and the server routes to the best available source internally. Individual APIs become service-layer implementation details, not tool-surface identities.
48
+
32
49
  ## Server Naming
33
50
 
34
51
  The server name (repo name, npm package, public identity) must communicate what it does at a glance. The test: can a human or agent scanning a server list tell what this server does from the name alone?
@@ -141,6 +158,56 @@ const findStudies = tool('clinicaltrials_find_studies', {
141
158
 
142
159
  > **Tip — mode consolidation.** When a tool has several related operations on the same noun, you can consolidate them under one tool with a `mode`/`operation` enum. This affects both naming (noun-led, e.g., `github_pull_request`) and handler design (dispatch by mode). Use when it tightens the surface; skip when ops diverge enough to warrant separate tools.
143
160
 
161
+ #### Multi-source tools and fallback chains
162
+
163
+ **Applies when:** a server aggregates multiple data sources for the same workflow, and the "best" source varies by input type, availability, or coverage. Skip for single-API servers.
164
+
165
+ When a tool's goal can be served by multiple sources, design it as a **multi-source tool** — the agent calls one tool, the handler routes to the best source (or fans out to several) internally. This is the difference between a "PubMed wrapper" and a "literature research server": `pubmed_search_articles` tries PubMed first, falls back to EuropePMC for broader coverage, then Unpaywall for open access. The agent doesn't choose which API to hit — the server makes that decision based on what works.
166
+
167
+ Two patterns:
168
+
169
+ **Source fallback chains** — try sources in priority order, fall through on failure or empty results. Best when sources cover the same data with different depth or availability. The output should indicate which source provided the data so the agent (and human) can assess provenance.
170
+
171
+ ```ts
172
+ // Handler pseudocode — not a real implementation
173
+ async handler(input, ctx) {
174
+ // Primary: PubMed E-utilities (authoritative, best metadata)
175
+ const result = await pubmedService.search(input.query);
176
+ if (result.items.length > 0) return { ...result, source: 'pubmed' };
177
+
178
+ // Fallback: EuropePMC (broader coverage, includes preprints)
179
+ const epmcResult = await epmcService.search(input.query);
180
+ if (epmcResult.items.length > 0) return { ...epmcResult, source: 'europepmc' };
181
+
182
+ return { items: [], source: 'none', message: 'No results from any source.' };
183
+ }
184
+ ```
185
+
186
+ **Multi-source fan-out** — query multiple sources in parallel, merge results. Best when sources provide complementary data about the same entity. Use `Promise.allSettled` so one failing source doesn't tank the whole call.
187
+
188
+ ```ts
189
+ // Handler pseudocode — indicator enrichment across threat intel sources
190
+ async handler(input, ctx) {
191
+ const [vt, abuse, greynoise] = await Promise.allSettled([
192
+ vtService.lookup(input.indicator),
193
+ abuseIpService.check(input.indicator),
194
+ greynoiseService.query(input.indicator),
195
+ ]);
196
+ return {
197
+ indicator: input.indicator,
198
+ sources: {
199
+ virustotal: vt.status === 'fulfilled' ? vt.value : { error: vt.reason.message },
200
+ abuseipdb: abuse.status === 'fulfilled' ? abuse.value : { error: abuse.reason.message },
201
+ greynoise: greynoise.status === 'fulfilled' ? greynoise.value : { error: greynoise.reason.message },
202
+ },
203
+ // Server synthesizes a verdict from available data — the agent gets a conclusion, not raw API dumps
204
+ assessment: synthesizeVerdict(vt, abuse, greynoise),
205
+ };
206
+ }
207
+ ```
208
+
209
+ In both patterns, the tool surface is organized around what the user is doing. Sources are service-layer details — the agent sees `threat_enrich_indicator`, not `virustotal_lookup` + `abuseipdb_check` + `greynoise_query`. Mode-based dispatch by input type (e.g., `indicator_type: 'ip' | 'domain' | 'hash'`) naturally routes to different source chains per mode, since different sources cover different indicator types.
210
+
144
211
  There is no fixed ceiling on tool count — tools need to earn their keep, but don't artificially limit the surface. If the domain genuinely has 20 distinct workflows, expose 20 tools.
145
212
 
146
213
  #### Cut the surface
@@ -416,7 +483,7 @@ Skip for purely data/action-oriented servers.
416
483
 
417
484
  ### 7. Plan Services and Config
418
485
 
419
- **Services** — one per external dependency. Init/accessor pattern. Skip if all tools are thin wrappers with no shared state.
486
+ **Services** — one per external dependency (or per source, for multi-source servers). Init/accessor pattern. Skip if all tools are thin wrappers with no shared state. For multi-source servers, each upstream API gets its own service with its own auth, rate limits, and retry config — tools compose across services internally, agents never see the service boundary.
420
487
 
421
488
  **Server-as-service.** When the server IS the source of truth (knowledge graph, in-memory task tracker, local scratchpad, embedded inference wrapper), the resilience table below doesn't apply — there's no upstream to retry. The design questions shift to state management: what's tenant-scoped vs. global, what TTLs apply, what survives a restart, what the storage backend is. Plan persistence via `ctx.state` for tenant-scoped KV (auto-namespaced by `tenantId`), or use a `StorageService` provider directly when data must cross tenants. Service init still happens in `setup()`, accessed via `getMyService()` at request time. Calls within the server are local and synchronous-ish — the API-efficiency table below also doesn't apply.
422
489
 
@@ -539,6 +606,8 @@ Execute the plan using the scaffolding skills:
539
606
 
540
607
  Items without an `If …:` prefix apply to every design. Conditional items only apply when the trigger fires — otherwise skip them.
541
608
 
609
+ - [ ] Server scope decided — workflow identified, audience sized, boundary drawn (standalone single-API vs. multi-source aggregation vs. internal-only)
610
+ - [ ] **If multi-source:** tool surface organized around user workflows, not API identity. Sources are service-layer details.
542
611
  - [ ] External APIs/dependencies researched and verified (docs fetched, SDKs identified)
543
612
  - [ ] **If wrapping an external API:** live API probed (at minimum: one list/search, one single-item GET, one error case)
544
613
  - [ ] User goals enumerated first (3–10 outcomes agents will accomplish, scaled to domain size), then domain operations mapped as raw material
@@ -567,5 +636,6 @@ Items without an `If …:` prefix apply to every design. Conditional items only
567
636
  - [ ] **If the server is itself the source of truth (no external API):** state lifecycle planned — tenant-scoped vs. global, TTLs, what survives restart, storage backend chosen
568
637
  - [ ] **If the server has external deps or shared state:** service layer planned (or explicitly skipped with reasoning)
569
638
  - [ ] **If services wrap external APIs:** resilience planned (retry boundary, backoff, parse classification)
639
+ - [ ] **If multi-source server:** each source has its own service with independent auth/retry/rate-limit config. Fallback chains or fan-out strategy documented per tool. Output includes source provenance.
570
640
  - [ ] **If exposing a SQL/analytical workspace over tabular data is in scope:** DataCanvas considered (`api-canvas` skill) as one option before designing custom analytical state — register / query / export tools accepting an optional `canvas_id`, with `ctx.core.canvas?` reads
571
641
  - [ ] **If the server needs runtime config:** env vars identified in `server-config.ts`
@@ -180,6 +180,7 @@ Dependency bumps:
180
180
  - Not a CHANGELOG copy — terse, scannable
181
181
  - No marketing adjectives
182
182
  - Length is earned — two-line tags are fine for small patches
183
+ - **Issue backlinks:** when changes address GitHub issues, include `(#N)` references in the relevant bullets — same as the changelog entry. The backlinks render as clickable links in the GitHub Release body.
183
184
 
184
185
  ### 9. Verify end state
185
186
 
@@ -78,7 +78,8 @@ Scan specifically for:
78
78
  | Config changes | New env vars, renamed keys, changed defaults |
79
79
  | Linter rules | New definition-lint rules that may now flag existing tools/resources |
80
80
  | New or materially-changed skills | Note new skills or workflow changes (renamed steps, new checklist items) worth surfacing at end-of-run. Don't auto-invoke — some skills (e.g. `security-pass`) are user-triggered. The per-version changelog entries (e.g. 0.6.14 calling out `skills/security-pass/ (v1.0)`) name what changed. |
81
- | New template-scaffolded files | Compare `templates/` in the package against the project root. Files that `init` would create for a new project but don't exist in this project are adoption candidates — create them with project-specific values (version, name, description, env vars from `server.json`). Examples: `manifest.json`, `.mcpbignore`. Skip files the project has intentionally opted out of (documented in CLAUDE.md or a code comment). |
81
+ | New template-scaffolded files | Compare `templates/` in the package against the project root. Files that `init` would create for a new project but don't exist in this project are adoption candidates — create them with project-specific values (version, name, description, env vars from `server.json`). Examples: `manifest.json`, `.mcpbignore`, `.codex-plugin/`, `.claude-plugin/`. Skip files the project has intentionally opted out of (documented in CLAUDE.md or a code comment). |
82
+ | Changelog `agent-notes` | Read `agent-notes` frontmatter from each new per-version changelog file — these carry release-specific adoption instructions for downstream consumers (new files to create, fields to populate, one-time migration steps). Apply them alongside other adoption work in Step 6. |
82
83
 
83
84
  Cross-reference each finding against the server's code. Collect adoption opportunities for Step 6.
84
85
 
@@ -165,7 +165,24 @@ Never hand-edit `CHANGELOG.md` when using this pattern — it's a build artifact
165
165
 
166
166
  **Monolithic** — maintain `CHANGELOG.md` directly in [Keep a Changelog](https://keepachangelog.com/) format. To collapse from the template default: delete the `changelog/` directory, remove `changelog:build` and `changelog:check` from `package.json` scripts (and from `devcheck.config.json` if referenced), and drop `"changelog/"` from the `files` array. The `release` skill's directory-specific steps then don't apply — just edit `CHANGELOG.md` and bump version at release time.
167
167
 
168
- ### 10. MCPB Bundling Artifacts
168
+ ### 10. Plugin Metadata (Codex / Claude Code)
169
+
170
+ If `.codex-plugin/plugin.json` exists, verify it's populated and in sync with `package.json` and `server.json`:
171
+
172
+ - `name` matches `package.json` `name`
173
+ - `version` matches `package.json` `version`
174
+ - `description` matches `package.json` `description`
175
+ - `repository` matches `package.json` `repository.url`
176
+ - `license` matches `package.json` `license`
177
+ - `interface.displayName` = `package.json` `name`
178
+ - `interface.shortDescription` matches `package.json` `description`
179
+ - `interface.category` is set to a meaningful category
180
+
181
+ If `.codex-plugin/mcp.json` exists, verify the server name key matches `package.json` `name` and env vars include any required API keys from the server config schema.
182
+
183
+ If `.claude-plugin/plugin.json` exists, apply the same checks: `name`, `version`, `description`, `repository`, `license` from `package.json`. Verify the inline `mcpServers` entry key matches `package.json` `name` and env vars include any required API keys.
184
+
185
+ ### 11. MCPB Bundling Artifacts
169
186
 
170
187
  If the project ships as an `.mcpb` bundle for Claude Desktop (check for `manifest.json` at the project root), verify the full artifact set is present and consistent. If the project doesn't ship `.mcpb` bundles, skip this step.
171
188
 
@@ -196,11 +213,11 @@ If the project ships as an `.mcpb` bundle for Claude Desktop (check for `manifes
196
213
  - See `references/readme.md` for badge format and config generation commands
197
214
  - See the **Bundling** section of `templates/CLAUDE.md` for `base64` / `encodeURIComponent` generation
198
215
 
199
- ### 11. `LICENSE`
216
+ ### 12. `LICENSE`
200
217
 
201
218
  Confirm a license file exists. If not, ask the user which license to use (default: Apache-2.0, matching the scaffolded `package.json`). Create the file.
202
219
 
203
- ### 12. `Dockerfile`
220
+ ### 13. `Dockerfile`
204
221
 
205
222
  If a `Dockerfile` exists, verify the OCI labels and runtime config match the actual server:
206
223
 
@@ -211,7 +228,7 @@ If a `Dockerfile` exists, verify the OCI labels and runtime config match the act
211
228
 
212
229
  If no `Dockerfile` exists and the server is deployed via HTTP transport, consider scaffolding one — the template is available via `npx @cyanheads/mcp-ts-core init`.
213
230
 
214
- ### 13. `docs/tree.md`
231
+ ### 14. `docs/tree.md`
215
232
 
216
233
  Regenerate the directory structure:
217
234
 
@@ -221,7 +238,7 @@ bun run tree
221
238
 
222
239
  Review the output for anything unexpected (leftover files, missing directories).
223
240
 
224
- ### 14. Final Verification
241
+ ### 15. Final Verification
225
242
 
226
243
  Run the full check suite one last time:
227
244
 
@@ -243,6 +260,9 @@ Both must pass clean.
243
260
  - [ ] GitHub repo description matches `package.json` description; topics ↔ keywords in sync
244
261
  - [ ] `bunfig.toml` present
245
262
  - [ ] Changelog current — either monolithic `CHANGELOG.md` (hand-edited, Keep a Changelog) or directory-based (`changelog/<minor>.x/<version>.md` + rollup regenerated and in sync)
263
+ - [ ] `.codex-plugin/plugin.json` populated and in sync with `package.json` (if present)
264
+ - [ ] `.codex-plugin/mcp.json` server name and env vars current (if present)
265
+ - [ ] `.claude-plugin/plugin.json` populated and in sync with `package.json` (if present)
246
266
  - [ ] MCPB artifacts consistent (if `manifest.json` present) — version synced, env vars match `server.json`, `bundle` + `lint:packaging` scripts exist, README install badges present
247
267
  - [ ] `LICENSE` file present
248
268
  - [ ] `Dockerfile` OCI labels and runtime config accurate (if present)
@@ -4,7 +4,7 @@ description: >
4
4
  Ship a release end-to-end across every registry the project targets (npm, MCP Registry, GitHub Releases for `.mcpb` bundles, GHCR). Runs the final verification gate, pushes commits and tags, then publishes to each applicable destination. Assumes git wrapup (version bumps, changelog, commit, annotated tag) is already complete — this skill is the post-wrapup publish workflow. Retries transient network failures on publish steps; halts with a partial-state report when retries are exhausted or the failure is terminal.
5
5
  metadata:
6
6
  author: cyanheads
7
- version: "2.6"
7
+ version: "2.7"
8
8
  audience: external
9
9
  type: workflow
10
10
  ---
@@ -131,11 +131,12 @@ Halt on any publisher error other than "cannot publish duplicate version".
131
131
 
132
132
  Only if `manifest.json` exists at the repo root (otherwise skip).
133
133
 
134
- Build the bundle, then create a Release on the existing annotated tag and attach the `.mcpb`. The Release sits on top of the tag from wrapup — `--verify-tag` enforces that the tag already exists on the remote and prevents `gh` from creating a lightweight tag that would shadow the annotated one. `--notes-from-tag` pulls release notes directly from the annotated tag message (no duplication). Note: GitHub prepends `v<VERSION>:` to the release title, so the tag annotation subject must omit the version number to avoid stutter.
134
+ Build the bundle, then create a Release on the existing annotated tag and attach the `.mcpb`. The Release sits on top of the tag from wrapup — `--verify-tag` enforces that the tag already exists on the remote and prevents `gh` from creating a lightweight tag that would shadow the annotated one. `--notes-from-tag` pulls the tag annotation body as release notes. `--title` sets the release title from the tag subject — `--notes-from-tag` alone does NOT set the title (it defaults to the bare tag name, e.g. "v0.1.8" with no theme). The tag subject already omits the version number per the git-wrapup skill, so prepending `v<VERSION>:` produces the correct display title.
135
135
 
136
136
  ```bash
137
137
  bun run bundle # produces dist/<name>.mcpb (stable filename, no version)
138
- gh release create v<VERSION> --verify-tag --notes-from-tag dist/*.mcpb
138
+ SUBJECT=$(git tag -l --format='%(contents:subject)' v<VERSION>)
139
+ gh release create v<VERSION> --verify-tag --notes-from-tag --title "v<VERSION>: $SUBJECT" dist/*.mcpb
139
140
  ```
140
141
 
141
142
  The stable filename matters: it lets the README "Install in Claude Desktop" badge point at `releases/latest/download/<name>.mcpb` and always resolve to the most recent release. The `bundle` script in the templates outputs `dist/{{PACKAGE_NAME}}.mcpb` for this reason.
@@ -205,7 +206,7 @@ If any check fails, halt and report which destination is unreachable. A successf
205
206
  - [ ] Tags pushed to origin
206
207
  - [ ] `bun publish --access public` succeeds
207
208
  - [ ] `bun run publish-mcp` succeeds (if `server.json` present)
208
- - [ ] `bun run bundle` + `gh release create --verify-tag --notes-from-tag` succeeds (if `manifest.json` present)
209
+ - [ ] `bun run bundle` + `gh release create --verify-tag --notes-from-tag --title` succeeds (if `manifest.json` present)
209
210
  - [ ] Docker buildx multi-arch push succeeds (if `Dockerfile` present)
210
211
  - [ ] All published artifacts verified reachable (npm, MCP Registry, GH Release asset, GHCR manifest)
211
212
  - [ ] On re-invocation: idempotent-success signals recognized for already-published destinations
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "{{PACKAGE_NAME}}",
3
+ "version": "0.1.0",
4
+ "description": "",
5
+ "author": {
6
+ "name": ""
7
+ },
8
+ "homepage": "",
9
+ "repository": "",
10
+ "license": "Apache-2.0",
11
+ "mcpServers": {
12
+ "{{PACKAGE_NAME}}": {
13
+ "command": "npx",
14
+ "args": ["-y", "{{PACKAGE_NAME}}"],
15
+ "env": {
16
+ "MCP_TRANSPORT_TYPE": "stdio"
17
+ }
18
+ }
19
+ }
20
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "{{PACKAGE_NAME}}": {
3
+ "command": "npx",
4
+ "args": ["-y", "{{PACKAGE_NAME}}"],
5
+ "env": {
6
+ "MCP_TRANSPORT_TYPE": "stdio"
7
+ }
8
+ }
9
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "{{PACKAGE_NAME}}",
3
+ "version": "0.1.0",
4
+ "description": "",
5
+ "author": {
6
+ "name": "",
7
+ "email": "",
8
+ "url": ""
9
+ },
10
+ "homepage": "",
11
+ "repository": "",
12
+ "license": "Apache-2.0",
13
+ "keywords": ["mcp", "mcp-server", "model-context-protocol"],
14
+ "mcpServers": "./.codex-plugin/mcp.json",
15
+ "interface": {
16
+ "displayName": "{{PACKAGE_NAME}}",
17
+ "shortDescription": "",
18
+ "longDescription": "",
19
+ "developerName": "",
20
+ "category": "",
21
+ "capabilities": ["Read"],
22
+ "websiteURL": "",
23
+ "defaultPrompt": []
24
+ }
25
+ }
@@ -369,6 +369,8 @@ security: false # optional — true flags security fi
369
369
 
370
370
  `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`.
371
371
 
372
+ `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.
373
+
372
374
  **Section order** (Keep a Changelog): Added, Changed, Deprecated, Removed, Fixed, Security. Include only sections with entries — don't ship empty headers.
373
375
 
374
376
  **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.
@@ -401,4 +403,7 @@ import { getMyService } from '@/services/my-domain/my-service.js';
401
403
  - [ ] If wrapping external API: tests include at least one sparse payload case with omitted upstream fields
402
404
  - [ ] Registered in `createApp()` arrays (directly or via barrel exports)
403
405
  - [ ] Tests use `createMockContext()` from `@cyanheads/mcp-ts-core/testing`
406
+ - [ ] `.codex-plugin/plugin.json` populated — `name`, `version`, `description`, `repository`, `license` from `package.json`; `interface.displayName` = package name; `interface.shortDescription` from `package.json` description
407
+ - [ ] `.codex-plugin/mcp.json` updated — server name key matches `package.json` name; env vars added for any required API keys
408
+ - [ ] `.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
404
409
  - [ ] `npm run devcheck` passes
@@ -50,7 +50,7 @@ Tailor suggestions to what's actually missing or stale — don't recite the full
50
50
  - **Use `ctx.state`** for tenant-scoped storage. Never access persistence directly.
51
51
  - **Check `ctx.elicit` / `ctx.sample`** for presence before calling.
52
52
  - **Secrets in env vars only** — never hardcoded.
53
- - **Close the loop on issues.** When implementing work tracked by a GitHub issue, comment on the issue with what landed before moving on. The comment is for future readers — state the concrete changes, not the conversation that produced them.
53
+ - **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.
54
54
 
55
55
  ---
56
56
 
@@ -370,6 +370,8 @@ security: false # optional — true flags security fi
370
370
 
371
371
  `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`.
372
372
 
373
+ `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.
374
+
373
375
  **Section order** (Keep a Changelog): Added, Changed, Deprecated, Removed, Fixed, Security. Include only sections with entries — don't ship empty headers.
374
376
 
375
377
  **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.
@@ -402,4 +404,7 @@ import { getMyService } from '@/services/my-domain/my-service.js';
402
404
  - [ ] If wrapping external API: tests include at least one sparse payload case with omitted upstream fields
403
405
  - [ ] Registered in `createApp()` arrays (directly or via barrel exports)
404
406
  - [ ] Tests use `createMockContext()` from `@cyanheads/mcp-ts-core/testing`
407
+ - [ ] `.codex-plugin/plugin.json` populated — `name`, `version`, `description`, `repository`, `license` from `package.json`; `interface.displayName` = package name; `interface.shortDescription` from `package.json` description
408
+ - [ ] `.codex-plugin/mcp.json` updated — server name key matches `package.json` name; env vars added for any required API keys
409
+ - [ ] `.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
405
410
  - [ ] `npm run devcheck` passes
@@ -19,6 +19,14 @@ breaking: false
19
19
  # `## Security` section below. Flagged as `Security` in the rollup so
20
20
  # users can triage upgrade urgency at a glance.
21
21
  security: false
22
+
23
+ # Optional free-form notes for maintenance agents processing this release.
24
+ # Not rendered in CHANGELOG — consumed by agents running `maintenance` on
25
+ # downstream servers. Use for adoption instructions that don't fit the
26
+ # human-facing sections: new files to create, fields to populate, one-time
27
+ # migration steps. Omit the field entirely when there's nothing to say.
28
+ # agent-notes: |
29
+ # <instructions for downstream maintenance agents>
22
30
  ---
23
31
 
24
32
  # <version> — YYYY-MM-DD