@cyanheads/mcp-ts-core 0.1.27 → 0.1.29

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.27
3
+ **Package:** `@cyanheads/mcp-ts-core` · **Version:** 0.1.29
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.
package/README.md CHANGED
@@ -5,9 +5,9 @@
5
5
 
6
6
  <div align="center">
7
7
 
8
- [![Version](https://img.shields.io/badge/Version-0.1.27-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.29-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
- [![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/)
10
+ [![TypeScript](https://img.shields.io/badge/TypeScript-^6.0.2-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
 
12
12
  </div>
13
13
 
@@ -123,28 +123,16 @@ function lintToolAnnotations(annotations, toolName) {
123
123
  });
124
124
  }
125
125
  }
126
- // Semantic coherence: destructiveHint and idempotentHint are meaningless when readOnlyHint is true
127
- if (annotations.readOnlyHint === true) {
128
- if ('destructiveHint' in annotations) {
129
- diagnostics.push({
130
- rule: 'annotation-coherence',
131
- severity: 'warning',
132
- message: `Tool '${toolName}' sets destructiveHint while readOnlyHint is true. ` +
133
- 'destructiveHint is meaningless for read-only tools.',
134
- definitionType: 'tool',
135
- definitionName: toolName,
136
- });
137
- }
138
- if ('idempotentHint' in annotations) {
139
- diagnostics.push({
140
- rule: 'annotation-coherence',
141
- severity: 'warning',
142
- message: `Tool '${toolName}' sets idempotentHint while readOnlyHint is true. ` +
143
- 'Read-only tools are inherently idempotent — this hint is redundant.',
144
- definitionType: 'tool',
145
- definitionName: toolName,
146
- });
147
- }
126
+ // Semantic coherence: destructiveHint is meaningless when readOnlyHint is true
127
+ if (annotations.readOnlyHint === true && 'destructiveHint' in annotations) {
128
+ diagnostics.push({
129
+ rule: 'annotation-coherence',
130
+ severity: 'warning',
131
+ message: `Tool '${toolName}' sets destructiveHint while readOnlyHint is true. ` +
132
+ 'destructiveHint is meaningless for read-only tools.',
133
+ definitionType: 'tool',
134
+ definitionName: toolName,
135
+ });
148
136
  }
149
137
  return diagnostics;
150
138
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tool-rules.js","sourceRoot":"","sources":["../../../src/linter/rules/tool-rules.ts"],"names":[],"mappings":"AAAA;;;;GAI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AAqD;gBACtE,qDAAqD;YACvD,cAAc,EAAE,MAAM;YACtB,cAAc,EAAE,QAAQ;SACzB,CAAC,CAAC;IACL,CAAC;IAED,OAAO,WAAW,CAAC;AACrB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyanheads/mcp-ts-core",
3
- "version": "0.1.27",
3
+ "version": "0.1.29",
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",
@@ -143,8 +143,7 @@
143
143
  "dotenv": "17.3.1",
144
144
  "flatted": "3.4.2",
145
145
  "hono": "4.12.9",
146
- "zod": "4.3.6",
147
- "typescript": "5.9.3"
146
+ "zod": "4.3.6"
148
147
  },
149
148
  "devDependencies": {
150
149
  "@biomejs/biome": "2.4.8",
@@ -167,8 +166,8 @@
167
166
  "@types/papaparse": "^5.5.2",
168
167
  "@types/sanitize-html": "^2.16.1",
169
168
  "@types/validator": "^13.15.10",
170
- "@vitest/coverage-istanbul": "4.1.0",
171
- "@vitest/ui": "4.1.0",
169
+ "@vitest/coverage-istanbul": "4.1.1",
170
+ "@vitest/ui": "4.1.1",
172
171
  "bun-types": "^1.3.11",
173
172
  "chrono-node": "^2.9.0",
174
173
  "clipboardy": "^5.3.1",
@@ -188,7 +187,7 @@
188
187
  "repomix": "^1.13.0",
189
188
  "tsc-alias": "^1.8.16",
190
189
  "typedoc": "^0.28.18",
191
- "typescript": "^5.9.3",
190
+ "typescript": "^6.0.2",
192
191
  "unpdf": "^1.4.0",
193
192
  "validator": "^13.15.26",
194
193
  "vite": "8.0.2",
@@ -245,7 +244,7 @@
245
244
  "dependencies": {
246
245
  "@hono/mcp": "^0.2.4",
247
246
  "@hono/node-server": "^1.19.11",
248
- "@modelcontextprotocol/ext-apps": "^1.2.2",
247
+ "@modelcontextprotocol/ext-apps": "^1.3.1",
249
248
  "@modelcontextprotocol/sdk": "^1.27.1",
250
249
  "@opentelemetry/api": "^1.9.0",
251
250
  "dotenv": "^17.3.1",
@@ -268,7 +267,7 @@
268
267
  "@supabase/supabase-js": "^2.99.3",
269
268
  "chrono-node": "^2.9.0",
270
269
  "diff": "^8.0.4",
271
- "fast-xml-parser": "^5.5.8",
270
+ "fast-xml-parser": "latest",
272
271
  "js-yaml": "^4.1.0",
273
272
  "node-cron": "^4.2.1",
274
273
  "openai": "^6.32.0",
@@ -120,6 +120,8 @@ const findEligibleStudies = tool('clinicaltrials_find_eligible_studies', {
120
120
 
121
121
  There is no fixed ceiling on tool count — tools need to earn their keep, but don't artificially limit the surface. If the domain genuinely has 20 distinct workflows, expose 20 tools.
122
122
 
123
+ **Audit: does each tool earn its keep?** After mapping tools, review the full list critically. A tool that covers a niche use case, serves a tiny fraction of agents, or duplicates what another tool already handles is a candidate for deferral. Drop it from the design and note it as a future addition if demand warrants. Every tool in the surface is cognitive load for tool selection — a tight surface outperforms a comprehensive one.
124
+
123
125
  #### Tool descriptions
124
126
 
125
127
  The description is the LLM's primary signal for tool selection. It must answer: *what does this do, and when should I use it?*
@@ -193,6 +195,22 @@ output: z.object({
193
195
  - **Truncate large output with counts.** When a list exceeds a reasonable display size, show the top N and append "...and X more". Don't silently drop results.
194
196
  - **Use the `format` function for readable summaries** while keeping the full structured data in the output object for programmatic use.
195
197
 
198
+ #### Convenience shortcuts for complex inputs
199
+
200
+ When a tool wraps a complex query language or filter system, provide a simple shortcut parameter for the 80% case alongside the full-power escape hatch. This keeps simple queries simple while preserving full expressiveness.
201
+
202
+ ```ts
203
+ // text_search handles the common case; query handles everything else
204
+ text_search: z.string().optional()
205
+ .describe('Convenience shortcut: full-text search across title and abstract. '
206
+ + 'Equivalent to {"_or":[{"_text_any":{"title":"..."}},{"_text_any":{"abstract":"..."}}]}. '
207
+ + 'For more control, use the query parameter directly.'),
208
+ query: z.record(z.unknown()).optional()
209
+ .describe('Full query object for structured filters. Supports operators: _eq, _gt, _and, _or, ...'),
210
+ ```
211
+
212
+ The pattern: name the shortcut for what it does (`text_search`, `name_search`), document what it expands to, and point to the full parameter for advanced use. Validate that at least one of the two is provided.
213
+
196
214
  #### Error messages as LLM guidance
197
215
 
198
216
  When a tool throws, the error message is the agent's only signal for recovery. A good error message tells the LLM *what happened and what to do next*.
@@ -219,7 +237,7 @@ Summarize each tool:
219
237
 
220
238
  | Aspect | Decision |
221
239
  |:-------|:---------|
222
- | **Name** | `snake_case`, verb-noun: `search_papers`, `create_task`. Prefix with server domain if ambiguous. |
240
+ | **Name** | `snake_case`, `{domain}_{verb}_{noun}` — aim for 3 words: `patentsview_search_patents`, `clinicaltrials_find_studies`. Use the **canonical platform/brand name** as prefix (not abbreviations — `patentsview_` not `patents_`, `clinicaltrials_` not `ct_`). The verb+noun pair should be unambiguous within the server if two tools could plausibly share a name, the noun isn't specific enough (e.g., `read_fulltext` not `read_text` when structured metadata is a separate concept). |
223
241
  | **Granularity** | One tool per user-meaningful workflow, not per API call. Consolidate related operations with `operation`/`mode` enum. |
224
242
  | **Description** | Concrete capability statement. Add operational guidance (prerequisites, constraints, gotchas) when non-obvious. |
225
243
  | **Input schema** | `.describe()` on every field. Constrained types (enums, literals, regex). Explain costs/tradeoffs of parameter choices. |
@@ -301,6 +319,13 @@ What this server does, what system it wraps, who it's for.
301
319
  6. Prompts
302
320
 
303
321
  Each step is independently testable.
322
+
323
+ <!-- Optional sections for API-wrapping servers: -->
324
+ ## Domain Mapping <!-- nouns × operations → API endpoints -->
325
+ ## Workflow Analysis <!-- how tools chain for real tasks -->
326
+ ## Design Decisions <!-- rationale for consolidation, naming, tradeoffs -->
327
+ ## Known Limitations <!-- inherent API/data constraints the server can't solve -->
328
+ ## API Reference <!-- query language, pagination, rate limits -->
304
329
  ```
305
330
 
306
331
  Keep it concise. The design doc is a working reference, not a spec document — enough to orient a developer (or agent) implementing the server, not more.
@@ -4,7 +4,7 @@ description: >
4
4
  Finalize documentation and project metadata for a ship-ready MCP server. Use after implementation is complete, tests pass, and devcheck is clean. Safe to run at any stage — each step checks current state and only acts on what still needs work.
5
5
  metadata:
6
6
  author: cyanheads
7
- version: "1.1"
7
+ version: "1.2"
8
8
  audience: external
9
9
  type: workflow
10
10
  ---
@@ -48,6 +48,8 @@ Capture: tool count, resource count, prompt count, service count, required env v
48
48
 
49
49
  Read `references/readme.md` for structure and conventions. If `README.md` doesn't exist, create it from scratch. If it exists, diff the current content against the audit — update tool/resource/prompt tables, env var lists, and descriptions to match the actual surface area. Don't rewrite sections that are already accurate.
50
50
 
51
+ The header tagline (`<p><b>...</b></p>`) must match the `package.json` `description`.
52
+
51
53
  ### 3. Agent Protocol (CLAUDE.md / AGENTS.md)
52
54
 
53
55
  Update the project's agent protocol file to reflect the actual server.
@@ -70,6 +72,8 @@ Check for empty or placeholder metadata fields. Read `references/package-meta.md
70
72
 
71
73
  Key fields: `description`, `repository`, `author`, `homepage`, `bugs`, `keywords`.
72
74
 
75
+ **`description` is the canonical source.** Every other surface (README header, `server.json`, Dockerfile OCI label, GitHub repo description) derives from it. Write it here first, then propagate.
76
+
73
77
  ### 6. `server.json`
74
78
 
75
79
  Read `references/server-json.md` for the official MCP server manifest schema. If `server.json` doesn't exist, create it from the surface area audit. If it exists, diff against current state and update stale fields.
@@ -82,7 +86,26 @@ Key sync points:
82
86
  - `environmentVariables` reflect the server config Zod schema — server-specific required vars in both entries, transport vars only in HTTP entry
83
87
  - Two package entries: one for stdio, one for HTTP (if both transports supported)
84
88
 
85
- ### 7. `bunfig.toml`
89
+ ### 7. GitHub Repository Metadata
90
+
91
+ Sync the GitHub repo with `package.json` using the `gh` CLI. Skip if the repo isn't hosted on GitHub or `gh` isn't available.
92
+
93
+ **Description:**
94
+
95
+ ```bash
96
+ gh repo edit <owner>/<repo> --description "<package.json description>"
97
+ ```
98
+
99
+ **Topics ↔ Keywords:**
100
+
101
+ Compare GitHub topics (`gh repo view --json repositoryTopics`) against `package.json` `keywords`. They should be the union — add any that exist in one but not the other:
102
+
103
+ - Missing from GitHub → `gh repo edit --add-topic <topic>`
104
+ - Missing from `package.json` → add to `keywords` array
105
+
106
+ Common keywords shared across MCP servers (e.g., `mcp`, `mcp-server`, `model-context-protocol`, `typescript`) should appear in both. Domain-specific keywords should also be present in both.
107
+
108
+ ### 8. `bunfig.toml`
86
109
 
87
110
  Verify a `bunfig.toml` exists at the project root. If not, create one:
88
111
 
@@ -95,7 +118,7 @@ frozenLockfile = false
95
118
  bun = true
96
119
  ```
97
120
 
98
- ### 8. `CHANGELOG.md`
121
+ ### 9. `CHANGELOG.md`
99
122
 
100
123
  If `CHANGELOG.md` doesn't exist, create it with an initial entry. If it exists, verify the latest entry reflects the current state:
101
124
 
@@ -112,22 +135,22 @@ Initial release.
112
135
 
113
136
  Use a concrete version and date. Never `[Unreleased]`.
114
137
 
115
- ### 9. `LICENSE`
138
+ ### 10. `LICENSE`
116
139
 
117
140
  Confirm a license file exists. If not, ask the user which license to use (default: Apache-2.0, matching the scaffolded `package.json`). Create the file.
118
141
 
119
- ### 10. `Dockerfile`
142
+ ### 11. `Dockerfile`
120
143
 
121
144
  If a `Dockerfile` exists, verify the OCI labels and runtime config match the actual server:
122
145
 
123
146
  - `org.opencontainers.image.title` matches the package name
124
- - `org.opencontainers.image.description` is filled in (not empty placeholder)
147
+ - `org.opencontainers.image.description` matches `package.json` `description`
125
148
  - `org.opencontainers.image.source` points to the real repository URL (add if missing)
126
149
  - Log directory path in `mkdir` and `LOGS_DIR` uses the correct server name
127
150
 
128
151
  If no `Dockerfile` exists and the server is deployed via HTTP transport, consider scaffolding one — the template is available via `npx @cyanheads/mcp-ts-core init`.
129
152
 
130
- ### 11. `docs/tree.md`
153
+ ### 12. `docs/tree.md`
131
154
 
132
155
  Regenerate the directory structure:
133
156
 
@@ -137,7 +160,7 @@ bun run tree
137
160
 
138
161
  Review the output for anything unexpected (leftover files, missing directories).
139
162
 
140
- ### 12. Final Verification
163
+ ### 13. Final Verification
141
164
 
142
165
  Run the full check suite one last time:
143
166
 
@@ -156,6 +179,7 @@ Both must pass clean.
156
179
  - [ ] `.env.example` in sync with server config schema
157
180
  - [ ] `package.json` metadata complete (`description`, `mcpName`, `repository`, `author`, `keywords`, `engines`, `packageManager`)
158
181
  - [ ] `server.json` matches official MCP schema, versions synced, env vars current
182
+ - [ ] GitHub repo description matches `package.json` description; topics ↔ keywords in sync
159
183
  - [ ] `bunfig.toml` present
160
184
  - [ ] `CHANGELOG.md` exists with current entry
161
185
  - [ ] `LICENSE` file present
@@ -3,9 +3,8 @@
3
3
  "compilerOptions": {
4
4
  "rootDir": "src",
5
5
  "outDir": "dist",
6
- "baseUrl": ".",
7
6
  "paths": {
8
- "@/*": ["src/*"]
7
+ "@/*": ["./src/*"]
9
8
  }
10
9
  },
11
10
  "include": ["src/**/*"],
@@ -36,9 +36,8 @@
36
36
  "resolveJsonModule": true,
37
37
  "allowJs": false,
38
38
 
39
- "baseUrl": ".",
40
39
  "paths": {
41
- "@/*": ["src/*"]
40
+ "@/*": ["./src/*"]
42
41
  }
43
42
  }
44
43
  }