---
summary: "Post-pack bundle cleaner strips dependency-shipped agent docs; packaging linter adds post-bundle content and entrypoint identity checks; template scaffolds name/title pair"
breaking: false
security: false
agent-notes: |
  New file to sync: `scripts/clean-mcpb.ts` is now listed in `package.json` `files[]` and is invoked by the template `bundle` script after `mcpb pack`. Consumer servers that previously added the clean-mcpb script manually should verify their `bundle` script matches the template (`bun run build && npx -y @anthropic-ai/mcpb pack . dist/{{PACKAGE_NAME}}.mcpb && bun run scripts/clean-mcpb.ts dist/{{PACKAGE_NAME}}.mcpb`).

  The `bundle` step for newly-scaffolded servers now includes the clean step automatically. Existing servers using the old `bundle` script (without `scripts/clean-mcpb.ts`) should update `package.json` to match the template.

  Identity adoption (check 9): add explicit `name: '<unscoped-package-name>'` and `title: '<unscoped-package-name>'` to `createApp()` / `createWorkerHandler()` in `src/index.ts` (and `src/worker.ts` if present). `devcheck` now warns when the pair is partial and errors when a literal is set to the wrong value. Run `bun run lint:packaging` to confirm.

  `templates/manifest.json` no longer includes an empty `repository` stub — `mcpb pack` rejects it on fresh scaffolds. Existing servers: remove `"repository": { "type": "git", "url": "" }` from `manifest.json` if present.

  Re-sync the `skills/polish-docs-meta` skill (now v2.7) — it documents the `name`/`title` identity requirement and the updated `bundle` script description.
---

# 0.10.6 — 2026-06-11

## Added

- **`scripts/clean-mcpb.ts`** — post-pack bundle cleaner: runs `mcpb clean` (dev-dependency prune + manifest validation), then strips `node_modules/**` agent-doc entries (`skills/`, `.claude/`, `.agents/` trees and `SKILL.md` files) that root-anchored `.mcpbignore` patterns cannot reach. Batched `zip -d -nw` for literal matching; re-lists and asserts zero matches remain. ([#230](https://github.com/cyanheads/mcp-ts-core/issues/230))
- **`lint-packaging.ts` check 8** — post-bundle content guard: lists `.mcpb` files under `dist/` with `unzip -Z1` and flags any `node_modules/**` agent-doc entries, directing to `scripts/clean-mcpb.ts`. Cross-script regex `AGENT_DOC_ENTRY` is exported from both files; a unit test asserts they are identical. ([#230](https://github.com/cyanheads/mcp-ts-core/issues/230))
- **`lint-packaging.ts` check 9** — identity checks: `name`/`title` string literals in `createApp()` / `createWorkerHandler()` (`src/index.ts`, `src/worker.ts`) and `manifest.json` `display_name` must equal the unscoped `package.json` name; partial `name`/`title` pair warns without failing. Line-based brace-depth parser excludes nested object literals (setup bodies, extension configs) to avoid false positives. ([#231](https://github.com/cyanheads/mcp-ts-core/issues/231))
- **`scripts/clean-mcpb.ts` added to `package.json` `files[]`** — ships in the npm package; `init` scaffolds it into new servers (the scaffold script list derives from `files[]`) and existing servers receive it via maintenance script sync. ([#230](https://github.com/cyanheads/mcp-ts-core/issues/230))

## Changed

- **`templates/package.json` `bundle` script** — appended `&& bun run scripts/clean-mcpb.ts dist/{{PACKAGE_NAME}}.mcpb` after `mcpb pack`; newly-scaffolded servers get the clean step automatically. ([#230](https://github.com/cyanheads/mcp-ts-core/issues/230))
- **`templates/src/index.ts`** — scaffolded `createApp()` now includes an explicit `name: '{{PACKAGE_NAME}}'` / `title: '{{PACKAGE_NAME}}'` identity pair, so new servers pass check 9 out of the box. ([#231](https://github.com/cyanheads/mcp-ts-core/issues/231))
- **`templates/manifest.json`** — removed empty `repository: { type: "git", url: "" }` stub; `mcpb pack` rejects a blank URL on fresh scaffolds. ([#230](https://github.com/cyanheads/mcp-ts-core/issues/230))
- **`skills/polish-docs-meta` v2.7** — adds the `name`/`title` identity requirement (`createApp()` / `createWorkerHandler()` must match the unscoped package name; `lint:packaging` enforces) and updates the `bundle` script description to reflect the clean step. ([#231](https://github.com/cyanheads/mcp-ts-core/issues/231))
- **`skills/orchestrations` v1.3** — Phase 4 close-loop wording: each shipped issue gets exactly one what-landed comment (concrete changes + version), then a bare close; bare "Fixed in v\<version\>." trailer replaced by the fuller comment-then-close pattern that also covers enhancements.
- **`templates/CLAUDE.md` / `templates/AGENTS.md`** — `bundle` command description updated to reflect the clean step.
- **`lint-packaging.ts` `checkBundleContent`** — refactored to accept raw `.mcpbignore` content (string) instead of a file path, enabling direct unit testing without filesystem fixtures; `main()` still reads the file and passes the string.
- **`lint-packaging.ts` `KNOWN_DEV_DIRS` / `CRITICAL_RUNTIME_PATHS`** — exported for cross-module use and unit test access.
- **`tests/unit/scripts/lint-packaging.test.ts`** — rewritten to import `checkBundleContent`, `checkBundleEntries`, `checkEntrypointIdentity`, `checkManifestIdentity` from the real script; no inline logic mirror. ([#230](https://github.com/cyanheads/mcp-ts-core/issues/230), [#231](https://github.com/cyanheads/mcp-ts-core/issues/231))
- **`tests/unit/scripts/clean-mcpb.test.ts`** (new) — imports `AGENT_DOC_ENTRY` and `filterAgentDocEntries` from the real `scripts/clean-mcpb.ts`; covers match/keep/near-miss/order cases plus the cross-script sync assertion. ([#230](https://github.com/cyanheads/mcp-ts-core/issues/230))
