@cyanheads/mcp-ts-core 0.6.13 → 0.6.14
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 +2 -1
- package/README.md +2 -2
- package/changelog/0.6.x/0.6.14.md +22 -0
- package/dist/cli/init.js +1 -0
- package/dist/cli/init.js.map +1 -1
- package/dist/logs/combined.log +4 -4
- package/dist/logs/error.log +4 -4
- package/package.json +2 -1
- package/scripts/check-skills-sync.ts +150 -0
- package/scripts/devcheck.ts +27 -0
- package/skills/polish-docs-meta/SKILL.md +2 -0
- package/skills/release-and-publish/SKILL.md +1 -0
- package/skills/security-pass/SKILL.md +277 -0
- package/skills/setup/SKILL.md +3 -2
- package/templates/AGENTS.md +4 -2
- package/templates/CLAUDE.md +4 -2
package/CLAUDE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Agent Protocol
|
|
2
2
|
|
|
3
|
-
**Package:** `@cyanheads/mcp-ts-core` · **Version:** 0.6.
|
|
3
|
+
**Package:** `@cyanheads/mcp-ts-core` · **Version:** 0.6.14
|
|
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.
|
|
@@ -461,6 +461,7 @@ Detailed method signatures, options, and examples live in skill files. Read the
|
|
|
461
461
|
| `add-service` | `skills/add-service/SKILL.md` | Scaffold a new domain service |
|
|
462
462
|
| `add-test` | `skills/add-test/SKILL.md` | Scaffold test file for a tool, resource, or service |
|
|
463
463
|
| `field-test` | `skills/field-test/SKILL.md` | Exercise tools/resources/prompts with real inputs, verify behavior, report issues |
|
|
464
|
+
| `security-pass` | `skills/security-pass/SKILL.md` | Review server for MCP-flavored security gaps: output injection, scope blast radius, elicit gaps, upstream auth, input sinks, tenant isolation, leakage, resource bounds |
|
|
464
465
|
| `add-provider` | `skills/add-provider/SKILL.md` | Add a new provider implementation |
|
|
465
466
|
| `add-export` | `skills/add-export/SKILL.md` | Add a new subpath export |
|
|
466
467
|
| `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
|
-
[](./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
|
|
|
@@ -43,7 +43,7 @@ bun install
|
|
|
43
43
|
|
|
44
44
|
You get a scaffolded project with `CLAUDE.md`, Agent Skills, and a `src/` tree ready for your tools. Infrastructure — transports, auth, storage, telemetry, lifecycle, linting — lives in `node_modules`. What's left is domain: which APIs to wrap, which workflows to expose.
|
|
45
45
|
|
|
46
|
-
Start your coding agent (Claude Code, Codex, Cursor), describe the system you want to expose, and it drives the build. The included skills cover the full cycle: `setup`, `design-mcp-server`, scaffolding, testing, `release-and-publish`.
|
|
46
|
+
Start your coding agent (Claude Code, Codex, Cursor), describe the system you want to expose, and it drives the build. The included skills cover the full cycle: `setup`, `design-mcp-server`, scaffolding, testing, `security-pass`, `release-and-publish`.
|
|
47
47
|
|
|
48
48
|
### What you get
|
|
49
49
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: New security-pass skill (8-axis MCP server audit) and devcheck Skills Sync step verifying skills/ propagated to local agent mirrors
|
|
3
|
+
breaking: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 0.6.14 — 2026-04-23
|
|
7
|
+
|
|
8
|
+
Adds a structured pre-release security review path and closes the silent-drift gap between `skills/` and local agent mirrors. No code-runtime changes.
|
|
9
|
+
|
|
10
|
+
## Added
|
|
11
|
+
|
|
12
|
+
- **`skills/security-pass/`** (v1.0). New audit skill that walks an MCP server through eight axes shaped around what the server builder actually controls — tool output as LLM injection vector, scope granularity, destructive ops without `ctx.elicit`, upstream auth shape, input sinks (URL/path/shell/proto-pollution), tenant isolation (module-scope state in services), leakage back (errors/outputs/logs), and resource bounds. Produces grouped findings (critical → high → medium → low) and a numbered, cherry-pickable options list. Cross-referenced from `polish-docs-meta`, `release-and-publish`, `setup`, `templates/AGENTS.md`/`CLAUDE.md` "What's Next?" sequence (now slot 8), and the root agent protocol skill table.
|
|
13
|
+
- **`Skills Sync` devcheck step** (`scripts/check-skills-sync.ts`, 150 lines). Compares canonical `skills/` against `.agents/skills/` and `.claude/skills/` mirrors and reports missing or content-drifted files. Skipped automatically when `skills/` or both mirrors are absent (non-mirrored projects). Drift is demoted to a warning in devcheck so it surfaces without blocking. Per-skill or per-file ignores live in `devcheck.config.json` `skillsSync.ignore`. Script is shipped via `package.json` `files` and copied into new servers by the init CLI.
|
|
14
|
+
|
|
15
|
+
## Changed
|
|
16
|
+
|
|
17
|
+
- **`templates/AGENTS.md`** / **`templates/CLAUDE.md`** — "What's Next?" sequence reordered to insert `security-pass` between `devcheck` and `polish-docs-meta` (steps renumbered 8 → 10). Skill table updated.
|
|
18
|
+
- **`README.md`** — `security-pass` added to the included-skills lifecycle blurb between `testing` and `release-and-publish`.
|
|
19
|
+
|
|
20
|
+
## Removed
|
|
21
|
+
|
|
22
|
+
- **`scripts/make-executable.ts`** (123 lines). Unreferenced — not in `package.json` `files`, not in `SCAFFOLD_SCRIPTS`, not invoked by any build script. The framework's CLI binary uses Node's shebang directly; chmod handling at install time is npm's job.
|
package/dist/cli/init.js
CHANGED
package/dist/cli/init.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/cli/init.ts"],"names":[],"mappings":";A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I,EAAE,CAAC;YACT,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,EAAE,QAAQ,IAAI,EAAE,CAAC,CAAC;QAC3C,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,EAAE,eAAe,CAAC,CAAC;QAC1C,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,sDAAsD,CAAC,CAAC;QAC/E,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;QAC7B,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QAC5B,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;QAC/B,OAAO,CAAC,GAAG,CAAC,oEAAoE,CAAC,CAAC;QAClF,OAAO,CAAC,GAAG,EAAE,CAAC;IAChB,CAAC;AACH,CAAC"}
|
package/dist/logs/combined.log
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{"level":50,"time":
|
|
2
|
-
{"level":50,"time":
|
|
3
|
-
{"level":50,"time":
|
|
4
|
-
{"level":50,"time":
|
|
1
|
+
{"level":50,"time":1776980769962,"env":"testing","version":"0.0.0-test","pid":37808,"requestId":"OVT1K-CNGIB","timestamp":"2026-04-23T21:46:09.961Z","operation":"HandleToolRequest","input":{"message":"blocked"},"critical":false,"errorCode":-32005,"originalErrorType":"McpError","finalErrorType":"McpError","sessionId":"0a31a16b8e1ef00f4861dc55307c97ca3c475ea7e0c056a72f9d9abc9e666565","toolName":"scoped_echo","tenantId":"authz-tenant","auth":{"sub":"authz-user","scopes":["tool:other:read"],"clientId":"authz-client","tenantId":"authz-tenant"},"errorData":{"sessionId":"0a31a16b8e1ef00f4861dc55307c97ca3c475ea7e0c056a72f9d9abc9e666565","toolName":"scoped_echo","input":{"message":"blocked"},"requestId":"OVT1K-CNGIB","timestamp":"2026-04-23T21:46:09.961Z","tenantId":"authz-tenant","operation":"HandleToolRequest","auth":{"sub":"authz-user","scopes":["tool:other:read"],"clientId":"authz-client","tenantId":"authz-tenant"},"originalErrorName":"McpError","originalMessage":"Insufficient permissions.","originalStack":"McpError: Insufficient permissions.\n at forbidden (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:84:58)\n at withRequiredScopes (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/lib/authUtils.js:61:15)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:68:17)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:231:34)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Insufficient permissions.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:168:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:101:42)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:231:34)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at processTicksAndRejections (native:7:39)","msg":"Error in tool:scoped_echo: Insufficient permissions."}
|
|
2
|
+
{"level":50,"time":1776980770606,"env":"testing","version":"0.6.14","pid":37812,"requestId":"VSJZ5-S5BH9","timestamp":"2026-04-23T21:46:10.606Z","operation":"httpErrorHandler","critical":false,"errorCode":-32006,"originalErrorType":"McpError","finalErrorType":"McpError","path":"/mcp","method":"POST","errorData":{"path":"/mcp","method":"POST","requestId":"VSJZ5-S5BH9","timestamp":"2026-04-23T21:46:10.606Z","operation":"httpErrorHandler","originalErrorName":"McpError","originalMessage":"Missing or invalid Authorization header. Bearer scheme required.","originalStack":"McpError: Missing or invalid Authorization header. Bearer scheme required.\n at unauthorized (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:86:61)\n at authMiddleware (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/authMiddleware.js:64:19)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpTransport.js:119:22)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at cors2 (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/middleware/cors/index.js:82:11)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Missing or invalid Authorization header. Bearer scheme required.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:168:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpErrorHandler.js:59:39)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:26:25)\n at processTicksAndRejections (native:7:39)","msg":"Error in httpTransport: Missing or invalid Authorization header. Bearer scheme required."}
|
|
3
|
+
{"level":50,"time":1776980770622,"env":"testing","version":"0.6.14","pid":37812,"requestId":"9YIAG-QSYTE","timestamp":"2026-04-23T21:46:10.622Z","operation":"httpErrorHandler","critical":false,"errorCode":-32006,"originalErrorType":"McpError","finalErrorType":"McpError","path":"/mcp","method":"POST","errorData":{"path":"/mcp","method":"POST","requestId":"9YIAG-QSYTE","timestamp":"2026-04-23T21:46:10.622Z","operation":"httpErrorHandler","originalErrorName":"McpError","originalMessage":"Token has expired.","originalStack":"McpError: Token has expired.\n at unauthorized (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:86:61)\n at handleJoseVerifyError (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/lib/claimParser.js:56:11)\n at verify (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/strategies/jwtStrategy.js:91:13)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Token has expired.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:168:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpErrorHandler.js:59:39)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:26:25)\n at processTicksAndRejections (native:7:39)","msg":"Error in httpTransport: Token has expired."}
|
|
4
|
+
{"level":50,"time":1776980770626,"env":"testing","version":"0.6.14","pid":37812,"requestId":"V19S7-NN43O","timestamp":"2026-04-23T21:46:10.626Z","operation":"httpErrorHandler","critical":false,"errorCode":-32006,"originalErrorType":"McpError","finalErrorType":"McpError","path":"/mcp","method":"GET","errorData":{"path":"/mcp","method":"GET","requestId":"V19S7-NN43O","timestamp":"2026-04-23T21:46:10.626Z","operation":"httpErrorHandler","originalErrorName":"McpError","originalMessage":"Missing or invalid Authorization header. Bearer scheme required.","originalStack":"McpError: Missing or invalid Authorization header. Bearer scheme required.\n at unauthorized (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:86:61)\n at authMiddleware (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/authMiddleware.js:64:19)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpTransport.js:119:22)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at cors2 (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/middleware/cors/index.js:82:11)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Missing or invalid Authorization header. Bearer scheme required.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:168:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpErrorHandler.js:59:39)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:26:25)\n at processTicksAndRejections (native:7:39)","msg":"Error in httpTransport: Missing or invalid Authorization header. Bearer scheme required."}
|
package/dist/logs/error.log
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{"level":50,"time":
|
|
2
|
-
{"level":50,"time":
|
|
3
|
-
{"level":50,"time":
|
|
4
|
-
{"level":50,"time":
|
|
1
|
+
{"level":50,"time":1776980769962,"env":"testing","version":"0.0.0-test","pid":37808,"requestId":"OVT1K-CNGIB","timestamp":"2026-04-23T21:46:09.961Z","operation":"HandleToolRequest","input":{"message":"blocked"},"critical":false,"errorCode":-32005,"originalErrorType":"McpError","finalErrorType":"McpError","sessionId":"0a31a16b8e1ef00f4861dc55307c97ca3c475ea7e0c056a72f9d9abc9e666565","toolName":"scoped_echo","tenantId":"authz-tenant","auth":{"sub":"authz-user","scopes":["tool:other:read"],"clientId":"authz-client","tenantId":"authz-tenant"},"errorData":{"sessionId":"0a31a16b8e1ef00f4861dc55307c97ca3c475ea7e0c056a72f9d9abc9e666565","toolName":"scoped_echo","input":{"message":"blocked"},"requestId":"OVT1K-CNGIB","timestamp":"2026-04-23T21:46:09.961Z","tenantId":"authz-tenant","operation":"HandleToolRequest","auth":{"sub":"authz-user","scopes":["tool:other:read"],"clientId":"authz-client","tenantId":"authz-tenant"},"originalErrorName":"McpError","originalMessage":"Insufficient permissions.","originalStack":"McpError: Insufficient permissions.\n at forbidden (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:84:58)\n at withRequiredScopes (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/lib/authUtils.js:61:15)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:68:17)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:231:34)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Insufficient permissions.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:168:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/tools/utils/toolHandlerFactory.js:101:42)\n at executeToolHandler (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:231:34)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js:126:43)\n at processTicksAndRejections (native:7:39)","msg":"Error in tool:scoped_echo: Insufficient permissions."}
|
|
2
|
+
{"level":50,"time":1776980770606,"env":"testing","version":"0.6.14","pid":37812,"requestId":"VSJZ5-S5BH9","timestamp":"2026-04-23T21:46:10.606Z","operation":"httpErrorHandler","critical":false,"errorCode":-32006,"originalErrorType":"McpError","finalErrorType":"McpError","path":"/mcp","method":"POST","errorData":{"path":"/mcp","method":"POST","requestId":"VSJZ5-S5BH9","timestamp":"2026-04-23T21:46:10.606Z","operation":"httpErrorHandler","originalErrorName":"McpError","originalMessage":"Missing or invalid Authorization header. Bearer scheme required.","originalStack":"McpError: Missing or invalid Authorization header. Bearer scheme required.\n at unauthorized (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:86:61)\n at authMiddleware (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/authMiddleware.js:64:19)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpTransport.js:119:22)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at cors2 (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/middleware/cors/index.js:82:11)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Missing or invalid Authorization header. Bearer scheme required.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:168:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpErrorHandler.js:59:39)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:26:25)\n at processTicksAndRejections (native:7:39)","msg":"Error in httpTransport: Missing or invalid Authorization header. Bearer scheme required."}
|
|
3
|
+
{"level":50,"time":1776980770622,"env":"testing","version":"0.6.14","pid":37812,"requestId":"9YIAG-QSYTE","timestamp":"2026-04-23T21:46:10.622Z","operation":"httpErrorHandler","critical":false,"errorCode":-32006,"originalErrorType":"McpError","finalErrorType":"McpError","path":"/mcp","method":"POST","errorData":{"path":"/mcp","method":"POST","requestId":"9YIAG-QSYTE","timestamp":"2026-04-23T21:46:10.622Z","operation":"httpErrorHandler","originalErrorName":"McpError","originalMessage":"Token has expired.","originalStack":"McpError: Token has expired.\n at unauthorized (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:86:61)\n at handleJoseVerifyError (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/lib/claimParser.js:56:11)\n at verify (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/strategies/jwtStrategy.js:91:13)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Token has expired.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:168:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpErrorHandler.js:59:39)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:26:25)\n at processTicksAndRejections (native:7:39)","msg":"Error in httpTransport: Token has expired."}
|
|
4
|
+
{"level":50,"time":1776980770626,"env":"testing","version":"0.6.14","pid":37812,"requestId":"V19S7-NN43O","timestamp":"2026-04-23T21:46:10.626Z","operation":"httpErrorHandler","critical":false,"errorCode":-32006,"originalErrorType":"McpError","finalErrorType":"McpError","path":"/mcp","method":"GET","errorData":{"path":"/mcp","method":"GET","requestId":"V19S7-NN43O","timestamp":"2026-04-23T21:46:10.626Z","operation":"httpErrorHandler","originalErrorName":"McpError","originalMessage":"Missing or invalid Authorization header. Bearer scheme required.","originalStack":"McpError: Missing or invalid Authorization header. Bearer scheme required.\n at unauthorized (/Users/casey/Developer/github/mcp-ts-core/dist/types-global/errors.js:86:61)\n at authMiddleware (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/auth/authMiddleware.js:64:19)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpTransport.js:119:22)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:22:23)\n at cors2 (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/middleware/cors/index.js:82:11)\n at processTicksAndRejections (native:7:39)"},"stack":"McpError: Missing or invalid Authorization header. Bearer scheme required.\n at handleError (/Users/casey/Developer/github/mcp-ts-core/dist/utils/internal/error-handler/errorHandler.js:168:23)\n at <anonymous> (/Users/casey/Developer/github/mcp-ts-core/dist/mcp-server/transports/http/httpErrorHandler.js:59:39)\n at dispatch (/Users/casey/Developer/github/mcp-ts-core/node_modules/hono/dist/compose.js:26:25)\n at processTicksAndRejections (native:7:39)","msg":"Error in httpTransport: Missing or invalid Authorization header. Bearer scheme required."}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyanheads/mcp-ts-core",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.14",
|
|
4
4
|
"mcpName": "io.github.cyanheads/mcp-ts-core",
|
|
5
5
|
"description": "Agent-native TypeScript framework for building MCP servers. Declarative definitions with auth, multi-backend storage, OpenTelemetry, and first-class support for Bun/Node/Cloudflare Workers.",
|
|
6
6
|
"main": "dist/core/index.js",
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"scripts/build-changelog.ts",
|
|
12
12
|
"scripts/build.ts",
|
|
13
13
|
"scripts/check-docs-sync.ts",
|
|
14
|
+
"scripts/check-skills-sync.ts",
|
|
14
15
|
"scripts/clean.ts",
|
|
15
16
|
"scripts/devcheck.ts",
|
|
16
17
|
"scripts/lint-mcp.ts",
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview Verifies that `skills/` (canonical) has been propagated to the
|
|
4
|
+
* local mirrors `.agents/skills/` and `.claude/skills/`. The maintenance skill
|
|
5
|
+
* updates `skills/` for downstream servers; the mirrors are what local agent
|
|
6
|
+
* toolchains actually read, and silent drift means agents run on stale guidance.
|
|
7
|
+
*
|
|
8
|
+
* Propagation is one-way (`skills/` → mirrors), so only missing or
|
|
9
|
+
* content-drifted files are reported. Files that exist *only* in a mirror are
|
|
10
|
+
* typically unrelated skills (globally installed, other sources) and are left
|
|
11
|
+
* alone.
|
|
12
|
+
*
|
|
13
|
+
* Behavior:
|
|
14
|
+
* • In sync → pass
|
|
15
|
+
* • Mirrors missing entirely → skip (no mirrors to sync)
|
|
16
|
+
* • Drift (missing or changed files) → exit 1 with details (devcheck demotes to warning)
|
|
17
|
+
*
|
|
18
|
+
* Ignore specific skills or files via `devcheck.config.json`:
|
|
19
|
+
*
|
|
20
|
+
* {
|
|
21
|
+
* "skillsSync": {
|
|
22
|
+
* "ignore": ["some-skill", "other-skill/SKILL.md"]
|
|
23
|
+
* }
|
|
24
|
+
* }
|
|
25
|
+
*
|
|
26
|
+
* Patterns match relative paths under `skills/`. A bare name like `add-tool`
|
|
27
|
+
* ignores the whole directory; `add-tool/SKILL.md` ignores a single file.
|
|
28
|
+
* `.DS_Store` and other OS cruft are ignored by default.
|
|
29
|
+
*
|
|
30
|
+
* Runs as a devcheck step and standalone: `bun run scripts/check-skills-sync.ts`.
|
|
31
|
+
*
|
|
32
|
+
* @module scripts/check-skills-sync
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
import { existsSync, readdirSync, readFileSync } from 'node:fs';
|
|
36
|
+
import { relative, resolve, sep } from 'node:path';
|
|
37
|
+
import process from 'node:process';
|
|
38
|
+
|
|
39
|
+
const ROOT = resolve('.');
|
|
40
|
+
const SKILLS_DIR = resolve(ROOT, 'skills');
|
|
41
|
+
const MIRRORS: { label: string; path: string }[] = [
|
|
42
|
+
{ label: '.agents/skills', path: resolve(ROOT, '.agents/skills') },
|
|
43
|
+
{ label: '.claude/skills', path: resolve(ROOT, '.claude/skills') },
|
|
44
|
+
];
|
|
45
|
+
|
|
46
|
+
interface DevcheckConfig {
|
|
47
|
+
skillsSync?: { ignore?: string[] };
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** OS/editor noise we never want to flag as drift. */
|
|
51
|
+
const DEFAULT_IGNORES = ['.DS_Store', 'Thumbs.db'];
|
|
52
|
+
|
|
53
|
+
function loadIgnorePatterns(): string[] {
|
|
54
|
+
try {
|
|
55
|
+
const cfg = JSON.parse(
|
|
56
|
+
readFileSync(resolve(ROOT, 'devcheck.config.json'), 'utf-8'),
|
|
57
|
+
) as DevcheckConfig;
|
|
58
|
+
return [...DEFAULT_IGNORES, ...(cfg.skillsSync?.ignore ?? [])];
|
|
59
|
+
} catch {
|
|
60
|
+
return [...DEFAULT_IGNORES];
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function isIgnored(relPath: string, patterns: string[]): boolean {
|
|
65
|
+
const basename = relPath.split('/').pop() ?? relPath;
|
|
66
|
+
return patterns.some((p) => p === relPath || p === basename || relPath.startsWith(`${p}/`));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function walkFiles(root: string): string[] {
|
|
70
|
+
const files: string[] = [];
|
|
71
|
+
const walk = (dir: string) => {
|
|
72
|
+
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
73
|
+
const full = resolve(dir, entry.name);
|
|
74
|
+
if (entry.isDirectory()) walk(full);
|
|
75
|
+
else if (entry.isFile()) files.push(relative(root, full).split(sep).join('/'));
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
walk(root);
|
|
79
|
+
return files;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (!existsSync(SKILLS_DIR)) {
|
|
83
|
+
console.log('Skipped: no skills/ directory.');
|
|
84
|
+
process.exit(0);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const presentMirrors = MIRRORS.filter((m) => existsSync(m.path));
|
|
88
|
+
if (presentMirrors.length === 0) {
|
|
89
|
+
console.log('Skipped: no skill mirrors (.agents/skills, .claude/skills) present.');
|
|
90
|
+
process.exit(0);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const ignore = loadIgnorePatterns();
|
|
94
|
+
const canonical = walkFiles(SKILLS_DIR).filter((f) => !isIgnored(f, ignore));
|
|
95
|
+
|
|
96
|
+
const missing: Record<string, string[]> = {};
|
|
97
|
+
const drifted: Record<string, string[]> = {};
|
|
98
|
+
|
|
99
|
+
for (const mirror of presentMirrors) {
|
|
100
|
+
const missingHere: string[] = [];
|
|
101
|
+
const driftedHere: string[] = [];
|
|
102
|
+
for (const file of canonical) {
|
|
103
|
+
const mirrorFile = resolve(mirror.path, file);
|
|
104
|
+
if (!existsSync(mirrorFile)) {
|
|
105
|
+
missingHere.push(file);
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
const a = readFileSync(resolve(SKILLS_DIR, file), 'utf-8');
|
|
109
|
+
const b = readFileSync(mirrorFile, 'utf-8');
|
|
110
|
+
if (a !== b) driftedHere.push(file);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
if (missingHere.length) missing[mirror.label] = missingHere.sort();
|
|
114
|
+
if (driftedHere.length) drifted[mirror.label] = driftedHere.sort();
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const totals = {
|
|
118
|
+
missing: Object.values(missing).reduce((n, arr) => n + arr.length, 0),
|
|
119
|
+
drifted: Object.values(drifted).reduce((n, arr) => n + arr.length, 0),
|
|
120
|
+
};
|
|
121
|
+
const driftCount = totals.missing + totals.drifted;
|
|
122
|
+
|
|
123
|
+
if (driftCount === 0) {
|
|
124
|
+
console.log(`skills/ is in sync with ${presentMirrors.map((m) => m.label).join(' and ')}.`);
|
|
125
|
+
process.exit(0);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
const lines: string[] = [];
|
|
129
|
+
lines.push(
|
|
130
|
+
`skills/ has drifted from ${presentMirrors.length > 1 ? 'mirrors' : 'its mirror'} ` +
|
|
131
|
+
`(${totals.missing} missing, ${totals.drifted} changed).`,
|
|
132
|
+
);
|
|
133
|
+
|
|
134
|
+
const renderSection = (title: string, groups: Record<string, string[]>) => {
|
|
135
|
+
for (const [label, files] of Object.entries(groups)) {
|
|
136
|
+
lines.push('');
|
|
137
|
+
lines.push(`${title} ${label}/:`);
|
|
138
|
+
for (const file of files) lines.push(` - ${file}`);
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
renderSection('Missing in', missing);
|
|
143
|
+
renderSection('Content differs in', drifted);
|
|
144
|
+
|
|
145
|
+
lines.push('');
|
|
146
|
+
lines.push('Fix: propagate skills/ to the mirror(s), or add entries to');
|
|
147
|
+
lines.push(' devcheck.config.json `skillsSync.ignore` to silence specific paths.');
|
|
148
|
+
|
|
149
|
+
console.log(lines.join('\n'));
|
|
150
|
+
process.exit(1);
|
package/scripts/devcheck.ts
CHANGED
|
@@ -239,6 +239,9 @@ interface DevcheckConfig {
|
|
|
239
239
|
outdated?: {
|
|
240
240
|
allowlist?: string[];
|
|
241
241
|
};
|
|
242
|
+
skillsSync?: {
|
|
243
|
+
ignore?: string[];
|
|
244
|
+
};
|
|
242
245
|
}
|
|
243
246
|
|
|
244
247
|
function loadDevcheckConfig(rootDir: string): DevcheckConfig {
|
|
@@ -421,6 +424,30 @@ const ALL_CHECKS: Check[] = [
|
|
|
421
424
|
tip: (c) =>
|
|
422
425
|
`Edit both files together, or run ${c.bold('cp CLAUDE.md AGENTS.md')} (or reverse) to resync.`,
|
|
423
426
|
},
|
|
427
|
+
{
|
|
428
|
+
name: 'Skills Sync',
|
|
429
|
+
flag: '--no-skills-sync',
|
|
430
|
+
canFix: false,
|
|
431
|
+
// Compares canonical skills/ against local mirrors (.agents/skills, .claude/skills).
|
|
432
|
+
// Skipped when skills/ or both mirrors are absent (non-mirrored projects).
|
|
433
|
+
// Drift is demoted to a warning via isSuccess — intentional ignores live in
|
|
434
|
+
// devcheck.config.json `skillsSync.ignore`.
|
|
435
|
+
getCommand: () => {
|
|
436
|
+
const hasSkills = existsSync(path.join(ROOT_DIR, 'skills'));
|
|
437
|
+
const hasMirrors =
|
|
438
|
+
existsSync(path.join(ROOT_DIR, '.agents/skills')) ||
|
|
439
|
+
existsSync(path.join(ROOT_DIR, '.claude/skills'));
|
|
440
|
+
if (!hasSkills || !hasMirrors) return null;
|
|
441
|
+
return ['bun', 'run', 'scripts/check-skills-sync.ts'];
|
|
442
|
+
},
|
|
443
|
+
isSuccess: (result) => {
|
|
444
|
+
if (result.exitCode === 0) return true;
|
|
445
|
+
const firstLine = result.stdout.split('\n')[0]?.trim() || 'Skills mirrors have drifted.';
|
|
446
|
+
return { success: true, warning: firstLine };
|
|
447
|
+
},
|
|
448
|
+
tip: (c) =>
|
|
449
|
+
`Propagate ${c.bold('skills/')} to ${c.bold('.agents/skills/')} and ${c.bold('.claude/skills/')}, or add entries to ${c.bold('devcheck.config.json')} ${c.bold('skillsSync.ignore')}.`,
|
|
450
|
+
},
|
|
424
451
|
{
|
|
425
452
|
name: 'Changelog Sync',
|
|
426
453
|
flag: '--no-changelog-sync',
|
|
@@ -19,6 +19,8 @@ metadata:
|
|
|
19
19
|
|
|
20
20
|
Prefer running after implementation is complete, but safe to re-run at any point — steps are idempotent.
|
|
21
21
|
|
|
22
|
+
**Companion:** pair with `security-pass` for a full pre-ship review — this skill polishes docs and metadata; `security-pass` audits handlers for MCP-specific security gaps.
|
|
23
|
+
|
|
22
24
|
## Prerequisites
|
|
23
25
|
|
|
24
26
|
- [ ] All tools/resources/prompts implemented and registered
|
|
@@ -13,6 +13,7 @@ metadata:
|
|
|
13
13
|
|
|
14
14
|
This skill runs **after** git wrapup. By the time it's invoked:
|
|
15
15
|
|
|
16
|
+
- Pre-wrapup verification is done (`field-test`, `security-pass`, `polish-docs-meta` as applicable)
|
|
16
17
|
- `package.json` version is bumped
|
|
17
18
|
- `changelog/<major.minor>.x/<version>.md` is authored
|
|
18
19
|
- `CHANGELOG.md` is regenerated
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: security-pass
|
|
3
|
+
description: >
|
|
4
|
+
Review an MCP server for common security gaps: tool output as LLM injection, scope blast radius, destructive ops without consent, upstream auth shape, input sinks, tenant isolation, leaked data, unbounded resources. Use before a release, after a batch of handler changes, or when the user asks for a security review, audit, or hardening pass. Produces grouped findings and a numbered options list.
|
|
5
|
+
metadata:
|
|
6
|
+
author: cyanheads
|
|
7
|
+
version: "1.0"
|
|
8
|
+
audience: external
|
|
9
|
+
type: audit
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Context
|
|
13
|
+
|
|
14
|
+
An MCP server is a new attack surface with unique properties — tool output feeds back into the LLM's context, scopes gate what the model can do on the user's behalf, and per-request state must stay tenant-scoped. This skill walks a server through eight axes shaped around what the server builder actually controls. Framework-level concerns (transport, JSON-RPC parsing, auto-correlation, error classification) are out of scope — `mcp-ts-core` handles those.
|
|
15
|
+
|
|
16
|
+
**Read the code. Don't trust patterns from memory.**
|
|
17
|
+
|
|
18
|
+
## When to Use
|
|
19
|
+
|
|
20
|
+
- Before a release
|
|
21
|
+
- After adding or modifying a batch of handlers or services
|
|
22
|
+
- Periodically (quarterly-ish)
|
|
23
|
+
- User asks for a "security review", "audit", "hardening pass", or similar
|
|
24
|
+
|
|
25
|
+
## Inputs
|
|
26
|
+
|
|
27
|
+
Gather before starting. Ask if unclear:
|
|
28
|
+
|
|
29
|
+
1. **Scope** — whole server, specific module, or recent diff?
|
|
30
|
+
2. **Known concerns** — anything the user already suspects?
|
|
31
|
+
3. **Deployment context** — multi-tenant? public network? auth mode? (stdio / local-http / public-http behave differently)
|
|
32
|
+
4. **Severity floor** — report all findings, or skip medium/low?
|
|
33
|
+
|
|
34
|
+
## Steps
|
|
35
|
+
|
|
36
|
+
### 1. Build the map
|
|
37
|
+
|
|
38
|
+
Surface what you're auditing before diving in.
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
find src/mcp-server/tools/definitions -name "*.tool.ts" | sort
|
|
42
|
+
find src/mcp-server/resources/definitions -name "*.resource.ts" 2>/dev/null | sort
|
|
43
|
+
find src/services -maxdepth 1 -mindepth 1 -type d | sort
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Note: tool count, auth mode, storage provider, upstream APIs, which tools have `destructiveHint`, which services hold module-scope state.
|
|
47
|
+
|
|
48
|
+
Use `TaskCreate` — one task per axis. Mark complete as you go.
|
|
49
|
+
|
|
50
|
+
### 2. Walk the eight axes
|
|
51
|
+
|
|
52
|
+
#### Axis 1 — Tool output as LLM injection vector
|
|
53
|
+
|
|
54
|
+
Tool output enters the next LLM turn. Relayed upstream content (tickets, scraped text, emails, DB rows) can contain adversarial instructions even when your code is honest.
|
|
55
|
+
|
|
56
|
+
**Look in:** every `*.tool.ts` — `output` schema + `format()`.
|
|
57
|
+
|
|
58
|
+
**Check:**
|
|
59
|
+
|
|
60
|
+
- Handlers that return raw upstream text without structural framing?
|
|
61
|
+
- Does `format()` wrap untrusted content in delimiters (blockquote, fenced code, `<data>` tags)?
|
|
62
|
+
- Output schema distinguishes "data" fields from free-form text?
|
|
63
|
+
|
|
64
|
+
**Smell:** `return { body: await fetch(url).then(r => r.text()) }` rendered directly in `format()`.
|
|
65
|
+
|
|
66
|
+
#### Axis 2 — Scope granularity
|
|
67
|
+
|
|
68
|
+
Every `auth: [...]` entry is a blast-radius dial.
|
|
69
|
+
|
|
70
|
+
**Look in:** every `*.tool.ts` — `auth:` array.
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
grep -rn "auth: \[" src/mcp-server/tools/definitions/
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**Check:**
|
|
77
|
+
|
|
78
|
+
- Tools with `['admin']`, `['*']`, or `[]`?
|
|
79
|
+
- A single scope covering two capabilities that should be separated (read vs write)?
|
|
80
|
+
- Read-only tools never require write scopes?
|
|
81
|
+
|
|
82
|
+
**Smell:** every tool shares the same scope string.
|
|
83
|
+
|
|
84
|
+
#### Axis 3 — Destructive ops without elicit
|
|
85
|
+
|
|
86
|
+
`ctx.elicit` moves consent off the LLM and onto the user. Destructive tools without it trust the LLM not to be tricked.
|
|
87
|
+
|
|
88
|
+
**Look in:** handlers with `destructiveHint: true` or side-effecting verbs in names (`delete_*`, `send_*`, `pay_*`, `publish_*`, `drop_*`).
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
grep -rn "destructiveHint" src/mcp-server/tools/definitions/
|
|
92
|
+
grep -rn "ctx.elicit" src/mcp-server/tools/definitions/
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**Check:**
|
|
96
|
+
|
|
97
|
+
- Each destructive handler calls `ctx.elicit` before the side effect?
|
|
98
|
+
- Fallback when client doesn't support elicit — refuses, not silently proceeds?
|
|
99
|
+
|
|
100
|
+
**Smell:** `destructiveHint: true` file with no `ctx.elicit?.(...)` in it.
|
|
101
|
+
|
|
102
|
+
#### Axis 4 — Upstream auth shape
|
|
103
|
+
|
|
104
|
+
What credentials the server holds, and the blast radius if one leaks.
|
|
105
|
+
|
|
106
|
+
**Look in:** `src/services/*`, `src/config/server-config.ts`.
|
|
107
|
+
|
|
108
|
+
**Check:**
|
|
109
|
+
|
|
110
|
+
- Each upstream API key scoped to minimum required? (No admin keys for read workflows.)
|
|
111
|
+
- Services re-mint downstream tokens with correct `aud`, or passthrough the caller's?
|
|
112
|
+
- Server holds OAuth for N services × M tenants — what does one-tenant compromise expose?
|
|
113
|
+
- Per-tenant rate limits on upstream calls?
|
|
114
|
+
|
|
115
|
+
**Smell:** one global `API_KEY` used across all tenants + retry loop with no upper bound.
|
|
116
|
+
|
|
117
|
+
#### Axis 5 — Input sinks
|
|
118
|
+
|
|
119
|
+
LLM-supplied inputs feel internal but aren't. Classic sinks apply, amplified.
|
|
120
|
+
|
|
121
|
+
**Look in:** all handlers.
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
# URL sinks — SSRF
|
|
125
|
+
grep -rn "z.string().url()" src/
|
|
126
|
+
|
|
127
|
+
# Path sinks — traversal
|
|
128
|
+
grep -rn "readFile\|writeFile\|readdirSync\|createReadStream\|statSync" src/
|
|
129
|
+
|
|
130
|
+
# Shell sinks — command injection
|
|
131
|
+
grep -rnE "\b(exec|spawn|execSync|spawnSync)\b" src/
|
|
132
|
+
|
|
133
|
+
# Merges — prototype pollution
|
|
134
|
+
grep -rn "Object.assign\b\|structuredClone" src/
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
**Check:**
|
|
138
|
+
|
|
139
|
+
- URL-taking tools block private IPs, `file://`, `ftp://`, `localhost`, DNS rebind?
|
|
140
|
+
- Path-taking tools canonicalize (`path.resolve` + assert `startsWith(root + sep)`)?
|
|
141
|
+
- Shell-using tools use an allowlist (never string-concat)?
|
|
142
|
+
- Regex / query / expression inputs bounded?
|
|
143
|
+
- User-JSON merges reject `__proto__`, `constructor`, `prototype` keys?
|
|
144
|
+
|
|
145
|
+
**Smell:** `z.string().url()` with no allowlist; `readFile(input.path)` with no canonicalization.
|
|
146
|
+
|
|
147
|
+
#### Axis 6 — Tenant isolation
|
|
148
|
+
|
|
149
|
+
`ctx.state` is tenant-scoped. Module-scope state is not.
|
|
150
|
+
|
|
151
|
+
**Look in:** `src/services/*`.
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
grep -rnE "^(const|let) .* = new (Map|Set|WeakMap|Array)" src/services/
|
|
155
|
+
grep -rn "^let " src/services/
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**Check:**
|
|
159
|
+
|
|
160
|
+
- Module-scope `Map` / `Set` / cache near tenant-handling code?
|
|
161
|
+
- Upstream connections pooled per-tenant or shared?
|
|
162
|
+
- Any code path uses the global `logger` while carrying per-tenant data (bypassing auto-correlated `ctx.log`)?
|
|
163
|
+
- Could tenant B, served after tenant A, read tenant A's cached data?
|
|
164
|
+
|
|
165
|
+
**Smell:** service file with top-level `const cache = new Map()`.
|
|
166
|
+
|
|
167
|
+
#### Axis 7 — Leakage back
|
|
168
|
+
|
|
169
|
+
What accidentally reaches the LLM, user, or logs.
|
|
170
|
+
|
|
171
|
+
**Look in:** `throw new McpError(...)` sites, `McpError.data` fields, output schemas, `ctx.log.*` calls.
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
grep -rn "new McpError" src/
|
|
175
|
+
grep -rn "ctx.log\." src/
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
**Check:**
|
|
179
|
+
|
|
180
|
+
- Error `data` fields carry upstream response bodies, auth headers, stack traces?
|
|
181
|
+
- Output schemas include token prefixes, internal IDs, session identifiers?
|
|
182
|
+
- `format()` renders fields that shouldn't leave the server?
|
|
183
|
+
- `ctx.log.info(msg, body)` where `body` is the raw request (may contain secrets)?
|
|
184
|
+
|
|
185
|
+
**Smell:** `throw new McpError(code, upstream.message, { raw: upstream.body })`.
|
|
186
|
+
|
|
187
|
+
#### Axis 8 — Resource bounds
|
|
188
|
+
|
|
189
|
+
Unbounded = DoS of self, upstream, or the LLM's context window (billing-DoS is real).
|
|
190
|
+
|
|
191
|
+
**Look in:** handlers with loops, pagination, retries.
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
grep -rnE "while\s*\(|for\s*\(.*of" src/mcp-server/tools/definitions/
|
|
195
|
+
grep -rn "cursor\|nextPage\|paginate" src/
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
**Check:**
|
|
199
|
+
|
|
200
|
+
- Pagination loops have a total-items cap?
|
|
201
|
+
- Retry logic has max attempts + exponential backoff?
|
|
202
|
+
- Output size proportional to input — is there a ceiling?
|
|
203
|
+
- Tools callable in a loop fail-fast on degenerate input (empty string, `0`, `null`)?
|
|
204
|
+
|
|
205
|
+
**Smell:** `while (cursor) { results.push(...); cursor = next; }` with no max count.
|
|
206
|
+
|
|
207
|
+
### 3. Quick sanity pass
|
|
208
|
+
|
|
209
|
+
Fast, sometimes high-leverage. Outside the eight axes.
|
|
210
|
+
|
|
211
|
+
- `bun audit` — any direct high/critical?
|
|
212
|
+
- `package.json` — `postinstall` / lifecycle scripts on added deps?
|
|
213
|
+
- `.env.example` — placeholder values only, never real?
|
|
214
|
+
- Server-specific `ConfigSchema` — fails loudly on missing required keys (not silent defaults)?
|
|
215
|
+
- Any `process.env.*` reads outside the config parser (bypasses validation)?
|
|
216
|
+
|
|
217
|
+
**Automated assist.** `fuzzTool` from `@cyanheads/mcp-ts-core/testing/fuzz` catches crashes, memory leaks, and prototype pollution automatically — run it on each tool as a cheap first pass.
|
|
218
|
+
|
|
219
|
+
### 4. Report
|
|
220
|
+
|
|
221
|
+
Three sections. Summary → findings → numbered options.
|
|
222
|
+
|
|
223
|
+
#### Summary (1 paragraph)
|
|
224
|
+
|
|
225
|
+
Definitions reviewed, axes covered, count by severity, the single most important finding.
|
|
226
|
+
|
|
227
|
+
#### Findings
|
|
228
|
+
|
|
229
|
+
Group by severity. Each 3–5 lines.
|
|
230
|
+
|
|
231
|
+
| Severity | Meaning |
|
|
232
|
+
|:---------|:--------|
|
|
233
|
+
| **critical** | Exploitable now: auth bypass, exfiltration, arbitrary code/file/network access |
|
|
234
|
+
| **high** | Structural gap with clear attacker benefit even without immediate PoC (destructive op without elicit, admin scope on read tool, SSRF-capable URL input) |
|
|
235
|
+
| **medium** | Defense-in-depth gap weakening a boundary (missing per-tenant rate limit, error carries upstream response) |
|
|
236
|
+
| **low** | Hardening / polish (tighter output schema, narrower error data, minor comment) |
|
|
237
|
+
|
|
238
|
+
Format:
|
|
239
|
+
|
|
240
|
+
```
|
|
241
|
+
**<file_or_tool> — Axis <N> — <critical|high|medium|low>**
|
|
242
|
+
Issue: <one line: what's wrong>
|
|
243
|
+
Impact: <one line: what can go wrong>
|
|
244
|
+
Fix: <one line: the change>
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
#### Options
|
|
248
|
+
|
|
249
|
+
Numbered, cherry-pickable.
|
|
250
|
+
|
|
251
|
+
```
|
|
252
|
+
1. Add SSRF guard to `fetch_url.tool.ts` — block private IPs + non-http schemes (critical, #1)
|
|
253
|
+
2. Gate `delete_record.tool.ts` behind `ctx.elicit` (high, #3)
|
|
254
|
+
3. Split `admin` into `record:read` + `record:write` across 4 tools (high, #4)
|
|
255
|
+
4. Move `const tokenCache = new Map()` out of module scope in `auth-service.ts` (medium, #7)
|
|
256
|
+
5. Cap pagination loop in `list_all_tickets` at 1000 items (medium, #9)
|
|
257
|
+
6. Strip upstream response body from `McpError.data` in `sync-service.ts` (low, #11)
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
End with:
|
|
261
|
+
|
|
262
|
+
> Pick by number (e.g. "do 1, 3, 5" or "expand on 2").
|
|
263
|
+
|
|
264
|
+
## Checklist
|
|
265
|
+
|
|
266
|
+
- [ ] Scope confirmed (whole server / module / diff)
|
|
267
|
+
- [ ] Map built: tool count, services, upstream APIs, auth mode
|
|
268
|
+
- [ ] Axis 1 — tool output framing reviewed
|
|
269
|
+
- [ ] Axis 2 — scope granularity audited
|
|
270
|
+
- [ ] Axis 3 — destructive ops verified to elicit
|
|
271
|
+
- [ ] Axis 4 — upstream auth + token passthrough reviewed
|
|
272
|
+
- [ ] Axis 5 — input sinks (URL / path / shell / proto) checked
|
|
273
|
+
- [ ] Axis 6 — tenant isolation: module-scope state swept
|
|
274
|
+
- [ ] Axis 7 — leakage back: errors / outputs / logs reviewed
|
|
275
|
+
- [ ] Axis 8 — resource bounds on loops / retries / pagination
|
|
276
|
+
- [ ] Quick sanity pass: `bun audit`, lifecycle scripts, `.env.example`, config validation
|
|
277
|
+
- [ ] Report: summary → grouped findings → numbered options
|
package/skills/setup/SKILL.md
CHANGED
|
@@ -142,8 +142,9 @@ The included skills form a rough progression — not a rigid sequence, but the t
|
|
|
142
142
|
2. **`add-tool`** / **`add-app-tool`** / **`add-resource`** / **`add-prompt`** / **`add-service`** — scaffold each piece as you go
|
|
143
143
|
3. **`add-test`** — pair tests with each definition (or retrofit later)
|
|
144
144
|
4. **`field-test`** — exercise the built surface with real and adversarial inputs; produces a report of issues and pain points
|
|
145
|
-
5. **`
|
|
146
|
-
6. **`
|
|
145
|
+
5. **`security-pass`** — audit handlers for MCP-specific security gaps: output injection, scope blast radius, input sinks, tenant isolation
|
|
146
|
+
6. **`polish-docs-meta`** — finalize README, metadata, and agent protocol before shipping
|
|
147
|
+
7. **`maintenance`** — after `bun update --latest`, investigate upstream changelogs and re-sync skills
|
|
147
148
|
|
|
148
149
|
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
150
|
|
package/templates/AGENTS.md
CHANGED
|
@@ -29,8 +29,9 @@ When the user asks what to do next, what's left, or needs direction, suggest rel
|
|
|
29
29
|
5. **Add tests** — scaffold tests for existing definitions using the `add-test` skill
|
|
30
30
|
6. **Field-test definitions** — exercise tools/resources/prompts with real inputs using the `field-test` skill, get a report of issues and pain points
|
|
31
31
|
7. **Run `devcheck`** — lint, format, typecheck, and security audit
|
|
32
|
-
8. **Run the `
|
|
33
|
-
9. **Run the `
|
|
32
|
+
8. **Run the `security-pass` skill** — audit handlers for MCP-specific security gaps: output injection, scope blast radius, input sinks, tenant isolation
|
|
33
|
+
9. **Run the `polish-docs-meta` skill** — finalize README, CHANGELOG, metadata, and agent protocol for shipping
|
|
34
|
+
10. **Run the `maintenance` skill** — investigate changelogs, adopt upstream changes, and sync skills after `bun update --latest`
|
|
34
35
|
|
|
35
36
|
Tailor suggestions to what's actually missing or stale — don't recite the full list every time.
|
|
36
37
|
|
|
@@ -237,6 +238,7 @@ Available skills:
|
|
|
237
238
|
| `add-service` | Scaffold a new service integration |
|
|
238
239
|
| `add-test` | Scaffold test file for a tool, resource, or service |
|
|
239
240
|
| `field-test` | Exercise tools/resources/prompts with real inputs, verify behavior, report issues |
|
|
241
|
+
| `security-pass` | Audit server for MCP-flavored security gaps: output injection, scope blast radius, input sinks, tenant isolation |
|
|
240
242
|
| `devcheck` | Lint, format, typecheck, audit |
|
|
241
243
|
| `polish-docs-meta` | Finalize docs, README, metadata, and agent protocol for shipping |
|
|
242
244
|
| `maintenance` | Investigate changelogs, adopt upstream changes, sync skills to agent dirs |
|
package/templates/CLAUDE.md
CHANGED
|
@@ -29,8 +29,9 @@ When the user asks what to do next, what's left, or needs direction, suggest rel
|
|
|
29
29
|
5. **Add tests** — scaffold tests for existing definitions using the `add-test` skill
|
|
30
30
|
6. **Field-test definitions** — exercise tools/resources/prompts with real inputs using the `field-test` skill, get a report of issues and pain points
|
|
31
31
|
7. **Run `devcheck`** — lint, format, typecheck, and security audit
|
|
32
|
-
8. **Run the `
|
|
33
|
-
9. **Run the `
|
|
32
|
+
8. **Run the `security-pass` skill** — audit handlers for MCP-specific security gaps: output injection, scope blast radius, input sinks, tenant isolation
|
|
33
|
+
9. **Run the `polish-docs-meta` skill** — finalize README, CHANGELOG, metadata, and agent protocol for shipping
|
|
34
|
+
10. **Run the `maintenance` skill** — investigate changelogs, adopt upstream changes, and sync skills after `bun update --latest`
|
|
34
35
|
|
|
35
36
|
Tailor suggestions to what's actually missing or stale — don't recite the full list every time.
|
|
36
37
|
|
|
@@ -237,6 +238,7 @@ Available skills:
|
|
|
237
238
|
| `add-service` | Scaffold a new service integration |
|
|
238
239
|
| `add-test` | Scaffold test file for a tool, resource, or service |
|
|
239
240
|
| `field-test` | Exercise tools/resources/prompts with real inputs, verify behavior, report issues |
|
|
241
|
+
| `security-pass` | Audit server for MCP-flavored security gaps: output injection, scope blast radius, input sinks, tenant isolation |
|
|
240
242
|
| `devcheck` | Lint, format, typecheck, audit |
|
|
241
243
|
| `polish-docs-meta` | Finalize docs, README, metadata, and agent protocol for shipping |
|
|
242
244
|
| `maintenance` | Investigate changelogs, adopt upstream changes, sync skills to agent dirs |
|