@cyanheads/finnhub-mcp-server 0.1.1 → 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.
package/AGENTS.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # Developer Protocol
2
2
 
3
3
  **Server:** finnhub-mcp-server
4
- **Version:** 0.1.1
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.10.6`
4
+ **Version:** 0.1.2
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.12.3`
6
6
  **Engines:** Bun ≥1.3.0, Node ≥24.0.0
7
- **MCP SDK:** `@modelcontextprotocol/sdk` ^1.29.0
7
+ **MCP SDK:** `@modelcontextprotocol/server` 2.0.0
8
8
  **Zod:** ^4.4.3
9
9
 
10
10
  > **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.
@@ -16,7 +16,7 @@
16
16
  - **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.
17
17
  - **Use `ctx.log`** for request-scoped logging. No `console` calls.
18
18
  - **Use `ctx.state`** for tenant-scoped storage. Never access persistence directly.
19
- - **Check `ctx.elicit`** for presence before calling.
19
+ - **Need input the caller didn't supply?** `return ctx.requestInput(...)` and read `ctx.inputs` when the handler is re-entered. Never `await` for user input mid-handler.
20
20
  - **Secrets in env vars only** — never hardcoded.
21
21
  - **Close the loop on issues.** When implementing work tracked by a GitHub issue, comment on the issue with what landed and close it. Do both — a comment without a close leaves stale issues open; a close without a comment leaves no record of what shipped. The comment is for future readers — state the concrete changes, not the conversation that produced them.
22
22
 
@@ -72,7 +72,7 @@ export const itemData = resource('inventory://{itemId}', {
72
72
  params: z.object({ itemId: z.string().describe('Item identifier') }),
73
73
  auth: ['inventory:read'],
74
74
  async handler(params, ctx) {
75
- const item = await ctx.state.get(`item:${params.itemId}`);
75
+ const item = await ctx.state.get(`item/${params.itemId}`);
76
76
  if (!item) throw notFound(`Item ${params.itemId} not found`, { itemId: params.itemId });
77
77
  return item;
78
78
  },
@@ -149,13 +149,15 @@ Handlers receive a unified `ctx` object. Key properties:
149
149
 
150
150
  | Property | Description |
151
151
  |:---------|:------------|
152
- | `ctx.log` | Request-scoped logger — `.debug()`, `.info()`, `.notice()`, `.warning()`, `.error()`. Auto-correlates requestId, traceId, tenantId. |
153
- | `ctx.state` | Tenant-scoped KV — `.get(key)`, `.set(key, value, { ttl? })`, `.delete(key)`, `.list(prefix, { cursor, limit })`. Accepts any serializable value. |
154
- | `ctx.elicit` | Ask user for structured input — form call `(message, schema)` or `.url(message, url)` for an external link. **Check for presence first:** `if (ctx.elicit) { ... }` |
152
+ | `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. |
153
+ | `ctx.state` | Tenant-scoped KV — `.get(key)`, `.set(key, value, { ttl? })`, `.delete(key)`, `.getMany(keys)`, `.list(prefix, { cursor, limit })`. Accepts any serializable value. |
154
+ | `ctx.requestInput` | Suspend and ask the caller for more input — `return ctx.requestInput({ inputRequests: { key: inputRequired.elicit({ message, requestedSchema }) } })`. Never returns; the handler is re-entered with the answers. Always present. |
155
+ | `ctx.inputs` | Reader over a retried request's responses — `.accepted(key, schema)`, `.view(key)`, `.state()`, `.dropped`. Empty on the first round. |
156
+ | `ctx.enrich` | Success-path agent context (empty-result notices, query echo, pagination totals) — `ctx.enrich(...)` or `.notice()` / `.total()` / `.echo()` / `.truncated()`. Reaches `structuredContent` and `content[]`; lands only when the definition declares an `enrichment` block (no-op otherwise). |
157
+ | `ctx.content` | Non-text content blocks — `.image(data, mimeType)`, `.audio(data, mimeType)`, or `ctx.content(block)` for a raw block. Prepended to `content[]` after `format()`; never enters `structuredContent`. |
155
158
  | `ctx.signal` | `AbortSignal` for cancellation. |
156
- | `ctx.progress` | Task progress (present when `task: true`) — `.setTotal(n)`, `.increment()`, `.update(message)`. |
157
159
  | `ctx.requestId` | Unique request ID. |
158
- | `ctx.tenantId` | Tenant ID from JWT or `'default'` for stdio. |
160
+ | `ctx.tenantId` | Tenant ID from JWT; `'default'` for stdio or HTTP with auth off. |
159
161
 
160
162
  ---
161
163
 
@@ -163,7 +165,7 @@ Handlers receive a unified `ctx` object. Key properties:
163
165
 
164
166
  Handlers throw — the framework catches, classifies, and formats.
165
167
 
166
- **Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required descriptive metadata for the agent's next move (≥ 5 words, lint-validated); for the wire `data.recovery.hint` (mirrored into `content[]` text), pass explicitly at the throw site when dynamic context matters: `ctx.fail('reason', msg, { recovery: { hint: '...' } })`. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`) bubble freely and don't need declaring.
168
+ **Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required (≥ 5 words, lint-validated) — the single source of truth for the agent's next move. Pass `ctx.recoveryFor('reason')` as the throw's data to put it on the wire (`data.recovery.hint`, mirrored into `content[]` text); override with an explicit `{ recovery: { hint: '...' } }` when dynamic runtime context matters. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`) bubble freely and don't need declaring.
167
169
 
168
170
  ```ts
169
171
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
@@ -175,7 +177,7 @@ errors: [
175
177
  ],
176
178
  async handler(input, ctx) {
177
179
  const item = await db.find(input.id);
178
- if (!item) throw ctx.fail('no_match', `No item ${input.id}`);
180
+ if (!item) throw ctx.fail('no_match', `No item ${input.id}`, ctx.recoveryFor('no_match'));
179
181
  return item;
180
182
  }
181
183
  ```
@@ -238,7 +240,7 @@ src/
238
240
 
239
241
  ## Skills
240
242
 
241
- Skills are modular instructions in `skills/` at the project root. Read them directly when a task matches — e.g., `skills/add-tool/SKILL.md` when adding a tool.
243
+ Skills are modular instructions in `skills/` at the project root. Read them directly when a task matches — e.g., `skills/add-tool/SKILL.md` when adding a tool. `bun run list-skills` prints the full registry.
242
244
 
243
245
  **Agent skill directory:** Copy skills into the directory your agent discovers (Claude Code: `.claude/skills/`, others: equivalent). Skills then load as context without referencing `skills/` paths. After framework updates, run the `maintenance` skill — Phase B re-syncs the agent directory.
244
246
 
@@ -258,7 +260,6 @@ Available skills:
258
260
  | `tool-defs-analysis` | Read-only audit of MCP definition language across the surface — voice, leaks, defaults, recovery hints, output descriptions |
259
261
  | `security-pass` | Audit server for MCP-flavored security gaps: output injection, scope blast radius, input sinks, tenant isolation |
260
262
  | `code-simplifier` | Post-session cleanup against `git diff` — modernize syntax, consolidate duplication, align with the codebase |
261
- | `devcheck` | Lint, format, typecheck, audit |
262
263
  | `polish-docs-meta` | Finalize docs, README, metadata, and agent protocol for shipping |
263
264
  | `git-wrapup` | Land working-tree changes as a versioned commit + annotated tag — version bump, changelog, verify, tag. Local only. |
264
265
  | `release-and-publish` | Push + npm + MCP Registry + GH Release + Docker. Picks up from `git-wrapup` |
@@ -269,14 +270,16 @@ Available skills:
269
270
  | `api-auth` | Auth modes, scopes, JWT/OAuth |
270
271
  | `api-canvas` | DataCanvas: register tabular data, run SQL, export, plus the `spillover()` helper for big result sets — Tier 3 opt-in |
271
272
  | `api-config` | AppConfig, parseConfig, env vars |
272
- | `api-context` | Context interface, logger, state, progress |
273
+ | `api-context` | Context interface, RequestContext, logger, state, multi-round-trip input |
273
274
  | `api-errors` | McpError, JsonRpcErrorCode, error patterns |
274
275
  | `api-linter` | Definition linter rule catalog — invoked by `bun run lint:mcp` and `devcheck` |
276
+ | `api-mirror` | MirrorService: persistent self-refreshing local mirror (embedded SQLite + FTS5) of a bulk upstream dataset — Tier 3 opt-in |
275
277
  | `api-services` | LLM, Speech, Graph services |
276
278
  | `api-testing` | createMockContext, test patterns |
277
279
  | `api-utils` | Formatting, parsing, security, pagination, scheduling, telemetry helpers |
278
280
  | `api-telemetry` | OTel catalog: spans, metrics, completion logs, env config, cardinality rules |
279
281
  | `api-workers` | Cloudflare Workers runtime |
282
+ | `techniques` | Catalog of response/data-shaping techniques — overflow handling, payload shaping, retrieval patterns |
280
283
 
281
284
  **Chaining skills into pipelines.** When the user wants a multi-phase effort — build this server out, QA-and-fix the surface, update-and-ship — *and you can spawn sub-agents*, `skills/orchestrations/SKILL.md` sequences the task skills above into a gated pipeline with verification at each step. Read it to drive the run. Optional: skip it if you can't orchestrate sub-agents, and ignore it entirely if you were *spawned* as one — you've already been scoped to a single phase.
282
285
 
@@ -290,26 +293,29 @@ When you complete a skill's checklist, check the boxes and add a completion time
290
293
 
291
294
  | Command | Purpose |
292
295
  |:--------|:--------|
293
- | `npm run build` | Compile TypeScript |
294
- | `npm run rebuild` | Clean + build |
295
- | `npm run clean` | Remove build artifacts |
296
- | `npm run devcheck` | Lint + format + typecheck + security + changelog sync |
296
+ | `bun run build` | Compile TypeScript |
297
+ | `bun run rebuild` | Clean + build |
298
+ | `bun run clean` | Remove build artifacts |
299
+ | `bun run devcheck` | Lint + format + typecheck + security + changelog sync |
300
+ | `bun run lint:mcp` | Run the MCP definition linter standalone (rule catalog: `api-linter` skill) |
301
+ | `bun run lint:packaging` | Packaging surface checks — `server.json`/`manifest.json` env-var parity (run by devcheck) |
302
+ | `bun run list-skills` | Print the skill registry |
297
303
  | `bun run audit:refresh` | Delete `bun.lock`, reinstall, and re-run `bun audit`. Use when `devcheck` flags a transitive advisory — Bun's `update` is sticky on transitive resolutions, so the advisory may be a stale-lockfile false positive. If it survives the refresh, it's real. |
298
- | `npm run tree` | Generate directory structure doc |
299
- | `npm run format` | Auto-fix formatting (safe fixes only) |
300
- | `npm run format:unsafe` | Also apply Biome's unsafe autofixes — review the diff; they can change behavior |
301
- | `npm test` | Run tests |
302
- | `npm run start:stdio` | Production mode (stdio) |
303
- | `npm run start:http` | Production mode (HTTP) |
304
- | `npm run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |
305
- | `npm run changelog:check` | Verify `CHANGELOG.md` is in sync (used by devcheck) |
306
- | `npm run bundle` | Build, pack, and clean a `.mcpb` for one-click Claude Desktop install |
304
+ | `bun run tree` | Generate directory structure doc |
305
+ | `bun run format` | Auto-fix formatting (safe fixes only) |
306
+ | `bun run format:unsafe` | Also apply Biome's unsafe autofixes — review the diff; they can change behavior |
307
+ | `bun run test` | Run tests (Vitest — use `bun run test`, not `bun test`) |
308
+ | `bun run start:stdio` | Production mode (stdio) |
309
+ | `bun run start:http` | Production mode (HTTP) |
310
+ | `bun run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |
311
+ | `bun run changelog:check` | Verify `CHANGELOG.md` is in sync (used by devcheck) |
312
+ | `bun run bundle` | Build, pack, and clean a `.mcpb` for one-click Claude Desktop install |
307
313
 
308
314
  ---
309
315
 
310
316
  ## Bundling
311
317
 
312
- `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/**` `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 `manifest.json` and `.mcpbignore`; `lint:packaging` skips cleanly.
318
+ `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`) and strips two classes of `node_modules/**` content that root-anchored `.mcpbignore` patterns cannot reach: dependency-shipped agent docs (`skills/`, `.claude/`, `.agents/`, `SKILL.md`) and platform-specific native bindings, which would otherwise lock the bundle to the platform it was packed on. MCPB is stdio-only — HTTP and Cloudflare Workers deployments are unaffected. Consumers who don't need it can delete `manifest.json` and `.mcpbignore`; `lint:packaging` skips cleanly.
313
319
 
314
320
  **Adding an env var requires both files:** `server.json` (registry discovery, `environmentVariables[]`) and `manifest.json` (bundle install UX, `mcp_config.env` + `user_config`). `lint:packaging` (run by `devcheck`) verifies the env var names match.
315
321
 
@@ -327,14 +333,14 @@ Each per-version file opens with YAML frontmatter:
327
333
  ---
328
334
  summary: "One-line headline, ≤350 chars" # required — powers the rollup index
329
335
  breaking: false # optional — true flags breaking changes
330
- security: false # optional — true flags security fixes
336
+ security: false # optional — true ONLY for a source-code security fix, never a dependency CVE bump
331
337
  ---
332
338
 
333
339
  # 0.1.0 — YYYY-MM-DD
334
340
  ...
335
341
  ```
336
342
 
337
- `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`.
343
+ `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 routine dependency or transitive CVE bump (record those under `## Dependencies`). When both are set, badges render `· ⚠️ Breaking · 🛡️ Security`.
338
344
 
339
345
  `agent-notes` is an optional free-form field for maintenance agents processing the release downstream. Content here won't appear in the rendered CHANGELOG — it's consumed by agents running the `maintenance` skill. Use it for adoption instructions that don't fit the human-facing sections: new files to create, fields to populate, one-time migration steps. Omit entirely when there's nothing to say.
340
346
 
package/CLAUDE.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # Developer Protocol
2
2
 
3
3
  **Server:** finnhub-mcp-server
4
- **Version:** 0.1.1
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.10.6`
4
+ **Version:** 0.1.2
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.12.3`
6
6
  **Engines:** Bun ≥1.3.0, Node ≥24.0.0
7
- **MCP SDK:** `@modelcontextprotocol/sdk` ^1.29.0
7
+ **MCP SDK:** `@modelcontextprotocol/server` 2.0.0
8
8
  **Zod:** ^4.4.3
9
9
 
10
10
  > **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.
@@ -16,7 +16,7 @@
16
16
  - **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.
17
17
  - **Use `ctx.log`** for request-scoped logging. No `console` calls.
18
18
  - **Use `ctx.state`** for tenant-scoped storage. Never access persistence directly.
19
- - **Check `ctx.elicit`** for presence before calling.
19
+ - **Need input the caller didn't supply?** `return ctx.requestInput(...)` and read `ctx.inputs` when the handler is re-entered. Never `await` for user input mid-handler.
20
20
  - **Secrets in env vars only** — never hardcoded.
21
21
  - **Close the loop on issues.** When implementing work tracked by a GitHub issue, comment on the issue with what landed and close it. Do both — a comment without a close leaves stale issues open; a close without a comment leaves no record of what shipped. The comment is for future readers — state the concrete changes, not the conversation that produced them.
22
22
 
@@ -72,7 +72,7 @@ export const itemData = resource('inventory://{itemId}', {
72
72
  params: z.object({ itemId: z.string().describe('Item identifier') }),
73
73
  auth: ['inventory:read'],
74
74
  async handler(params, ctx) {
75
- const item = await ctx.state.get(`item:${params.itemId}`);
75
+ const item = await ctx.state.get(`item/${params.itemId}`);
76
76
  if (!item) throw notFound(`Item ${params.itemId} not found`, { itemId: params.itemId });
77
77
  return item;
78
78
  },
@@ -149,13 +149,15 @@ Handlers receive a unified `ctx` object. Key properties:
149
149
 
150
150
  | Property | Description |
151
151
  |:---------|:------------|
152
- | `ctx.log` | Request-scoped logger — `.debug()`, `.info()`, `.notice()`, `.warning()`, `.error()`. Auto-correlates requestId, traceId, tenantId. |
153
- | `ctx.state` | Tenant-scoped KV — `.get(key)`, `.set(key, value, { ttl? })`, `.delete(key)`, `.list(prefix, { cursor, limit })`. Accepts any serializable value. |
154
- | `ctx.elicit` | Ask user for structured input — form call `(message, schema)` or `.url(message, url)` for an external link. **Check for presence first:** `if (ctx.elicit) { ... }` |
152
+ | `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. |
153
+ | `ctx.state` | Tenant-scoped KV — `.get(key)`, `.set(key, value, { ttl? })`, `.delete(key)`, `.getMany(keys)`, `.list(prefix, { cursor, limit })`. Accepts any serializable value. |
154
+ | `ctx.requestInput` | Suspend and ask the caller for more input — `return ctx.requestInput({ inputRequests: { key: inputRequired.elicit({ message, requestedSchema }) } })`. Never returns; the handler is re-entered with the answers. Always present. |
155
+ | `ctx.inputs` | Reader over a retried request's responses — `.accepted(key, schema)`, `.view(key)`, `.state()`, `.dropped`. Empty on the first round. |
156
+ | `ctx.enrich` | Success-path agent context (empty-result notices, query echo, pagination totals) — `ctx.enrich(...)` or `.notice()` / `.total()` / `.echo()` / `.truncated()`. Reaches `structuredContent` and `content[]`; lands only when the definition declares an `enrichment` block (no-op otherwise). |
157
+ | `ctx.content` | Non-text content blocks — `.image(data, mimeType)`, `.audio(data, mimeType)`, or `ctx.content(block)` for a raw block. Prepended to `content[]` after `format()`; never enters `structuredContent`. |
155
158
  | `ctx.signal` | `AbortSignal` for cancellation. |
156
- | `ctx.progress` | Task progress (present when `task: true`) — `.setTotal(n)`, `.increment()`, `.update(message)`. |
157
159
  | `ctx.requestId` | Unique request ID. |
158
- | `ctx.tenantId` | Tenant ID from JWT or `'default'` for stdio. |
160
+ | `ctx.tenantId` | Tenant ID from JWT; `'default'` for stdio or HTTP with auth off. |
159
161
 
160
162
  ---
161
163
 
@@ -163,7 +165,7 @@ Handlers receive a unified `ctx` object. Key properties:
163
165
 
164
166
  Handlers throw — the framework catches, classifies, and formats.
165
167
 
166
- **Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required descriptive metadata for the agent's next move (≥ 5 words, lint-validated); for the wire `data.recovery.hint` (mirrored into `content[]` text), pass explicitly at the throw site when dynamic context matters: `ctx.fail('reason', msg, { recovery: { hint: '...' } })`. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`) bubble freely and don't need declaring.
168
+ **Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required (≥ 5 words, lint-validated) — the single source of truth for the agent's next move. Pass `ctx.recoveryFor('reason')` as the throw's data to put it on the wire (`data.recovery.hint`, mirrored into `content[]` text); override with an explicit `{ recovery: { hint: '...' } }` when dynamic runtime context matters. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`) bubble freely and don't need declaring.
167
169
 
168
170
  ```ts
169
171
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
@@ -175,7 +177,7 @@ errors: [
175
177
  ],
176
178
  async handler(input, ctx) {
177
179
  const item = await db.find(input.id);
178
- if (!item) throw ctx.fail('no_match', `No item ${input.id}`);
180
+ if (!item) throw ctx.fail('no_match', `No item ${input.id}`, ctx.recoveryFor('no_match'));
179
181
  return item;
180
182
  }
181
183
  ```
@@ -238,7 +240,7 @@ src/
238
240
 
239
241
  ## Skills
240
242
 
241
- Skills are modular instructions in `skills/` at the project root. Read them directly when a task matches — e.g., `skills/add-tool/SKILL.md` when adding a tool.
243
+ Skills are modular instructions in `skills/` at the project root. Read them directly when a task matches — e.g., `skills/add-tool/SKILL.md` when adding a tool. `bun run list-skills` prints the full registry.
242
244
 
243
245
  **Agent skill directory:** Copy skills into the directory your agent discovers (Claude Code: `.claude/skills/`, others: equivalent). Skills then load as context without referencing `skills/` paths. After framework updates, run the `maintenance` skill — Phase B re-syncs the agent directory.
244
246
 
@@ -258,7 +260,6 @@ Available skills:
258
260
  | `tool-defs-analysis` | Read-only audit of MCP definition language across the surface — voice, leaks, defaults, recovery hints, output descriptions |
259
261
  | `security-pass` | Audit server for MCP-flavored security gaps: output injection, scope blast radius, input sinks, tenant isolation |
260
262
  | `code-simplifier` | Post-session cleanup against `git diff` — modernize syntax, consolidate duplication, align with the codebase |
261
- | `devcheck` | Lint, format, typecheck, audit |
262
263
  | `polish-docs-meta` | Finalize docs, README, metadata, and agent protocol for shipping |
263
264
  | `git-wrapup` | Land working-tree changes as a versioned commit + annotated tag — version bump, changelog, verify, tag. Local only. |
264
265
  | `release-and-publish` | Push + npm + MCP Registry + GH Release + Docker. Picks up from `git-wrapup` |
@@ -269,14 +270,16 @@ Available skills:
269
270
  | `api-auth` | Auth modes, scopes, JWT/OAuth |
270
271
  | `api-canvas` | DataCanvas: register tabular data, run SQL, export, plus the `spillover()` helper for big result sets — Tier 3 opt-in |
271
272
  | `api-config` | AppConfig, parseConfig, env vars |
272
- | `api-context` | Context interface, logger, state, progress |
273
+ | `api-context` | Context interface, RequestContext, logger, state, multi-round-trip input |
273
274
  | `api-errors` | McpError, JsonRpcErrorCode, error patterns |
274
275
  | `api-linter` | Definition linter rule catalog — invoked by `bun run lint:mcp` and `devcheck` |
276
+ | `api-mirror` | MirrorService: persistent self-refreshing local mirror (embedded SQLite + FTS5) of a bulk upstream dataset — Tier 3 opt-in |
275
277
  | `api-services` | LLM, Speech, Graph services |
276
278
  | `api-testing` | createMockContext, test patterns |
277
279
  | `api-utils` | Formatting, parsing, security, pagination, scheduling, telemetry helpers |
278
280
  | `api-telemetry` | OTel catalog: spans, metrics, completion logs, env config, cardinality rules |
279
281
  | `api-workers` | Cloudflare Workers runtime |
282
+ | `techniques` | Catalog of response/data-shaping techniques — overflow handling, payload shaping, retrieval patterns |
280
283
 
281
284
  **Chaining skills into pipelines.** When the user wants a multi-phase effort — build this server out, QA-and-fix the surface, update-and-ship — *and you can spawn sub-agents*, `skills/orchestrations/SKILL.md` sequences the task skills above into a gated pipeline with verification at each step. Read it to drive the run. Optional: skip it if you can't orchestrate sub-agents, and ignore it entirely if you were *spawned* as one — you've already been scoped to a single phase.
282
285
 
@@ -290,26 +293,29 @@ When you complete a skill's checklist, check the boxes and add a completion time
290
293
 
291
294
  | Command | Purpose |
292
295
  |:--------|:--------|
293
- | `npm run build` | Compile TypeScript |
294
- | `npm run rebuild` | Clean + build |
295
- | `npm run clean` | Remove build artifacts |
296
- | `npm run devcheck` | Lint + format + typecheck + security + changelog sync |
296
+ | `bun run build` | Compile TypeScript |
297
+ | `bun run rebuild` | Clean + build |
298
+ | `bun run clean` | Remove build artifacts |
299
+ | `bun run devcheck` | Lint + format + typecheck + security + changelog sync |
300
+ | `bun run lint:mcp` | Run the MCP definition linter standalone (rule catalog: `api-linter` skill) |
301
+ | `bun run lint:packaging` | Packaging surface checks — `server.json`/`manifest.json` env-var parity (run by devcheck) |
302
+ | `bun run list-skills` | Print the skill registry |
297
303
  | `bun run audit:refresh` | Delete `bun.lock`, reinstall, and re-run `bun audit`. Use when `devcheck` flags a transitive advisory — Bun's `update` is sticky on transitive resolutions, so the advisory may be a stale-lockfile false positive. If it survives the refresh, it's real. |
298
- | `npm run tree` | Generate directory structure doc |
299
- | `npm run format` | Auto-fix formatting (safe fixes only) |
300
- | `npm run format:unsafe` | Also apply Biome's unsafe autofixes — review the diff; they can change behavior |
301
- | `npm test` | Run tests |
302
- | `npm run start:stdio` | Production mode (stdio) |
303
- | `npm run start:http` | Production mode (HTTP) |
304
- | `npm run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |
305
- | `npm run changelog:check` | Verify `CHANGELOG.md` is in sync (used by devcheck) |
306
- | `npm run bundle` | Build, pack, and clean a `.mcpb` for one-click Claude Desktop install |
304
+ | `bun run tree` | Generate directory structure doc |
305
+ | `bun run format` | Auto-fix formatting (safe fixes only) |
306
+ | `bun run format:unsafe` | Also apply Biome's unsafe autofixes — review the diff; they can change behavior |
307
+ | `bun run test` | Run tests (Vitest — use `bun run test`, not `bun test`) |
308
+ | `bun run start:stdio` | Production mode (stdio) |
309
+ | `bun run start:http` | Production mode (HTTP) |
310
+ | `bun run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |
311
+ | `bun run changelog:check` | Verify `CHANGELOG.md` is in sync (used by devcheck) |
312
+ | `bun run bundle` | Build, pack, and clean a `.mcpb` for one-click Claude Desktop install |
307
313
 
308
314
  ---
309
315
 
310
316
  ## Bundling
311
317
 
312
- `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/**` `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 `manifest.json` and `.mcpbignore`; `lint:packaging` skips cleanly.
318
+ `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`) and strips two classes of `node_modules/**` content that root-anchored `.mcpbignore` patterns cannot reach: dependency-shipped agent docs (`skills/`, `.claude/`, `.agents/`, `SKILL.md`) and platform-specific native bindings, which would otherwise lock the bundle to the platform it was packed on. MCPB is stdio-only — HTTP and Cloudflare Workers deployments are unaffected. Consumers who don't need it can delete `manifest.json` and `.mcpbignore`; `lint:packaging` skips cleanly.
313
319
 
314
320
  **Adding an env var requires both files:** `server.json` (registry discovery, `environmentVariables[]`) and `manifest.json` (bundle install UX, `mcp_config.env` + `user_config`). `lint:packaging` (run by `devcheck`) verifies the env var names match.
315
321
 
@@ -327,14 +333,14 @@ Each per-version file opens with YAML frontmatter:
327
333
  ---
328
334
  summary: "One-line headline, ≤350 chars" # required — powers the rollup index
329
335
  breaking: false # optional — true flags breaking changes
330
- security: false # optional — true flags security fixes
336
+ security: false # optional — true ONLY for a source-code security fix, never a dependency CVE bump
331
337
  ---
332
338
 
333
339
  # 0.1.0 — YYYY-MM-DD
334
340
  ...
335
341
  ```
336
342
 
337
- `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`.
343
+ `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 routine dependency or transitive CVE bump (record those under `## Dependencies`). When both are set, badges render `· ⚠️ Breaking · 🛡️ Security`.
338
344
 
339
345
  `agent-notes` is an optional free-form field for maintenance agents processing the release downstream. Content here won't appear in the rendered CHANGELOG — it's consumed by agents running the `maintenance` skill. Use it for adoption instructions that don't fit the human-facing sections: new files to create, fields to populate, one-time migration steps. Omit entirely when there's nothing to say.
340
346
 
package/Dockerfile CHANGED
@@ -3,16 +3,24 @@
3
3
  #
4
4
  # This stage installs all dependencies (including dev), builds the TypeScript
5
5
  # source code into JavaScript, and prepares the production assets.
6
+ #
7
+ # --platform=$BUILDPLATFORM runs the build natively on the host arch: the output
8
+ # is platform-independent JS (only dist/ copies forward), so a multi-arch
9
+ # buildx push must not emulate this stage — Bun under QEMU aborts with
10
+ # JSC MemoryExhaustion.
6
11
  # ==============================================================================
7
- FROM oven/bun:1.3 AS build
12
+ FROM --platform=$BUILDPLATFORM oven/bun:1.4.0 AS build
8
13
 
9
14
  WORKDIR /usr/src/app
10
15
 
11
16
  # Copy dependency manifests for optimized layer caching
12
17
  COPY package.json bun.lock ./
13
18
 
14
- # Install all dependencies (including dev dependencies for building)
15
- RUN bun install --frozen-lockfile
19
+ # Install all dependencies (including dev dependencies for building).
20
+ # The BuildKit cache mount persists Bun's global package cache across builds.
21
+ # --ignore-scripts skips native postinstalls the tsc-only build never needs.
22
+ RUN --mount=type=cache,target=/root/.bun/install/cache \
23
+ bun install --frozen-lockfile --ignore-scripts
16
24
 
17
25
  # Copy the rest of the source code
18
26
  COPY . .
@@ -28,7 +36,7 @@ RUN bun run build
28
36
  # application. It uses a slim base image and only includes production
29
37
  # dependencies and build artifacts.
30
38
  # ==============================================================================
31
- FROM oven/bun:1.3-slim AS production
39
+ FROM oven/bun:1.4.0-slim AS production
32
40
 
33
41
  WORKDIR /usr/src/app
34
42
 
@@ -49,14 +57,21 @@ COPY package.json bun.lock ./
49
57
 
50
58
  # Install only production dependencies, ignoring any lifecycle scripts (like 'prepare')
51
59
  # that are not needed in the final production image.
52
- RUN bun install --production --frozen-lockfile --ignore-scripts
60
+ # `--omit=peer` drops the framework's optional peer tiers (test runner, service
61
+ # SDKs, parsers) that Bun would otherwise auto-install. Anything this server
62
+ # actually imports belongs in its own `dependencies`, so nothing needed at
63
+ # runtime is lost. The OTEL step below carries the same flag — without it, that
64
+ # install re-resolves the graph and pulls every optional peer back in.
65
+ RUN --mount=type=cache,target=/root/.bun/install/cache \
66
+ bun install --production --omit=peer --frozen-lockfile --ignore-scripts
53
67
 
54
68
  # Conditionally install OpenTelemetry optional peer dependencies (Tier 3).
55
69
  # These are not bundled by default to keep the base image lean. Enable at build time
56
70
  # with: docker build --build-arg OTEL_ENABLED=true
57
71
  ARG OTEL_ENABLED=true
58
- RUN if [ "$OTEL_ENABLED" = "true" ]; then \
59
- bun add @hono/otel \
72
+ RUN --mount=type=cache,target=/root/.bun/install/cache \
73
+ if [ "$OTEL_ENABLED" = "true" ]; then \
74
+ bun add --omit=dev --omit=peer --ignore-scripts @hono/otel \
60
75
  @opentelemetry/instrumentation-http \
61
76
  @opentelemetry/exporter-metrics-otlp-http \
62
77
  @opentelemetry/exporter-trace-otlp-http \
package/LICENSE CHANGED
@@ -186,7 +186,7 @@ Apache License
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright 2025 Casey Hand @cyanheads
189
+ Copyright 2026 Casey Hand @cyanheads
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  <div align="center">
9
9
 
10
- [![Version](https://img.shields.io/badge/Version-0.1.1-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/finnhub-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^1.29.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/finnhub-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/finnhub-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^6.0.3-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.3.0-blueviolet.svg?style=flat-square)](https://bun.sh/)
10
+ [![Version](https://img.shields.io/badge/Version-0.1.2-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/finnhub-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-2.0.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/finnhub-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/finnhub-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^7.0.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.3.0-blueviolet.svg?style=flat-square)](https://bun.sh/)
11
11
 
12
12
  </div>
13
13
 
@@ -0,0 +1,36 @@
1
+ ---
2
+ summary: "MCP SDK v2 via @cyanheads/mcp-ts-core ^0.12.3: protocol revision 2026-07-28 served beside 2025-era clients, strict tool inputs, error-envelope output schemas. Missing-symbol errors reclassified ValidationError. Bun 1.4.0 images, supply-chain install guard, TypeScript 7."
3
+ breaking: false
4
+ security: false
5
+ ---
6
+
7
+ # 0.1.2 — 2026-08-21
8
+
9
+ ## Changed
10
+
11
+ - **MCP SDK v2** — framework `@cyanheads/mcp-ts-core` ^0.10.6 → ^0.12.3. Every endpoint now also serves protocol revision 2026-07-28 alongside the 2025 era; existing 2025-era clients keep working.
12
+ - **Strict tool inputs** — an argument key a tool's schema does not declare is rejected by name instead of stripped.
13
+ - **Error envelope on the wire** — the advertised output schema declares `error`, so clients that validate `structuredContent` without checking `isError` stop rejecting error results with `-32602`.
14
+ - **`missing_symbol` reclassified** — `finnhub_get_earnings` (history mode) and `finnhub_get_news` (company mode) return `ValidationError` instead of `InvalidParams` when the required symbol is absent.
15
+ - **Bun 1.4.0** — Dockerfile pins on both stages plus `packageManager`; the build stage runs natively per architecture so multi-arch pushes do not emulate Bun; the production image omits optional peer tiers.
16
+ - **Supply-chain guard** — `bunfig.toml` holds freshly published versions for 3 days and runs the Socket security scanner on every install; framework releases are excluded and adopt same-day.
17
+ - **TypeScript ^7.0.2** — and the tsconfig split typechecks `tests/` alongside `src/`.
18
+
19
+ ## Fixed
20
+
21
+ - **Fetch timeouts classify as `Timeout`** again rather than surfacing as `ServiceUnavailable`.
22
+ - **`withRetry` honors upstream `Retry-After`** headers instead of blind exponential backoff.
23
+ - **A stalled response body aborts** — the request deadline now bounds the whole exchange, not just the response headers.
24
+ - **`MCP_AUTH_MODE=none` no longer advertises OAuth** protected-resource metadata over HTTP.
25
+ - **Stateful HTTP replays dropped SSE streams** — a client reconnecting with `Last-Event-ID` receives the frames it missed.
26
+
27
+ ## Dependencies
28
+
29
+ - `@cyanheads/mcp-ts-core` `^0.10.6` → `^0.12.3`
30
+ - `typescript` `^6.0.3` → `^7.0.2`
31
+ - `@types/node` `25.9.3` → `26.2.0`
32
+ - `@biomejs/biome` `2.5.0` → `2.5.9`
33
+ - `vitest` `^4.1.8` → `^4.1.11`
34
+ - `tsc-alias` `^1.8.17` → `^1.9.2`
35
+ - `ignore` `^7.0.5` → `^7.0.6`
36
+ - `@socketsecurity/bun-security-scanner` `^1.1.2` added
@@ -4,10 +4,11 @@
4
4
  # to author a new release. Set that file's H1 to `# <version> — YYYY-MM-DD`
5
5
  # with a concrete date.
6
6
 
7
- # Required. One-line GitHub Release-style headline. 350 character cap.
8
- # Default short and scannable. Don't pad, don't stitch unrelated changes with
9
- # semicolons — pick the headline. Quotes required: unquoted YAML treats `: `
10
- # inside the value as a key separator and fails GitHub's strict parser.
7
+ # Required. One-line GitHub Release-style headline. 350 character cap — a
8
+ # ceiling, not a target. Default short and scannable. Don't pad, don't stitch
9
+ # unrelated changes with commas/semicolons into an inventory — pick the
10
+ # headline, like a tag's theme line. Quotes required: unquoted YAML treats
11
+ # `: ` inside the value as a key separator and fails GitHub's strict parser.
11
12
  summary: ""
12
13
 
13
14
  # Set `true` when consumers must change code to upgrade: API removals,
@@ -15,16 +16,19 @@ summary: ""
15
16
  # usage. Flagged as `Breaking` in the rollup.
16
17
  breaking: false
17
18
 
18
- # Set `true` if this release contains any security fix. Pairs with the
19
- # `## Security` section below. Flagged as `Security` in the rollup so
20
- # users can triage upgrade urgency at a glance.
19
+ # Set `true` ONLY for a security fix in THIS project's own source code — a
20
+ # vulnerability or hardening in code you ship. A dependency or transitive CVE
21
+ # bump is routine maintenance, NOT a security release: record it under
22
+ # `## Dependencies` (with the advisory ID) and leave this `false`. When true,
23
+ # pairs with the `## Security` section below and flags `Security` in the rollup.
21
24
  security: false
22
25
 
23
26
  # Optional free-form notes for maintenance agents processing this release.
24
27
  # Not rendered in CHANGELOG — consumed by agents running `maintenance` on
25
- # downstream servers. Use for adoption instructions that don't fit the
26
- # human-facing sections: new files to create, fields to populate, one-time
27
- # migration steps. Omit the field entirely when there's nothing to say.
28
+ # downstream servers. ADOPTION STEPS ONLY — new files to create, fields to
29
+ # populate, one-time migration steps. Never a second rendering of the body:
30
+ # if a body bullet already says it, name the bullet's symbol instead of
31
+ # re-explaining. Omit the field entirely when there's nothing to say.
28
32
  # agent-notes: |
29
33
  # <instructions for downstream maintenance agents>
30
34
  ---
@@ -39,17 +43,54 @@ security: false
39
43
  each bullet with the symbol or concept name in **bold** so they can skip
40
44
  what's irrelevant and zoom in on what's not.
41
45
 
42
- Tone: terse, fact-dense, not verbose. Default to one sentence per bullet —
43
- name the symbol, state what changed, stop. Use a second sentence only when
44
- it carries weight. If a bullet feels long, it is.
45
-
46
- Cut: mechanism walkthroughs (those belong in JSDoc, CLAUDE.md/AGENTS.md, or the
47
- relevant skill), ceremonial framings ("This release introduces…",
48
- backwards-compat paragraphs), file-by-file test enumerations, internal
49
- implementation notes. Prefer code/symbol names over English re-explanations.
46
+ Tone: terse, fact-dense, not verbose. Bullet shape: **symbol** + what
47
+ changed + at most one consumer-facing caveat. One sentence by default, two
48
+ when the second carries weight — a bullet past ~40 words or three sentences
49
+ is wrong. The depth lives one hop away: the linked issue carries the why,
50
+ the commit diff carries the how. The changelog names what changed and what
51
+ a consumer does about it; a reader who wants mechanism opens the link.
52
+
53
+ Model length on THIS guide, never on the previous entry — entries modeled
54
+ on entries compound.
55
+
56
+ Cut (each has shipped as a wall of text; these are the cruft):
57
+ - History/justification narration — how the bug worked, why the old
58
+ behavior was wrong. One short clause at most; the issue carries the story.
59
+ - Design-rationale defense — "chosen over Y because…", "guarding the
60
+ getter is not enough…". That is the author arguing with a reviewer;
61
+ reviewers read the PR, not the changelog.
62
+ - Defensive unchanged-clauses — "X is unchanged", "byte-identical to
63
+ <prev>". Keep one only where its absence would cause a real misread,
64
+ as a short parenthetical.
65
+ - Edge-case inventories — marker lists, not-flagged lists, escape tables.
66
+ Tests and the issue carry those.
67
+ - Mechanism walkthroughs (JSDoc, CLAUDE.md/AGENTS.md, or the relevant
68
+ skill own those), ceremonial framings ("This release introduces…"),
69
+ backwards-compat paragraphs, file-by-file test enumerations. Prefer
70
+ code/symbol names over English re-explanations.
71
+
72
+ Verified ≠ included: the every-claim-verified-from-the-diff rule bounds
73
+ the TRUTH of what you write, never the AMOUNT.
74
+
75
+ Example — same fact, right size:
76
+
77
+ TOO LONG: **`fetchWithTimeout`'s `timeoutMs` bounds the whole exchange**
78
+ (#341). `fetch` resolves once headers arrive and the deadline was
79
+ cleared as the helper returned, so a peer that answered promptly and
80
+ then stalled the stream held the request open indefinitely. A 2xx
81
+ carrying a body now comes back as a passthrough wrapper that disarms
82
+ the deadline when the body closes, errors, or is cancelled; …
83
+ [+90 more words of mechanism and edge cases]
84
+
85
+ RIGHT: **`fetchWithTimeout`'s `timeoutMs` now bounds the whole
86
+ exchange, not just the headers** (#341). A stalled body aborts with
87
+ the same `Timeout` error; the returned `Response` is a wrapper, so
88
+ identity assertions (`toBe(response)`) no longer hold.
50
89
 
51
90
  Narrative intro: skip by default. Add one short sentence only when the
52
- release theme genuinely needs framing the bullets can't carry.
91
+ release theme genuinely needs framing the bullets can't carry. When many
92
+ bullets share one upgrade consequence, state it ONCE — intro line or
93
+ agent-notes — never per bullet.
53
94
 
54
95
  Sections: Keep a Changelog order — Added, Changed, Deprecated, Removed,
55
96
  Fixed, Security. Include only sections with entries; delete the rest
package/dist/index.js CHANGED
File without changes
@@ -9,8 +9,8 @@ import { z } from '@cyanheads/mcp-ts-core';
9
9
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
10
10
  export declare const getEarnings: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
11
11
  mode: z.ZodEnum<{
12
- history: "history";
13
12
  calendar: "calendar";
13
+ history: "history";
14
14
  }>;
15
15
  symbol: z.ZodOptional<z.ZodString>;
16
16
  from: z.ZodOptional<z.ZodString>;
@@ -18,8 +18,8 @@ export declare const getEarnings: import("@cyanheads/mcp-ts-core").ToolDefinitio
18
18
  limit: z.ZodDefault<z.ZodNumber>;
19
19
  }, z.core.$strip>, z.ZodObject<{
20
20
  mode: z.ZodEnum<{
21
- history: "history";
22
21
  calendar: "calendar";
22
+ history: "history";
23
23
  }>;
24
24
  history: z.ZodOptional<z.ZodArray<z.ZodObject<{
25
25
  period: z.ZodString;
@@ -41,7 +41,7 @@ export declare const getEarnings: import("@cyanheads/mcp-ts-core").ToolDefinitio
41
41
  }, z.core.$strip>>>;
42
42
  }, z.core.$strip>, readonly [{
43
43
  readonly reason: "missing_symbol";
44
- readonly code: JsonRpcErrorCode.InvalidParams;
44
+ readonly code: JsonRpcErrorCode.ValidationError;
45
45
  readonly when: "mode 'history' was requested without a symbol.";
46
46
  readonly recovery: "Provide a `symbol` for history mode, or switch to mode: calendar for the market-wide upcoming-releases feed.";
47
47
  }, {
@@ -91,7 +91,7 @@ export const getEarnings = tool('finnhub_get_earnings', {
91
91
  errors: [
92
92
  {
93
93
  reason: 'missing_symbol',
94
- code: JsonRpcErrorCode.InvalidParams,
94
+ code: JsonRpcErrorCode.ValidationError,
95
95
  when: "mode 'history' was requested without a symbol.",
96
96
  recovery: 'Provide a `symbol` for history mode, or switch to mode: calendar for the market-wide upcoming-releases feed.',
97
97
  },
@@ -1 +1 @@
1
- {"version":3,"file":"get-earnings.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-earnings.tool.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAE1E,yCAAyC;AACzC,SAAS,OAAO,CAAC,IAAU;IACzB,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AACzC,CAAC;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC,sBAAsB,EAAE;IACtD,WAAW,EACT,yYAAyY;IAC3Y,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IACxD,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,IAAI,EAAE,CAAC;aACJ,IAAI,CAAC,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;aAC7B,QAAQ,CACP,+KAA+K,CAChL;QACH,MAAM,EAAE,CAAC;aACN,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,kHAAkH,CACnH;QACH,IAAI,EAAE,CAAC;aACJ,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,2EAA2E,CAAC;QACxF,EAAE,EAAE,CAAC;aACF,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,mFAAmF,CACpF;QACH,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,GAAG,EAAE;aACL,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,GAAG,CAAC;aACR,OAAO,CAAC,EAAE,CAAC;aACX,Q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AC,IAAI,MAAM,CAAC,CAAC,MAAM,SAAS,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,OAAO,KAAK,IAAI,cAAc,GAAG,iBAAiB,GAAG,EAAE,CACvG,CAAC;YACJ,CAAC;QACH,CAAC;QAED,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACvB,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;QAClC,CAAC;QAED,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"get-earnings.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-earnings.tool.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAE1E,yCAAyC;AACzC,SAAS,OAAO,CAAC,IAAU;IACzB,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AACzC,CAAC;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC,sBAAsB,EAAE;IACtD,WAAW,EACT,yYAAyY;IAC3Y,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IACxD,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,IAAI,EAAE,CAAC;aACJ,IAAI,CAAC,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;aAC7B,QAAQ,CACP,+KAA+K,CAChL;QACH,MAAM,EAAE,CAAC;aACN,MAAM,EAAE;aACR,QAAQ,EAAE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,EAAE,CAAC;gBAChC,MAAM,GAAG,GAAG,CAAC,CAAC,WAAW,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC;gBAC1D,MAAM,GAAG,GAAG,CAAC,CAAC,eAAe,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC;gBAClE,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,IAAI,UAAU,CAAC;gBAClC,KAAK,CAAC,IAAI,CACR,KAAK,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,MAAM,SAAS,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,OAAO,KAAK,IAAI,cAAc,GAAG,iBAAiB,GAAG,EAAE,CACvG,CAAC;YACJ,CAAC;QACH,CAAC;QAED,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACvB,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;QAClC,CAAC;QAED,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
@@ -15,9 +15,9 @@ export declare const getNews: import("@cyanheads/mcp-ts-core").ToolDefinition<z.
15
15
  from: z.ZodOptional<z.ZodString>;
16
16
  to: z.ZodOptional<z.ZodString>;
17
17
  category: z.ZodDefault<z.ZodEnum<{
18
- general: "general";
19
- forex: "forex";
20
18
  crypto: "crypto";
19
+ forex: "forex";
20
+ general: "general";
21
21
  merger: "merger";
22
22
  }>>;
23
23
  limit: z.ZodDefault<z.ZodNumber>;
@@ -37,7 +37,7 @@ export declare const getNews: import("@cyanheads/mcp-ts-core").ToolDefinition<z.
37
37
  }, z.core.$strip>>;
38
38
  }, z.core.$strip>, readonly [{
39
39
  readonly reason: "missing_symbol";
40
- readonly code: JsonRpcErrorCode.InvalidParams;
40
+ readonly code: JsonRpcErrorCode.ValidationError;
41
41
  readonly when: "mode 'company' was requested without a symbol.";
42
42
  readonly recovery: "Provide a `symbol` for company mode, or switch to mode: market with a category.";
43
43
  }, {
@@ -80,7 +80,7 @@ export const getNews = tool('finnhub_get_news', {
80
80
  errors: [
81
81
  {
82
82
  reason: 'missing_symbol',
83
- code: JsonRpcErrorCode.InvalidParams,
83
+ code: JsonRpcErrorCode.ValidationError,
84
84
  when: "mode 'company' was requested without a symbol.",
85
85
  recovery: 'Provide a `symbol` for company mode, or switch to mode: market with a category.',
86
86
  },
@@ -1 +1 @@
1
- {"version":3,"file":"get-news.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-news.tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAG1E,yCAAyC;AACzC,SAAS,OAAO,CAAC,IAAU;IACzB,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AACzC,CAAC;AAED,yEAAyE;AACzE,SAAS,gBAAgB,CAAC,CAAqB;IAS7C,OAAO;QACL,QAAQ,EAAE,CAAC,CAAC,QAAQ;QACpB,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC,WAAW,EAAE;QACnD,OAAO,EAAE,CAAC,CAAC,OAAO,IAAI,EAAE;QACxB,GAAG,EAAE,CAAC,CAAC,GAAG;QACV,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,CA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AAI,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAC9D,CAAC;CACF,CAAC,CAAC"}
@@ -4,6 +4,92 @@
4
4
  * @module mcp-server/tools/definitions/index
5
5
  */
6
6
  export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
7
+ mode: import("zod").ZodEnum<{
8
+ company: "company";
9
+ market: "market";
10
+ }>;
11
+ symbol: import("zod").ZodOptional<import("zod").ZodString>;
12
+ from: import("zod").ZodOptional<import("zod").ZodString>;
13
+ to: import("zod").ZodOptional<import("zod").ZodString>;
14
+ category: import("zod").ZodDefault<import("zod").ZodEnum<{
15
+ crypto: "crypto";
16
+ forex: "forex";
17
+ general: "general";
18
+ merger: "merger";
19
+ }>>;
20
+ limit: import("zod").ZodDefault<import("zod").ZodNumber>;
21
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
22
+ mode: import("zod").ZodEnum<{
23
+ company: "company";
24
+ market: "market";
25
+ }>;
26
+ articles: import("zod").ZodArray<import("zod").ZodObject<{
27
+ headline: import("zod").ZodString;
28
+ source: import("zod").ZodString;
29
+ datetime: import("zod").ZodString;
30
+ summary: import("zod").ZodString;
31
+ url: import("zod").ZodString;
32
+ category: import("zod").ZodOptional<import("zod").ZodString>;
33
+ related: import("zod").ZodOptional<import("zod").ZodString>;
34
+ }, import("zod/v4/core").$strip>>;
35
+ }, import("zod/v4/core").$strip>, readonly [{
36
+ readonly reason: "missing_symbol";
37
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
38
+ readonly when: "mode 'company' was requested without a symbol.";
39
+ readonly recovery: "Provide a `symbol` for company mode, or switch to mode: market with a category.";
40
+ }, {
41
+ readonly reason: "not_us_or_paid";
42
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Forbidden;
43
+ readonly when: "Upstream HTTP 403 on the symbol.";
44
+ readonly recovery: "Free tier is US equities only; use a US symbol or a paid plan.";
45
+ }], {
46
+ readonly totalCount: import("zod").ZodNumber;
47
+ readonly truncated: import("zod").ZodOptional<import("zod").ZodBoolean>;
48
+ readonly shown: import("zod").ZodOptional<import("zod").ZodNumber>;
49
+ readonly cap: import("zod").ZodOptional<import("zod").ZodNumber>;
50
+ readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
51
+ }> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
52
+ query: import("zod").ZodString;
53
+ limit: import("zod").ZodDefault<import("zod").ZodNumber>;
54
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
55
+ results: import("zod").ZodArray<import("zod").ZodObject<{
56
+ symbol: import("zod").ZodString;
57
+ displaySymbol: import("zod").ZodString;
58
+ description: import("zod").ZodString;
59
+ type: import("zod").ZodString;
60
+ isLikelyUS: import("zod").ZodBoolean;
61
+ }, import("zod/v4/core").$strip>>;
62
+ }, import("zod/v4/core").$strip>, undefined, {
63
+ readonly totalCount: import("zod").ZodNumber;
64
+ readonly truncated: import("zod").ZodOptional<import("zod").ZodBoolean>;
65
+ readonly shown: import("zod").ZodOptional<import("zod").ZodNumber>;
66
+ readonly cap: import("zod").ZodOptional<import("zod").ZodNumber>;
67
+ readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
68
+ }> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
69
+ symbol: import("zod").ZodString;
70
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
71
+ symbol: import("zod").ZodString;
72
+ current: import("zod").ZodNumber;
73
+ change: import("zod").ZodNullable<import("zod").ZodNumber>;
74
+ percentChange: import("zod").ZodNullable<import("zod").ZodNumber>;
75
+ high: import("zod").ZodNumber;
76
+ low: import("zod").ZodNumber;
77
+ open: import("zod").ZodNumber;
78
+ previousClose: import("zod").ZodNumber;
79
+ quoteTime: import("zod").ZodString;
80
+ marketOpen: import("zod").ZodNullable<import("zod").ZodBoolean>;
81
+ priceIsLive: import("zod").ZodBoolean;
82
+ }, import("zod/v4/core").$strip>, readonly [{
83
+ readonly reason: "symbol_not_found";
84
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
85
+ readonly when: "Quote sentinel detected (c=0, t=0, d=null, dp=null) — unknown US symbol at HTTP 200.";
86
+ readonly recovery: "Verify the ticker, or call finnhub_search_symbols to resolve the company name to a valid US symbol.";
87
+ }, {
88
+ readonly reason: "not_us_or_paid";
89
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Forbidden;
90
+ readonly when: "Upstream HTTP 403 — international or paid-only symbol.";
91
+ readonly recovery: "This free Finnhub tier covers US stocks only; international symbols require a paid plan. Try the US listing of the company.";
92
+ }], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
7
93
  symbol: import("zod").ZodString;
8
94
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
9
95
  symbol: import("zod").ZodString;
@@ -45,8 +131,8 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
45
131
  readonly recovery: "Free tier is US equities only; international symbols need a paid Finnhub plan. Try the company's US listing.";
46
132
  }], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
47
133
  mode: import("zod").ZodEnum<{
48
- history: "history";
49
134
  calendar: "calendar";
135
+ history: "history";
50
136
  }>;
51
137
  symbol: import("zod").ZodOptional<import("zod").ZodString>;
52
138
  from: import("zod").ZodOptional<import("zod").ZodString>;
@@ -54,8 +140,8 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
54
140
  limit: import("zod").ZodDefault<import("zod").ZodNumber>;
55
141
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
56
142
  mode: import("zod").ZodEnum<{
57
- history: "history";
58
143
  calendar: "calendar";
144
+ history: "history";
59
145
  }>;
60
146
  history: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
61
147
  period: import("zod").ZodString;
@@ -77,7 +163,7 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
77
163
  }, import("zod/v4/core").$strip>>>;
78
164
  }, import("zod/v4/core").$strip>, readonly [{
79
165
  readonly reason: "missing_symbol";
80
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.InvalidParams;
166
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
81
167
  readonly when: "mode 'history' was requested without a symbol.";
82
168
  readonly recovery: "Provide a `symbol` for history mode, or switch to mode: calendar for the market-wide upcoming-releases feed.";
83
169
  }, {
@@ -92,75 +178,6 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
92
178
  readonly cap: import("zod").ZodOptional<import("zod").ZodNumber>;
93
179
  readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
94
180
  }> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
95
- mode: import("zod").ZodEnum<{
96
- company: "company";
97
- market: "market";
98
- }>;
99
- symbol: import("zod").ZodOptional<import("zod").ZodString>;
100
- from: import("zod").ZodOptional<import("zod").ZodString>;
101
- to: import("zod").ZodOptional<import("zod").ZodString>;
102
- category: import("zod").ZodDefault<import("zod").ZodEnum<{
103
- general: "general";
104
- forex: "forex";
105
- crypto: "crypto";
106
- merger: "merger";
107
- }>>;
108
- limit: import("zod").ZodDefault<import("zod").ZodNumber>;
109
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
110
- mode: import("zod").ZodEnum<{
111
- company: "company";
112
- market: "market";
113
- }>;
114
- articles: import("zod").ZodArray<import("zod").ZodObject<{
115
- headline: import("zod").ZodString;
116
- source: import("zod").ZodString;
117
- datetime: import("zod").ZodString;
118
- summary: import("zod").ZodString;
119
- url: import("zod").ZodString;
120
- category: import("zod").ZodOptional<import("zod").ZodString>;
121
- related: import("zod").ZodOptional<import("zod").ZodString>;
122
- }, import("zod/v4/core").$strip>>;
123
- }, import("zod/v4/core").$strip>, readonly [{
124
- readonly reason: "missing_symbol";
125
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.InvalidParams;
126
- readonly when: "mode 'company' was requested without a symbol.";
127
- readonly recovery: "Provide a `symbol` for company mode, or switch to mode: market with a category.";
128
- }, {
129
- readonly reason: "not_us_or_paid";
130
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Forbidden;
131
- readonly when: "Upstream HTTP 403 on the symbol.";
132
- readonly recovery: "Free tier is US equities only; use a US symbol or a paid plan.";
133
- }], {
134
- readonly totalCount: import("zod").ZodNumber;
135
- readonly truncated: import("zod").ZodOptional<import("zod").ZodBoolean>;
136
- readonly shown: import("zod").ZodOptional<import("zod").ZodNumber>;
137
- readonly cap: import("zod").ZodOptional<import("zod").ZodNumber>;
138
- readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
139
- }> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
140
- symbol: import("zod").ZodString;
141
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
142
- symbol: import("zod").ZodString;
143
- current: import("zod").ZodNumber;
144
- change: import("zod").ZodNullable<import("zod").ZodNumber>;
145
- percentChange: import("zod").ZodNullable<import("zod").ZodNumber>;
146
- high: import("zod").ZodNumber;
147
- low: import("zod").ZodNumber;
148
- open: import("zod").ZodNumber;
149
- previousClose: import("zod").ZodNumber;
150
- quoteTime: import("zod").ZodString;
151
- marketOpen: import("zod").ZodNullable<import("zod").ZodBoolean>;
152
- priceIsLive: import("zod").ZodBoolean;
153
- }, import("zod/v4/core").$strip>, readonly [{
154
- readonly reason: "symbol_not_found";
155
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
156
- readonly when: "Quote sentinel detected (c=0, t=0, d=null, dp=null) — unknown US symbol at HTTP 200.";
157
- readonly recovery: "Verify the ticker, or call finnhub_search_symbols to resolve the company name to a valid US symbol.";
158
- }, {
159
- readonly reason: "not_us_or_paid";
160
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Forbidden;
161
- readonly when: "Upstream HTTP 403 — international or paid-only symbol.";
162
- readonly recovery: "This free Finnhub tier covers US stocks only; international symbols require a paid plan. Try the US listing of the company.";
163
- }], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
164
181
  symbol: import("zod").ZodString;
165
182
  limit: import("zod").ZodDefault<import("zod").ZodNumber>;
166
183
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
@@ -188,22 +205,5 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
188
205
  readonly truncated: import("zod").ZodOptional<import("zod").ZodBoolean>;
189
206
  readonly shown: import("zod").ZodOptional<import("zod").ZodNumber>;
190
207
  readonly cap: import("zod").ZodOptional<import("zod").ZodNumber>;
191
- }> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
192
- query: import("zod").ZodString;
193
- limit: import("zod").ZodDefault<import("zod").ZodNumber>;
194
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
195
- results: import("zod").ZodArray<import("zod").ZodObject<{
196
- symbol: import("zod").ZodString;
197
- displaySymbol: import("zod").ZodString;
198
- description: import("zod").ZodString;
199
- type: import("zod").ZodString;
200
- isLikelyUS: import("zod").ZodBoolean;
201
- }, import("zod/v4/core").$strip>>;
202
- }, import("zod/v4/core").$strip>, undefined, {
203
- readonly totalCount: import("zod").ZodNumber;
204
- readonly truncated: import("zod").ZodOptional<import("zod").ZodBoolean>;
205
- readonly shown: import("zod").ZodOptional<import("zod").ZodNumber>;
206
- readonly cap: import("zod").ZodOptional<import("zod").ZodNumber>;
207
- readonly notice: import("zod").ZodOptional<import("zod").ZodString>;
208
208
  }>)[];
209
209
  //# sourceMappingURL=index.d.ts.map
@@ -7,9 +7,9 @@
7
7
  * identical, correct error semantics.
8
8
  * @module services/finnhub/finnhub-service
9
9
  */
10
+ import type { Context } from '@cyanheads/mcp-ts-core';
10
11
  import type { AppConfig } from '@cyanheads/mcp-ts-core/config';
11
12
  import type { StorageService } from '@cyanheads/mcp-ts-core/storage';
12
- import type { RequestContextLike } from '@cyanheads/mcp-ts-core/utils';
13
13
  import type { FinnhubEarning, FinnhubEarningsCalendar, FinnhubMarketStatus, FinnhubMetricResponse, FinnhubNewsArticle, FinnhubProfile, FinnhubQuote, FinnhubRecommendation, FinnhubSearchResponse } from './types.js';
14
14
  /**
15
15
  * Authenticated client for the Finnhub REST API. Initialized once in
@@ -20,27 +20,27 @@ export declare class FinnhubService {
20
20
  private readonly apiKey;
21
21
  constructor();
22
22
  /** `GET /search?q={query}` — resolve a name/ticker fragment to symbols. */
23
- search(query: string, ctx: RequestContextLike): Promise<FinnhubSearchResponse>;
23
+ search(query: string, ctx: Context): Promise<FinnhubSearchResponse>;
24
24
  /** `GET /quote?symbol={symbol}` — real-time price snapshot. */
25
- quote(symbol: string, ctx: RequestContextLike): Promise<FinnhubQuote>;
25
+ quote(symbol: string, ctx: Context): Promise<FinnhubQuote>;
26
26
  /** `GET /stock/market-status?exchange={exchange}` — live market-open flag. */
27
- marketStatus(exchange: string, ctx: RequestContextLike): Promise<FinnhubMarketStatus>;
27
+ marketStatus(exchange: string, ctx: Context): Promise<FinnhubMarketStatus>;
28
28
  /** `GET /stock/profile2?symbol={symbol}` — company profile (`{}` if unknown). */
29
- profile(symbol: string, ctx: RequestContextLike): Promise<FinnhubProfile>;
29
+ profile(symbol: string, ctx: Context): Promise<FinnhubProfile>;
30
30
  /** `GET /stock/metric?symbol={symbol}&metric=all` — fundamentals (~100 keys). */
31
- metrics(symbol: string, ctx: RequestContextLike): Promise<FinnhubMetricResponse>;
31
+ metrics(symbol: string, ctx: Context): Promise<FinnhubMetricResponse>;
32
32
  /** `GET /stock/peers?symbol={symbol}` — sector peer symbols (includes the query). */
33
- peers(symbol: string, ctx: RequestContextLike): Promise<string[]>;
33
+ peers(symbol: string, ctx: Context): Promise<string[]>;
34
34
  /** `GET /stock/earnings?symbol={symbol}` — past quarters, newest first. */
35
- earnings(symbol: string, ctx: RequestContextLike): Promise<FinnhubEarning[]>;
35
+ earnings(symbol: string, ctx: Context): Promise<FinnhubEarning[]>;
36
36
  /** `GET /calendar/earnings?from={from}&to={to}` — upcoming releases window. */
37
- earningsCalendar(from: string, to: string, ctx: RequestContextLike): Promise<FinnhubEarningsCalendar>;
37
+ earningsCalendar(from: string, to: string, ctx: Context): Promise<FinnhubEarningsCalendar>;
38
38
  /** `GET /company-news?symbol={symbol}&from={from}&to={to}`. */
39
- companyNews(symbol: string, from: string, to: string, ctx: RequestContextLike): Promise<FinnhubNewsArticle[]>;
39
+ companyNews(symbol: string, from: string, to: string, ctx: Context): Promise<FinnhubNewsArticle[]>;
40
40
  /** `GET /news?category={category}` — market-wide headlines. */
41
- marketNews(category: string, ctx: RequestContextLike): Promise<FinnhubNewsArticle[]>;
41
+ marketNews(category: string, ctx: Context): Promise<FinnhubNewsArticle[]>;
42
42
  /** `GET /stock/recommendation?symbol={symbol}` — analyst trends, empty if no coverage. */
43
- recommendations(symbol: string, ctx: RequestContextLike): Promise<FinnhubRecommendation[]>;
43
+ recommendations(symbol: string, ctx: Context): Promise<FinnhubRecommendation[]>;
44
44
  /**
45
45
  * Core request pipeline: build the authenticated URL, fetch, and parse — all
46
46
  * wrapped in `withRetry` so transient failures (429/5xx/network) back off and
@@ -1 +1 @@
1
- {"version":3,"file":"finnhub-service.d.ts","sourceRoot":"","sources":["../../../src/services/finnhub/finnhub-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAE/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAGvE,OAAO,KAAK,EACV,cAAc,EACd,uBAAuB,EACvB,mBAAmB,EACnB,qBAAqB,EACrB,kB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AAU,CAAC,GAAY,EAAE,SAAiB,EAAE,IAAY;QAC9D,IAAI,GAAG,YAAY,QAAQ,IAAI,GAAG,CAAC,IAAI,KAAK,gBAAgB,CAAC,YAAY,EAAE,CAAC;YAC1E,OAAO,kBAAkB,CACvB,wGAAwG,EACxG,EAAE,SAAS,EAAE,IAAI,EAAE,EACnB,EAAE,KAAK,EAAE,GAAG,EAAE,CACf,CAAC;QACJ,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC;CACF;AAED,gCAAgC;AAEhC,IAAI,QAAoC,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,OAAkB,EAAE,QAAwB;IAC7E,QAAQ,GAAG,IAAI,cAAc,EAAE,CAAC;AAClC,CAAC;AAED,uEAAuE;AACvE,MAAM,UAAU,iBAAiB;IAC/B,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,uEAAuE,CAAC,CAAC;IAC3F,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyanheads/finnhub-mcp-server",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "mcpName": "io.github.cyanheads/finnhub-mcp-server",
5
5
  "description": "Real-time US-equity quotes, company fundamentals, earnings, analyst trends, and financial news via Finnhub. STDIO or Streamable HTTP.",
6
6
  "type": "module",
@@ -52,16 +52,25 @@
52
52
  "finnhub",
53
53
  "finance",
54
54
  "stocks",
55
+ "equities",
55
56
  "market-data",
56
57
  "quotes",
57
58
  "earnings",
58
- "stock-market"
59
+ "stock-market",
60
+ "ai-agents",
61
+ "cyanheads"
59
62
  ],
60
63
  "repository": {
61
64
  "type": "git",
62
65
  "url": "git+https://github.com/cyanheads/finnhub-mcp-server.git"
63
66
  },
67
+ "homepage": "https://github.com/cyanheads/finnhub-mcp-server#readme",
68
+ "bugs": {
69
+ "url": "https://github.com/cyanheads/finnhub-mcp-server/issues"
70
+ },
64
71
  "license": "Apache-2.0",
72
+ "packageManager": "bun@1.4.0",
73
+ "author": "Casey Hand <casey@caseyjhand.com> (https://caseyjhand.com)",
65
74
  "engines": {
66
75
  "bun": ">=1.3.0",
67
76
  "node": ">=24.0.0"
@@ -70,17 +79,18 @@
70
79
  "access": "public"
71
80
  },
72
81
  "dependencies": {
73
- "@cyanheads/mcp-ts-core": "^0.10.6",
82
+ "@cyanheads/mcp-ts-core": "^0.12.3",
74
83
  "pino-pretty": "^13.1.3",
75
84
  "zod": "^4.4.3"
76
85
  },
77
86
  "devDependencies": {
78
- "@biomejs/biome": "2.5.0",
79
- "@types/node": "25.9.3",
87
+ "@biomejs/biome": "2.5.9",
88
+ "@socketsecurity/bun-security-scanner": "^1.1.2",
89
+ "@types/node": "26.2.0",
80
90
  "depcheck": "^1.4.7",
81
- "ignore": "^7.0.5",
82
- "tsc-alias": "^1.8.17",
83
- "typescript": "^6.0.3",
84
- "vitest": "^4.1.8"
91
+ "ignore": "^7.0.6",
92
+ "tsc-alias": "^1.9.2",
93
+ "typescript": "^7.0.2",
94
+ "vitest": "^4.1.11"
85
95
  }
86
96
  }
package/server.json CHANGED
@@ -6,14 +6,14 @@
6
6
  "url": "https://github.com/cyanheads/finnhub-mcp-server",
7
7
  "source": "github"
8
8
  },
9
- "version": "0.1.1",
9
+ "version": "0.1.2",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "registryBaseUrl": "https://registry.npmjs.org",
14
14
  "identifier": "@cyanheads/finnhub-mcp-server",
15
15
  "runtimeHint": "node",
16
- "version": "0.1.1",
16
+ "version": "0.1.2",
17
17
  "packageArguments": [
18
18
  {
19
19
  "type": "positional",
@@ -55,7 +55,7 @@
55
55
  "registryBaseUrl": "https://registry.npmjs.org",
56
56
  "identifier": "@cyanheads/finnhub-mcp-server",
57
57
  "runtimeHint": "node",
58
- "version": "0.1.1",
58
+ "version": "0.1.2",
59
59
  "packageArguments": [
60
60
  {
61
61
  "type": "positional",