@cyanheads/mcp-ts-core 0.1.29 → 0.2.0
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 +19 -1
- package/README.md +18 -1
- package/biome.json +10 -0
- package/dist/testing/fuzz.d.ts +109 -0
- package/dist/testing/fuzz.d.ts.map +1 -0
- package/dist/testing/fuzz.js +558 -0
- package/dist/testing/fuzz.js.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/network/retry.d.ts +83 -0
- package/dist/utils/network/retry.d.ts.map +1 -0
- package/dist/utils/network/retry.js +152 -0
- package/dist/utils/network/retry.js.map +1 -0
- package/package.json +5 -1
- package/skills/add-service/SKILL.md +53 -0
- package/skills/api-utils/SKILL.md +1 -0
- package/skills/design-mcp-server/SKILL.md +11 -0
- package/skills/report-issue-framework/SKILL.md +231 -0
- package/skills/report-issue-local/SKILL.md +225 -0
- package/skills/setup/SKILL.md +1 -0
- package/templates/.github/ISSUE_TEMPLATE/bug_report.yml +106 -0
- package/templates/.github/ISSUE_TEMPLATE/config.yml +1 -0
- package/templates/.github/ISSUE_TEMPLATE/feature_request.yml +36 -0
- package/templates/CLAUDE.md +2 -0
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: report-issue-local
|
|
3
|
+
description: >
|
|
4
|
+
File a bug or feature request against this MCP server's own repo. Use for server-specific issues — tool logic, service integrations, config problems, or domain bugs that aren't caused by the framework.
|
|
5
|
+
metadata:
|
|
6
|
+
author: cyanheads
|
|
7
|
+
version: "1.1"
|
|
8
|
+
audience: external
|
|
9
|
+
type: workflow
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
The bug is in this server's code, not in `@cyanheads/mcp-ts-core`. Typical triggers:
|
|
15
|
+
|
|
16
|
+
- A tool handler returns wrong results or throws on valid input
|
|
17
|
+
- A service integration (external API, database, third-party SDK) fails or misbehaves
|
|
18
|
+
- Server-specific config (`server-config.ts`) rejects valid env vars or has wrong defaults
|
|
19
|
+
- Resource handlers return stale, incomplete, or incorrect data
|
|
20
|
+
- Domain logic errors — wrong calculations, missing edge cases, bad state transitions
|
|
21
|
+
- Missing or incorrect `.describe()` on schema fields causing poor LLM tool use
|
|
22
|
+
|
|
23
|
+
**If the issue is in the framework itself** (builders, Context, utilities, type exports, linter), use `report-issue-framework` instead.
|
|
24
|
+
|
|
25
|
+
## Before Filing
|
|
26
|
+
|
|
27
|
+
1. **Identify the repo**:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
gh repo view --json nameWithOwner -q '.nameWithOwner'
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
2. **Search existing issues**:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
gh issue list --search "your error message or keyword"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
3. **Reproduce the issue** — confirm it's reproducible. Note the exact input, transport mode, and any relevant env vars.
|
|
40
|
+
|
|
41
|
+
4. **Check logs** — review `ctx.log` output and any framework telemetry for clues. If running HTTP, check the response body for structured error details.
|
|
42
|
+
|
|
43
|
+
## Redact Before Posting
|
|
44
|
+
|
|
45
|
+
GitHub issues are **public and permanent**. Before submitting any issue, scrub the title, body, logs, and code snippets for:
|
|
46
|
+
|
|
47
|
+
- **Secrets** — API keys, tokens, passwords, env var values from `.env` or server config
|
|
48
|
+
- **Credentials** — auth headers (`Authorization: Bearer ...`), session IDs, cookie values
|
|
49
|
+
- **PII** — names, emails, IP addresses, user IDs tied to real people
|
|
50
|
+
- **Internal URLs** — private API endpoints, internal hostnames, database connection strings
|
|
51
|
+
- **Env dumps** — `process.env` output, `.env` file contents, Worker bindings
|
|
52
|
+
|
|
53
|
+
Replace sensitive values with obvious placeholders: `REDACTED`, `sk-...REDACTED`, `https://internal.example.com`, `user-id-123`. Do not rely on partial masking (`sk-abc...xyz`) — partial keys can still be exploited.
|
|
54
|
+
|
|
55
|
+
## Filing a Bug
|
|
56
|
+
|
|
57
|
+
This repo includes YAML form issue templates (scaffolded from the framework). Use `--web` to open the form in the browser (preferred when available), or pass `--title` + `--body` for non-interactive use.
|
|
58
|
+
|
|
59
|
+
### Browser (interactive)
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
gh issue create --template "Bug Report" --web
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### CLI (non-interactive)
|
|
66
|
+
|
|
67
|
+
Structure the `--body` to match the template's form fields:
|
|
68
|
+
|
|
69
|
+
````bash
|
|
70
|
+
gh issue create \
|
|
71
|
+
--title "bug(tool_name): concise description" \
|
|
72
|
+
--label "bug" \
|
|
73
|
+
--body "$(cat <<'ISSUE'
|
|
74
|
+
### Server version
|
|
75
|
+
|
|
76
|
+
0.1.0
|
|
77
|
+
|
|
78
|
+
### mcp-ts-core version
|
|
79
|
+
|
|
80
|
+
0.1.29
|
|
81
|
+
|
|
82
|
+
### Runtime
|
|
83
|
+
|
|
84
|
+
Bun
|
|
85
|
+
|
|
86
|
+
### Runtime version
|
|
87
|
+
|
|
88
|
+
Bun 1.2.x
|
|
89
|
+
|
|
90
|
+
### Transport
|
|
91
|
+
|
|
92
|
+
stdio
|
|
93
|
+
|
|
94
|
+
### Description
|
|
95
|
+
|
|
96
|
+
What happened and what you expected instead.
|
|
97
|
+
|
|
98
|
+
### Steps to reproduce
|
|
99
|
+
|
|
100
|
+
1. Call `tool_name` with input: `{ "key": "value" }`
|
|
101
|
+
2. Observe error / wrong output
|
|
102
|
+
|
|
103
|
+
### Actual behavior
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
Error or incorrect output here
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Expected behavior
|
|
110
|
+
|
|
111
|
+
What should have happened.
|
|
112
|
+
|
|
113
|
+
### Additional context
|
|
114
|
+
|
|
115
|
+
Relevant `ctx.log` output, stack traces, or telemetry spans.
|
|
116
|
+
ISSUE
|
|
117
|
+
)"
|
|
118
|
+
````
|
|
119
|
+
|
|
120
|
+
### Title conventions
|
|
121
|
+
|
|
122
|
+
Format: `type(scope): description`
|
|
123
|
+
|
|
124
|
+
- **type:** `bug`, `feat`, `docs`, `chore`
|
|
125
|
+
- **scope:** tool name, service name, resource name, `config`, `auth`, or domain area
|
|
126
|
+
|
|
127
|
+
Examples:
|
|
128
|
+
- `bug(search_docs): returns empty results for queries with special characters`
|
|
129
|
+
- `feat(analytics): add date range filter to usage_report tool`
|
|
130
|
+
- `docs(setup): .env.example missing REDIS_URL`
|
|
131
|
+
|
|
132
|
+
### Labels
|
|
133
|
+
|
|
134
|
+
| Label | When |
|
|
135
|
+
|:------|:-----|
|
|
136
|
+
| `bug` | Something broken |
|
|
137
|
+
| `enhancement` | New feature or improvement |
|
|
138
|
+
| `docs` | Documentation issue |
|
|
139
|
+
| `config` | Configuration or environment issue |
|
|
140
|
+
| `regression` | Worked before, broken after a change |
|
|
141
|
+
|
|
142
|
+
Combine labels: `--label "bug" --label "regression"`.
|
|
143
|
+
|
|
144
|
+
### Attaching logs or large output
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
bun run dev:stdio 2>&1 | head -200 > /tmp/server-error.log
|
|
148
|
+
|
|
149
|
+
# As part of a new issue
|
|
150
|
+
gh issue create \
|
|
151
|
+
--title "bug(ingest): crashes on large payload" \
|
|
152
|
+
--label "bug" \
|
|
153
|
+
--body-file /tmp/server-error.log
|
|
154
|
+
|
|
155
|
+
# Or as a comment on an existing issue
|
|
156
|
+
gh issue comment <number> --body-file /tmp/server-error.log
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Filing a Feature Request
|
|
160
|
+
|
|
161
|
+
### Browser (interactive)
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
gh issue create --template "Feature Request" --web
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### CLI (non-interactive)
|
|
168
|
+
|
|
169
|
+
````bash
|
|
170
|
+
gh issue create \
|
|
171
|
+
--title "feat(scope): concise description" \
|
|
172
|
+
--label "enhancement" \
|
|
173
|
+
--body "$(cat <<'ISSUE'
|
|
174
|
+
### Use case
|
|
175
|
+
|
|
176
|
+
What problem does this solve? Who benefits?
|
|
177
|
+
|
|
178
|
+
### Proposed behavior
|
|
179
|
+
|
|
180
|
+
Describe the expected behavior or API change.
|
|
181
|
+
|
|
182
|
+
### Alternatives considered
|
|
183
|
+
|
|
184
|
+
What you tried or considered instead.
|
|
185
|
+
ISSUE
|
|
186
|
+
)"
|
|
187
|
+
````
|
|
188
|
+
|
|
189
|
+
## Triage: Framework vs Server
|
|
190
|
+
|
|
191
|
+
Not sure where the bug lives? Quick checks:
|
|
192
|
+
|
|
193
|
+
| Signal | Likely framework | Likely server |
|
|
194
|
+
|:-------|:-----------------|:--------------|
|
|
195
|
+
| Error originates in `node_modules/@cyanheads/mcp-ts-core/` | Yes | |
|
|
196
|
+
| Error in `src/mcp-server/tools/` or `src/services/` | | Yes |
|
|
197
|
+
| Same bug reproduces with a bare `tool()` definition (no services) | Yes | |
|
|
198
|
+
| Bug disappears when you swap in a dummy handler | | Yes |
|
|
199
|
+
| `ctx.state`, `ctx.log`, `ctx.elicit` behave wrong on any tool | Yes | |
|
|
200
|
+
| Only one specific tool/resource is affected | | Yes |
|
|
201
|
+
|
|
202
|
+
When genuinely ambiguous, file against this server's repo and note that it might be a framework issue. The maintainer can transfer it upstream.
|
|
203
|
+
|
|
204
|
+
## Following Up
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
# View issue details
|
|
208
|
+
gh issue view <number>
|
|
209
|
+
|
|
210
|
+
# Add context
|
|
211
|
+
gh issue comment <number> --body "Additional findings..."
|
|
212
|
+
|
|
213
|
+
# List your open issues
|
|
214
|
+
gh issue list --author @me
|
|
215
|
+
|
|
216
|
+
# Close if resolved
|
|
217
|
+
gh issue close <number> --reason completed --comment "Fixed in <commit or PR>"
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
## Checklist
|
|
221
|
+
|
|
222
|
+
- [ ] Confirmed bug is in server code, not the framework
|
|
223
|
+
- [ ] Searched existing issues — no duplicate found
|
|
224
|
+
- [ ] All secrets, credentials, PII, and internal URLs redacted
|
|
225
|
+
- [ ] Issue filed with: version, runtime, repro steps, actual vs expected behavior
|
package/skills/setup/SKILL.md
CHANGED
|
@@ -35,6 +35,7 @@ What `init` actually creates:
|
|
|
35
35
|
```text
|
|
36
36
|
CLAUDE.md # Agent protocol (project-specific)
|
|
37
37
|
AGENTS.md # Same content — discard whichever you don't use
|
|
38
|
+
.github/ISSUE_TEMPLATE/ # GitHub issue templates (bug report, feature request)
|
|
38
39
|
skills/ # Project skills (source of truth)
|
|
39
40
|
src/
|
|
40
41
|
index.ts # createApp() entry point
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
name: Bug Report
|
|
2
|
+
description: Report a bug in {{PACKAGE_NAME}}
|
|
3
|
+
labels: ["bug"]
|
|
4
|
+
body:
|
|
5
|
+
- type: markdown
|
|
6
|
+
attributes:
|
|
7
|
+
value: |
|
|
8
|
+
**Do not include secrets, credentials, API keys, tokens, PII, or other sensitive data.** Redact env vars, auth headers, user-identifying information, and internal URLs from all code snippets, logs, and stack traces before submitting. GitHub issues are public and permanent.
|
|
9
|
+
|
|
10
|
+
- type: input
|
|
11
|
+
id: version
|
|
12
|
+
attributes:
|
|
13
|
+
label: Server version
|
|
14
|
+
placeholder: "0.1.0"
|
|
15
|
+
validations:
|
|
16
|
+
required: true
|
|
17
|
+
|
|
18
|
+
- type: input
|
|
19
|
+
id: framework-version
|
|
20
|
+
attributes:
|
|
21
|
+
label: mcp-ts-core version
|
|
22
|
+
placeholder: "0.1.29"
|
|
23
|
+
validations:
|
|
24
|
+
required: true
|
|
25
|
+
|
|
26
|
+
- type: dropdown
|
|
27
|
+
id: runtime
|
|
28
|
+
attributes:
|
|
29
|
+
label: Runtime
|
|
30
|
+
options:
|
|
31
|
+
- Bun
|
|
32
|
+
- Node.js
|
|
33
|
+
- Cloudflare Workers
|
|
34
|
+
validations:
|
|
35
|
+
required: true
|
|
36
|
+
|
|
37
|
+
- type: input
|
|
38
|
+
id: runtime-version
|
|
39
|
+
attributes:
|
|
40
|
+
label: Runtime version
|
|
41
|
+
placeholder: "Bun 1.2.x / Node 22.x"
|
|
42
|
+
validations:
|
|
43
|
+
required: true
|
|
44
|
+
|
|
45
|
+
- type: dropdown
|
|
46
|
+
id: transport
|
|
47
|
+
attributes:
|
|
48
|
+
label: Transport
|
|
49
|
+
options:
|
|
50
|
+
- stdio
|
|
51
|
+
- HTTP (Streamable HTTP)
|
|
52
|
+
- Worker (Cloudflare)
|
|
53
|
+
validations:
|
|
54
|
+
required: true
|
|
55
|
+
|
|
56
|
+
- type: input
|
|
57
|
+
id: os
|
|
58
|
+
attributes:
|
|
59
|
+
label: OS
|
|
60
|
+
placeholder: "macOS 15.x / Ubuntu 24.04 / etc."
|
|
61
|
+
validations:
|
|
62
|
+
required: false
|
|
63
|
+
|
|
64
|
+
- type: textarea
|
|
65
|
+
id: description
|
|
66
|
+
attributes:
|
|
67
|
+
label: Description
|
|
68
|
+
description: What happened and what you expected instead.
|
|
69
|
+
validations:
|
|
70
|
+
required: true
|
|
71
|
+
|
|
72
|
+
- type: textarea
|
|
73
|
+
id: reproduction
|
|
74
|
+
attributes:
|
|
75
|
+
label: Steps to reproduce
|
|
76
|
+
description: Exact inputs, tool calls, or sequence of actions to trigger the bug.
|
|
77
|
+
placeholder: |
|
|
78
|
+
1. Call `tool_name` with input: `{ "key": "value" }`
|
|
79
|
+
2. Observe error / wrong output
|
|
80
|
+
validations:
|
|
81
|
+
required: true
|
|
82
|
+
|
|
83
|
+
- type: textarea
|
|
84
|
+
id: actual
|
|
85
|
+
attributes:
|
|
86
|
+
label: Actual behavior
|
|
87
|
+
description: Error messages, stack traces, or incorrect output.
|
|
88
|
+
render: shell
|
|
89
|
+
validations:
|
|
90
|
+
required: true
|
|
91
|
+
|
|
92
|
+
- type: textarea
|
|
93
|
+
id: expected
|
|
94
|
+
attributes:
|
|
95
|
+
label: Expected behavior
|
|
96
|
+
description: What should have happened.
|
|
97
|
+
validations:
|
|
98
|
+
required: true
|
|
99
|
+
|
|
100
|
+
- type: textarea
|
|
101
|
+
id: context
|
|
102
|
+
attributes:
|
|
103
|
+
label: Additional context
|
|
104
|
+
description: Workarounds, related issues, logs, or anything else relevant.
|
|
105
|
+
validations:
|
|
106
|
+
required: false
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
blank_issues_enabled: false
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: Feature Request
|
|
2
|
+
description: Suggest a new feature or improvement for {{PACKAGE_NAME}}
|
|
3
|
+
labels: ["enhancement"]
|
|
4
|
+
body:
|
|
5
|
+
- type: textarea
|
|
6
|
+
id: use-case
|
|
7
|
+
attributes:
|
|
8
|
+
label: Use case
|
|
9
|
+
description: What problem does this solve? Who benefits?
|
|
10
|
+
validations:
|
|
11
|
+
required: true
|
|
12
|
+
|
|
13
|
+
- type: textarea
|
|
14
|
+
id: proposed-behavior
|
|
15
|
+
attributes:
|
|
16
|
+
label: Proposed behavior
|
|
17
|
+
description: Describe the expected behavior or API change. Include example code if possible.
|
|
18
|
+
render: typescript
|
|
19
|
+
validations:
|
|
20
|
+
required: true
|
|
21
|
+
|
|
22
|
+
- type: textarea
|
|
23
|
+
id: alternatives
|
|
24
|
+
attributes:
|
|
25
|
+
label: Alternatives considered
|
|
26
|
+
description: What you tried or considered instead, and why it fell short.
|
|
27
|
+
validations:
|
|
28
|
+
required: false
|
|
29
|
+
|
|
30
|
+
- type: textarea
|
|
31
|
+
id: context
|
|
32
|
+
attributes:
|
|
33
|
+
label: Additional context
|
|
34
|
+
description: Related issues, prior art, links, or anything else relevant.
|
|
35
|
+
validations:
|
|
36
|
+
required: false
|
package/templates/CLAUDE.md
CHANGED
|
@@ -227,6 +227,8 @@ Available skills:
|
|
|
227
227
|
| `devcheck` | Lint, format, typecheck, audit |
|
|
228
228
|
| `polish-docs-meta` | Finalize docs, README, metadata, and agent protocol for shipping |
|
|
229
229
|
| `maintenance` | Sync skills and dependencies after updates |
|
|
230
|
+
| `report-issue-framework` | File a bug or feature request against `@cyanheads/mcp-ts-core` via `gh` CLI |
|
|
231
|
+
| `report-issue-local` | File a bug or feature request against this server's own repo via `gh` CLI |
|
|
230
232
|
| `api-auth` | Auth modes, scopes, JWT/OAuth |
|
|
231
233
|
| `api-config` | AppConfig, parseConfig, env vars |
|
|
232
234
|
| `api-context` | Context interface, logger, state, progress |
|