@cyanheads/mcp-ts-core 0.1.18 → 0.1.19

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,6 +1,6 @@
1
1
  # Agent Protocol
2
2
 
3
- **Package:** `@cyanheads/mcp-ts-core` · **Version:** 0.1.18
3
+ **Package:** `@cyanheads/mcp-ts-core` · **Version:** 0.1.19
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.
@@ -400,6 +400,7 @@ Detailed method signatures, options, and examples live in skill files. Read the
400
400
  | `add-prompt` | `skills/add-prompt/SKILL.md` | Scaffold a new MCP prompt definition |
401
401
  | `add-service` | `skills/add-service/SKILL.md` | Scaffold a new domain service |
402
402
  | `add-test` | `skills/add-test/SKILL.md` | Scaffold test file for a tool, resource, or service |
403
+ | `field-test` | `skills/field-test/SKILL.md` | Exercise tools/resources/prompts with real inputs, verify behavior, report issues |
403
404
  | `add-provider` | `skills/add-provider/SKILL.md` | Add a new provider implementation |
404
405
  | `add-export` | `skills/add-export/SKILL.md` | Add a new subpath export |
405
406
  | `design-mcp-server` | `skills/design-mcp-server/SKILL.md` | Design tool surface, resources, and service layer for a new server |
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  <div align="center">
7
7
 
8
- [![Version](https://img.shields.io/badge/Version-0.1.18-blue.svg?style=flat-square)](./CHANGELOG.md) [![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) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^1.27.1-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE)
8
+ [![Version](https://img.shields.io/badge/Version-0.1.19-blue.svg?style=flat-square)](./CHANGELOG.md) [![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) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^1.27.1-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE)
9
9
 
10
10
  [![TypeScript](https://img.shields.io/badge/TypeScript-^5.9.3-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.3.2-blueviolet.svg?style=flat-square)](https://bun.sh/)
11
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyanheads/mcp-ts-core",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
4
4
  "mcpName": "io.github.cyanheads/mcp-ts-core",
5
5
  "description": "Agent-native TypeScript framework for building MCP servers. Build tools, not infrastructure. Declarative definitions with auth, multi-backend storage, OpenTelemetry, and first-class support for Node.js and Cloudflare Workers.",
6
6
  "main": "dist/core/index.js",
@@ -229,9 +229,31 @@ const Shell = {
229
229
 
230
230
  const ROOT_DIR = path.join(path.dirname(fileURLToPath(import.meta.url)), '..');
231
231
 
232
- // Packages allowed to be outdated without failing the check.
233
- // zod is pinned due to the MCP SDK's hard version requirement.
234
- const OUTDATED_ALLOWLIST = new Set(['zod']);
232
+ // ── Project-local config (devcheck.config.json) ─────────────────────
233
+
234
+ interface DevcheckConfig {
235
+ depcheck?: {
236
+ ignores?: string[];
237
+ ignorePatterns?: string[];
238
+ };
239
+ outdated?: {
240
+ allowlist?: string[];
241
+ };
242
+ }
243
+
244
+ function loadDevcheckConfig(rootDir: string): DevcheckConfig {
245
+ try {
246
+ return JSON.parse(
247
+ readFileSync(path.join(rootDir, 'devcheck.config.json'), 'utf-8'),
248
+ ) as DevcheckConfig;
249
+ } catch {
250
+ return {};
251
+ }
252
+ }
253
+
254
+ const DEVCHECK_CONFIG = loadDevcheckConfig(ROOT_DIR);
255
+
256
+ const OUTDATED_ALLOWLIST = new Set(DEVCHECK_CONFIG.outdated?.allowlist ?? []);
235
257
 
236
258
  /** Use bun for package management commands if available, otherwise npm. */
237
259
  const PM_CMD = spawnSync('bun', ['--version'], { stdio: 'ignore' }).status === 0 ? 'bun' : 'npm';
@@ -433,13 +455,16 @@ const ALL_CHECKS: Check[] = [
433
455
  flag: '--no-depcheck',
434
456
  canFix: false,
435
457
  slowCheck: true,
436
- getCommand: (ctx) => [
437
- path.join(ctx.rootDir, 'node_modules', '.bin', 'depcheck'),
438
- '--ignores=@types/*,pino-pretty,typescript,bun-types,@vitest/coverage-istanbul,repomix,bun,tsc-alias,@cyanheads/mcp-ts-core,@modelcontextprotocol/ext-apps,typedoc',
439
- '--ignore-patterns=examples',
440
- ],
458
+ getCommand: (ctx) => {
459
+ const cmd = [path.join(ctx.rootDir, 'node_modules', '.bin', 'depcheck')];
460
+ const ignores = DEVCHECK_CONFIG.depcheck?.ignores ?? ['@types/*'];
461
+ if (ignores.length > 0) cmd.push(`--ignores=${ignores.join(',')}`);
462
+ const patterns = DEVCHECK_CONFIG.depcheck?.ignorePatterns ?? [];
463
+ if (patterns.length > 0) cmd.push(`--ignore-patterns=${patterns.join(',')}`);
464
+ return cmd;
465
+ },
441
466
  tip: (c) =>
442
- `Remove unused packages with ${c.bold(`${PM_CMD} remove <pkg>`)} or add to depcheck ignores.`,
467
+ `Remove unused packages with ${c.bold(`${PM_CMD} remove <pkg>`)} or add to ${c.bold('devcheck.config.json')} ignores.`,
443
468
  },
444
469
  // Slow checks last (network-bound operations)
445
470
  {
@@ -519,7 +544,7 @@ const ALL_CHECKS: Check[] = [
519
544
  return unexpected.length === 0;
520
545
  },
521
546
  tip: (c) =>
522
- `Run ${c.bold(`${PM_CMD} update`)} to upgrade dependencies. Allowlisted packages: ${[...OUTDATED_ALLOWLIST].join(', ')}.`,
547
+ `Run ${c.bold(`${PM_CMD} update`)} to upgrade dependencies. Configure allowlist in ${c.bold('devcheck.config.json')}.`,
523
548
  },
524
549
  ];
525
550
 
@@ -0,0 +1,105 @@
1
+ ---
2
+ name: field-test
3
+ description: >
4
+ Exercise tools, resources, and prompts with real-world inputs to verify behavior end-to-end. Use after adding or modifying definitions, or when the user asks to test, try out, or verify their MCP surface. Calls each definition with realistic and adversarial inputs and produces a report of issues, pain points, and recommendations.
5
+ metadata:
6
+ author: cyanheads
7
+ version: "1.0"
8
+ audience: external
9
+ type: debug
10
+ ---
11
+
12
+ ## Context
13
+
14
+ Unit tests (`add-test` skill) verify handler logic with mocked context. Field testing verifies the full picture: real server, real transport, real inputs, real outputs. It catches issues that unit tests miss — bad descriptions, awkward input shapes, unhelpful error messages, missing format functions, schema mismatches, and surprising edge-case behavior.
15
+
16
+ **Actively use** the tools — don't just read their code.
17
+
18
+ ---
19
+
20
+ ## Steps
21
+
22
+ ### 1. Surface available definitions
23
+
24
+ List the MCP tools, resources, and prompts available in your environment. This confirms the server is connected and gives you everything you need — names, descriptions, parameter schemas — to plan your tests.
25
+
26
+ If you don't see any MCP tools from this server, ask the user to connect it first (e.g. `claude mcp add` for Claude Code, or the equivalent for their client). Don't proceed until the tools are visible.
27
+
28
+ Present what you find: each definition's name, parameters (with types and descriptions), and any notable schema details (optional fields, enums, constraints). This is your test surface.
29
+
30
+ ### 2. Test each definition
31
+
32
+ For every tool, resource, and prompt, run through these categories:
33
+
34
+ #### Tools
35
+
36
+ | Category | What to test |
37
+ |:---------|:-------------|
38
+ | **Happy path** | Realistic input that should succeed. Verify output shape matches the output schema. Verify format function produces sensible content blocks. |
39
+ | **Variations** | Different valid input combinations — optional fields omitted, optional fields included, different enum values, min/max boundaries. |
40
+ | **Edge cases** | Empty strings, zero values, very long inputs, special characters, Unicode. |
41
+ | **Error paths** | Missing required fields, wrong types, nonexistent IDs, inputs that should trigger domain errors. Verify errors are clear and actionable. |
42
+ | **Descriptions** | Read every field's `.describe()` — would a user/LLM understand what to provide? Flag vague or missing descriptions. |
43
+
44
+ #### Resources
45
+
46
+ | Category | What to test |
47
+ |:---------|:-------------|
48
+ | **Happy path** | Valid URI with known params. Verify returned content and MIME type. |
49
+ | **List** | Call `list` if defined. Verify returned resources have names and valid URIs. |
50
+ | **Not found** | URI with nonexistent params. Verify a clear error, not a crash. |
51
+ | **Pagination** | If the resource uses `extractCursor`/`paginateArray`, test with varying limits and cursors. |
52
+
53
+ #### Prompts
54
+
55
+ | Category | What to test |
56
+ |:---------|:-------------|
57
+ | **Happy path** | Valid args. Verify generated messages are well-formed. |
58
+ | **Defaults** | Omit optional args. Verify the output still makes sense. |
59
+ | **Content quality** | Read the generated messages — are they clear, well-structured prompts? |
60
+
61
+ ### 3. Track progress
62
+
63
+ Use a todo list to track each definition and its test status. Mark each as you go — don't batch.
64
+
65
+ ### 4. Produce the report
66
+
67
+ After testing everything, present a structured report:
68
+
69
+ #### Summary table
70
+
71
+ | Definition | Type | Status | Issues |
72
+ |:-----------|:-----|:-------|:-------|
73
+ | `search_items` | tool | pass | — |
74
+ | `get_item` | tool | issues | Error message unhelpful for missing ID |
75
+ | `item://` | resource | fail | Crashes on nonexistent ID |
76
+
77
+ #### Detailed findings
78
+
79
+ For each definition with issues, include:
80
+
81
+ - **What happened** — the input, the output or error, and what was expected
82
+ - **Severity** — `bug` (broken behavior), `ux` (works but confusing/unhelpful), `nit` (minor polish)
83
+ - **Recommendation** — specific fix suggestion
84
+
85
+ #### Pain points
86
+
87
+ Cross-cutting observations that aren't tied to a single definition:
88
+
89
+ - Inconsistent error message patterns across tools
90
+ - Missing format functions (raw JSON returned to user)
91
+ - Description quality issues (vague, missing, or misleading)
92
+ - Schema design issues (required fields that should be optional, missing defaults, overly broad types)
93
+ - Performance observations (unexpectedly slow responses)
94
+
95
+ ---
96
+
97
+ ## Checklist
98
+
99
+ - [ ] All registered tools tested (happy path + edge cases)
100
+ - [ ] All registered resources tested (happy path + not found)
101
+ - [ ] All registered prompts tested (happy path + defaults)
102
+ - [ ] Error messages reviewed for clarity and actionability
103
+ - [ ] Descriptions reviewed for completeness and accuracy
104
+ - [ ] Format functions verified (or absence noted)
105
+ - [ ] Summary report presented to user
@@ -11,6 +11,9 @@
11
11
  # ── Storage ───────────────────────────────────────────────────────────
12
12
  # STORAGE_PROVIDER_TYPE=in-memory # in-memory | filesystem | supabase | cloudflare-r2 | cloudflare-kv | cloudflare-d1
13
13
 
14
+ # ── Session ──────────────────────────────────────────────────────────
15
+ # MCP_SESSION_MODE=stateful # stateful | stateless (default: stateful)
16
+
14
17
  # ── Logging ───────────────────────────────────────────────────────────
15
18
  # MCP_LOG_LEVEL=info # debug | info | notice | warning | error
16
19
 
@@ -19,6 +19,24 @@
19
19
 
20
20
  ---
21
21
 
22
+ ## What's Next?
23
+
24
+ When the user asks what to do next, what's left, or needs direction, suggest relevant options based on the current project state:
25
+
26
+ 1. **Re-run the `setup` skill** — ensures CLAUDE.md, skills, structure, and metadata are populated and up to date with the current codebase
27
+ 2. **Run the `design-mcp-server` skill** — if the tool/resource surface hasn't been mapped yet, work through domain design
28
+ 3. **Add tools/resources/prompts** — scaffold new definitions using the `add-tool`, `add-resource`, `add-prompt` skills
29
+ 4. **Add services** — scaffold domain service integrations using the `add-service` skill
30
+ 5. **Add tests** — scaffold tests for existing definitions using the `add-test` skill
31
+ 6. **Field-test definitions** — exercise tools/resources/prompts with real inputs using the `field-test` skill, get a report of issues and pain points
32
+ 7. **Run `devcheck`** — lint, format, typecheck, and security audit
33
+ 8. **Run the `polish-docs-meta` skill** — finalize README, CHANGELOG, metadata, and agent protocol for shipping
34
+ 9. **Run the `maintenance` skill** — sync skills and dependencies after framework updates
35
+
36
+ Tailor suggestions to what's actually missing or stale — don't recite the full list every time.
37
+
38
+ ---
39
+
22
40
  ## Core Rules
23
41
 
24
42
  - **Logic throws, framework catches.** Tool/resource handlers are pure — throw on failure, no `try/catch`. Plain `Error` is fine; the framework catches, classifies, and formats. Use error factories (`notFound()`, `validationError()`, etc.) when the error code matters.
@@ -205,6 +223,7 @@ Available skills:
205
223
  | `add-prompt` | Scaffold a new prompt definition |
206
224
  | `add-service` | Scaffold a new service integration |
207
225
  | `add-test` | Scaffold test file for a tool, resource, or service |
226
+ | `field-test` | Exercise tools/resources/prompts with real inputs, verify behavior, report issues |
208
227
  | `devcheck` | Lint, format, typecheck, audit |
209
228
  | `polish-docs-meta` | Finalize docs, README, metadata, and agent protocol for shipping |
210
229
  | `maintenance` | Sync skills and dependencies after updates |
@@ -19,6 +19,24 @@
19
19
 
20
20
  ---
21
21
 
22
+ ## What's Next?
23
+
24
+ When the user asks what to do next, what's left, or needs direction, suggest relevant options based on the current project state:
25
+
26
+ 1. **Re-run the `setup` skill** — ensures CLAUDE.md, skills, structure, and metadata are populated and up to date with the current codebase
27
+ 2. **Run the `design-mcp-server` skill** — if the tool/resource surface hasn't been mapped yet, work through domain design
28
+ 3. **Add tools/resources/prompts** — scaffold new definitions using the `add-tool`, `add-resource`, `add-prompt` skills
29
+ 4. **Add services** — scaffold domain service integrations using the `add-service` skill
30
+ 5. **Add tests** — scaffold tests for existing definitions using the `add-test` skill
31
+ 6. **Field-test definitions** — exercise tools/resources/prompts with real inputs using the `field-test` skill, get a report of issues and pain points
32
+ 7. **Run `devcheck`** — lint, format, typecheck, and security audit
33
+ 8. **Run the `polish-docs-meta` skill** — finalize README, CHANGELOG, metadata, and agent protocol for shipping
34
+ 9. **Run the `maintenance` skill** — sync skills and dependencies after framework updates
35
+
36
+ Tailor suggestions to what's actually missing or stale — don't recite the full list every time.
37
+
38
+ ---
39
+
22
40
  ## Core Rules
23
41
 
24
42
  - **Logic throws, framework catches.** Tool/resource handlers are pure — throw on failure, no `try/catch`. Plain `Error` is fine; the framework catches, classifies, and formats. Use error factories (`notFound()`, `validationError()`, etc.) when the error code matters.
@@ -205,6 +223,7 @@ Available skills:
205
223
  | `add-prompt` | Scaffold a new prompt definition |
206
224
  | `add-service` | Scaffold a new service integration |
207
225
  | `add-test` | Scaffold test file for a tool, resource, or service |
226
+ | `field-test` | Exercise tools/resources/prompts with real inputs, verify behavior, report issues |
208
227
  | `devcheck` | Lint, format, typecheck, audit |
209
228
  | `polish-docs-meta` | Finalize docs, README, metadata, and agent protocol for shipping |
210
229
  | `maintenance` | Sync skills and dependencies after updates |
@@ -46,10 +46,7 @@ COPY package.json bun.lock ./
46
46
 
47
47
  # Install only production dependencies, ignoring any lifecycle scripts (like 'prepare')
48
48
  # that are not needed in the final production image.
49
- # Remove platform-specific bun/rollup binaries pulled as optionalDependencies
50
- # by @modelcontextprotocol/ext-apps — only needed for its build toolchain, not runtime.
51
- RUN bun install --production --frozen-lockfile --ignore-scripts \
52
- && rm -rf node_modules/@oven node_modules/@rollup
49
+ RUN bun install --production --frozen-lockfile --ignore-scripts
53
50
 
54
51
  # Copy the compiled application code from the build stage
55
52
  COPY --from=build /usr/src/app/dist ./dist
@@ -0,0 +1,15 @@
1
+ {
2
+ "depcheck": {
3
+ "ignores": [
4
+ "@types/*",
5
+ "pino-pretty",
6
+ "typescript",
7
+ "tsc-alias",
8
+ "@cyanheads/mcp-ts-core"
9
+ ],
10
+ "ignorePatterns": []
11
+ },
12
+ "outdated": {
13
+ "allowlist": []
14
+ }
15
+ }