@cyanheads/mcp-ts-core 0.1.0 → 0.1.2

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.
@@ -1,13 +1,23 @@
1
1
  # Agent Protocol
2
2
 
3
3
  **Server:** {{PACKAGE_NAME}}
4
- **Version:** 0.1.0
4
+ **Version:** 0.1.2
5
5
  **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)
6
6
 
7
7
  > **Read the framework docs first:** `node_modules/@cyanheads/mcp-ts-core/CLAUDE.md` contains the full API reference — builders, Context, error codes, exports, patterns. This file covers server-specific conventions only.
8
8
 
9
9
  ---
10
10
 
11
+ ## First Session
12
+
13
+ > **Remove this section** from CLAUDE.md / AGENTS.md after completing these steps. The skills and conventions below remain — this block is one-time onboarding only.
14
+
15
+ 1. **Read the framework API** — `node_modules/@cyanheads/mcp-ts-core/CLAUDE.md`
16
+ 2. **Run the `setup` skill** — read `skills/setup/SKILL.md` and follow its checklist (project orientation, agent protocol file selection, echo definition cleanup, skill sync)
17
+ 3. **Design the server** — read `skills/design-mcp-server/SKILL.md` and work through it with the user to map the domain into tools, resources, and services before scaffolding
18
+
19
+ ---
20
+
11
21
  ## Core Rules
12
22
 
13
23
  - **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.
@@ -173,6 +183,7 @@ src/
173
183
  | Files | kebab-case with suffix | `search-docs.tool.ts` |
174
184
  | Tool/resource/prompt names | snake_case | `search_docs` |
175
185
  | Directories | kebab-case | `src/services/doc-search/` |
186
+ | Descriptions | Single string or template literal, no `+` concatenation | `'Search items by query and filter.'` |
176
187
 
177
188
  ---
178
189
 
@@ -187,6 +198,7 @@ Available skills:
187
198
  | Skill | Purpose |
188
199
  |:------|:--------|
189
200
  | `setup` | Post-init project orientation |
201
+ | `design-mcp-server` | Design tool surface, resources, and services for a new server |
190
202
  | `add-tool` | Scaffold a new tool definition |
191
203
  | `add-resource` | Scaffold a new resource definition |
192
204
  | `add-prompt` | Scaffold a new prompt definition |
@@ -211,12 +223,18 @@ When you complete a skill's checklist, check the boxes and add a completion time
211
223
 
212
224
  | Command | Purpose |
213
225
  |:--------|:--------|
214
- | `bun run build` | Compile TypeScript |
215
- | `bun run devcheck` | Lint + format + typecheck |
216
- | `bun run test` | Run tests |
217
- | `bun run format` | Auto-fix formatting |
218
- | `bun run dev:stdio` | Dev mode (stdio) |
219
- | `bun run dev:http` | Dev mode (HTTP) |
226
+ | `npm run build` | Compile TypeScript |
227
+ | `npm run clean` | Remove build artifacts |
228
+ | `bun run devcheck` | Lint + format + typecheck + security |
229
+ | `bun run tree` | Generate directory structure doc |
230
+ | `npm run format` | Auto-fix formatting |
231
+ | `npm test` | Run tests |
232
+ | `npm run dev:stdio` | Dev mode (stdio) |
233
+ | `npm run dev:http` | Dev mode (HTTP) |
234
+ | `npm run start:stdio` | Production mode (stdio) |
235
+ | `npm run start:http` | Production mode (HTTP) |
236
+
237
+ **Bun requirement:** `devcheck` and `tree` scripts use Bun-specific APIs (`spawn` from `'bun'`). Install [Bun](https://bun.sh) to run them. All other commands work with any Node-compatible package manager.
220
238
 
221
239
  ---
222
240
 
@@ -239,6 +257,6 @@ import { getMyService } from '@/services/my-domain/my-service.js';
239
257
  - [ ] JSDoc `@fileoverview` + `@module` on every file
240
258
  - [ ] `ctx.log` for logging, `ctx.state` for storage
241
259
  - [ ] Handlers throw on failure — error factories or plain `Error`, no try/catch
242
- - [ ] Registered in `src/index.ts` arrays
260
+ - [ ] Registered in `createApp()` arrays (directly or via barrel exports)
243
261
  - [ ] Tests use `createMockContext()` from `@cyanheads/mcp-ts-core/testing`
244
262
  - [ ] `bun run devcheck` passes
@@ -1,28 +1,8 @@
1
1
  {
2
+ "extends": "@cyanheads/mcp-ts-core/tsconfig.base.json",
2
3
  "compilerOptions": {
3
- "target": "ESNext",
4
- "module": "NodeNext",
5
- "moduleResolution": "NodeNext",
6
- "strict": true,
7
- "noUncheckedIndexedAccess": true,
8
- "verbatimModuleSyntax": true,
9
- "moduleDetection": "force",
10
- "esModuleInterop": true,
11
- "allowSyntheticDefaultImports": true,
12
- "outDir": "dist",
13
4
  "rootDir": "src",
14
- "declaration": true,
15
- "sourceMap": true,
16
- "skipLibCheck": true,
17
- "forceConsistentCasingInFileNames": true,
18
- "lib": ["ESNext"],
19
- "types": ["node"],
20
- "noUnusedLocals": true,
21
- "noUnusedParameters": true,
22
- "noImplicitReturns": true,
23
- "noFallthroughCasesInSwitch": true,
24
- "resolveJsonModule": true,
25
- "allowJs": false,
5
+ "outDir": "dist",
26
6
  "baseUrl": ".",
27
7
  "paths": {
28
8
  "@/*": ["src/*"]
@@ -1,43 +1,3 @@
1
1
  {
2
- "$schema": "https://biomejs.dev/schemas/1.9.0/schema.json",
3
- "vcs": {
4
- "enabled": true,
5
- "clientKind": "git",
6
- "useIgnoreFile": true
7
- },
8
- "formatter": {
9
- "enabled": true,
10
- "indentStyle": "space",
11
- "indentWidth": 2,
12
- "lineWidth": 100,
13
- "lineEnding": "lf"
14
- },
15
- "javascript": {
16
- "formatter": {
17
- "quoteStyle": "single",
18
- "trailingCommas": "all",
19
- "semicolons": "always",
20
- "arrowParentheses": "always",
21
- "bracketSpacing": true
22
- }
23
- },
24
- "linter": {
25
- "enabled": true,
26
- "rules": {
27
- "recommended": true,
28
- "correctness": {
29
- "noUnusedVariables": "error",
30
- "noUnusedFunctionParameters": "error",
31
- "noUnusedImports": "error"
32
- },
33
- "style": {
34
- "useConst": "error"
35
- },
36
- "suspicious": {
37
- "noExplicitAny": "warn",
38
- "noVar": "error",
39
- "useAwait": "warn"
40
- }
41
- }
42
- }
2
+ "extends": ["@cyanheads/mcp-ts-core/biome"]
43
3
  }
@@ -1,27 +1,49 @@
1
1
  {
2
2
  "name": "{{PACKAGE_NAME}}",
3
3
  "version": "0.1.0",
4
+ "description": "",
4
5
  "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "files": [
9
+ "dist/"
10
+ ],
5
11
  "scripts": {
6
- "build": "tsc && tsc-alias",
7
- "devcheck": "biome check . && tsc --noEmit",
8
- "format": "biome check --fix .",
12
+ "build": "tsx scripts/build.ts",
13
+ "rebuild": "tsx scripts/clean.ts && tsx scripts/build.ts",
14
+ "clean": "tsx scripts/clean.ts",
15
+ "devcheck": "bun run scripts/devcheck.ts",
16
+ "tree": "bun run scripts/tree.ts",
17
+ "format": "biome check --write --unsafe .",
9
18
  "test": "vitest run",
10
- "dev:stdio": "tsx src/index.ts",
11
- "dev:http": "MCP_TRANSPORT_TYPE=http tsx src/index.ts",
19
+ "dev:stdio": "tsx --watch src/index.ts",
20
+ "dev:http": "MCP_TRANSPORT_TYPE=http tsx --watch src/index.ts",
12
21
  "start:stdio": "node dist/index.js",
13
22
  "start:http": "MCP_TRANSPORT_TYPE=http node dist/index.js"
14
23
  },
24
+ "keywords": [
25
+ "mcp",
26
+ "mcp-server",
27
+ "model-context-protocol"
28
+ ],
29
+ "license": "Apache-2.0",
30
+ "engines": {
31
+ "node": ">=22.0.0"
32
+ },
33
+ "publishConfig": {
34
+ "access": "public"
35
+ },
15
36
  "dependencies": {
16
37
  "@cyanheads/mcp-ts-core": "^0.1.0",
17
- "zod": "^4.3.6"
38
+ "pino-pretty": "^13.1.3"
18
39
  },
19
40
  "devDependencies": {
20
- "@biomejs/biome": "^2.4.0",
21
- "@types/node": "^25.0.0",
22
- "tsc-alias": "^1.8.0",
41
+ "@biomejs/biome": "^2.4.7",
42
+ "@types/node": "^25.5.0",
43
+ "ignore": "^7.0.5",
44
+ "tsc-alias": "^1.8.16",
23
45
  "tsx": "^4.19.0",
24
- "typescript": "^5.9.0",
25
- "vitest": "^4.0.0"
46
+ "typescript": "^5.9.3",
47
+ "vitest": "^4.1.0"
26
48
  }
27
49
  }
@@ -1,12 +1,14 @@
1
- import { defineConfig } from 'vitest/config';
1
+ import { defineConfig, mergeConfig } from 'vitest/config';
2
+ import coreConfig from '@cyanheads/mcp-ts-core/vitest.config';
2
3
 
3
- export default defineConfig({
4
- resolve: {
5
- alias: { '@/': new URL('./src/', import.meta.url).pathname },
6
- },
7
- test: {
8
- globals: false,
9
- environment: 'node',
10
- include: ['src/**/*.test.ts', 'tests/**/*.test.ts'],
11
- },
12
- });
4
+ export default mergeConfig(
5
+ coreConfig,
6
+ defineConfig({
7
+ resolve: {
8
+ alias: { '@/': new URL('./src/', import.meta.url).pathname },
9
+ },
10
+ test: {
11
+ include: ['src/**/*.test.ts', 'tests/**/*.test.ts'],
12
+ },
13
+ }),
14
+ );