@cyanheads/mcp-ts-core 0.5.4 → 0.6.1
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 +39 -1
- package/README.md +1 -1
- package/changelog/0.1.x/0.1.0.md +78 -0
- package/changelog/0.1.x/0.1.1.md +28 -0
- package/changelog/0.1.x/0.1.10.md +32 -0
- package/changelog/0.1.x/0.1.11.md +51 -0
- package/changelog/0.1.x/0.1.12.md +21 -0
- package/changelog/0.1.x/0.1.13.md +16 -0
- package/changelog/0.1.x/0.1.14.md +20 -0
- package/changelog/0.1.x/0.1.15.md +24 -0
- package/changelog/0.1.x/0.1.16.md +17 -0
- package/changelog/0.1.x/0.1.17.md +14 -0
- package/changelog/0.1.x/0.1.18.md +18 -0
- package/changelog/0.1.x/0.1.19.md +19 -0
- package/changelog/0.1.x/0.1.2.md +25 -0
- package/changelog/0.1.x/0.1.20.md +21 -0
- package/changelog/0.1.x/0.1.21.md +17 -0
- package/changelog/0.1.x/0.1.22.md +28 -0
- package/changelog/0.1.x/0.1.23.md +23 -0
- package/changelog/0.1.x/0.1.24.md +17 -0
- package/changelog/0.1.x/0.1.25.md +16 -0
- package/changelog/0.1.x/0.1.26.md +22 -0
- package/changelog/0.1.x/0.1.27.md +30 -0
- package/changelog/0.1.x/0.1.28.md +16 -0
- package/changelog/0.1.x/0.1.29.md +19 -0
- package/changelog/0.1.x/0.1.3.md +22 -0
- package/changelog/0.1.x/0.1.4.md +17 -0
- package/changelog/0.1.x/0.1.5.md +25 -0
- package/changelog/0.1.x/0.1.6.md +26 -0
- package/changelog/0.1.x/0.1.7.md +29 -0
- package/changelog/0.1.x/0.1.8.md +33 -0
- package/changelog/0.1.x/0.1.9.md +19 -0
- package/changelog/0.2.x/0.2.0.md +32 -0
- package/changelog/0.2.x/0.2.1.md +12 -0
- package/changelog/0.2.x/0.2.10.md +38 -0
- package/changelog/0.2.x/0.2.11.md +29 -0
- package/changelog/0.2.x/0.2.12.md +31 -0
- package/changelog/0.2.x/0.2.2.md +19 -0
- package/changelog/0.2.x/0.2.3.md +15 -0
- package/changelog/0.2.x/0.2.4.md +24 -0
- package/changelog/0.2.x/0.2.5.md +27 -0
- package/changelog/0.2.x/0.2.6.md +23 -0
- package/changelog/0.2.x/0.2.7.md +23 -0
- package/changelog/0.2.x/0.2.8.md +12 -0
- package/changelog/0.2.x/0.2.9.md +25 -0
- package/changelog/0.3.x/0.3.0.md +45 -0
- package/changelog/0.3.x/0.3.1.md +16 -0
- package/changelog/0.3.x/0.3.2.md +24 -0
- package/changelog/0.3.x/0.3.3.md +31 -0
- package/changelog/0.3.x/0.3.4.md +31 -0
- package/changelog/0.3.x/0.3.5.md +32 -0
- package/changelog/0.3.x/0.3.6.md +48 -0
- package/changelog/0.3.x/0.3.7.md +23 -0
- package/changelog/0.3.x/0.3.8.md +21 -0
- package/changelog/0.4.x/0.4.0.md +38 -0
- package/changelog/0.4.x/0.4.1.md +31 -0
- package/changelog/0.5.x/0.5.0.md +29 -0
- package/changelog/0.5.x/0.5.1.md +18 -0
- package/changelog/0.5.x/0.5.2.md +38 -0
- package/changelog/0.5.x/0.5.3.md +26 -0
- package/changelog/0.5.x/0.5.4.md +29 -0
- package/changelog/0.6.x/0.6.0.md +39 -0
- package/changelog/0.6.x/0.6.1.md +22 -0
- package/changelog/unreleased.md +40 -0
- package/dist/cli/init.js +1 -0
- package/dist/cli/init.js.map +1 -1
- package/dist/core/app.d.ts +13 -3
- package/dist/core/app.d.ts.map +1 -1
- package/dist/core/app.js +20 -13
- package/dist/core/app.js.map +1 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/serverManifest.d.ts +259 -0
- package/dist/core/serverManifest.d.ts.map +1 -0
- package/dist/core/serverManifest.js +334 -0
- package/dist/core/serverManifest.js.map +1 -0
- package/dist/core/worker.d.ts.map +1 -1
- package/dist/core/worker.js +2 -2
- package/dist/core/worker.js.map +1 -1
- package/dist/linter/rules/landing-rules.d.ts +15 -0
- package/dist/linter/rules/landing-rules.d.ts.map +1 -0
- package/dist/linter/rules/landing-rules.js +145 -0
- package/dist/linter/rules/landing-rules.js.map +1 -0
- package/dist/linter/types.d.ts +5 -2
- package/dist/linter/types.d.ts.map +1 -1
- package/dist/linter/validate.d.ts.map +1 -1
- package/dist/linter/validate.js +5 -0
- package/dist/linter/validate.js.map +1 -1
- package/dist/mcp-server/transports/http/httpTransport.d.ts +4 -3
- package/dist/mcp-server/transports/http/httpTransport.d.ts.map +1 -1
- package/dist/mcp-server/transports/http/httpTransport.js +47 -26
- package/dist/mcp-server/transports/http/httpTransport.js.map +1 -1
- package/dist/mcp-server/transports/http/httpTypes.d.ts +0 -12
- package/dist/mcp-server/transports/http/httpTypes.d.ts.map +1 -1
- package/dist/mcp-server/transports/http/landing-page.d.ts +48 -0
- package/dist/mcp-server/transports/http/landing-page.d.ts.map +1 -0
- package/dist/mcp-server/transports/http/landing-page.js +1529 -0
- package/dist/mcp-server/transports/http/landing-page.js.map +1 -0
- package/dist/mcp-server/transports/http/serverCard.d.ts +67 -0
- package/dist/mcp-server/transports/http/serverCard.d.ts.map +1 -0
- package/dist/mcp-server/transports/http/serverCard.js +91 -0
- package/dist/mcp-server/transports/http/serverCard.js.map +1 -0
- package/dist/mcp-server/transports/manager.d.ts +3 -3
- package/dist/mcp-server/transports/manager.d.ts.map +1 -1
- package/dist/mcp-server/transports/manager.js +4 -4
- package/dist/mcp-server/transports/manager.js.map +1 -1
- package/dist/utils/formatting/html.d.ts +76 -0
- package/dist/utils/formatting/html.d.ts.map +1 -0
- package/dist/utils/formatting/html.js +111 -0
- package/dist/utils/formatting/html.js.map +1 -0
- package/dist/utils/formatting/index.d.ts +1 -0
- package/dist/utils/formatting/index.d.ts.map +1 -1
- package/dist/utils/formatting/index.js +1 -0
- package/dist/utils/formatting/index.js.map +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +5 -1
- package/scripts/build-changelog.ts +222 -0
- package/scripts/devcheck.ts +16 -1
- package/scripts/tree.ts +3 -0
- package/skills/add-app-tool/SKILL.md +2 -4
- package/skills/add-prompt/SKILL.md +2 -4
- package/skills/add-resource/SKILL.md +2 -4
- package/skills/add-service/SKILL.md +2 -4
- package/skills/add-tool/SKILL.md +6 -5
- package/skills/api-context/SKILL.md +2 -2
- package/skills/api-services/SKILL.md +1 -1
- package/skills/api-services/references/graph.md +1 -1
- package/skills/api-utils/SKILL.md +1 -1
- package/skills/api-utils/references/parsing.md +1 -1
- package/skills/api-utils/references/security.md +1 -1
- package/skills/design-mcp-server/SKILL.md +2 -2
- package/skills/maintenance/SKILL.md +12 -11
- package/skills/polish-docs-meta/SKILL.md +24 -9
- package/skills/release/SKILL.md +21 -7
- package/skills/setup/SKILL.md +4 -8
- package/templates/AGENTS.md +23 -1
- package/templates/CLAUDE.md +23 -1
- package/templates/changelog/unreleased.md +40 -0
- package/templates/package.json +3 -0
package/CLAUDE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Agent Protocol
|
|
2
2
|
|
|
3
|
-
**Package:** `@cyanheads/mcp-ts-core` · **Version:** 0.
|
|
3
|
+
**Package:** `@cyanheads/mcp-ts-core` · **Version:** 0.6.0
|
|
4
4
|
**npm:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) · **Docker:** [ghcr.io/cyanheads/mcp-ts-core](https://ghcr.io/cyanheads/mcp-ts-core)
|
|
5
5
|
|
|
6
6
|
> **Developer note:** Never assume. Read related files and docs before making changes. Read full file content for context. Never edit a file before reading it.
|
|
@@ -518,11 +518,49 @@ Detailed method signatures, options, and examples live in skill files. Read the
|
|
|
518
518
|
| `bun run dev:http` | Development mode (HTTP) |
|
|
519
519
|
| `bun run start:stdio` | Production mode (stdio, after build) |
|
|
520
520
|
| `bun run start:http` | Production mode (HTTP, after build) |
|
|
521
|
+
| `bun run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |
|
|
522
|
+
| `bun run changelog:check` | Verify `CHANGELOG.md` is in sync with `changelog/` (used by devcheck) |
|
|
521
523
|
|
|
522
524
|
After `bun update --latest`, run the `maintenance` skill to investigate changelogs, adopt upstream changes, and sync project skills.
|
|
523
525
|
|
|
524
526
|
---
|
|
525
527
|
|
|
528
|
+
## Changelog
|
|
529
|
+
|
|
530
|
+
Directory-based, grouped by minor series using the `.x` semver-wildcard convention. Source of truth is `changelog/<major.minor>.x/<version>.md` — one standalone file per released version (e.g. `changelog/0.5.x/0.5.4.md`), shipped in the npm package so agents can read a specific version from `node_modules/@cyanheads/mcp-ts-core/changelog/<major.minor>.x/<version>.md` without parsing a monolithic file. Work-in-progress entries live at the top level in `changelog/unreleased.md` and are moved into the appropriate series directory on release.
|
|
531
|
+
|
|
532
|
+
`CHANGELOG.md` is a **navigation index**, not a copy of bodies — each entry is a clickable header + one-line summary pulled from the per-version file's frontmatter. Regenerated by `bun run changelog:build`. Devcheck runs `changelog:check` and hard-fails on drift. Never hand-edit `CHANGELOG.md` — edit the per-version file and rerun the build.
|
|
533
|
+
|
|
534
|
+
### Per-version file format
|
|
535
|
+
|
|
536
|
+
```markdown
|
|
537
|
+
---
|
|
538
|
+
summary: One-line headline, ≤250 chars, no markdown # required
|
|
539
|
+
breaking: false # optional, default false
|
|
540
|
+
---
|
|
541
|
+
|
|
542
|
+
# 0.5.4 — 2026-04-20
|
|
543
|
+
|
|
544
|
+
Optional narrative intro (1-3 sentences).
|
|
545
|
+
|
|
546
|
+
## Added
|
|
547
|
+
|
|
548
|
+
- ...
|
|
549
|
+
```
|
|
550
|
+
|
|
551
|
+
**Frontmatter fields:**
|
|
552
|
+
|
|
553
|
+
| Field | Required | Purpose |
|
|
554
|
+
|:------|:---------|:--------|
|
|
555
|
+
| `summary` | yes | Rollup index line. Max 250 chars, no markdown, single line. Write like a GitHub Release title. |
|
|
556
|
+
| `breaking` | no (default `false`) | Flags releases with breaking changes. Renders as `· ⚠️ Breaking` badge in the rollup. Agents running the `maintenance` skill read this to prioritize review. |
|
|
557
|
+
|
|
558
|
+
Summary > 250 chars or malformed `breaking` fails `changelog:check`. Missing `summary` emits a warning and renders the rollup entry as header-only.
|
|
559
|
+
|
|
560
|
+
Pre-release versions (`0.6.0-beta.1`, `0.6.0-rc.1`, etc.) accumulate as sub-headers inside `unreleased.md` during development and are consolidated into the single final-version file (`changelog/0.6.x/0.6.0.md`) when the final ships.
|
|
561
|
+
|
|
562
|
+
---
|
|
563
|
+
|
|
526
564
|
## Publishing
|
|
527
565
|
|
|
528
566
|
Run the `release` skill first — it verifies version consistency across all files, changelog completeness, skill version bumps, and runs the final check suite. It ends by presenting these irreversible publish commands:
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
<div align="center">
|
|
7
7
|
|
|
8
|
-
[](./CHANGELOG.md) [](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/docs/specification/2025-11-25/changelog.mdx) [](https://modelcontextprotocol.io/) [](./LICENSE)
|
|
9
9
|
|
|
10
10
|
[](https://www.typescriptlang.org/) [](https://bun.sh/)
|
|
11
11
|
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: Initial stable pre-release — builder API for tools/resources/prompts, unified Context, createApp lifecycle, Cloudflare Workers support, 25+ subpath exports
|
|
3
|
+
breaking: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 0.1.0 — 2026-03-14
|
|
7
|
+
|
|
8
|
+
First stable pre-release of `@cyanheads/mcp-ts-core` — a framework for building MCP servers in TypeScript. Extracted from the `mcp-ts-template` template into a standalone npm package with explicit subpath exports, builder-pattern definition APIs, unified handler context, and full-stack observability.
|
|
9
|
+
|
|
10
|
+
## Highlights
|
|
11
|
+
|
|
12
|
+
- **Package identity**: `@cyanheads/mcp-ts-core` on npm, `ghcr.io/cyanheads/mcp-ts-core` on Docker.
|
|
13
|
+
- **Builder API**: `tool()`, `resource()`, `prompt()` builders with Zod-validated `input`/`output`/`args`, inline `auth`, and `handler(input, ctx)` signatures. Replaces the legacy `logic`/`inputSchema`/`outputSchema`/`responseFormatter`/`withToolAuth` pattern.
|
|
14
|
+
- **Unified `Context`**: Single handler argument providing `ctx.log`, `ctx.state`, `ctx.elicit`, `ctx.sample`, `ctx.signal`, `ctx.progress`, and `ctx.uri`.
|
|
15
|
+
- **`createApp()` lifecycle**: Owns OTEL init, logger, transport startup, signal handling, and graceful shutdown. Returns `ServerHandle` with `shutdown()` and `services`.
|
|
16
|
+
- **Cloudflare Workers**: `createWorkerHandler()` with per-request `McpServer` factory, env binding injection, and `onScheduled` support.
|
|
17
|
+
- **Comprehensive observability**: Every tool/resource/prompt call automatically instrumented with OTel spans, duration histograms, call/error counters, and structured completion logs. Process-level gauges (RSS, heap, uptime, event loop delay). Subsystem instrumentation for storage, auth, sessions, tasks, LLM, speech, graph, and error classification. 60+ semantic convention constants.
|
|
18
|
+
|
|
19
|
+
## Added
|
|
20
|
+
|
|
21
|
+
- **Definition builders**: `tool()`, `resource()`, `prompt()` with Zod schemas, inline `auth` scopes, `format` functions, `title` field, and `task: true` for async task tools.
|
|
22
|
+
- **Unified `Context` interface**: `ctx.log` (auto-correlated logging), `ctx.state` (tenant-scoped KV with generics, Zod validation, batch ops, TTL), `ctx.elicit` (user prompting), `ctx.sample` (LLM completion), `ctx.signal` (cancellation), `ctx.progress` (task progress).
|
|
23
|
+
- **`createApp(options)`**: Composition root accepting `tools`, `resources`, `prompts`, `setup()`, `name`, `version`. Full server lifecycle management.
|
|
24
|
+
- **`createWorkerHandler(options)`**: Cloudflare Workers entry point with `extraEnvBindings`, `extraObjectBindings`, `onScheduled`.
|
|
25
|
+
- **Subpath exports**: 25+ explicit entries — `./tools`, `./resources`, `./prompts`, `./tasks`, `./errors`, `./config`, `./auth`, `./storage`, `./storage/types`, `./utils`, `./services`, `./testing`, `./worker`.
|
|
26
|
+
- **`z` re-export**: `import { tool, z } from '@cyanheads/mcp-ts-core'` — no separate `zod` import needed.
|
|
27
|
+
- **Error factories**: `notFound()`, `validationError()`, `unauthorized()`, `forbidden()`, `conflict()`, `rateLimited()`, `timeout()`, `serviceUnavailable()`, `configurationError()`, `invalidParams()`, `invalidRequest()` — all accept `(message, data?, options?)` with `{ cause }` for error chaining.
|
|
28
|
+
- **Auto-error classification**: Framework catches all handler errors and classifies by type/message pattern matching — `ZodError` to `ValidationError`, HTTP status codes, common message patterns, `McpError` preserved as-is.
|
|
29
|
+
- **`checkScopes(ctx, scopes)`**: Dynamic scope checking for runtime-dependent auth requirements.
|
|
30
|
+
- **`createMockContext(options?)`**: Test utility with stubbed `log`, in-memory `state`, optional `elicit`/`sample`/`progress` mocks.
|
|
31
|
+
- **Auto-task tools**: `task: true` on tool definitions — framework manages task creation, background execution, progress reporting, cancellation, and result storage.
|
|
32
|
+
- **`GET /mcp` discovery**: Server capabilities, framework identity, auth mode, and definition counts.
|
|
33
|
+
- **`init` CLI**: `mcp-ts-core init [name]` scaffolds a new consumer project with templates, echo definitions, and agent protocol files.
|
|
34
|
+
- **Shareable configs**: `tsconfig.base.json`, `biome.json`, `vitest.config.base.ts` for consumer extension.
|
|
35
|
+
- **Agent skills**: 12+ skill files (`skills/`) covering `setup`, `add-tool`, `add-resource`, `add-prompt`, `add-service`, `add-provider`, `add-export`, `devcheck`, `release`, `maintenance`, `migrate-mcp-ts-template`, and API references.
|
|
36
|
+
- **`examples/` directory**: Complete reference consumer server with 7 tools, 2 resources, 1 prompt, and 39 tests.
|
|
37
|
+
- **OTel instrumentation**: Process gauges, startup/shutdown spans, resource/prompt measurement, active request gauge, storage/auth/session/task/LLM/speech/graph instrumentation, error classification metric.
|
|
38
|
+
- **Semantic conventions**: `src/utils/telemetry/semconv.ts` with 60+ constants for all custom OTel attributes.
|
|
39
|
+
- **Services**: `CoreServices` exposes `config`, `logger`, `storage`, `rateLimiter`, optional `llmProvider`, `speechService`, `supabase`.
|
|
40
|
+
- **`GraphService.healthCheck()`**: Liveness check delegated to the underlying graph provider.
|
|
41
|
+
- **Utility barrels**: Unified `./utils` and `./services` exports covering formatting, parsing, security, network, pagination, scheduling, telemetry, encoding, runtime, token counting, and type guards.
|
|
42
|
+
|
|
43
|
+
## Changed (from legacy template)
|
|
44
|
+
|
|
45
|
+
- **DI container removed**: Replaced by `createApp()` direct construction. Explicit dependency struct (`McpServerDeps`) instead of token-based resolution.
|
|
46
|
+
- **Definition types consolidated**: Merged `New*Definition` types into canonical `ToolDefinition`, `ResourceDefinition`, `PromptDefinition`. Single code path per primitive in registration.
|
|
47
|
+
- **Error handling simplified**: "Logic throws, framework catches." Handlers throw plain `Error` or use error factories. No `try/catch` needed in handlers. Framework classifies, normalizes, and returns `isError: true`.
|
|
48
|
+
- **Auth moved inline**: `auth: ['scope']` on definitions replaces `withToolAuth()`/`withResourceAuth()` HOF wrappers.
|
|
49
|
+
- **`ctx.state` accepts any serializable value**: No manual `JSON.stringify`/`JSON.parse`. Supports generic types, Zod validation, batch operations (`getMany`, `setMany`, `deleteMany`), and TTL.
|
|
50
|
+
- **Tenant ID defaults to `'default'`**: `ctx.state` works in stdio mode without JWT auth.
|
|
51
|
+
- **Build system**: `tsc` + `tsc-alias` replaces `bun build` for proper `.d.ts` generation.
|
|
52
|
+
- **Dependencies restructured**: Heavy deps (OTEL, Supabase, OpenAI, parsers, sanitization, scheduling) moved to optional peer dependencies with lazy dynamic `import()`. Core deps minimized.
|
|
53
|
+
- **Auth fail-closed**: When auth is enabled but no auth context exists, throws `Unauthorized` instead of defaulting to allowed.
|
|
54
|
+
- **Config immutable**: Config proxy `set()`/`defineProperty()` traps return `false` after parse.
|
|
55
|
+
- **Async API surface**: Parser `parse()` methods, `diffFormatter`, and `sanitization` methods are async due to lazy loading.
|
|
56
|
+
- **Zod modernized**: `z.url()`, `z.email()`, `z.iso.datetime()` replace string refinements.
|
|
57
|
+
- **`devcheck` audit**: Classifies vulnerabilities as direct vs transitive, warns instead of failing for upstream-only issues.
|
|
58
|
+
- **HTTP error mappings expanded**: `InvalidParams` 400, `Timeout` 504, `ServiceUnavailable` 503. Error responses include `McpError.data`.
|
|
59
|
+
- **Prompt registration**: Callbacks wrapped in error handling via `ErrorHandler.handleError`.
|
|
60
|
+
- **OpenRouter provider**: SDK-level retries (`maxRetries: 2`) with exponential backoff on 429/5xx, replacing manual retry logic.
|
|
61
|
+
- **`ElicitResult` type**: Updated to match actual MCP SDK shape — flat `Record<string, string | number | boolean | string[]>` content, not a discriminated union with typed `data`.
|
|
62
|
+
- **Speech API parameters**: TTS uses `voice: { voiceId }` / `format`, STT uses `audio` / `format`. `WhisperProvider` uses direct HTTP instead of OpenAI SDK.
|
|
63
|
+
- **`AuthContext` narrowed**: Removed `[key: string]: unknown` index signature — explicit fields only.
|
|
64
|
+
- **Agent skill documentation**: Expanded with full env var reference tables (all defaults), provider registration guides per domain, auto-classification pattern reference, vitest `mergeConfig` setup, and corrected pagination/elicitation examples.
|
|
65
|
+
|
|
66
|
+
## Removed
|
|
67
|
+
|
|
68
|
+
- **DI container** (`src/container/`): 6 source files + 5 test files.
|
|
69
|
+
- **Legacy definition types**: `New*` prefixed types, `isNew*Definition` type guards, `newToolHandlerFactory`, `newResourceHandlerFactory`, `newPromptDefinition` — all consolidated into canonical modules.
|
|
70
|
+
- **`withAuth` HOF**: `withToolAuth()`, `withResourceAuth()` — replaced by inline `auth` on definitions.
|
|
71
|
+
- **Template definitions from `src/`**: Moved to `examples/`. Core library ships with no built-in tools/resources/prompts.
|
|
72
|
+
- **Legacy READMEs**: `src/mcp-server/README.md`, `src/services/README.md`, `src/storage/README.md` — superseded by CLAUDE.md and skill files.
|
|
73
|
+
- **Conformance test suite**: 20 test files + 4 helpers — to be rewritten against stable API post-publish.
|
|
74
|
+
- **`./context` subpath export**: `Context` available from main entry point.
|
|
75
|
+
- **11 granular `./utils/*` subpath exports**: Replaced by single `./utils` barrel.
|
|
76
|
+
- **`changelog/archive.md`**: Pre-3.0.0 history.
|
|
77
|
+
- **`@traversable/*` devDependencies**: No longer needed after removing Zod schema compatibility tests.
|
|
78
|
+
- **`vite-tsconfig-paths`**: Replaced by native Vitest `resolve.tsconfigPaths`.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: Scaffold and build portability — Node-portable build script, shared config extensions for tsconfig/biome/vitest, template overhaul, init CLI improvements
|
|
3
|
+
breaking: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 0.1.1 — 2026-03-14
|
|
7
|
+
|
|
8
|
+
Scaffold and build portability improvements. Consumer projects now extend core shared configs instead of inlining them, and the build script runs on plain Node.js.
|
|
9
|
+
|
|
10
|
+
## Changed
|
|
11
|
+
|
|
12
|
+
- Made `scripts/build.ts` Node-portable by replacing Bun-specific `spawn` and `Bun.file` with `node:child_process/execFile` and `readFileSync`.
|
|
13
|
+
- Renamed `./biome.json` subpath export to `./biome` for consistency with `extends` syntax.
|
|
14
|
+
- Template `tsconfig.json` now extends `@cyanheads/mcp-ts-core/tsconfig.base.json` instead of inlining compiler options.
|
|
15
|
+
- Template `biome.json` now extends `@cyanheads/mcp-ts-core/biome` instead of inlining rules.
|
|
16
|
+
- Template `vitest.config.ts` now extends core vitest config via `mergeConfig`.
|
|
17
|
+
- Template `package.json` overhauled: proper metadata fields, `tsx scripts/build.ts` build command, `--watch` for dev scripts, updated dependency versions, added `pino-pretty`.
|
|
18
|
+
- Template `CLAUDE.md` updated commands table to distinguish `npm` (portable) from `bun` (bun-only) scripts, added description naming convention, added Bun requirement note.
|
|
19
|
+
- `init` CLI now copies build scripts (`build.ts`, `clean.ts`, `devcheck.ts`, `tree.ts`) into scaffolded projects.
|
|
20
|
+
- `init` CLI refactored template copying with shared `copyIfAbsent` helper and consistent `packageName` derivation.
|
|
21
|
+
- Added `scripts/` directory to npm package `files` array so consumers receive build scripts.
|
|
22
|
+
|
|
23
|
+
## Removed
|
|
24
|
+
|
|
25
|
+
- Deleted `scripts/test-report.ts` (624-line HTML test report generator).
|
|
26
|
+
- Deleted `scripts/verify-exports.ts` (export path verifier).
|
|
27
|
+
- Removed `prepublishOnly` and `prepare` scripts from package.json.
|
|
28
|
+
- Removed `test:report`, `test:report:open`, `coverage:update`, and `coverage:commit` scripts from package.json.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: Security hardening — prevent HTTP error data leaks, drop raw token from AuthContext, concurrency-safe config overrides, cancellation in ContextState and LLM provider
|
|
3
|
+
breaking: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 0.1.10 — 2026-03-20
|
|
7
|
+
|
|
8
|
+
Security hardening, concurrency-safe config overrides, cancellation support in context state and LLM provider, and filesystem list optimization.
|
|
9
|
+
|
|
10
|
+
## Security
|
|
11
|
+
|
|
12
|
+
- **HTTP error data leak prevention** — HTTP error handler now captures original `McpError.data` before `ErrorHandler.handleError()` enrichment, preventing internal details (stack traces, cause chains, operation context) from leaking in JSON-RPC error responses.
|
|
13
|
+
- **Removed raw token from `AuthContext`** — Dropped the `token` field from the context-facing auth shape. Raw JWT/OAuth bearer tokens no longer propagate through `ctx.auth`.
|
|
14
|
+
|
|
15
|
+
## Fixed
|
|
16
|
+
|
|
17
|
+
- **Concurrency-safe config overrides** — `composeServices()` no longer mutates `process.env` for `name`/`version` overrides. `parseConfig()` and `resetConfig()` accept an optional `envOverrides` parameter, avoiding races in Workers and parallel test suites.
|
|
18
|
+
- **Auth bridging from ALS** — `requestContextService.createRequestContext()` now bridges auth info from AsyncLocalStorage into the context, so `ctx.auth` is populated in tool/resource handlers without requiring a separate `withAuthInfo()` call.
|
|
19
|
+
|
|
20
|
+
## Added
|
|
21
|
+
|
|
22
|
+
- **Cancellation in `ContextState`** — All `ctx.state` methods (`get`, `set`, `delete`, `getMany`, `setMany`, `deleteMany`, `list`) now call `signal.throwIfAborted()` before I/O, respecting request cancellation.
|
|
23
|
+
- **`AbortSignal` on LLM provider** — `ILlmProvider.chatCompletion()` and `chatCompletionStream()` accept an optional `signal` parameter, plumbed through `OpenRouterProvider` to the OpenAI SDK.
|
|
24
|
+
- **`ListResult.values`** — `IStorageProvider.ListResult` gained an optional `values` map for pre-fetched data, allowing providers to avoid redundant I/O.
|
|
25
|
+
|
|
26
|
+
## Changed
|
|
27
|
+
|
|
28
|
+
- **Filesystem list optimization** — `FileSystemProvider.list()` retains parsed values during TTL validation and populates `ListResult.values`, eliminating a redundant `getMany()` round-trip in `ContextState.list()`.
|
|
29
|
+
- **Peer dependency version ranges** — All `peerDependencies` now specify proper semver ranges (were empty strings).
|
|
30
|
+
- **Removed stale `resolutions`** — Dropped `escape-string-regexp`, `@isaacs/brace-expansion`, `markdown-it`, `qs`, `minimatch`, `ajv`, `lodash`, `rollup` from `resolutions`.
|
|
31
|
+
- **Removed `inspector` script** — Dropped `mcp-inspector` script from `package.json`.
|
|
32
|
+
- Fixed "template's" → "framework's" in `storageBackedTaskStore` comments.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: Security hardening across auth, sessions, and error data — HMAC cursors, auth-gated metadata, JWT issuer/audience validation, public API barrel, zod promoted to direct dependency
|
|
3
|
+
breaking: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 0.1.11 — 2026-03-20
|
|
7
|
+
|
|
8
|
+
Security hardening, reliability improvements, public API surface refinement, and storage provider consistency.
|
|
9
|
+
|
|
10
|
+
## Security
|
|
11
|
+
|
|
12
|
+
- **HMAC-signed pagination cursors** — Cursors now include a truncated HMAC-SHA256 signature using a per-process random key, preventing cursor forgery for key enumeration within tenant namespaces. Cursors are ephemeral — they don't survive process restarts.
|
|
13
|
+
- **Auth-gated server metadata** — `GET /mcp` returns minimal `{ status: 'ok' }` when auth is enabled, hiding server name, version, environment, and capability details from unauthenticated callers.
|
|
14
|
+
- **OTel scope redaction** — Auth middleware logs scope count instead of scope values in OTel span attributes, preventing authorization model exposure to tracing backends.
|
|
15
|
+
- **JWT issuer/audience validation** — `JwtStrategy` validates `iss` and `aud` claims when `MCP_JWT_EXPECTED_ISSUER` / `MCP_JWT_EXPECTED_AUDIENCE` are configured. Explicit `algorithms: ['HS256']` constraint on token verification.
|
|
16
|
+
- **Dev bypass guard** — `DEV_MCP_AUTH_BYPASS` rejected in production (`NODE_ENV=production`). Allowed in development and testing environments.
|
|
17
|
+
- **Session capacity limits** — `SessionStore` enforces a configurable maximum session count (default 10,000), preventing unbounded memory growth from session exhaustion.
|
|
18
|
+
- **Atomic identity binding** — Session identity fields (tenantId, clientId, subject) bound atomically as a snapshot, preventing chimeric identities from per-field races across requests.
|
|
19
|
+
- **Error data sanitization** — HTTP error handler captures `McpError.data` before `ErrorHandler` enrichment, preventing internal details (stack traces, cause chains) from leaking while preserving developer-intentional error context.
|
|
20
|
+
|
|
21
|
+
## Added
|
|
22
|
+
|
|
23
|
+
- **Public API barrel** — New `src/core/index.ts` selectively re-exports only the public API, keeping internal types (`ComposedApp`, `composeServices`, `TaskManager`) out of the consumer-facing surface. Package entry points updated from `dist/core/app.js` to `dist/core/index.js`.
|
|
24
|
+
- **`zod` as direct dependency** — Moved from `peerDependencies` to `dependencies`. Consumers no longer need to install `zod` separately.
|
|
25
|
+
- **Duplicate tool name detection** — `ToolRegistry` throws at startup if two tools share the same name.
|
|
26
|
+
- **Auto-task timeout enforcement** — Background task handlers aborted after the task entry TTL expires, preventing leaked resources from hung handlers.
|
|
27
|
+
- **`ErrorHandler.classifyOnly()`** — Classifies errors without logging, OTel side effects, or wrapping. Used by resource handler factory to avoid double-logging.
|
|
28
|
+
- **`SchedulerService.destroyAll()`** — Stops and removes all cron jobs during shutdown, preventing timers from keeping the event loop alive.
|
|
29
|
+
- **In-memory provider capacity limits** — Configurable `maxEntries` (default 10,000) with automatic TTL sweep when capacity is reached. New `size` getter for monitoring.
|
|
30
|
+
- **Walk-based JSON size estimator** — `estimateJsonSize()` fallback in performance module handles circular references and BigInt without throwing.
|
|
31
|
+
|
|
32
|
+
## Fixed
|
|
33
|
+
|
|
34
|
+
- **Fatal shutdown backstop** — Uncaught exceptions and unhandled rejections trigger a 10-second backstop timer guaranteeing process exit, preventing hung shutdowns.
|
|
35
|
+
- **Signal handler ordering** — `SIGTERM`/`SIGINT` handlers registered before transport start, so signals during HTTP bind still trigger graceful shutdown.
|
|
36
|
+
- **Non-SSE transport cleanup** — Per-request `McpServer`/transport instances closed via microtask after non-SSE responses, preventing resource leaks in stateless HTTP mode.
|
|
37
|
+
- **OTel shutdown race** — No-op catch on `sdk.shutdown()` promise prevents unhandled rejection when the timeout timer wins the race.
|
|
38
|
+
- **Task ownership cleanup** — `SessionAwareTaskStore` removes ownership entries when tasks reach terminal state (completed/failed).
|
|
39
|
+
- **Formatter error isolation** — Tool handler factory catches formatter errors separately from handler errors, providing clearer error messages.
|
|
40
|
+
- **Lazy dotenv loading** — Deferred to first `parseConfig()` call. Avoids wasted filesystem syscall in Workers and prevents stale `.env` from loading before test setup.
|
|
41
|
+
- **Config name/version overrides** — Persisted directly to `process.env` for process-lifetime visibility to OTEL/logger/transport, replacing the env-override parameter approach.
|
|
42
|
+
|
|
43
|
+
## Changed
|
|
44
|
+
|
|
45
|
+
- **TypeError no longer mapped to ValidationError** — Runtime TypeErrors (e.g., "Cannot read properties of undefined") are programming errors, not validation failures. They now fall through to message-pattern matching or `InternalError` fallback.
|
|
46
|
+
- **Validation error pattern** — Restored broad `invalid` keyword matching. The pattern relies on ordering (Unauthorized patterns are checked first) rather than a restrictive noun list, so messages like "Invalid email" correctly classify as ValidationError.
|
|
47
|
+
- **R2 provider: idempotent delete** — Removed pre-delete `head()` check. R2 `delete()` is idempotent; the extra round-trip added latency under eventual consistency.
|
|
48
|
+
- **R2 provider: consistent pagination** — Switched from R2 native cursor to limit+1 pagination with `startAfter`, matching D1/Supabase providers.
|
|
49
|
+
- **D1 provider: strict JSON parsing** — `getMany()` throws `McpError(SerializationError)` on parse failure instead of silently skipping corrupted values.
|
|
50
|
+
- **Resource handler error path** — Uses `classifyOnly()` instead of full `handleError()` to avoid double-logging when the SDK catches the re-thrown error.
|
|
51
|
+
- **Auto-task handler refactored** — Extracted `AutoTaskOptions` interface, configurable TTL from config, proper `finally` block for cleanup, error classification via `ErrorHandler`.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: Required output schemas, OAuth algorithm pinning, resource metric cardinality fix
|
|
3
|
+
breaking: true
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 0.1.12 — 2026-03-20
|
|
7
|
+
|
|
8
|
+
Required output schemas, OAuth hardening, and metric cardinality fix.
|
|
9
|
+
|
|
10
|
+
## Security
|
|
11
|
+
|
|
12
|
+
- **OAuth algorithm pinning** — `OauthStrategy` restricts JWT verification to `['RS256', 'ES256', 'PS256']`, preventing algorithm confusion attacks.
|
|
13
|
+
|
|
14
|
+
## Added
|
|
15
|
+
|
|
16
|
+
- **`ATTR_MCP_RESOURCE_NAME`** — New bounded resource identifier attribute for metric dimensions, replacing unbounded URI on metrics.
|
|
17
|
+
|
|
18
|
+
## Changed
|
|
19
|
+
|
|
20
|
+
- **`output` required on tool definitions** — `ToolDefinition.output` is now mandatory (was optional). Handler factory and task registration unconditionally validate output and include `structuredContent`.
|
|
21
|
+
- **Resource metric cardinality** — Resource metrics use bounded `mcp.resource.name` attribute instead of unbounded `mcp.resource.uri`. URI attribute reserved for span-level detail only.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: Test suite reorganization into unit, integration, compliance, smoke, and helpers tiers — vitest config updated, helper files consolidated
|
|
3
|
+
breaking: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 0.1.13 — 2026-03-20
|
|
7
|
+
|
|
8
|
+
Test suite reorganization into a structured directory layout.
|
|
9
|
+
|
|
10
|
+
## Changed
|
|
11
|
+
|
|
12
|
+
- **Test directory restructure** — Reorganized flat `tests/` into `tests/unit/`, `tests/integration/`, `tests/compliance/`, `tests/smoke/`, and `tests/helpers/`. Clear separation of test tiers with dedicated directories for each category.
|
|
13
|
+
- **Vitest config updates** — `vitest.config.ts` uses explicit `include` globs (`tests/unit/**`, `tests/compliance/**`, `tests/smoke/**`) instead of exclusion-based patterns. `vitest.integration.ts` includes both `*.test.ts` and `*.int.test.ts` patterns.
|
|
14
|
+
- **Test helper consolidation** — Merged `tests/fixtures/`, `tests/mocks/`, and `tests/integration/helpers/` into a single `tests/helpers/` directory with renamed files (`fixtures.ts`, `mock-handlers.ts`, `mock-server.ts`, `http-helpers.ts`, `server-process.ts`).
|
|
15
|
+
- All test import paths updated to match new directory depths.
|
|
16
|
+
- Regenerated `docs/tree.md` to reflect new structure.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: Skill documentation overhaul — maintenance, migration, polish, and release skills updated with expanded guidance and examples, msw bumped
|
|
3
|
+
breaking: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 0.1.14 — 2026-03-21
|
|
7
|
+
|
|
8
|
+
Skill documentation overhaul and dependency updates.
|
|
9
|
+
|
|
10
|
+
## Changed
|
|
11
|
+
|
|
12
|
+
- **`maintenance` skill v1.1** — Simplified from three-tier to two-tier skill sync (package → project). Removed agent skill directory tier.
|
|
13
|
+
- **`migrate-mcp-ts-template` skill v2.1** — Added worker, encoding, and service import mappings. Expanded framework file candidates with review-before-cleanup guidance. Added `setup()` and `vitest.config` examples.
|
|
14
|
+
- **`polish-docs-meta` skill v1.1** — Added `server.json` and `bunfig.toml` verification steps. Rewrote README reference (tools-first structure, two-layer tool docs, badge guide). Rewrote `server.json` reference to use official MCP schema with two-package-entry pattern. Updated `package-meta` reference with `mcpName`, `packageManager`, and `engines.bun` fields.
|
|
15
|
+
- **`release` skill v1.2** — Reframed as a verification gate; git wrapup protocol now handles version bumps, changelog, and commits. Added template version check.
|
|
16
|
+
- Minor wording refinements across `add-test`, `api-context`, and `setup` skills.
|
|
17
|
+
|
|
18
|
+
## Dependencies
|
|
19
|
+
|
|
20
|
+
- Bumped `msw` to `^2.12.14`.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: MCP definition linter at startup, standalone lint:mcp script, runtime-agnostic devcheck, npm-first templates
|
|
3
|
+
breaking: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 0.1.15 — 2026-03-21
|
|
7
|
+
|
|
8
|
+
MCP definition linter, Bun-free devcheck, and template portability.
|
|
9
|
+
|
|
10
|
+
## Added
|
|
11
|
+
|
|
12
|
+
- **MCP definition linter** — New `src/linter/` module validates tool, resource, and prompt definitions against MCP spec and framework conventions at startup. Checks name format/uniqueness, description presence, handler existence, Zod schema structure, `.describe()` on fields, URI template validity, and annotation types. Errors (MUST violations) block startup; warnings (SHOULD/quality) are logged.
|
|
13
|
+
- **`./linter` subpath export** — `validateDefinitions()` and lint types available via `@cyanheads/mcp-ts-core/linter` for standalone use.
|
|
14
|
+
- **`lint:mcp` script** — `scripts/lint-mcp.ts` discovers definitions from conventional paths and runs the linter as a standalone CLI or devcheck step.
|
|
15
|
+
- **Duplicate name detection for prompts and resources** — `PromptRegistry` and `ResourceRegistry` now throw at startup on duplicate names, matching existing `ToolRegistry` behavior.
|
|
16
|
+
- **Linter test suite** — 370-line test file covering all lint rules, edge cases, and report structure.
|
|
17
|
+
|
|
18
|
+
## Changed
|
|
19
|
+
|
|
20
|
+
- **`devcheck` is now runtime-agnostic** — Migrated from `Bun.spawn` to Node.js `child_process.spawn`. Auto-detects bun for package management commands, falls back to npm. Shebang changed from `bun` to `tsx`. Removed "slowest check" summary line.
|
|
21
|
+
- **Templates default to npm/tsx** — `AGENTS.md`, `CLAUDE.md`, and `package.json` templates use `tsx` for scripts and `npm run` for commands. Bun is documented as an optional upgrade. Removed "Bun requirement" note and `migrate-mcp-ts-template` skill reference. Added `rebuild` and `lint:mcp` commands.
|
|
22
|
+
- **Skills section wording** — Templates clarify that skills live at `skills/` and should be copied to agent directories, replacing the "sync" language.
|
|
23
|
+
- **`init` CLI** — Now copies `lint-mcp.ts` to scaffolded projects.
|
|
24
|
+
- **`setup` skill** — Updated to recommend npm as default with bun as alternative.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: Security patch for flatted prototype pollution CVE-2026-33228, rebranded framework description, condensed agent protocol in CLAUDE.md
|
|
3
|
+
breaking: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 0.1.16 — 2026-03-21
|
|
7
|
+
|
|
8
|
+
Security patch and agent protocol cleanup.
|
|
9
|
+
|
|
10
|
+
## Security
|
|
11
|
+
|
|
12
|
+
- **CVE-2026-33228** — Pinned `flatted` to `3.4.2` via `overrides` to fix prototype pollution vulnerability in `flatted <= 3.4.1` (transitive dep via `@vitest/ui`).
|
|
13
|
+
|
|
14
|
+
## Changed
|
|
15
|
+
|
|
16
|
+
- **Project description** — Rebranded to "Agent-native TypeScript framework for building MCP servers." Updated `package.json` description, keywords, and README tagline.
|
|
17
|
+
- **CLAUDE.md** — Condensed agent protocol: removed inline code examples duplicated in skills, merged Checklist into Code Style section, shortened Context/Error/Auth sections with skill cross-references.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: Three bug fixes for HTTP duplicate registration, stale tsbuildinfo cleanup, and missing tsconfig.build.json in scaffold
|
|
3
|
+
breaking: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 0.1.17 — 2026-03-21
|
|
7
|
+
|
|
8
|
+
Three bug fixes affecting consumer projects scaffolded via `mcp-ts-core init` and HTTP transport mode.
|
|
9
|
+
|
|
10
|
+
## Fixed
|
|
11
|
+
|
|
12
|
+
- **Duplicate registration in HTTP mode** — Shared `ToolRegistry`, `ResourceRegistry`, and `PromptRegistry` instances now clear their `registeredNames` Set at the top of `registerAll()`, preventing duplicate-name errors when per-request `McpServer` instances are created (GHSA-345p-7cg4-v4c7 security pattern).
|
|
13
|
+
- **Stale `.tsbuildinfo` not cleaned** — `scripts/clean.ts` now dynamically globs for all `*.tsbuildinfo` files in the project root instead of hardcoding a single `.tsbuildinfo` filename. Prevents silent 0-file builds when tsc names buildinfo after the tsconfig (e.g., `tsconfig.build.tsbuildinfo`).
|
|
14
|
+
- **Missing `tsconfig.build.json` in scaffold** — Added `templates/_tsconfig.build.json` so `init` creates the file consumers need for `scripts/build.ts` (which defaults to `-p tsconfig.build.json`).
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: Devcheck output visibility improvements, expanded template .gitignore, added VS Code config to scaffolded projects
|
|
3
|
+
breaking: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 0.1.18 — 2026-03-21
|
|
7
|
+
|
|
8
|
+
Template and devcheck improvements.
|
|
9
|
+
|
|
10
|
+
## Changed
|
|
11
|
+
|
|
12
|
+
- **Devcheck output visibility** — `scripts/devcheck.ts` now shows stdout for all checks (dimmed), not just failures. Stderr is dimmed for passing checks, red for failures. Makes it easier to verify what ran.
|
|
13
|
+
- **Template `.gitignore` rewrite** — Expanded from a minimal Node.js gitignore to a comprehensive multi-language template covering OS files, IDE files, Node/Python/Java/Ruby, build artifacts, logs, coverage, environment files, and MCP-specific patterns.
|
|
14
|
+
- **Template `.vscode/` config** — Added `extensions.json` (recommends Biome + markdownlint) and `settings.json` (Biome as default formatter, markdownlint config, format-on-save) to scaffolded projects.
|
|
15
|
+
|
|
16
|
+
## Fixed
|
|
17
|
+
|
|
18
|
+
- **`docs/tree.md`** — Corrected `vitest.config.base.ts` → `vitest.config.base.js` filename.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: Devcheck config externalization, field-test skill reference, template guidance additions, MCP_SESSION_MODE docs
|
|
3
|
+
breaking: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 0.1.19 — 2026-03-21
|
|
7
|
+
|
|
8
|
+
Devcheck config externalization, template guidance, and field-test skill.
|
|
9
|
+
|
|
10
|
+
## Added
|
|
11
|
+
|
|
12
|
+
- **`devcheck.config.json`** — Devcheck now reads depcheck ignores, ignore patterns, and outdated allowlist from a project-local JSON config file instead of hardcoded values in `scripts/devcheck.ts`. Consumer template includes a starter config.
|
|
13
|
+
- **"What's Next?" section in templates** — `AGENTS.md` and `CLAUDE.md` templates now include a prioritized list of suggested next steps, helping agents guide users through the server development workflow.
|
|
14
|
+
- **`field-test` skill reference** — Added to skill tables in `CLAUDE.md`, `templates/AGENTS.md`, and `templates/CLAUDE.md`.
|
|
15
|
+
- **`MCP_SESSION_MODE` env var** — Documented in `templates/.env.example` (`stateful` | `stateless`).
|
|
16
|
+
|
|
17
|
+
## Changed
|
|
18
|
+
|
|
19
|
+
- **Template Dockerfile** — Simplified production install step; removed manual cleanup of platform-specific `@oven`/`@rollup` binaries (no longer needed).
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: Reliability fixes for lifecycle, transport, storage, and telemetry — new design-mcp-server skill, onboarding improvements in consumer templates
|
|
3
|
+
breaking: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 0.1.2 — 2026-03-14
|
|
7
|
+
|
|
8
|
+
Reliability fixes for core lifecycle, transport, storage, and telemetry. New `design-mcp-server` skill for planning tool surfaces before scaffolding.
|
|
9
|
+
|
|
10
|
+
## Added
|
|
11
|
+
|
|
12
|
+
- `design-mcp-server` skill (`skills/design-mcp-server/SKILL.md`) — structured workflow for mapping a domain into tools, resources, and services before implementation.
|
|
13
|
+
- "First Session" onboarding section in consumer templates (`CLAUDE.md`, `AGENTS.md`) guiding new projects through framework docs, setup, and design.
|
|
14
|
+
|
|
15
|
+
## Fixed
|
|
16
|
+
|
|
17
|
+
- `composeServices()` now saves and restores `process.env.MCP_SERVER_NAME` / `MCP_SERVER_VERSION` so successive calls in the same process aren't contaminated by earlier overrides.
|
|
18
|
+
- OpenTelemetry initialization sets `isOtelInitialized` only after `sdk.start()` succeeds, and resets the flag and promise on failure — prevents a failed init from blocking retries.
|
|
19
|
+
- Storage factory throws `configurationError` for unsupported providers in serverless environments instead of silently falling back to `in-memory`.
|
|
20
|
+
- HTTP transport resolves `mcpSessionMode: 'auto'` to stateful (per MCP spec conformance) instead of treating it as stateless.
|
|
21
|
+
|
|
22
|
+
## Changed
|
|
23
|
+
|
|
24
|
+
- Setup skill simplified: skill sync is now a single `cp -R skills/* .claude/skills/` command instead of a multi-step comparison workflow.
|
|
25
|
+
- Consumer templates updated: expanded commands table distinguishing `npm` (portable) from `bun` (bun-only) scripts, added description naming convention, added `design-mcp-server` to skills table.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: Template scaffolding improvements — dynamic framework version pinning, server.json manifest, slimmed gitignore focused on TypeScript/Node.js
|
|
3
|
+
breaking: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 0.1.20 — 2026-03-21
|
|
7
|
+
|
|
8
|
+
Template scaffolding improvements: dynamic framework version pinning, slimmed gitignore, and new server.json template.
|
|
9
|
+
|
|
10
|
+
## Added
|
|
11
|
+
|
|
12
|
+
- **`server.json` template** — Scaffolded projects now include a pre-configured MCP server manifest with stdio and streamable-http transport entries, using `{{PACKAGE_NAME}}` placeholder.
|
|
13
|
+
- **Dynamic `{{FRAMEWORK_VERSION}}` placeholder** — `init` CLI reads the current framework version from its own `package.json` and injects it into templates. Scaffolded `package.json` now pins `@cyanheads/mcp-ts-core` to the exact version that generated the project, replacing the hardcoded `^0.1.0`.
|
|
14
|
+
|
|
15
|
+
## Changed
|
|
16
|
+
|
|
17
|
+
- **Template `_.gitignore` slimmed** — Removed Python, Java, Ruby, and other language-specific sections. Focused exclusively on TypeScript/Node.js patterns (OS files, IDE, build output, coverage, logs, env, MCP-specific). Added trailing newline.
|
|
18
|
+
- **Template `package.json` enhanced** — Added `README.md`, `LICENSE`, `CLAUDE.md`, `AGENTS.md`, `Dockerfile`, and `server.json` to `files` array. Added empty `repository` field for consumers to fill in.
|
|
19
|
+
- **Template `.env.example`** — Default HTTP port changed from 3000 to 3010.
|
|
20
|
+
- **Template `.vscode/settings.json`** — Removed unused `ruff.enable: false` setting.
|
|
21
|
+
- **`CLAUDE.md`** — Added `templates/` directory documentation explaining the scaffolding source and file naming conventions.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: Template test scaffolding, explicit stdio transport defaults, js-yaml v4 peer dep upgrade
|
|
3
|
+
breaking: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 0.1.21 — 2026-03-21
|
|
7
|
+
|
|
8
|
+
Template testing, dependency updates, and transport defaults.
|
|
9
|
+
|
|
10
|
+
## Added
|
|
11
|
+
|
|
12
|
+
- **Template test files** — Scaffolded projects now include starter tests for the echo tool, resource, and prompt (`templates/tests/`), demonstrating `createMockContext` usage and handler testing patterns.
|
|
13
|
+
|
|
14
|
+
## Changed
|
|
15
|
+
|
|
16
|
+
- **Template stdio scripts** — `dev:stdio` and `start:stdio` now explicitly set `MCP_TRANSPORT_TYPE=stdio`, matching the `dev:http`/`start:http` pattern. Prevents ambiguity when the default transport changes.
|
|
17
|
+
- **`js-yaml` peer dependency** — Upgraded from `^3.14.2` to `^4.1.0`. v4 drops unsafe `safeLoad`/`safeDump` aliases and uses safe parsing by default.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: Linter hardening — schema serializability, auth scope, annotation coherence, and URI template-params alignment checks added, tool name format upgraded to error
|
|
3
|
+
breaking: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 0.1.22 — 2026-03-21
|
|
7
|
+
|
|
8
|
+
Linter hardening: new rules catch schema serializability failures, auth scope issues, annotation contradictions, and URI template mismatches before they become runtime errors.
|
|
9
|
+
|
|
10
|
+
## Added
|
|
11
|
+
|
|
12
|
+
- **Schema serializability rule** — `checkSchemaSerializable` validates that tool/resource/prompt Zod schemas can convert to JSON Schema via `toJSONSchema()`. Non-serializable types (`z.custom()`, `z.date()`, `z.transform()`, etc.) that would crash `tools/list` at runtime are now caught at startup.
|
|
13
|
+
- **Auth scope validation** — `lintAuthScopes` checks that `auth` arrays on tools and resources contain only non-empty strings. Catches typos like `auth: 'scope'` (not an array) or `auth: ['']` (empty scope).
|
|
14
|
+
- **Annotation coherence warnings** — Flags contradictory annotation combos: `destructiveHint` with `readOnlyHint: true` (meaningless) and `idempotentHint` with `readOnlyHint: true` (redundant).
|
|
15
|
+
- **Template-params alignment** — Resource linter cross-references URI template variables against `params` schema keys. Mismatches (e.g., `{itemId}` in template but `item_id` in schema) cause every resource read to fail silently — now caught at startup.
|
|
16
|
+
- **`_.dockerignore` template** — Scaffolded projects now include a comprehensive `.dockerignore`, matching the framework's own.
|
|
17
|
+
- **Linter tests** — ~130 lines of new test coverage for all new rules.
|
|
18
|
+
|
|
19
|
+
## Changed
|
|
20
|
+
|
|
21
|
+
- **Tool name format severity** — Upgraded from warning to error. The MCP spec uses MUST for the `[A-Za-z0-9._-]{1,128}` format; non-conforming names may break clients.
|
|
22
|
+
- **README template** — `polish-docs-meta` reference updated: scoped package names in `<h1>`, count line (tools · resources · prompts), framework badge linking to `@cyanheads/mcp-ts-core`.
|
|
23
|
+
- **Docs & skills** — Added JSON-Schema-serializable type guidance to `CLAUDE.md`, `add-tool`, `design-mcp-server`, `field-test` skills, and `AGENTS.md`/`CLAUDE.md` templates.
|
|
24
|
+
|
|
25
|
+
## Fixed
|
|
26
|
+
|
|
27
|
+
- **`lint-mcp` task tool detection** — `isToolLike()` now recognizes task tools (which have `taskHandlers` instead of `handler`).
|
|
28
|
+
- **`.dockerignore`** — Added `.git/` to version control exclusions.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: Config correctness and transport resilience — env boolean coercion fix, optional OTel startup hardening, Docker OTel opt-in build arg
|
|
3
|
+
breaking: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 0.1.23 — 2026-03-21
|
|
7
|
+
|
|
8
|
+
Config correctness, transport resilience, and example cleanup.
|
|
9
|
+
|
|
10
|
+
## Fixed
|
|
11
|
+
|
|
12
|
+
- **String boolean coercion** — Added `envBoolean` preprocessor for OpenTelemetry and Speech config booleans. `z.coerce.boolean()` treats `"false"` as `true` (non-empty string); the new preprocessor correctly parses `"true"`/`"1"` as `true` and everything else as `false`.
|
|
13
|
+
- **Missing `@hono/otel` handling** — HTTP transport now logs a warning instead of throwing `configurationError` when `@hono/otel` is not installed with OTel enabled. Prevents hard startup failures for optional instrumentation.
|
|
14
|
+
|
|
15
|
+
## Added
|
|
16
|
+
|
|
17
|
+
- **Docker OTel opt-in** — `OTEL_ENABLED=true` build arg conditionally installs OpenTelemetry peer dependencies in the production image. Base image stays lean by default.
|
|
18
|
+
|
|
19
|
+
## Changed
|
|
20
|
+
|
|
21
|
+
- **Example annotations** — Removed redundant `idempotentHint` from all example tool definitions (flagged by 0.1.22 linter as redundant when `readOnlyHint: true`).
|
|
22
|
+
- **`js-yaml` dev dependency** — Bumped from `^4.1.0` to `^4.1.1`.
|
|
23
|
+
- **`server.json` description** — Expanded to describe core capabilities.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: Docker OTel enabled by default, Worker transport type fix, SessionAwareTaskStore async correctness
|
|
3
|
+
breaking: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 0.1.24 — 2026-03-21
|
|
7
|
+
|
|
8
|
+
Docker OTel default, Worker transport fix, and task store async correctness.
|
|
9
|
+
|
|
10
|
+
## Changed
|
|
11
|
+
|
|
12
|
+
- **Docker OTel default** — `OTEL_ENABLED` build arg now defaults to `true` in both the framework and template Dockerfiles. Docker images ship with OpenTelemetry instrumentation enabled out of the box.
|
|
13
|
+
|
|
14
|
+
## Fixed
|
|
15
|
+
|
|
16
|
+
- **Worker transport type** — `createWorkerHandler()` now sets `MCP_TRANSPORT_TYPE=http` in the Worker environment. Workers are always HTTP; without this, `context.ts` could not determine the correct transport for tenant isolation.
|
|
17
|
+
- **`SessionAwareTaskStore` async correctness** — `getTask()` and `getTaskResult()` are now properly `async` with explicit `await` on inner delegate calls. Previously returned bare promises without the `async` keyword, which could mask exceptions thrown by `assertOwnership()`.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: Consumer identity resolution — parseConfig reads consumer package.json, OTEL service identity propagated from createApp name and version
|
|
3
|
+
breaking: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 0.1.25 — 2026-03-21
|
|
7
|
+
|
|
8
|
+
Consumer identity resolution and OTEL service identity propagation.
|
|
9
|
+
|
|
10
|
+
## Fixed
|
|
11
|
+
|
|
12
|
+
- **Consumer package.json resolution** — `parseConfig()` now reads the consumer project's `package.json` from `process.cwd()` to resolve server name, version, and description. Previously fell through directly to the framework's own `package.json`, causing consumer servers to report the framework's identity. Resolution order: env var → consumer `package.json` → framework `package.json`.
|
|
13
|
+
|
|
14
|
+
## Changed
|
|
15
|
+
|
|
16
|
+
- **OTEL service identity** — `createApp({ name, version })` now propagates to `OTEL_SERVICE_NAME` and `OTEL_SERVICE_VERSION` (via `??=`), ensuring telemetry reflects the actual server identity rather than requiring separate env var configuration.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: Resource notification support — ctx.notifyResourceUpdated and ctx.notifyResourceListChanged for dynamic resource subscriptions, mock context support, dependency updates
|
|
3
|
+
breaking: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 0.1.26 — 2026-03-23
|
|
7
|
+
|
|
8
|
+
Resource notification support and dependency updates.
|
|
9
|
+
|
|
10
|
+
## Added
|
|
11
|
+
|
|
12
|
+
- **Resource notifications on Context** — `ctx.notifyResourceUpdated(uri)` and `ctx.notifyResourceListChanged()` let tool and resource handlers notify subscribed clients when dynamic resources change. Optional (like `elicit`/`sample`), presence-checked before use. Threaded through `ContextDeps`, handler factories, and both tool/resource registries.
|
|
13
|
+
- **`createMockContext` notification support** — `MockContextOptions` accepts `notifyResourceUpdated` and `notifyResourceListChanged` for testing handlers that fire resource notifications.
|
|
14
|
+
- **Resource notifications design doc** — `docs/resource-notifications.md` documents the gap, SDK surface, API design, and alternatives considered.
|
|
15
|
+
|
|
16
|
+
## Changed
|
|
17
|
+
|
|
18
|
+
- **`diff`** — 8.0.3 → 8.0.4
|
|
19
|
+
- **`hono`** — 4.12.8 → 4.12.9
|
|
20
|
+
- **`@supabase/supabase-js`** — ^2.99.3 → ^2.100.0
|
|
21
|
+
- **`typedoc`** — ^0.28.17 → ^0.28.18
|
|
22
|
+
- **`vite`** — 8.0.1 → 8.0.2
|