AGENTS.md
+29 −29
https://raw.githubusercontent.com/cyanheads/coingecko-mcp-server/HEAD/AGENTS.md
− **Version:** 0.1.4− **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.13`− **MCP SDK:** `@modelcontextprotocol/server` ^2.2.0− **Zod:** ^4.6.5− | `ctx.log` | Request-scoped logger — `.debug()`, `.info()`, `.notice()`, `.warning()`, `.error()`. Auto-correlates requestId, traceId, tenantId. |− | `ctx.enrich` | Attach non-payload metadata to the response — `ctx.enrich.notice(msg)`, `ctx.enrich.truncated({ shown, cap })`, `ctx.enrich.total(n)`, or `ctx.enrich({ ...fields })`. Shapes match the tool's `enrichment` schema. Used here to disclose truncation, dropped ids/currencies, and applied filters. |− This server centralizes its service-level reasons (`rate_limited`, `upstream_unreachable`, `invalid_response`) in `src/services/coingecko/error-contracts.ts` and spreads `...COINGECKO_SERVICE_ERRORS` into each tool's `errors[]`, alongside the per-tool reasons declared inline. Every shared entry carries `thrownBy: 'service'`, as does `coingecko_get_global`'s inline `unsupported_currency` (raised by `CoinGeckoService.global()`); every other declared reason is thrown by a literal `ctx.fail` in its − | `npm run build` | Compile TypeScript |− | `npm run rebuild` | Clean + build |− | `npm run clean` | Remove build artifacts |− | `npm run devcheck` | Lint + format + typecheck + security + changelog sync |− | `npm run tree` | Generate directory structure doc |− | `npm run list-skills` | List the project's available skills and their paths |− | `npm run format` | Auto-fix formatting (safe fixes only) |− | `npm run format:unsafe` | Also apply Biome's unsafe autofixes — review the diff; they can change behavior |− | `npm run lint:mcp` | Validate MCP tool/resource/prompt definitions against the spec |− | `npm run lint:packaging` | Verify `manifest.json` ↔ `server.json` env var consistency (run by devcheck) |− | `npm test` | Run tests |− | `npm run start:stdio` | Production mode (stdio) |− | `npm run start:http` | Production mode (HTTP) |− | `npm run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |− | `npm run changelog:check` | Verify `CHANGELOG.md` is in sync (used by devcheck) |− | `npm run bundle` | Build, pack, and clean a `.mcpb` for one-click Claude Desktop install |− | `npm run release:github` | Create the GitHub Release from the annotated tag (used by release-and-publish) |− `npm run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. The pack step is followed by `scripts/clean-mcpb.ts`, which prunes dev dependencies (`mcpb clean`) and strips dependency-shipped agent docs (`node_modules/**` `framework-skills/`, `skills/`, `.claude/`, `.agents/`, `SKILL.md`) that root-anchored `.mcpbignore` patterns cannot reach. MCPB is stdio-only — HTTP and Cloudflare Workers deployments are unaffected. Consumers who don't need it can delete `manife− Directory-based, grouped by minor series via the `.x` semver-wildcard convention. Source of truth: `changelog/<major.minor>.x/<version>.md` (e.g. `changelog/0.1.x/0.1.0.md`) — one file per release, shipped in the npm package. At release, author the per-version file with a concrete version and date, then run `npm run changelog:build` to regenerate the rollup. `changelog/template.md` is a **pristine format reference** — never edited or moved; read it for the frontmatter + section layout when scaff− security: false # optional — true flags security fixes− `breaking: true` renders a `· ⚠️ Breaking` badge — use it when consumers must update code on upgrade (signature changes, removed APIs, config renames). `security: true` renders a `· 🛡️ Security` badge and pairs with a `## Security` body section. When both are set, badges render `· ⚠️ Breaking · 🛡️ Security`.− - [ ] `npm run devcheck` passes+ **Version:** 0.2.0+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.15`+ **MCP SDK:** `@modelcontextprotocol/server` ^2.3.1+ **Zod:** ^4.6.6+ | `ctx.log` | Request-scoped logger — `.debug()`, `.info()`, `.notice()`, `.warning()`, `.error()`. Auto-correlates requestId, traceId, tenantId. Dual-sink: Pino and `notifications/message` to the client, so treat it as client-visible. |+ | `ctx.enrich` | Attach non-payload metadata to the response — `ctx.enrich.notice(msg)`, `ctx.enrich.truncated({ shown, cap })`, `ctx.enrich.total(n)`, or `ctx.enrich({ ...fields })`. Reaches both `structuredContent` and `content[]` only when the definition declares an `enrichment` block; otherwise it is a no-op. Shapes match the tool's `enrichment` schema. Used here to disclose truncation, dropped ids/currencies, and applied filters. |+ This server centralizes transport reasons in `src/services/coingecko/error-contracts.ts` and spreads `...COINGECKO_SERVICE_ERRORS` into each tool's `errors[]`. Reasons retain the installed framework's status/code/retry mapping, distinguish permanent refusals, timeouts, rate limits, and transient failures, and carry bounded explanations from confirmed JSON envelopes. History error 10012 recommends a narrower window. Every shared entry carries `thrownBy: 'service'`, as do inline `unsupported_curre+ | `bun run build` | Compile TypeScript |+ | `bun run rebuild` | Clean + build |+ | `bun run clean` | Remove build artifacts |+ | `bun run devcheck` | Lint + format + typecheck + security + changelog sync |+ | `bun run tree` | Generate directory structure doc |+ | `bun run list-skills` | List the project's available skills and their paths |+ | `bun run format` | Auto-fix formatting (safe fixes only) |+ | `bun run format:unsafe` | Also apply Biome's unsafe autofixes — review the diff; they can change behavior |+ | `bun run lint:mcp` | Validate MCP tool/resource/prompt definitions against the spec |+ | `bun run lint:packaging` | Verify `manifest.json` ↔ `server.json` env var consistency (run by devcheck) |+ | `bun run test` | Run tests (Vitest — use `bun run test`, not `bun test`) |+ | `bun run start:stdio` | Production mode (stdio) |+ | `bun run start:http` | Production mode (HTTP) |+ | `bun run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |+ | `bun run changelog:check` | Verify `CHANGELOG.md` is in sync (used by devcheck) |+ | `bun run bundle` | Build, pack, and clean a `.mcpb` for one-click Claude Desktop install |+ | `bun run release:github` | Create the GitHub Release from the annotated tag (used by release-and-publish) |+ `bun run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. The pack step is followed by `scripts/clean-mcpb.ts`, which prunes dev dependencies (`mcpb clean`), strips platform-specific native bindings for portable bundles, and strips dependency-shipped agent docs (`node_modules/**` `framework-skills/`, `skills/`, `.claude/`, `.agents/`, `SKILL.md`) that root-anchored `.mcpbignore` patterns cannot reach. MCPB is stdio-only — HTTP and Cloudflare Workers deployment+ Directory-based, grouped by minor series via the `.x` semver-wildcard convention. Source of truth: `changelog/<major.minor>.x/<version>.md` (e.g. `changelog/0.1.x/0.1.0.md`) — one file per release, shipped in the npm package. At release, author the per-version file with a concrete version and date, then run `bun run changelog:build` to regenerate the rollup. `changelog/template.md` is a **pristine format reference** — never edited or moved; read it for the frontmatter + section layout when scaff+ security: false # optional — true ONLY for a source-code security fix, never a dependency CVE bump+ `breaking: true` renders a `· ⚠️ Breaking` badge — use it when consumers must update code on upgrade (signature changes, removed APIs, config renames). `security: true` renders a `· 🛡️ Security` badge and pairs with a `## Security` body section — set it only for a security fix in this server's own source code, never for a dependency or transitive CVE bump (record those under `## Dependencies`). When both are set, badges render `· ⚠️ Breaking · 🛡️ Security`.+ - [ ] `bun run devcheck` passes