@cyanheads/calculator-mcp-server 0.1.21 → 0.1.23

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,8 +1,11 @@
1
1
  # Agent Protocol
2
2
 
3
3
  **Server:** calculator-mcp-server
4
- **Version:** 0.1.21
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)
4
+ **Version:** 0.1.23
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.9.4`
6
+ **Engines:** Bun ≥1.3.0, Node ≥24.0.0
7
+ **MCP SDK:** `@modelcontextprotocol/sdk` 1.29.0
8
+ **Zod:** 4.4.3
6
9
 
7
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.
8
11
 
@@ -36,7 +39,7 @@ When the user asks what to do next, what's left, or needs direction, suggest rel
36
39
  8. **Run the `security-pass` skill** — audit handlers for MCP-specific security gaps (injection, blast radius, input sinks, tenant isolation)
37
40
  9. **Run the `polish-docs-meta` skill** — finalize README, CHANGELOG, metadata, and agent protocol for shipping
38
41
  10. **Run the `release-and-publish` skill** — publish to npm + MCP Registry + GHCR after wrapup
39
- 11. **Run the `maintenance` skill** — sync skills and dependencies after framework updates
42
+ 11. **Run the `maintenance` skill** — investigate changelogs, adopt upstream changes, and sync skills after `bun update --latest`
40
43
 
41
44
  Tailor suggestions to what's actually missing or stale — don't recite the full list every time.
42
45
 
@@ -239,7 +242,7 @@ src/
239
242
 
240
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.
241
244
 
242
- **Agent skill directory:** Copy skills into the directory your agent discovers (Claude Code: `.claude/skills/`, others: equivalent). This makes skills available as context without needing to reference `skills/` paths manually. After framework updates, run the `maintenance` skill — it re-syncs the agent directory automatically (Phase B).
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.
243
246
 
244
247
  Available skills:
245
248
 
@@ -256,21 +259,22 @@ Available skills:
256
259
  | `field-test` | Exercise tools/resources/prompts with real inputs, verify behavior, report issues |
257
260
  | `tool-defs-analysis` | Read-only audit of MCP definition language (voice, leaks, recovery hints, structure) |
258
261
  | `devcheck` | Lint, format, typecheck, audit |
259
- | `security-pass` | Audit handlers for MCP-specific security gaps before shipping |
262
+ | `security-pass` | Audit server for MCP-flavored security gaps: output injection, scope blast radius, input sinks, tenant isolation |
260
263
  | `polish-docs-meta` | Finalize docs, README, metadata, and agent protocol for shipping |
261
264
  | `release-and-publish` | Publish to npm, MCP Registry, and GHCR after git wrapup |
262
- | `maintenance` | Sync skills and dependencies after updates |
265
+ | `maintenance` | Investigate changelogs, adopt upstream changes, sync skills to agent dirs |
263
266
  | `report-issue-framework` | File a bug or feature request against `@cyanheads/mcp-ts-core` via `gh` CLI |
264
267
  | `report-issue-local` | File a bug or feature request against this server's own repo via `gh` CLI |
265
268
  | `api-auth` | Auth modes, scopes, JWT/OAuth |
266
- | `api-canvas` | DataCanvas: register tabular data, run SQL, export — Tier 3 opt-in |
269
+ | `api-canvas` | DataCanvas: register tabular data, run SQL, export, plus the `spillover()` helper for big result sets — Tier 3 opt-in |
267
270
  | `api-config` | AppConfig, parseConfig, env vars |
268
271
  | `api-context` | Context interface, logger, state, progress |
269
272
  | `api-errors` | McpError, JsonRpcErrorCode, error patterns |
270
273
  | `api-linter` | MCP definition linter rules reference (every rule ID + fix) |
271
274
  | `api-services` | LLM, Speech, Graph services |
275
+ | `api-telemetry` | OTel catalog: spans, metrics, completion logs, env config, cardinality rules |
272
276
  | `api-testing` | createMockContext, test patterns |
273
- | `api-utils` | Formatting, parsing, security, pagination, scheduling |
277
+ | `api-utils` | Formatting, parsing, security, pagination, scheduling, telemetry helpers |
274
278
  | `api-workers` | Cloudflare Workers runtime |
275
279
  | `migrate-mcp-ts-template` | Migrate a template fork to use `@cyanheads/mcp-ts-core` as a package |
276
280
 
@@ -285,16 +289,55 @@ When you complete a skill's checklist, check the boxes and add a completion time
285
289
  | `bun run build` | Compile TypeScript |
286
290
  | `bun run rebuild` | Clean + build |
287
291
  | `bun run clean` | Remove build artifacts |
288
- | `bun run devcheck` | Lint + format + typecheck + security |
292
+ | `bun run devcheck` | Lint + format + typecheck + security + changelog sync |
293
+ | `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. |
289
294
  | `bun run tree` | Generate directory structure doc |
295
+ | `bun run list-skills` | Print skill index from `skills/` frontmatter |
290
296
  | `bun run format` | Auto-fix formatting |
291
297
  | `bun run lint:mcp` | Validate MCP definitions |
298
+ | `bun run lint:packaging` | Validate env var alignment between `manifest.json` and `server.json` |
299
+ | `bun run bundle` | Build and pack as `.mcpb` for one-click Claude Desktop install |
300
+ | `bun run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |
301
+ | `bun run changelog:check` | Verify `CHANGELOG.md` is in sync (used by devcheck) |
292
302
  | `bun run test` | Run tests |
293
303
  | `bun run start:stdio` | Production mode (stdio) |
294
304
  | `bun run start:http` | Production mode (HTTP) |
295
305
 
296
306
  ---
297
307
 
308
+ ## Bundling
309
+
310
+ `bun run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. MCPB is stdio-only — HTTP deployments are unaffected. Delete `manifest.json` and `.mcpbignore` to skip; `lint:packaging` skips cleanly when `manifest.json` is absent.
311
+
312
+ **Adding an env var requires both files:** `server.json` (`environmentVariables[]`) and `manifest.json` (`mcp_config.env` + `user_config`). `lint:packaging` (run by `devcheck`) verifies env var names match.
313
+
314
+ **README install badges** — drop these in to give users one-click install paths:
315
+
316
+ | Client | Mechanism |
317
+ |:-------|:----------|
318
+ | Claude Desktop | Browser downloads `.mcpb` from latest GitHub Release; OS file handler routes to Claude Desktop. |
319
+ | Cursor | `https://cursor.com/en/install-mcp` with base64 JSON config. |
320
+ | VS Code | `vscode:mcp/install?...` wrapped in `https://vscode.dev/redirect?url=` (GitHub strips non-HTTP schemes). |
321
+ | Claude Code / Codex | CLI only — no URL scheme. |
322
+
323
+ ```markdown
324
+ [![Install in Claude Desktop](https://img.shields.io/badge/Install_in-Claude_Desktop-D97757?style=for-the-badge&logo=anthropic&logoColor=white)](https://github.com/cyanheads/calculator-mcp-server/releases/latest/download/calculator-mcp-server.mcpb)
325
+ [![Install in Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=calculator-mcp-server&config=<BASE64_CONFIG>)
326
+ [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=for-the-badge&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect?url=vscode:mcp/install?<URLENCODED_JSON>)
327
+ ```
328
+
329
+ Generate encoded configs:
330
+
331
+ ```bash
332
+ # Cursor
333
+ echo -n '{"command":"npx -y @cyanheads/calculator-mcp-server"}' | base64
334
+
335
+ # VS Code
336
+ node -p 'encodeURIComponent(JSON.stringify({name:"@cyanheads/calculator-mcp-server",command:"npx",args:["-y","@cyanheads/calculator-mcp-server"]}))'
337
+ ```
338
+
339
+ ---
340
+
298
341
  ## Publishing
299
342
 
300
343
  After git wrapup (version bumps, changelog, commit, annotated tag) is complete, run the **`release-and-publish`** skill — it handles the full publish flow with retry-on-transient-failure across every registry.
@@ -316,7 +359,8 @@ git push && git push --tags
316
359
  This server publishes to:
317
360
 
318
361
  1. **npm** — `bun publish --access public`
319
- 2. **GHCR** — multi-arch Docker image:
362
+ 2. **GitHub Release** — `.mcpb` bundle attached via `gh release create --verify-tag --notes-from-tag dist/*.mcpb` (powers the Claude Desktop install badge)
363
+ 3. **GHCR** — multi-arch Docker image:
320
364
 
321
365
  ```bash
322
366
  docker buildx build --platform linux/amd64,linux/arm64 \
@@ -325,7 +369,7 @@ This server publishes to:
325
369
  --push .
326
370
  ```
327
371
 
328
- The `release-and-publish` skill drives both — don't run the commands manually unless the skill halts.
372
+ The `release-and-publish` skill drives all three — don't run the commands manually unless the skill halts.
329
373
 
330
374
  ---
331
375
 
@@ -345,7 +389,7 @@ import { getServerConfig } from '@/config/server-config.js';
345
389
 
346
390
  ## Checklist
347
391
 
348
- - [ ] Zod schemas: all fields have `.describe()`, only JSON-Schema-serializable types (no `z.custom()`, `z.date()`, `z.transform()`, etc.)
392
+ - [ ] Zod schemas: all fields have `.describe()`, only JSON-Schema-serializable types (no `z.custom()`, `z.date()`, `z.transform()`, `z.bigint()`, `z.symbol()`, `z.void()`, `z.map()`, `z.set()`, `z.function()`, `z.nan()`)
349
393
  - [ ] Optional nested objects: handler guards for empty inner values from form-based clients (`if (input.obj?.field && ...)`, not just `if (input.obj)`). When regex/length constraints matter, use `z.union([z.literal(''), z.string().regex(...).describe(...)])` — literal variants are exempt from `describe-on-fields`.
350
394
  - [ ] JSDoc `@fileoverview` + `@module` on every file
351
395
  - [ ] `ctx.log` for logging, `ctx.state` for storage
package/CLAUDE.md CHANGED
@@ -1,8 +1,11 @@
1
1
  # Agent Protocol
2
2
 
3
3
  **Server:** calculator-mcp-server
4
- **Version:** 0.1.21
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)
4
+ **Version:** 0.1.23
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.9.4`
6
+ **Engines:** Bun ≥1.3.0, Node ≥24.0.0
7
+ **MCP SDK:** `@modelcontextprotocol/sdk` 1.29.0
8
+ **Zod:** 4.4.3
6
9
 
7
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.
8
11
 
@@ -36,7 +39,7 @@ When the user asks what to do next, what's left, or needs direction, suggest rel
36
39
  8. **Run the `security-pass` skill** — audit handlers for MCP-specific security gaps (injection, blast radius, input sinks, tenant isolation)
37
40
  9. **Run the `polish-docs-meta` skill** — finalize README, CHANGELOG, metadata, and agent protocol for shipping
38
41
  10. **Run the `release-and-publish` skill** — publish to npm + MCP Registry + GHCR after wrapup
39
- 11. **Run the `maintenance` skill** — sync skills and dependencies after framework updates
42
+ 11. **Run the `maintenance` skill** — investigate changelogs, adopt upstream changes, and sync skills after `bun update --latest`
40
43
 
41
44
  Tailor suggestions to what's actually missing or stale — don't recite the full list every time.
42
45
 
@@ -239,7 +242,7 @@ src/
239
242
 
240
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.
241
244
 
242
- **Agent skill directory:** Copy skills into the directory your agent discovers (Claude Code: `.claude/skills/`, others: equivalent). This makes skills available as context without needing to reference `skills/` paths manually. After framework updates, run the `maintenance` skill — it re-syncs the agent directory automatically (Phase B).
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.
243
246
 
244
247
  Available skills:
245
248
 
@@ -256,21 +259,22 @@ Available skills:
256
259
  | `field-test` | Exercise tools/resources/prompts with real inputs, verify behavior, report issues |
257
260
  | `tool-defs-analysis` | Read-only audit of MCP definition language (voice, leaks, recovery hints, structure) |
258
261
  | `devcheck` | Lint, format, typecheck, audit |
259
- | `security-pass` | Audit handlers for MCP-specific security gaps before shipping |
262
+ | `security-pass` | Audit server for MCP-flavored security gaps: output injection, scope blast radius, input sinks, tenant isolation |
260
263
  | `polish-docs-meta` | Finalize docs, README, metadata, and agent protocol for shipping |
261
264
  | `release-and-publish` | Publish to npm, MCP Registry, and GHCR after git wrapup |
262
- | `maintenance` | Sync skills and dependencies after updates |
265
+ | `maintenance` | Investigate changelogs, adopt upstream changes, sync skills to agent dirs |
263
266
  | `report-issue-framework` | File a bug or feature request against `@cyanheads/mcp-ts-core` via `gh` CLI |
264
267
  | `report-issue-local` | File a bug or feature request against this server's own repo via `gh` CLI |
265
268
  | `api-auth` | Auth modes, scopes, JWT/OAuth |
266
- | `api-canvas` | DataCanvas: register tabular data, run SQL, export — Tier 3 opt-in |
269
+ | `api-canvas` | DataCanvas: register tabular data, run SQL, export, plus the `spillover()` helper for big result sets — Tier 3 opt-in |
267
270
  | `api-config` | AppConfig, parseConfig, env vars |
268
271
  | `api-context` | Context interface, logger, state, progress |
269
272
  | `api-errors` | McpError, JsonRpcErrorCode, error patterns |
270
273
  | `api-linter` | MCP definition linter rules reference (every rule ID + fix) |
271
274
  | `api-services` | LLM, Speech, Graph services |
275
+ | `api-telemetry` | OTel catalog: spans, metrics, completion logs, env config, cardinality rules |
272
276
  | `api-testing` | createMockContext, test patterns |
273
- | `api-utils` | Formatting, parsing, security, pagination, scheduling |
277
+ | `api-utils` | Formatting, parsing, security, pagination, scheduling, telemetry helpers |
274
278
  | `api-workers` | Cloudflare Workers runtime |
275
279
  | `migrate-mcp-ts-template` | Migrate a template fork to use `@cyanheads/mcp-ts-core` as a package |
276
280
 
@@ -285,16 +289,55 @@ When you complete a skill's checklist, check the boxes and add a completion time
285
289
  | `bun run build` | Compile TypeScript |
286
290
  | `bun run rebuild` | Clean + build |
287
291
  | `bun run clean` | Remove build artifacts |
288
- | `bun run devcheck` | Lint + format + typecheck + security |
292
+ | `bun run devcheck` | Lint + format + typecheck + security + changelog sync |
293
+ | `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. |
289
294
  | `bun run tree` | Generate directory structure doc |
295
+ | `bun run list-skills` | Print skill index from `skills/` frontmatter |
290
296
  | `bun run format` | Auto-fix formatting |
291
297
  | `bun run lint:mcp` | Validate MCP definitions |
298
+ | `bun run lint:packaging` | Validate env var alignment between `manifest.json` and `server.json` |
299
+ | `bun run bundle` | Build and pack as `.mcpb` for one-click Claude Desktop install |
300
+ | `bun run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |
301
+ | `bun run changelog:check` | Verify `CHANGELOG.md` is in sync (used by devcheck) |
292
302
  | `bun run test` | Run tests |
293
303
  | `bun run start:stdio` | Production mode (stdio) |
294
304
  | `bun run start:http` | Production mode (HTTP) |
295
305
 
296
306
  ---
297
307
 
308
+ ## Bundling
309
+
310
+ `bun run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. MCPB is stdio-only — HTTP deployments are unaffected. Delete `manifest.json` and `.mcpbignore` to skip; `lint:packaging` skips cleanly when `manifest.json` is absent.
311
+
312
+ **Adding an env var requires both files:** `server.json` (`environmentVariables[]`) and `manifest.json` (`mcp_config.env` + `user_config`). `lint:packaging` (run by `devcheck`) verifies env var names match.
313
+
314
+ **README install badges** — drop these in to give users one-click install paths:
315
+
316
+ | Client | Mechanism |
317
+ |:-------|:----------|
318
+ | Claude Desktop | Browser downloads `.mcpb` from latest GitHub Release; OS file handler routes to Claude Desktop. |
319
+ | Cursor | `https://cursor.com/en/install-mcp` with base64 JSON config. |
320
+ | VS Code | `vscode:mcp/install?...` wrapped in `https://vscode.dev/redirect?url=` (GitHub strips non-HTTP schemes). |
321
+ | Claude Code / Codex | CLI only — no URL scheme. |
322
+
323
+ ```markdown
324
+ [![Install in Claude Desktop](https://img.shields.io/badge/Install_in-Claude_Desktop-D97757?style=for-the-badge&logo=anthropic&logoColor=white)](https://github.com/cyanheads/calculator-mcp-server/releases/latest/download/calculator-mcp-server.mcpb)
325
+ [![Install in Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=calculator-mcp-server&config=<BASE64_CONFIG>)
326
+ [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=for-the-badge&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect?url=vscode:mcp/install?<URLENCODED_JSON>)
327
+ ```
328
+
329
+ Generate encoded configs:
330
+
331
+ ```bash
332
+ # Cursor
333
+ echo -n '{"command":"npx -y @cyanheads/calculator-mcp-server"}' | base64
334
+
335
+ # VS Code
336
+ node -p 'encodeURIComponent(JSON.stringify({name:"@cyanheads/calculator-mcp-server",command:"npx",args:["-y","@cyanheads/calculator-mcp-server"]}))'
337
+ ```
338
+
339
+ ---
340
+
298
341
  ## Publishing
299
342
 
300
343
  After git wrapup (version bumps, changelog, commit, annotated tag) is complete, run the **`release-and-publish`** skill — it handles the full publish flow with retry-on-transient-failure across every registry.
@@ -316,7 +359,8 @@ git push && git push --tags
316
359
  This server publishes to:
317
360
 
318
361
  1. **npm** — `bun publish --access public`
319
- 2. **GHCR** — multi-arch Docker image:
362
+ 2. **GitHub Release** — `.mcpb` bundle attached via `gh release create --verify-tag --notes-from-tag dist/*.mcpb` (powers the Claude Desktop install badge)
363
+ 3. **GHCR** — multi-arch Docker image:
320
364
 
321
365
  ```bash
322
366
  docker buildx build --platform linux/amd64,linux/arm64 \
@@ -325,7 +369,7 @@ This server publishes to:
325
369
  --push .
326
370
  ```
327
371
 
328
- The `release-and-publish` skill drives both — don't run the commands manually unless the skill halts.
372
+ The `release-and-publish` skill drives all three — don't run the commands manually unless the skill halts.
329
373
 
330
374
  ---
331
375
 
@@ -345,7 +389,7 @@ import { getServerConfig } from '@/config/server-config.js';
345
389
 
346
390
  ## Checklist
347
391
 
348
- - [ ] Zod schemas: all fields have `.describe()`, only JSON-Schema-serializable types (no `z.custom()`, `z.date()`, `z.transform()`, etc.)
392
+ - [ ] Zod schemas: all fields have `.describe()`, only JSON-Schema-serializable types (no `z.custom()`, `z.date()`, `z.transform()`, `z.bigint()`, `z.symbol()`, `z.void()`, `z.map()`, `z.set()`, `z.function()`, `z.nan()`)
349
393
  - [ ] Optional nested objects: handler guards for empty inner values from form-based clients (`if (input.obj?.field && ...)`, not just `if (input.obj)`). When regex/length constraints matter, use `z.union([z.literal(''), z.string().regex(...).describe(...)])` — literal variants are exempt from `describe-on-fields`.
350
394
  - [ ] JSDoc `@fileoverview` + `@module` on every file
351
395
  - [ ] `ctx.log` for logging, `ctx.state` for storage
package/Dockerfile CHANGED
@@ -4,7 +4,7 @@
4
4
  # This stage installs all dependencies (including dev), builds the TypeScript
5
5
  # source code into JavaScript, and prepares the production assets.
6
6
  # ==============================================================================
7
- FROM oven/bun:1 AS build
7
+ FROM oven/bun:1.3 AS build
8
8
 
9
9
  WORKDIR /usr/src/app
10
10
 
@@ -28,7 +28,7 @@ RUN bun run build
28
28
  # application. It uses a slim base image and only includes production
29
29
  # dependencies and build artifacts.
30
30
  # ==============================================================================
31
- FROM oven/bun:1-slim AS production
31
+ FROM oven/bun:1.3-slim AS production
32
32
 
33
33
  WORKDIR /usr/src/app
34
34
 
package/README.md CHANGED
@@ -1,16 +1,21 @@
1
1
  <div align="center">
2
2
  <h1>@cyanheads/calculator-mcp-server</h1>
3
- <p><b>A calculator MCP server that lets any LLM verify mathematical computations. Evaluate, simplify, and differentiate expressions via a single tool. Powered by math.js v15.</b></p>
4
- <p><b>1 Tool · 1 Resource</b></p>
3
+ <p><b>Evaluate, simplify, and differentiate mathematical expressions via MCP. STDIO or Streamable HTTP.</b>
4
+ <div>1 Tool 1 Resource</div>
5
+ </p>
5
6
  </div>
6
7
 
7
8
  <div align="center">
8
9
 
9
- [![npm](https://img.shields.io/npm/v/@cyanheads/calculator-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/calculator-mcp-server)
10
- [![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/calculator-mcp-server)
11
- [![Version](https://img.shields.io/badge/Version-0.1.21-blue.svg?style=flat-square)](./CHANGELOG.md) [![Framework](https://img.shields.io/badge/Built%20on-@cyanheads/mcp--ts--core-259?style=flat-square)](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)
10
+ [![Version](https://img.shields.io/badge/Version-0.1.23-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/calculator-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-%5E1.29.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/calculator-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/calculator-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-%5E6.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/)
12
11
 
13
- [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-1.29.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![TypeScript](https://img.shields.io/badge/TypeScript-6.0.3-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/)
12
+ </div>
13
+
14
+ <div align="center">
15
+
16
+ [![Install in Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=calculator-mcp-server&config=eyJjb21tYW5kIjoibnB4IC15IEBjeWFuaGVhZHMvY2FsY3VsYXRvci1tY3Atc2VydmVyIn0=) [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=for-the-badge&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect?url=vscode:mcp/install?%7B%22name%22%3A%22calculator-mcp-server%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40cyanheads%2Fcalculator-mcp-server%22%5D%7D)
17
+
18
+ [![Framework](https://img.shields.io/badge/Built%20on-@cyanheads/mcp--ts--core-67E8F9?style=flat-square)](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)
14
19
 
15
20
  </div>
16
21
 
@@ -105,7 +110,7 @@ Add to your MCP client config (e.g., `claude_desktop_config.json`):
105
110
 
106
111
  ### Prerequisites
107
112
 
108
- - [Bun v1.2.0](https://bun.sh/) or higher
113
+ - [Bun v1.3.0](https://bun.sh/) or higher
109
114
 
110
115
  ### Installation
111
116
 
@@ -3,11 +3,7 @@
3
3
  * @module config/server-config
4
4
  */
5
5
  import { z } from '@cyanheads/mcp-ts-core';
6
- declare const ServerConfigSchema: z.ZodObject<{
7
- maxExpressionLength: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
8
- evaluationTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
9
- maxResultLength: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
10
- }, z.core.$strip>;
6
+ declare const ServerConfigSchema: any;
11
7
  export type ServerConfig = z.infer<typeof ServerConfigSchema>;
12
8
  /** Lazy-parsed server config from env vars. */
13
9
  export declare function getServerConfig(): ServerConfig;
@@ -1 +1 @@
1
- {"version":3,"file":"server-config.d.ts","sourceRoot":"","sources":["../../src/config/server-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAG3C,QAAA,MAAM,kBAAkB;;;;iBAsBtB,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAI9D,+CAA+C;AAC/C,wBAAgB,eAAe,IAAI,YAAY,CAO9C"}
1
+ {"version":3,"file":"server-config.d.ts","sourceRoot":"","sources":["../../src/config/server-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAG3C,QAAA,MAAM,kBAAkB,KAsBtB,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAI9D,+CAA+C;AAC/C,wBAAgB,eAAe,IAAI,YAAY,CAO9C"}
package/dist/index.js CHANGED
@@ -11,6 +11,7 @@ import { initMathService } from './services/math/math-service.js';
11
11
  await createApp({
12
12
  tools: [calculateTool],
13
13
  resources: [helpResource],
14
+ instructions: 'Use `calculate` to verify math computations via math.js. `operation` selects `evaluate` (default, numeric), `simplify` (symbolic, with trig identities), or `derivative` (symbolic, requires `variable`). Covers arithmetic, trigonometry, logarithms, statistics, matrices, complex numbers, combinatorics, and unit conversion (e.g. `5 kg to lbs`). Pass variable values via `scope` (e.g. `{ "x": 5 }`) and bound numeric output with `precision` (1–16). One expression per call.',
14
15
  landing: {
15
16
  repoRoot: 'https://github.com/cyanheads/calculator-mcp-server',
16
17
  tagline: 'A hardened math.js calculator MCP server — evaluate, simplify, and differentiate expressions.',
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,kDAAkD,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE,MAAM,SAAS,CAAC;IACd,KAAK,EAAE,CAAC,aAAa,CAAC;IACtB,SAAS,EAAE,CAAC,YAAY,CAAC;IACzB,OAAO,EAAE;QACP,QAAQ,EAAE,oDAAoD;QAC9D,OAAO,EACL,+FAA+F;KAClG;IACD,KAAK;QACH,eAAe,CAAC,eAAe,EAAE,CAAC,CAAC;IACrC,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,kDAAkD,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE,MAAM,SAAS,CAAC;IACd,KAAK,EAAE,CAAC,aAAa,CAAC;IACtB,SAAS,EAAE,CAAC,YAAY,CAAC;IACzB,YAAY,EACV,wdAAwd;IAC1d,OAAO,EAAE;QACP,QAAQ,EAAE,oDAAoD;QAC9D,OAAO,EACL,+FAA+F;KAClG;IACD,KAAK;QACH,eAAe,CAAC,eAAe,EAAE,CAAC,CAAC;IACrC,CAAC;CACF,CAAC,CAAC"}
@@ -2,7 +2,5 @@
2
2
  * @fileoverview Help resource — static reference of available functions, operators, and syntax.
3
3
  * @module mcp-server/resources/definitions/help.resource
4
4
  */
5
- export declare const helpResource: import("@cyanheads/mcp-ts-core").ResourceDefinition<import("zod").ZodObject<Readonly<{
6
- [k: string]: import("zod/v4/core").$ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>;
7
- }>, import("zod/v4/core").$strip>, undefined, undefined>;
5
+ export declare const helpResource: import("@cyanheads/mcp-ts-core").ResourceDefinition<ZodObject<ZodRawShape>, undefined, undefined>;
8
6
  //# sourceMappingURL=help.resource.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"help.resource.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/help.resource.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,eAAO,MAAM,YAAY;;wDAWvB,CAAC"}
1
+ {"version":3,"file":"help.resource.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/help.resource.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,eAAO,MAAM,YAAY,mGAWvB,CAAC"}
@@ -3,23 +3,8 @@
3
3
  * Single tool covering 100% of the server's purpose.
4
4
  * @module mcp-server/tools/definitions/calculate.tool
5
5
  */
6
- import { z } from '@cyanheads/mcp-ts-core';
7
6
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
8
- export declare const calculateTool: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
9
- expression: z.ZodString;
10
- operation: z.ZodDefault<z.ZodEnum<{
11
- evaluate: "evaluate";
12
- simplify: "simplify";
13
- derivative: "derivative";
14
- }>>;
15
- variable: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>>;
16
- scope: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
17
- precision: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodNumber]>>;
18
- }, z.core.$strip>, z.ZodObject<{
19
- result: z.ZodString;
20
- resultType: z.ZodString;
21
- expression: z.ZodString;
22
- }, z.core.$strip>, readonly [{
7
+ export declare const calculateTool: import("@cyanheads/mcp-ts-core").ToolDefinition<any, any, readonly [{
23
8
  readonly reason: "empty_expression";
24
9
  readonly code: JsonRpcErrorCode.ValidationError;
25
10
  readonly when: "Expression is empty or whitespace-only.";
@@ -1 +1 @@
1
- {"version":3,"file":"calculate.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/calculate.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmKxB,CAAC"}
1
+ {"version":3,"file":"calculate.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/calculate.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqKxB,CAAC"}
@@ -133,6 +133,8 @@ export const calculateTool = tool('calculate', {
133
133
  }
134
134
  ctx.log.info('Differentiated expression', { expression, variable });
135
135
  return { ...math.differentiateExpression(expression, variable, ctx), expression };
136
+ default:
137
+ throw new Error(`Unhandled operation: ${operation}`);
136
138
  }
137
139
  },
138
140
  format: (output) => [
@@ -1 +1 @@
1
- {"version":3,"file":"calculate.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/calculate.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEjE,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC,WAAW,EAAE;IAC7C,WAAW,EACT,0NAA0N;IAC5N,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;QAClB,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,KAAK;KACrB;IACD,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,UAAU,EAAE,CAAC;aACV,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CACP,oVAAoV,CACrV;QACH,SAAS,EAAE,CAAC;aACT,IAAI,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC;aAC5C,OAAO,CAAC,UAAU,CAAC;aACnB,QAAQ,CACP,+RAA+R,CACh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MAAM,EAAE,EAAE,CAAC;QAClB;YACE,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,qBAAqB,MAAM,CAAC,UAAU,mBAAmB,MAAM,CAAC,MAAM,eAAe,MAAM,CAAC,UAAU,EAAE;SAC/G;KACF;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"calculate.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/calculate.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEjE,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC,WAAW,EAAE;IAC7C,WAAW,EACT,0NAA0N;IAC5N,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;QAClB,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,KAAK;KACrB;IACD,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,UAAU,EAAE,CAAC;aACV,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CACP,oVAAoV,CACrV;QACH,SAAS,EAAE,CAAC;aACT,IAAI,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC;aAC5C,OAAO,CAAC,UAAU,CAAC;aACnB,QAAQ,CACP,+RAA+R,CAChS;QACH,QAAQ,EAAE,CAAC;aACR,KAAK,CAAC;YACL,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,oCAAoC,CAAC;YAC5D,CAAC;iBACE,MAAM,EAAE;iBACR,GAAG,CAAC,EAAE,CAAC;iBACP,KAAK,CACJ,0BAA0B,EAC1B,wDAAwD,CACzD;iBACA,QAAQ,CAAC,mEAAmE,CAAC;SACjF,CAAC;aACD,QAAQ,EAAE;aACV,QA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2
  "name": "@cyanheads/calculator-mcp-server",
3
- "version": "0.1.21",
4
- "description": "Calculator MCP server — evaluate, simplify, and differentiate math expressions.",
3
+ "version": "0.1.23",
4
+ "description": "Evaluate, simplify, and differentiate mathematical expressions via MCP. STDIO or Streamable HTTP.",
5
5
  "mcpName": "io.github.cyanheads/calculator-mcp-server",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
@@ -15,9 +15,15 @@
15
15
  "rebuild": "bun scripts/clean.ts && bun scripts/build.ts",
16
16
  "clean": "bun scripts/clean.ts",
17
17
  "devcheck": "bun scripts/devcheck.ts",
18
+ "audit:refresh": "rm -f bun.lock && bun install && bun audit",
18
19
  "tree": "bun scripts/tree.ts",
20
+ "list-skills": "bun scripts/list-skills.ts",
19
21
  "format": "biome check --write --unsafe .",
20
22
  "lint:mcp": "bun scripts/lint-mcp.ts",
23
+ "lint:packaging": "bun scripts/lint-packaging.ts",
24
+ "bundle": "bun run build && npx -y @anthropic-ai/mcpb pack . dist/calculator-mcp-server.mcpb",
25
+ "changelog:build": "bun scripts/build-changelog.ts",
26
+ "changelog:check": "bun scripts/build-changelog.ts --check",
21
27
  "test": "vitest run",
22
28
  "start": "node dist/index.js",
23
29
  "start:stdio": "MCP_TRANSPORT_TYPE=stdio node dist/index.js",
@@ -55,26 +61,30 @@
55
61
  }
56
62
  ],
57
63
  "engines": {
58
- "node": ">=22.0.0",
59
- "bun": ">=1.2.0"
64
+ "node": ">=24.0.0",
65
+ "bun": ">=1.3.0"
60
66
  },
61
67
  "packageManager": "bun@1.3.11",
62
68
  "publishConfig": {
63
69
  "access": "public"
64
70
  },
71
+ "overrides": {
72
+ "zod": "^4.4.3"
73
+ },
65
74
  "dependencies": {
66
- "@cyanheads/mcp-ts-core": "^0.8.15",
75
+ "@cyanheads/mcp-ts-core": "^0.9.4",
67
76
  "mathjs": "^15.2.0",
68
- "pino-pretty": "^13.1.3"
77
+ "pino-pretty": "^13.1.3",
78
+ "zod": "^4.4.3"
69
79
  },
70
80
  "devDependencies": {
71
- "@biomejs/biome": "^2.4.14",
72
- "@types/node": "^25.6.0",
81
+ "@biomejs/biome": "^2.4.15",
82
+ "@types/node": "^25.9.1",
73
83
  "depcheck": "^1.4.7",
74
84
  "ignore": "^7.0.5",
75
85
  "tsc-alias": "^1.8.17",
76
- "tsx": "^4.21.0",
86
+ "tsx": "^4.22.3",
77
87
  "typescript": "^6.0.3",
78
- "vitest": "^4.1.5"
88
+ "vitest": "^4.1.7"
79
89
  }
80
90
  }
package/server.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
3
  "name": "io.github.cyanheads/calculator-mcp-server",
4
- "description": "Calculator MCP server — evaluate, simplify, and differentiate math expressions.",
4
+ "description": "Evaluate, simplify, and differentiate mathematical expressions.",
5
5
  "repository": {
6
6
  "url": "https://github.com/cyanheads/calculator-mcp-server",
7
7
  "source": "github"
8
8
  },
9
- "version": "0.1.21",
9
+ "version": "0.1.23",
10
10
  "remotes": [
11
11
  {
12
12
  "type": "streamable-http",
@@ -19,7 +19,7 @@
19
19
  "registryBaseUrl": "https://registry.npmjs.org",
20
20
  "identifier": "@cyanheads/calculator-mcp-server",
21
21
  "runtimeHint": "bun",
22
- "version": "0.1.21",
22
+ "version": "0.1.23",
23
23
  "packageArguments": [
24
24
  {
25
25
  "type": "positional",
@@ -69,7 +69,7 @@
69
69
  "registryBaseUrl": "https://registry.npmjs.org",
70
70
  "identifier": "@cyanheads/calculator-mcp-server",
71
71
  "runtimeHint": "bun",
72
- "version": "0.1.21",
72
+ "version": "0.1.23",
73
73
  "packageArguments": [
74
74
  {
75
75
  "type": "positional",