When to Use
You've isolated a problem to @cyanheads/mcp-ts-core itself — not your server code, not a misconfiguration, not a missing peer dependency. Typical triggers:
- Framework builder (
tool(), resource(), prompt()) rejects valid input or produces incorrect output
createApp() or createWorkerHandler() fails on a valid config
Context properties (ctx.log, ctx.state, ctx.inputs, etc.) behave contrary to docs
- A utility from
/utils, /errors, /auth, /storage, /services returns wrong results or throws unexpectedly
- Type exports are incorrect or missing (compile error on documented usage)
- The definition linter (
bun run lint:mcp) produces false positives or misses real violations
For general gh CLI workflows outside issue filing (PRs, workflows, API access), see the github-cli skill.
Before Filing
- Confirm framework version —
bun pm ls @cyanheads/mcp-ts-core or check node_modules/@cyanheads/mcp-ts-core/package.json
- Check you're on latest —
bun outdated @cyanheads/mcp-ts-core. If behind, update and retest before filing.
- Isolate the issue — reproduce with a minimal handler or standalone script. Strip server-specific services, config, and dependencies. If the bug disappears when isolated, it's likely in your server code.
- Search existing issues — don't file duplicates:
gh issue list -R cyanheads/mcp-ts-core --search "your error message or keyword" --state all
# Assess a close match before commenting — is it already linked to a fix or referenced elsewhere?
gh issue view <number> -R cyanheads/mcp-ts-core --comments
gh api 'repos/cyanheads/mcp-ts-core/issues/<number>/timeline' --paginate \
--jq '.[] | select(.event=="cross-referenced") | .source.issue | "\(.repository.full_name)#\(.number) — \(.title)"'
- For documentation- or contract-shaped requests, audit all three doc layers first — proposals to add reference docs, public-API conventions, attribute/event catalogs, or stability commitments often duplicate surface that already exists. Check
src/ for behavior, docs/ for human-facing reference, and skills/ for agent-facing reference. Skill files marked audience: external are the framework's public contract — treat them as authoritative when evaluating whether a documentation gap exists. Also verify the constants or types you'd reference aren't already exported from @cyanheads/mcp-ts-core or one of its subpaths.
Writing Well-Structured Issues
Good issues are scannable, concrete, and self-contained — terse and fact-dense. Default to one or two sentences per bullet; if a bullet runs long, split it or cut it. These patterns apply to both bugs and features — the guidance targets any prose block (Description, Additional context, feature proposals).
- Lead with specifics. Name the tool, function, module, or symptom. "Currently
createApp() throws ConfigurationError when MCP_HTTP_PORT is set to 0" beats "There's a problem with the config." A reader should know what's broken or missing before the end of the first sentence.
- Embed library/service links on first mention.
[Hono](https://hono.dev/), [linkedom](https://github.com/WebReflection/linkedom). Link to the canonical repo or homepage so readers can verify the dependency and reach docs in one click.
- Use
owner/repo#N for cross-repo issue references. GitHub auto-renders them as linked references (e.g. cyanheads/pubmed-mcp-server#34). Bare #N only works for same-repo issues.
- Add a
Related: #N line near the top when the issue grows from prior context (discussions, other issues, PRs). Makes provenance clickable.
- Cite cross-references once per body. Link an issue/PR in
Related:, the description, or Additional context — not all three. The reader sees them all; redundant linking dilutes signal.
- Lead design sections with a philosophy sentence. Bold a short principle before the tradeoff details — e.g. "Philosophy: fail fast on config errors, degrade gracefully on runtime errors." Establishes the lens for the rest of the section.
- Prefer Markdown tables for comparisons. When showing options, tiers, strategies, or tradeoffs — tables are the highest-density format for scanning N rows × M attributes.
- Separate
### Scope from ### Out of scope. The latter is as important as the former — it pre-empts scope-creep debates in comments and signals you've thought about the boundaries.
- Use
Depends on: owner/repo#N to declare ordering explicitly when implementation is blocked on another issue landing first.
- Cut what dilutes the signal. Mechanism walkthroughs (link the PR or doc instead), ceremonial framings ("This issue covers…"), conversation references ("as discussed", "per offline"), and kitchen-sink Additional context blocks. If a paragraph isn't pulling weight, drop it.
- Skip collaborator-framing sign-offs. Lines like "Happy to open a PR", "let me know if you'd like", "willing to contribute", "if that's the preferred flow" read as noise. A PR link beats an offer; if you're the maintainer filing against your own repo, the offer is redundant. End the body at the last substantive point.
Redact Before Posting
GitHub issues are public. Do not include secrets, credentials, API keys, or tokens. Redact sensitive values from env vars, headers, and logs before submitting. Replace with obvious placeholders: REDACTED, sk-...REDACTED. Do not rely on partial masking — partial keys can still be exploited.
Filing a Bug
The repo has YAML form issue templates. Use --web to open the form in the browser (preferred when available), or pass --title + --body for non-interactive use.
Browser (interactive)
gh issue create -R cyanheads/mcp-ts-core --template "Bug Report" --web
CLI (non-interactive)
Structure the --body to match the template's form fields:
gh issue create -R cyanheads/mcp-ts-core \
--title "bug(scope): concise description" \
--label "bug" \
--assignee "@me" \
--body "$(cat <<'ISSUE'
### mcp-ts-core version
0.1.29
### Runtime
Bun
### Runtime version
Bun 1.3.x
### Transport
stdio
### OS
macOS 15.x
### Description
Brief explanation of the bug — what you expected vs what happened.
### Reproduction
```ts
import { tool, z } from '@cyanheads/mcp-ts-core';
export const broken = tool('broken_example', {
description: 'Minimal repro.',
input: z.object({ id: z.string().describe('ID') }),
output: z.object({
name: z.string().describe('Name'),
extra: z.string().optional().describe('Optional field'),
}),
async handler(input, ctx) {
return { name: 'test' }; // omitting optional field causes validation error
},
});
```
### Actual behavior
```
Error: Output validation failed: ...
```
### Expected behavior
Omitting an optional output field should pass validation.
### Additional context
Any workarounds, related issues, or observations.
ISSUE
)"
Title conventions
Format: bug(<scope>): concise description
| Scope |
When |
tool |
Tool builder, handler, format, annotations |
resource |
Resource builder, handler, list, params |
prompt |
Prompt builder, generate, args |
context |
Context, logger, state, progress, elicit |
config |
AppConfig, parseConfig, env parsing |
errors |
McpError, error factories, typed contracts (errors[] / ctx.fail), conformance lint, httpErrorFromResponse, auto-classification |
auth |
Auth modes, scope checking, JWT/OAuth |
storage |
StorageService, providers |
transport |
stdio/http transport, SSE, session handling |
worker |
createWorkerHandler, Worker runtime |
utils |
Utilities (formatting, parsing, pagination, etc.) |
linter |
Definition linter false positives/negatives |
types |
Type exports, type inference |
services |
LLM, Speech, Graph services |
deps |
Dependency issues, peer dep conflicts |
Labels
Every issue needs exactly one primary label. Stack secondary labels on top when applicable.
Primary (required — pick one):
| Label |
When |
bug |
Something broken |
enhancement |
Feature request or improvement |
documentation |
Documentation is wrong, missing, or misleading |
Secondary (optional — stack on top of primary):
| Label |
When |
regression |
Worked before, broken after an update |
performance |
Memory, CPU, latency, or resource usage |
security |
Vulnerability, CVE, or hardening work |
breaking-change |
Fix/feature will break public API; requires a major bump |
surplus-token-idea |
Worth exploring when token budget allows |
Combine labels: --label "bug" --label "regression".
Attaching logs or stack traces
For long output, write to a file and attach. Note: --body-file replaces the entire body — it does not supplement a --body flag. For structured bugs with logs, either embed the log content in the Additional context section of a normal --body, or file the issue first and add the log as a comment:
bun run rebuild && bun run start:stdio 2>&1 | head -100 > /tmp/mcp-error.log
# As part of a new issue (the log becomes the entire body — no template fields)
gh issue create -R cyanheads/mcp-ts-core \
--title "bug(transport): stdio crashes on large payload" \
--label "bug" \
--assignee "@me" \
--body-file /tmp/mcp-error.log
# Or as a comment on an existing issue
gh issue comment <number> -R cyanheads/mcp-ts-core --body-file /tmp/mcp-error.log
Filing a Feature Request
Browser (interactive)
gh issue create -R cyanheads/mcp-ts-core --template "Feature Request" --web
CLI (non-interactive)
Template below demonstrates the richer structure. Omit sections you don't need — simple requests don't require Flow / Design / Dependencies blocks.
gh issue create -R cyanheads/mcp-ts-core \
--title "feat(scope): concise description" \
--label "enhancement" \
--assignee "@me" \
--body "$(cat <<'ISSUE'
Concrete statement of what's currently missing or broken in the framework. Name the specific builder, utility, context method, or config field. Two or three sentences — the reader should know the gap before the end of the paragraph.
Related: #N
## Proposal
What you want the framework to do, in one paragraph. Link external libraries on first mention: [lib name](https://github.com/owner/repo). Include a short justification — what this gives us that we don't have today.
### Proposed API
```ts
import { withRetry } from '@cyanheads/mcp-ts-core/utils';
const result = await withRetry(() => fetchExternal(url), {
maxAttempts: 3,
backoff: 'exponential',
});
```
### Flow (optional)
Ordered steps — e.g. `trigger → resolve → fetch → degrade`. Useful when the change spans multiple phases or fallbacks.
### Design / Tradeoffs (optional)
Philosophy: **one-line principle in bold.**
| Option | Strengths | Weaknesses |
|:---|:---|:---|
| A | ... | ... |
| B | ... | ... |
### Scope
- Files or modules touched
- New exports, env vars, or config keys
- Tier (Tier 1 core / Tier 2 standard / Tier 3 optional peer dep)
### Out of scope
- What we're deliberately not doing
- Adjacent work that belongs in a separate issue
### Dependencies (optional)
- Depends on: owner/repo#N
### Alternatives considered
What you tried or evaluated instead, and why it didn't fit.
ISSUE
)"
Following Up
# Check issue status (with comment thread)
gh issue view <number> -R cyanheads/mcp-ts-core --comments
# Add context or respond to maintainer questions
gh issue comment <number> -R cyanheads/mcp-ts-core --body "Additional context..."
# List your open issues
gh issue list -R cyanheads/mcp-ts-core --author @me
Checklist
1---2name: report-issue-framework3description: File a bug or feature request against @cyanheads/mcp-ts-core when you hit a framework issue. Use when a builder, utility, context method, or config behaves contrary to the documented API — not for server-specific application bugs.4---5
6## When to Use
7
8You've isolated a problem to `@cyanheads/mcp-ts-core` itself — not your server code, not a misconfiguration, not a missing peer dependency. Typical triggers:
9
10- Framework builder (`tool()`, `resource()`, `prompt()`) rejects valid input or produces incorrect output
11- `createApp()` or `createWorkerHandler()` fails on a valid config
12- `Context` properties (`ctx.log`, `ctx.state`, `ctx.inputs`, etc.) behave contrary to docs
13- A utility from `/utils`, `/errors`, `/auth`, `/storage`, `/services` returns wrong results or throws unexpectedly
14- Type exports are incorrect or missing (compile error on documented usage)
15- The definition linter (`bun run lint:mcp`) produces false positives or misses real violations
16
17For general `gh` CLI workflows outside issue filing (PRs, workflows, API access), see the `github-cli` skill.
18
19## Before Filing
20
211. **Confirm framework version** — `bun pm ls @cyanheads/mcp-ts-core` or check `node_modules/@cyanheads/mcp-ts-core/package.json`
222. **Check you're on latest** — `bun outdated @cyanheads/mcp-ts-core`. If behind, update and retest before filing.
233. **Isolate the issue** — reproduce with a minimal handler or standalone script. Strip server-specific services, config, and dependencies. If the bug disappears when isolated, it's likely in your server code.
244. **Search existing issues** — don't file duplicates:
25
26```bash
27gh issue list -R cyanheads/mcp-ts-core --search "your error message or keyword" --state all
28
29# Assess a close match before commenting — is it already linked to a fix or referenced elsewhere?
30gh issue view <number> -R cyanheads/mcp-ts-core --comments
31gh api 'repos/cyanheads/mcp-ts-core/issues/<number>/timeline' --paginate \
32 --jq '.[] | select(.event=="cross-referenced") | .source.issue | "\(.repository.full_name)#\(.number) — \(.title)"'
33```
34
355. **For documentation- or contract-shaped requests, audit all three doc layers first** — proposals to add reference docs, public-API conventions, attribute/event catalogs, or stability commitments often duplicate surface that already exists. Check `src/` for behavior, `docs/` for human-facing reference, and `skills/` for agent-facing reference. Skill files marked `audience: external` are the framework's public contract — treat them as authoritative when evaluating whether a documentation gap exists. Also verify the constants or types you'd reference aren't already exported from `@cyanheads/mcp-ts-core` or one of its subpaths.
36
37## Writing Well-Structured Issues
38
39Good issues are scannable, concrete, and self-contained — terse and fact-dense. Default to one or two sentences per bullet; if a bullet runs long, split it or cut it. These patterns apply to both bugs and features — the guidance targets any prose block (Description, Additional context, feature proposals).
40
41- **Lead with specifics.** Name the tool, function, module, or symptom. "Currently `createApp()` throws `ConfigurationError` when `MCP_HTTP_PORT` is set to `0`" beats "There's a problem with the config." A reader should know what's broken or missing before the end of the first sentence.
42- **Embed library/service links on first mention.** `[Hono](https://hono.dev/)`, `[linkedom](https://github.com/WebReflection/linkedom)`. Link to the canonical repo or homepage so readers can verify the dependency and reach docs in one click.
43- **Use `owner/repo#N` for cross-repo issue references.** GitHub auto-renders them as linked references (e.g. `cyanheads/pubmed-mcp-server#34`). Bare `#N` only works for same-repo issues.
44- **Add a `Related: #N` line** near the top when the issue grows from prior context (discussions, other issues, PRs). Makes provenance clickable.
45- **Cite cross-references once per body.** Link an issue/PR in `Related:`, the description, or Additional context — not all three. The reader sees them all; redundant linking dilutes signal.
46- **Lead design sections with a philosophy sentence.** Bold a short principle before the tradeoff details — e.g. "Philosophy: **fail fast on config errors, degrade gracefully on runtime errors.**" Establishes the lens for the rest of the section.
47- **Prefer Markdown tables for comparisons.** When showing options, tiers, strategies, or tradeoffs — tables are the highest-density format for scanning N rows × M attributes.
48- **Separate `### Scope` from `### Out of scope`.** The latter is as important as the former — it pre-empts scope-creep debates in comments and signals you've thought about the boundaries.
49- **Use `Depends on: owner/repo#N`** to declare ordering explicitly when implementation is blocked on another issue landing first.
50- **Cut what dilutes the signal.** Mechanism walkthroughs (link the PR or doc instead), ceremonial framings ("This issue covers…"), conversation references ("as discussed", "per offline"), and kitchen-sink Additional context blocks. If a paragraph isn't pulling weight, drop it.
51- **Skip collaborator-framing sign-offs.** Lines like "Happy to open a PR", "let me know if you'd like", "willing to contribute", "if that's the preferred flow" read as noise. A PR link beats an offer; if you're the maintainer filing against your own repo, the offer is redundant. End the body at the last substantive point.
52
53## Redact Before Posting
54
55GitHub issues are **public**. Do not include secrets, credentials, API keys, or tokens. Redact sensitive values from env vars, headers, and logs before submitting. Replace with obvious placeholders: `REDACTED`, `sk-...REDACTED`. Do not rely on partial masking — partial keys can still be exploited.
56
57## Filing a Bug
58
59The repo has YAML form issue templates. Use `--web` to open the form in the browser (preferred when available), or pass `--title` + `--body` for non-interactive use.
60
61### Browser (interactive)
62
63```bash
64gh issue create -R cyanheads/mcp-ts-core --template "Bug Report" --web
65```
66
67### CLI (non-interactive)
68
69Structure the `--body` to match the template's form fields:
70
71````bash
72gh issue create -R cyanheads/mcp-ts-core \
73 --title "bug(scope): concise description" \
74 --label "bug" \
75 --assignee "@me" \
76 --body "$(cat <<'ISSUE'
77### mcp-ts-core version
78
790.1.29
80
81### Runtime
82
83Bun
84
85### Runtime version
86
87Bun 1.3.x
88
89### Transport
90
91stdio
92
93### OS
94
95macOS 15.x
96
97### Description
98
99Brief explanation of the bug — what you expected vs what happened.
100
101### Reproduction
102
103```ts
104import { tool, z } from '@cyanheads/mcp-ts-core';
105
106export const broken = tool('broken_example', {
107 description: 'Minimal repro.',
108 input: z.object({ id: z.string().describe('ID') }),
109 output: z.object({
110 name: z.string().describe('Name'),
111 extra: z.string().optional().describe('Optional field'),
112 }),
113 async handler(input, ctx) {
114 return { name: 'test' }; // omitting optional field causes validation error
115 },
116});
117```
118
119### Actual behavior
120
121```
122Error: Output validation failed: ...
123```
124
125### Expected behavior
126
127Omitting an optional output field should pass validation.
128
129### Additional context
130
131Any workarounds, related issues, or observations.
132ISSUE
133)"
134````
135
136### Title conventions
137
138Format: `bug(<scope>): concise description`
139
140| Scope | When |
141|:------|:-----|
142| `tool` | Tool builder, handler, format, annotations |
143| `resource` | Resource builder, handler, list, params |
144| `prompt` | Prompt builder, generate, args |
145| `context` | Context, logger, state, progress, elicit |
146| `config` | AppConfig, parseConfig, env parsing |
147| `errors` | McpError, error factories, typed contracts (`errors[]` / `ctx.fail`), conformance lint, `httpErrorFromResponse`, auto-classification |
148| `auth` | Auth modes, scope checking, JWT/OAuth |
149| `storage` | StorageService, providers |
150| `transport` | stdio/http transport, SSE, session handling |
151| `worker` | createWorkerHandler, Worker runtime |
152| `utils` | Utilities (formatting, parsing, pagination, etc.) |
153| `linter` | Definition linter false positives/negatives |
154| `types` | Type exports, type inference |
155| `services` | LLM, Speech, Graph services |
156| `deps` | Dependency issues, peer dep conflicts |
157
158### Labels
159
160Every issue needs exactly one primary label. Stack secondary labels on top when applicable.
161
162**Primary (required — pick one):**
163
164| Label | When |
165|:------|:-----|
166| `bug` | Something broken |
167| `enhancement` | Feature request or improvement |
168| `documentation` | Documentation is wrong, missing, or misleading |
169
170**Secondary (optional — stack on top of primary):**
171
172| Label | When |
173|:------|:-----|
174| `regression` | Worked before, broken after an update |
175| `performance` | Memory, CPU, latency, or resource usage |
176| `security` | Vulnerability, CVE, or hardening work |
177| `breaking-change` | Fix/feature will break public API; requires a major bump |
178| `surplus-token-idea` | Worth exploring when token budget allows |
179
180Combine labels: `--label "bug" --label "regression"`.
181
182### Attaching logs or stack traces
183
184For long output, write to a file and attach. Note: `--body-file` replaces the entire body — it does not supplement a `--body` flag. For structured bugs with logs, either embed the log content in the `Additional context` section of a normal `--body`, or file the issue first and add the log as a comment:
185
186```bash
187bun run rebuild && bun run start:stdio 2>&1 | head -100 > /tmp/mcp-error.log
188
189# As part of a new issue (the log becomes the entire body — no template fields)
190gh issue create -R cyanheads/mcp-ts-core \
191 --title "bug(transport): stdio crashes on large payload" \
192 --label "bug" \
193 --assignee "@me" \
194 --body-file /tmp/mcp-error.log
195
196# Or as a comment on an existing issue
197gh issue comment <number> -R cyanheads/mcp-ts-core --body-file /tmp/mcp-error.log
198```
199
200## Filing a Feature Request
201
202### Browser (interactive)
203
204```bash
205gh issue create -R cyanheads/mcp-ts-core --template "Feature Request" --web
206```
207
208### CLI (non-interactive)
209
210Template below demonstrates the richer structure. Omit sections you don't need — simple requests don't require Flow / Design / Dependencies blocks.
211
212````bash
213gh issue create -R cyanheads/mcp-ts-core \
214 --title "feat(scope): concise description" \
215 --label "enhancement" \
216 --assignee "@me" \
217 --body "$(cat <<'ISSUE'
218Concrete statement of what's currently missing or broken in the framework. Name the specific builder, utility, context method, or config field. Two or three sentences — the reader should know the gap before the end of the paragraph.
219
220Related: #N
221
222## Proposal
223
224What you want the framework to do, in one paragraph. Link external libraries on first mention: [lib name](https://github.com/owner/repo). Include a short justification — what this gives us that we don't have today.
225
226### Proposed API
227
228```ts
229import { withRetry } from '@cyanheads/mcp-ts-core/utils';
230
231const result = await withRetry(() => fetchExternal(url), {
232 maxAttempts: 3,
233 backoff: 'exponential',
234});
235```
236
237### Flow (optional)
238
239Ordered steps — e.g. `trigger → resolve → fetch → degrade`. Useful when the change spans multiple phases or fallbacks.
240
241### Design / Tradeoffs (optional)
242
243Philosophy: **one-line principle in bold.**
244
245| Option | Strengths | Weaknesses |
246|:---|:---|:---|
247| A | ... | ... |
248| B | ... | ... |
249
250### Scope
251
252- Files or modules touched
253- New exports, env vars, or config keys
254- Tier (Tier 1 core / Tier 2 standard / Tier 3 optional peer dep)
255
256### Out of scope
257
258- What we're deliberately not doing
259- Adjacent work that belongs in a separate issue
260
261### Dependencies (optional)
262
263- Depends on: owner/repo#N
264
265### Alternatives considered
266
267What you tried or evaluated instead, and why it didn't fit.
268ISSUE
269)"
270````
271
272## Following Up
273
274```bash
275# Check issue status (with comment thread)
276gh issue view <number> -R cyanheads/mcp-ts-core --comments
277
278# Add context or respond to maintainer questions
279gh issue comment <number> -R cyanheads/mcp-ts-core --body "Additional context..."
280
281# List your open issues
282gh issue list -R cyanheads/mcp-ts-core --author @me
283```
284
285## Checklist
286
287- [ ] Confirmed bug is in `@cyanheads/mcp-ts-core`, not server code
288- [ ] Running latest (or documented) framework version
289- [ ] Searched existing issues — no duplicate found
290- [ ] If documentation or contract enhancement: confirmed `src/`, `docs/`, `skills/`, and public exports don't already cover the surface
291- [ ] All secrets, credentials, and tokens redacted
292- [ ] Primary label assigned (`bug` / `enhancement` / `documentation`)
293- [ ] If bug: version, runtime, repro code, actual vs expected behavior included
294- [ ] If feature: Proposal and Scope sections present; Out of scope defined