@cyanheads/mcp-ts-core 0.6.9 → 0.6.11

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.
@@ -4,7 +4,7 @@ description: >
4
4
  Post-init orientation for an MCP server built on @cyanheads/mcp-ts-core. Use after running `@cyanheads/mcp-ts-core init` to understand the project structure, conventions, and skill sync model. Also use when onboarding to an existing project for the first time.
5
5
  metadata:
6
6
  author: cyanheads
7
- version: "1.4"
7
+ version: "1.5"
8
8
  audience: external
9
9
  type: workflow
10
10
  ---
@@ -29,19 +29,39 @@ For the full framework API, read `node_modules/@cyanheads/mcp-ts-core/CLAUDE.md`
29
29
  What `init` actually creates:
30
30
 
31
31
  ```text
32
- CLAUDE.md # Agent protocol (project-specific)
33
- AGENTS.md # Alternate agent protocol file keep the one your agent uses
34
- .github/ISSUE_TEMPLATE/ # GitHub issue templates (bug report, feature request)
35
- skills/ # Project skills (source of truth)
32
+ CLAUDE.md # Agent protocol — Claude Code
33
+ AGENTS.md # Agent protocol — other agents (Codex, Cursor, etc.)
34
+ package.json # Starter deps + scripts (placeholders substituted on init)
35
+ tsconfig.json # TypeScript config
36
+ tsconfig.build.json # Build-only TS config
37
+ vitest.config.ts # Test runner config
38
+ biome.json # Lint + format config
39
+ devcheck.config.json # Which devcheck steps to run
40
+ Dockerfile # Starter multi-stage image
41
+ .dockerignore
42
+ .env.example # Copy to .env and fill in
43
+ .gitignore
44
+ .github/ISSUE_TEMPLATE/ # Bug / feature-request issue forms
45
+ .vscode/ # Recommended extensions + editor settings
46
+ server.json # MCP Registry publishing metadata
47
+ changelog/template.md # Format reference for per-version changelog files
48
+ scripts/ # build, clean, devcheck, lint-mcp, build-changelog, tree, check-docs-sync
49
+ skills/ # External skills copied from the package (source of truth)
36
50
  src/
37
51
  index.ts # createApp() entry point
38
52
  mcp-server/
39
53
  tools/definitions/
40
- echo.tool.ts # Echo tool (starter — replace when ready)
54
+ echo.tool.ts # Standard tool starter
55
+ echo-app.app-tool.ts # UI-enabled app tool starter (pairs with echo-app-ui resource)
41
56
  resources/definitions/
42
- echo.resource.ts # Echo resource (starter — replace when ready)
57
+ echo.resource.ts # Standard resource starter
58
+ echo-app-ui.app-resource.ts # UI resource paired with echo-app app tool
43
59
  prompts/definitions/
44
- echo.prompt.ts # Echo prompt (starter — replace when ready)
60
+ echo.prompt.ts # Prompt starter
61
+ tests/
62
+ tools/echo.tool.test.ts # Starter tests (one per echo definition)
63
+ resources/echo.resource.test.ts
64
+ prompts/echo.prompt.test.ts
45
65
  ```
46
66
 
47
67
  Add these as needed:
@@ -59,11 +79,24 @@ src/
59
79
 
60
80
  ## Scaffolded Echo Definitions
61
81
 
62
- The init creates echo definitions for tools, resources, and prompts. They're functional examples with inline comments explaining conventions. After init:
82
+ The init creates five echo definitions plus matching starter tests:
63
83
 
64
- 1. Clean up what you don't need. If your server has no prompts, the echo prompt definition and its registration in `src/index.ts` can go. Same for resources.
65
- 2. Rename and replace what you keep. The echo definitions show the pattern — swap them out for your real tools/resources/prompts.
66
- 3. Definitions register directly in `src/index.ts`. No barrel files, just import and add to the arrays.
84
+ | File | Demonstrates |
85
+ |:--|:--|
86
+ | `echo.tool.ts` | Standard MCP tool: input/output Zod schemas, `handler`, `format` |
87
+ | `echo-app.app-tool.ts` | MCP App tool — same as a tool, but emits a UI (`ui_app://` link) for clients that render MCP Apps |
88
+ | `echo.resource.ts` | Standard MCP resource with a parameterised URI template |
89
+ | `echo-app-ui.app-resource.ts` | UI resource served to MCP App clients; paired with `echo-app.app-tool.ts` |
90
+ | `echo.prompt.ts` | Prompt template (pure message generator) |
91
+ | `tests/**/echo.*.test.ts` | Starter tests using `createMockContext` — edit alongside the definitions |
92
+
93
+ After init:
94
+
95
+ 1. **Clean up what you don't need.** If your server has no prompts, delete the echo prompt and its registration in `src/index.ts`. Same for resources, or the app-tool pair if you're not targeting UI-capable clients.
96
+ 2. **Rename and replace what you keep.** The echo definitions and their tests show the pattern — swap them out for your real tools/resources/prompts.
97
+ 3. **Definitions register directly in `src/index.ts`.** No barrel files, just import and add to the `tools` / `resources` / `prompts` arrays.
98
+
99
+ See the `add-tool`, `add-app-tool`, `add-resource`, `add-prompt`, and `add-test` skills for the scaffolding patterns when you start adding real definitions.
67
100
 
68
101
  ## Conventions
69
102
 
@@ -71,7 +104,7 @@ The init creates echo definitions for tools, resources, and prompts. They're fun
71
104
  |:-----------|:-----|
72
105
  | File names | kebab-case |
73
106
  | Tool/resource/prompt names | snake_case, prefixed with server name (e.g. `tasks_fetch_list`) |
74
- | File suffixes | `.tool.ts`, `.resource.ts`, `.prompt.ts` |
107
+ | File suffixes | `.tool.ts`, `.resource.ts`, `.prompt.ts`, `.app-tool.ts` (UI-enabled), `.app-resource.ts` (paired UI resource) |
75
108
  | Imports (framework) | `@cyanheads/mcp-ts-core` and subpaths |
76
109
  | Imports (server code) | `@/` path alias for `src/` |
77
110
 
@@ -97,6 +130,23 @@ After `bun install`, complete these one-time setup tasks:
97
130
  2. **Initialize git** — `git init && git add -A && git commit -m "chore: scaffold from @cyanheads/mcp-ts-core"`
98
131
  3. **Verify agent protocol placeholders** — if the `init` CLI was run without a `[name]` argument, `{{PACKAGE_NAME}}` may remain as a literal in `CLAUDE.md`/`AGENTS.md` and `package.json`. Replace it with the actual server name.
99
132
 
133
+ ## Changelog Convention
134
+
135
+ `changelog/template.md` ships as a **format reference** — never edit, rename, or move it. For each release, author a per-version file at `changelog/<major.minor>.x/<version>.md` (e.g. `changelog/0.1.x/0.1.0.md`) with YAML frontmatter (`summary:` + optional `breaking:`) and grouped sections (Added / Changed / Fixed / Removed). Then regenerate the rollup with `bun run changelog:build` — `CHANGELOG.md` is an auto-generated navigation index, never hand-edited. See the `release-and-publish` skill for the full release flow.
136
+
137
+ ## Next Steps
138
+
139
+ The included skills form a rough progression — not a rigid sequence, but the typical flow through a new server:
140
+
141
+ 1. **`design-mcp-server`** — map the domain into tools, resources, and services before writing any definitions
142
+ 2. **`add-tool`** / **`add-app-tool`** / **`add-resource`** / **`add-prompt`** / **`add-service`** — scaffold each piece as you go
143
+ 3. **`add-test`** — pair tests with each definition (or retrofit later)
144
+ 4. **`field-test`** — exercise the built surface with real and adversarial inputs; produces a report of issues and pain points
145
+ 5. **`polish-docs-meta`** — finalize README, metadata, and agent protocol before shipping
146
+ 6. **`maintenance`** — after `bun update --latest`, investigate upstream changelogs and re-sync skills
147
+
148
+ Skip or reorder as the project calls for it. The agent protocol's "What's Next?" section is the authoritative map once the first session is over.
149
+
100
150
  ## Checklist
101
151
 
102
152
  - [ ] Agent protocol file selected — keep one authoritative file (`CLAUDE.md` or `AGENTS.md`)
@@ -106,4 +156,4 @@ After `bun install`, complete these one-time setup tasks:
106
156
  - [ ] Skills copied to agent directory (`cp -R skills/* .claude/skills/` or equivalent)
107
157
  - [ ] Project structure understood (definitions directories, entry point)
108
158
  - [ ] `bun run devcheck` passes
109
- - [ ] If new server: proceed to `design-mcp-server` skill to plan the tool surface
159
+ - [ ] Next: if new server, move on to `design-mcp-server` to plan the tool surface
@@ -1,142 +0,0 @@
1
- ---
2
- name: release
3
- description: >
4
- Verify release readiness and publish. The git wrapup protocol handles version bumps, changelog, README, commits, and tagging during the coding session. This skill verifies nothing was missed, runs final checks, and presents the irreversible publish commands.
5
- metadata:
6
- author: cyanheads
7
- version: "1.5"
8
- audience: internal
9
- type: workflow
10
- ---
11
-
12
- ## Context
13
-
14
- By the time this skill runs, the git wrapup protocol should have already handled: changelog entry, version bumps, README updates, atomic commits, and an annotated tag. This skill is the **final verification gate** before irreversible publish commands. Its job is to catch anything the wrapup missed or got wrong — not to redo the work.
15
-
16
- ## Steps
17
-
18
- ### 1. Confirm the Target Version
19
-
20
- Read `package.json` to get the version. This is the source of truth. If the user hasn't decided on the bump level yet (patch/minor/major), ask now — but usually this was already set during wrapup.
21
-
22
- ### 2. Verify Version Consistency
23
-
24
- The wrapup protocol bumps versions, but sometimes a file gets missed. **Search for the old version string** across the repo and verify the new version appears in all required locations:
25
-
26
- | File | What to Verify |
27
- |:-----|:---------------|
28
- | `package.json` | `version` field |
29
- | `server.json` | Root `version` + `version` in each `packages[]` entry (3 total) |
30
- | `CLAUDE.md` | Version in the header (`**Version:** X.Y.Z`) |
31
- | `README.md` | Version badge (`Version-X.Y.Z-blue`) and any other version references |
32
- | `templates/CLAUDE.md` | `**Version:** X.Y.Z` in the header |
33
- | `templates/AGENTS.md` | Same — these files are identical |
34
-
35
- Fix any mismatches. A grep for the **old** version is the fastest way to find stragglers.
36
-
37
- ### 3. Finalize the Per-Version Changelog File
38
-
39
- The changelog is directory-based, grouped by minor series using the `.x` semver-wildcard convention: per-version files live at `changelog/<major.minor>.x/<version>.md` (e.g. `changelog/0.5.x/0.5.4.md`), and `CHANGELOG.md` is an auto-generated rollup (`bun run changelog:build`). `changelog/template.md` is a **pristine format reference** — never edited, never moved, never renamed. At release time, you're authoring (or finalizing) the per-version file for the version being shipped.
40
-
41
- Create or finalize `changelog/<series>/<version>.md`:
42
-
43
- 1. Determine the series: `0.5.5` → `0.5.x/`. Create the directory if it doesn't exist: `mkdir -p changelog/<series>`
44
- 2. If the file doesn't exist yet, scaffold it by copying the structure of `changelog/template.md` into the new path. Do **not** `git mv` or otherwise rename `template.md` itself — it stays where it is.
45
- 3. Set the H1: `# <version> — <date>` (em-dash, ISO date)
46
- 4. **Fill in the frontmatter** at the top of the file:
47
- - `summary:` — one-line headline, ≤250 chars, no markdown. Write it like a GitHub Release title. Required.
48
- - `breaking:` — set to `true` if this release requires consumer code changes (API removal, signature change, config rename). Defaults to `false`. Renders `· ⚠️ Breaking` in the rollup when true.
49
- 5. Verify content:
50
- - Sections grouped correctly (Added / Changed / Fixed / Removed)
51
- - Accurately reflects what shipped — cross-reference with `git log` since the last tag
52
- - If this release absorbed pre-release versions (e.g., `0.6.0-beta.1`), consolidate their entries as `##`/`###` sub-headers inside this file (they share this version's frontmatter — no separate files)
53
- - **Issue/PR references use full URLs**, not bare `#NN`. GitHub's auto-link only renders inside its own UI; these files are read from `node_modules` too, where bare `#NN` is dead text. Use `[#38](https://github.com/<owner>/<repo>/issues/38)` (or `/pull/NN` for PRs). Only link numbers verified via `gh issue view NN` / `gh pr view NN` — never speculate on future numbers, since GitHub will happily resolve `#42` to whatever unrelated item already owns 42 and pull its title into timeline previews.
54
- 6. Regenerate the rollup: `bun run changelog:build` — warnings about missing summaries are expected during the legacy-file backfill period but should not include this release
55
-
56
- Never hand-edit `CHANGELOG.md` — it's a build artifact. Devcheck's `Changelog Sync` step will fail if it drifts. Never edit `changelog/template.md` — it's the format reference, not a worksheet.
57
-
58
- ### 4. Verify README.md
59
-
60
- Beyond the version badge, confirm:
61
-
62
- - Feature counts (tool count, resource count, etc.) match reality if the surface area changed
63
- - Descriptions and capability lists reflect new features
64
- - MCP SDK version badge is current if the dependency was bumped
65
- - Code examples still match current APIs
66
-
67
- ### 5. Verify Skill Versions
68
-
69
- For any skills whose `SKILL.md` was modified in this release cycle, confirm `metadata.version` in their YAML frontmatter was bumped. This is how the `maintenance` skill detects updates — if the version didn't bump, consumers won't get the new content on `bun update`.
70
-
71
- ### 6. Verify `docs/tree.md`
72
-
73
- If the file structure changed, regenerate and confirm it's current:
74
-
75
- ```bash
76
- bun run tree
77
- ```
78
-
79
- Skip if no structural changes occurred.
80
-
81
- ### 7. Run Final Checks
82
-
83
- All must pass:
84
-
85
- ```bash
86
- bun run devcheck
87
- bun run test
88
- bun run build
89
- ```
90
-
91
- ### 8. Verify Commit and Tag
92
-
93
- Confirm a clean release commit and annotated tag exist:
94
-
95
- - Commit message: `chore: release v{{VERSION}}`
96
- - Annotated tag: `v{{VERSION}}` with a concise summary of key changes
97
-
98
- If the wrapup created the commit and tag already, verify they're correct. If not, create them now.
99
-
100
- Tag message examples:
101
-
102
- ```text
103
- v0.2.0: Cloudflare Workers support, task tools, Graph service
104
- v0.1.7: OTel instrumentation refactor, lighter semconv
105
- v0.1.6: Error factory functions, auto-classification patterns
106
- ```
107
-
108
- ### 9. Stop and Present Publish Commands
109
-
110
- The following commands are irreversible. Present them to the user for manual execution:
111
-
112
- ```bash
113
- # Push commit and tag
114
- git push && git push --tags
115
-
116
- # Publish to npm
117
- bun publish --access public
118
-
119
- # Build and push Docker image
120
- docker buildx build --platform linux/amd64,linux/arm64 \
121
- -t ghcr.io/cyanheads/mcp-ts-core:{{VERSION}} \
122
- -t ghcr.io/cyanheads/mcp-ts-core:latest \
123
- --push .
124
-
125
- # Publish MCP listing (if applicable)
126
- mcp-publisher publish
127
- ```
128
-
129
- ## Pre-Publish Checklist
130
-
131
- - [ ] Version consistent across all files (package.json, server.json ×3, CLAUDE.md, README.md, templates)
132
- - [ ] No stale old-version references found in repo
133
- - [ ] `changelog/<major.minor>.x/<version>.md` created/finalized with concrete version, date, and frontmatter; `CHANGELOG.md` regenerated via `bun run changelog:build`; `changelog/template.md` untouched
134
- - [ ] README.md current — feature counts, badges, descriptions, examples
135
- - [ ] Modified skill versions bumped in YAML frontmatter
136
- - [ ] `docs/tree.md` current (if structure changed)
137
- - [ ] `bun run devcheck` passes
138
- - [ ] `bun run test` passes
139
- - [ ] `bun run build` succeeds
140
- - [ ] Clean release commit exists
141
- - [ ] Annotated git tag exists with summary message
142
- - [ ] User presented with publish commands (push, npm, Docker, mcp-publisher)