@cyanheads/calculator-mcp-server 0.1.22 → 0.1.24
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 +81 -10
- package/CLAUDE.md +81 -10
- package/README.md +11 -6
- package/dist/mcp-server/tools/definitions/calculate.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/calculate.tool.js +2 -0
- package/dist/mcp-server/tools/definitions/calculate.tool.js.map +1 -1
- package/package.json +17 -7
- package/server.json +4 -4
package/AGENTS.md
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
# Agent Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** calculator-mcp-server
|
|
4
|
-
**Version:** 0.1.
|
|
5
|
-
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)
|
|
4
|
+
**Version:** 0.1.24
|
|
5
|
+
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.9.6`
|
|
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** —
|
|
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
|
|
|
@@ -151,6 +154,11 @@ Handlers receive a unified `ctx` object. Key properties:
|
|
|
151
154
|
| Property | Description |
|
|
152
155
|
|:---------|:------------|
|
|
153
156
|
| `ctx.log` | Request-scoped logger — `.debug()`, `.info()`, `.notice()`, `.warning()`, `.error()`. Auto-correlates requestId, traceId, tenantId. |
|
|
157
|
+
| `ctx.state` | Tenant-scoped KV — `.get(key)`, `.set(key, value, { ttl? })`, `.delete(key)`, `.list(prefix, { cursor, limit })`. Accepts any serializable value. |
|
|
158
|
+
| `ctx.elicit` | Ask user for structured input. **Check for presence first:** `if (ctx.elicit) { ... }` |
|
|
159
|
+
| `ctx.sample` | Request LLM completion from the client. **Check for presence first:** `if (ctx.sample) { ... }` |
|
|
160
|
+
| `ctx.signal` | `AbortSignal` for cancellation. |
|
|
161
|
+
| `ctx.progress` | Task progress (present when `task: true`) — `.setTotal(n)`, `.increment()`, `.update(message)`. |
|
|
154
162
|
| `ctx.requestId` | Unique request ID. |
|
|
155
163
|
| `ctx.tenantId` | Tenant ID from JWT or `'default'` for stdio. |
|
|
156
164
|
|
|
@@ -239,7 +247,7 @@ src/
|
|
|
239
247
|
|
|
240
248
|
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
249
|
|
|
242
|
-
**Agent skill directory:** Copy skills into the directory your agent discovers (Claude Code: `.claude/skills/`, others: equivalent).
|
|
250
|
+
**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
251
|
|
|
244
252
|
Available skills:
|
|
245
253
|
|
|
@@ -256,10 +264,10 @@ Available skills:
|
|
|
256
264
|
| `field-test` | Exercise tools/resources/prompts with real inputs, verify behavior, report issues |
|
|
257
265
|
| `tool-defs-analysis` | Read-only audit of MCP definition language (voice, leaks, recovery hints, structure) |
|
|
258
266
|
| `devcheck` | Lint, format, typecheck, audit |
|
|
259
|
-
| `security-pass` | Audit
|
|
267
|
+
| `security-pass` | Audit server for MCP-flavored security gaps: output injection, scope blast radius, input sinks, tenant isolation |
|
|
260
268
|
| `polish-docs-meta` | Finalize docs, README, metadata, and agent protocol for shipping |
|
|
261
269
|
| `release-and-publish` | Publish to npm, MCP Registry, and GHCR after git wrapup |
|
|
262
|
-
| `maintenance` |
|
|
270
|
+
| `maintenance` | Investigate changelogs, adopt upstream changes, sync skills to agent dirs |
|
|
263
271
|
| `report-issue-framework` | File a bug or feature request against `@cyanheads/mcp-ts-core` via `gh` CLI |
|
|
264
272
|
| `report-issue-local` | File a bug or feature request against this server's own repo via `gh` CLI |
|
|
265
273
|
| `api-auth` | Auth modes, scopes, JWT/OAuth |
|
|
@@ -286,16 +294,78 @@ When you complete a skill's checklist, check the boxes and add a completion time
|
|
|
286
294
|
| `bun run build` | Compile TypeScript |
|
|
287
295
|
| `bun run rebuild` | Clean + build |
|
|
288
296
|
| `bun run clean` | Remove build artifacts |
|
|
289
|
-
| `bun run devcheck` | Lint + format + typecheck + security |
|
|
297
|
+
| `bun run devcheck` | Lint + format + typecheck + security + changelog sync |
|
|
298
|
+
| `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. |
|
|
290
299
|
| `bun run tree` | Generate directory structure doc |
|
|
300
|
+
| `bun run list-skills` | Print skill index from `skills/` frontmatter |
|
|
291
301
|
| `bun run format` | Auto-fix formatting |
|
|
292
302
|
| `bun run lint:mcp` | Validate MCP definitions |
|
|
303
|
+
| `bun run lint:packaging` | Validate env var alignment between `manifest.json` and `server.json` |
|
|
304
|
+
| `bun run bundle` | Build and pack as `.mcpb` for one-click Claude Desktop install |
|
|
305
|
+
| `bun run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |
|
|
306
|
+
| `bun run changelog:check` | Verify `CHANGELOG.md` is in sync (used by devcheck) |
|
|
293
307
|
| `bun run test` | Run tests |
|
|
294
308
|
| `bun run start:stdio` | Production mode (stdio) |
|
|
295
309
|
| `bun run start:http` | Production mode (HTTP) |
|
|
296
310
|
|
|
297
311
|
---
|
|
298
312
|
|
|
313
|
+
## Bundling
|
|
314
|
+
|
|
315
|
+
`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.
|
|
316
|
+
|
|
317
|
+
**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.
|
|
318
|
+
|
|
319
|
+
**README install badges** — drop these in to give users one-click install paths:
|
|
320
|
+
|
|
321
|
+
| Client | Mechanism |
|
|
322
|
+
|:-------|:----------|
|
|
323
|
+
| Claude Desktop | Browser downloads `.mcpb` from latest GitHub Release; OS file handler routes to Claude Desktop. |
|
|
324
|
+
| Cursor | `https://cursor.com/en/install-mcp` with base64 JSON config. |
|
|
325
|
+
| VS Code | `vscode:mcp/install?...` wrapped in `https://vscode.dev/redirect?url=` (GitHub strips non-HTTP schemes). |
|
|
326
|
+
| Claude Code / Codex | CLI only — no URL scheme. |
|
|
327
|
+
|
|
328
|
+
```markdown
|
|
329
|
+
[](https://github.com/cyanheads/calculator-mcp-server/releases/latest/download/calculator-mcp-server.mcpb)
|
|
330
|
+
[](https://cursor.com/en/install-mcp?name=calculator-mcp-server&config=<BASE64_CONFIG>)
|
|
331
|
+
[](https://vscode.dev/redirect?url=vscode:mcp/install?<URLENCODED_JSON>)
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
Generate encoded configs:
|
|
335
|
+
|
|
336
|
+
```bash
|
|
337
|
+
# Cursor
|
|
338
|
+
echo -n '{"command":"npx -y @cyanheads/calculator-mcp-server"}' | base64
|
|
339
|
+
|
|
340
|
+
# VS Code
|
|
341
|
+
node -p 'encodeURIComponent(JSON.stringify({name:"@cyanheads/calculator-mcp-server",command:"npx",args:["-y","@cyanheads/calculator-mcp-server"]}))'
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
---
|
|
345
|
+
|
|
346
|
+
## Changelog
|
|
347
|
+
|
|
348
|
+
Directory-based, grouped by minor series via the `.x` semver-wildcard convention. Source of truth: `changelog/<major.minor>.x/<version>.md` (e.g. `changelog/0.1.x/0.1.0.md`) — one file per release, shipped in the npm package. At release, author the per-version file with a concrete version and date, then run `bun run changelog:build` to regenerate the rollup. `changelog/template.md` is a **pristine format reference** — never edited or moved; read it for the frontmatter + section layout when scaffolding. `CHANGELOG.md` is a **navigation index** (header + link + summary per version), regenerated by `bun run changelog:build` — devcheck hard-fails on drift; never hand-edit it.
|
|
349
|
+
|
|
350
|
+
Each per-version file opens with YAML frontmatter:
|
|
351
|
+
|
|
352
|
+
```markdown
|
|
353
|
+
---
|
|
354
|
+
summary: "One-line headline, ≤350 chars" # required — powers the rollup index
|
|
355
|
+
breaking: false # optional — true flags breaking changes
|
|
356
|
+
security: false # optional — true flags security fixes
|
|
357
|
+
---
|
|
358
|
+
|
|
359
|
+
# 0.1.0 — YYYY-MM-DD
|
|
360
|
+
...
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
`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`.
|
|
364
|
+
|
|
365
|
+
**Section order** (Keep a Changelog): Added, Changed, Deprecated, Removed, Fixed, Security. Include only sections with entries — don't ship empty headers.
|
|
366
|
+
|
|
367
|
+
---
|
|
368
|
+
|
|
299
369
|
## Publishing
|
|
300
370
|
|
|
301
371
|
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.
|
|
@@ -317,7 +387,8 @@ git push && git push --tags
|
|
|
317
387
|
This server publishes to:
|
|
318
388
|
|
|
319
389
|
1. **npm** — `bun publish --access public`
|
|
320
|
-
2. **
|
|
390
|
+
2. **GitHub Release** — `.mcpb` bundle attached via `gh release create --verify-tag --notes-from-tag dist/*.mcpb` (powers the Claude Desktop install badge)
|
|
391
|
+
3. **GHCR** — multi-arch Docker image:
|
|
321
392
|
|
|
322
393
|
```bash
|
|
323
394
|
docker buildx build --platform linux/amd64,linux/arm64 \
|
|
@@ -326,7 +397,7 @@ This server publishes to:
|
|
|
326
397
|
--push .
|
|
327
398
|
```
|
|
328
399
|
|
|
329
|
-
The `release-and-publish` skill drives
|
|
400
|
+
The `release-and-publish` skill drives all three — don't run the commands manually unless the skill halts.
|
|
330
401
|
|
|
331
402
|
---
|
|
332
403
|
|
|
@@ -346,7 +417,7 @@ import { getServerConfig } from '@/config/server-config.js';
|
|
|
346
417
|
|
|
347
418
|
## Checklist
|
|
348
419
|
|
|
349
|
-
- [ ] Zod schemas: all fields have `.describe()`, only JSON-Schema-serializable types (no `z.custom()`, `z.date()`, `z.transform()`,
|
|
420
|
+
- [ ] 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()`)
|
|
350
421
|
- [ ] 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`.
|
|
351
422
|
- [ ] JSDoc `@fileoverview` + `@module` on every file
|
|
352
423
|
- [ ] `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.
|
|
5
|
-
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)
|
|
4
|
+
**Version:** 0.1.24
|
|
5
|
+
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.9.6`
|
|
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** —
|
|
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
|
|
|
@@ -151,6 +154,11 @@ Handlers receive a unified `ctx` object. Key properties:
|
|
|
151
154
|
| Property | Description |
|
|
152
155
|
|:---------|:------------|
|
|
153
156
|
| `ctx.log` | Request-scoped logger — `.debug()`, `.info()`, `.notice()`, `.warning()`, `.error()`. Auto-correlates requestId, traceId, tenantId. |
|
|
157
|
+
| `ctx.state` | Tenant-scoped KV — `.get(key)`, `.set(key, value, { ttl? })`, `.delete(key)`, `.list(prefix, { cursor, limit })`. Accepts any serializable value. |
|
|
158
|
+
| `ctx.elicit` | Ask user for structured input. **Check for presence first:** `if (ctx.elicit) { ... }` |
|
|
159
|
+
| `ctx.sample` | Request LLM completion from the client. **Check for presence first:** `if (ctx.sample) { ... }` |
|
|
160
|
+
| `ctx.signal` | `AbortSignal` for cancellation. |
|
|
161
|
+
| `ctx.progress` | Task progress (present when `task: true`) — `.setTotal(n)`, `.increment()`, `.update(message)`. |
|
|
154
162
|
| `ctx.requestId` | Unique request ID. |
|
|
155
163
|
| `ctx.tenantId` | Tenant ID from JWT or `'default'` for stdio. |
|
|
156
164
|
|
|
@@ -239,7 +247,7 @@ src/
|
|
|
239
247
|
|
|
240
248
|
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
249
|
|
|
242
|
-
**Agent skill directory:** Copy skills into the directory your agent discovers (Claude Code: `.claude/skills/`, others: equivalent).
|
|
250
|
+
**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
251
|
|
|
244
252
|
Available skills:
|
|
245
253
|
|
|
@@ -256,10 +264,10 @@ Available skills:
|
|
|
256
264
|
| `field-test` | Exercise tools/resources/prompts with real inputs, verify behavior, report issues |
|
|
257
265
|
| `tool-defs-analysis` | Read-only audit of MCP definition language (voice, leaks, recovery hints, structure) |
|
|
258
266
|
| `devcheck` | Lint, format, typecheck, audit |
|
|
259
|
-
| `security-pass` | Audit
|
|
267
|
+
| `security-pass` | Audit server for MCP-flavored security gaps: output injection, scope blast radius, input sinks, tenant isolation |
|
|
260
268
|
| `polish-docs-meta` | Finalize docs, README, metadata, and agent protocol for shipping |
|
|
261
269
|
| `release-and-publish` | Publish to npm, MCP Registry, and GHCR after git wrapup |
|
|
262
|
-
| `maintenance` |
|
|
270
|
+
| `maintenance` | Investigate changelogs, adopt upstream changes, sync skills to agent dirs |
|
|
263
271
|
| `report-issue-framework` | File a bug or feature request against `@cyanheads/mcp-ts-core` via `gh` CLI |
|
|
264
272
|
| `report-issue-local` | File a bug or feature request against this server's own repo via `gh` CLI |
|
|
265
273
|
| `api-auth` | Auth modes, scopes, JWT/OAuth |
|
|
@@ -286,16 +294,78 @@ When you complete a skill's checklist, check the boxes and add a completion time
|
|
|
286
294
|
| `bun run build` | Compile TypeScript |
|
|
287
295
|
| `bun run rebuild` | Clean + build |
|
|
288
296
|
| `bun run clean` | Remove build artifacts |
|
|
289
|
-
| `bun run devcheck` | Lint + format + typecheck + security |
|
|
297
|
+
| `bun run devcheck` | Lint + format + typecheck + security + changelog sync |
|
|
298
|
+
| `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. |
|
|
290
299
|
| `bun run tree` | Generate directory structure doc |
|
|
300
|
+
| `bun run list-skills` | Print skill index from `skills/` frontmatter |
|
|
291
301
|
| `bun run format` | Auto-fix formatting |
|
|
292
302
|
| `bun run lint:mcp` | Validate MCP definitions |
|
|
303
|
+
| `bun run lint:packaging` | Validate env var alignment between `manifest.json` and `server.json` |
|
|
304
|
+
| `bun run bundle` | Build and pack as `.mcpb` for one-click Claude Desktop install |
|
|
305
|
+
| `bun run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |
|
|
306
|
+
| `bun run changelog:check` | Verify `CHANGELOG.md` is in sync (used by devcheck) |
|
|
293
307
|
| `bun run test` | Run tests |
|
|
294
308
|
| `bun run start:stdio` | Production mode (stdio) |
|
|
295
309
|
| `bun run start:http` | Production mode (HTTP) |
|
|
296
310
|
|
|
297
311
|
---
|
|
298
312
|
|
|
313
|
+
## Bundling
|
|
314
|
+
|
|
315
|
+
`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.
|
|
316
|
+
|
|
317
|
+
**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.
|
|
318
|
+
|
|
319
|
+
**README install badges** — drop these in to give users one-click install paths:
|
|
320
|
+
|
|
321
|
+
| Client | Mechanism |
|
|
322
|
+
|:-------|:----------|
|
|
323
|
+
| Claude Desktop | Browser downloads `.mcpb` from latest GitHub Release; OS file handler routes to Claude Desktop. |
|
|
324
|
+
| Cursor | `https://cursor.com/en/install-mcp` with base64 JSON config. |
|
|
325
|
+
| VS Code | `vscode:mcp/install?...` wrapped in `https://vscode.dev/redirect?url=` (GitHub strips non-HTTP schemes). |
|
|
326
|
+
| Claude Code / Codex | CLI only — no URL scheme. |
|
|
327
|
+
|
|
328
|
+
```markdown
|
|
329
|
+
[](https://github.com/cyanheads/calculator-mcp-server/releases/latest/download/calculator-mcp-server.mcpb)
|
|
330
|
+
[](https://cursor.com/en/install-mcp?name=calculator-mcp-server&config=<BASE64_CONFIG>)
|
|
331
|
+
[](https://vscode.dev/redirect?url=vscode:mcp/install?<URLENCODED_JSON>)
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
Generate encoded configs:
|
|
335
|
+
|
|
336
|
+
```bash
|
|
337
|
+
# Cursor
|
|
338
|
+
echo -n '{"command":"npx -y @cyanheads/calculator-mcp-server"}' | base64
|
|
339
|
+
|
|
340
|
+
# VS Code
|
|
341
|
+
node -p 'encodeURIComponent(JSON.stringify({name:"@cyanheads/calculator-mcp-server",command:"npx",args:["-y","@cyanheads/calculator-mcp-server"]}))'
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
---
|
|
345
|
+
|
|
346
|
+
## Changelog
|
|
347
|
+
|
|
348
|
+
Directory-based, grouped by minor series via the `.x` semver-wildcard convention. Source of truth: `changelog/<major.minor>.x/<version>.md` (e.g. `changelog/0.1.x/0.1.0.md`) — one file per release, shipped in the npm package. At release, author the per-version file with a concrete version and date, then run `bun run changelog:build` to regenerate the rollup. `changelog/template.md` is a **pristine format reference** — never edited or moved; read it for the frontmatter + section layout when scaffolding. `CHANGELOG.md` is a **navigation index** (header + link + summary per version), regenerated by `bun run changelog:build` — devcheck hard-fails on drift; never hand-edit it.
|
|
349
|
+
|
|
350
|
+
Each per-version file opens with YAML frontmatter:
|
|
351
|
+
|
|
352
|
+
```markdown
|
|
353
|
+
---
|
|
354
|
+
summary: "One-line headline, ≤350 chars" # required — powers the rollup index
|
|
355
|
+
breaking: false # optional — true flags breaking changes
|
|
356
|
+
security: false # optional — true flags security fixes
|
|
357
|
+
---
|
|
358
|
+
|
|
359
|
+
# 0.1.0 — YYYY-MM-DD
|
|
360
|
+
...
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
`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`.
|
|
364
|
+
|
|
365
|
+
**Section order** (Keep a Changelog): Added, Changed, Deprecated, Removed, Fixed, Security. Include only sections with entries — don't ship empty headers.
|
|
366
|
+
|
|
367
|
+
---
|
|
368
|
+
|
|
299
369
|
## Publishing
|
|
300
370
|
|
|
301
371
|
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.
|
|
@@ -317,7 +387,8 @@ git push && git push --tags
|
|
|
317
387
|
This server publishes to:
|
|
318
388
|
|
|
319
389
|
1. **npm** — `bun publish --access public`
|
|
320
|
-
2. **
|
|
390
|
+
2. **GitHub Release** — `.mcpb` bundle attached via `gh release create --verify-tag --notes-from-tag dist/*.mcpb` (powers the Claude Desktop install badge)
|
|
391
|
+
3. **GHCR** — multi-arch Docker image:
|
|
321
392
|
|
|
322
393
|
```bash
|
|
323
394
|
docker buildx build --platform linux/amd64,linux/arm64 \
|
|
@@ -326,7 +397,7 @@ This server publishes to:
|
|
|
326
397
|
--push .
|
|
327
398
|
```
|
|
328
399
|
|
|
329
|
-
The `release-and-publish` skill drives
|
|
400
|
+
The `release-and-publish` skill drives all three — don't run the commands manually unless the skill halts.
|
|
330
401
|
|
|
331
402
|
---
|
|
332
403
|
|
|
@@ -346,7 +417,7 @@ import { getServerConfig } from '@/config/server-config.js';
|
|
|
346
417
|
|
|
347
418
|
## Checklist
|
|
348
419
|
|
|
349
|
-
- [ ] Zod schemas: all fields have `.describe()`, only JSON-Schema-serializable types (no `z.custom()`, `z.date()`, `z.transform()`,
|
|
420
|
+
- [ ] 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()`)
|
|
350
421
|
- [ ] 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`.
|
|
351
422
|
- [ ] JSDoc `@fileoverview` + `@module` on every file
|
|
352
423
|
- [ ] `ctx.log` for logging, `ctx.state` for storage
|
package/README.md
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
<h1>@cyanheads/calculator-mcp-server</h1>
|
|
3
|
-
<p><b>
|
|
4
|
-
<
|
|
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
|
-
[](https://www.npmjs.com/package/@cyanheads/calculator-mcp-server)
|
|
10
|
-
[](https://github.com/users/cyanheads/packages/container/package/calculator-mcp-server)
|
|
11
|
-
[](./CHANGELOG.md) [](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)
|
|
10
|
+
[](./CHANGELOG.md) [](./LICENSE) [](https://github.com/users/cyanheads/packages/container/package/calculator-mcp-server) [](https://modelcontextprotocol.io/) [](https://www.npmjs.com/package/@cyanheads/calculator-mcp-server) [](https://www.typescriptlang.org/) [](https://bun.sh/)
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
<div align="center">
|
|
15
|
+
|
|
16
|
+
[](https://github.com/cyanheads/calculator-mcp-server/releases/latest/download/calculator-mcp-server.mcpb) [](https://cursor.com/en/install-mcp?name=calculator-mcp-server&config=eyJjb21tYW5kIjoibnB4IC15IEBjeWFuaGVhZHMvY2FsY3VsYXRvci1tY3Atc2VydmVyIn0=) [](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
|
+
[](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)
|
|
14
19
|
|
|
15
20
|
</div>
|
|
16
21
|
|
|
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,SA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E,GAAG,IAAI,CAAC,uBAAuB,CAAC,UAAU,EAAE,QAAQ,EAAE,GAAG,CAAC,EAAE,UAAU,EAAE,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,QAAQ,CACP,uIAAuI,CACxI;QACH,KAAK,EAAE,CAAC;aACL,MAAM,CAAC,CAAC,CAAC,MAAM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|
-
"description": "
|
|
3
|
+
"version": "0.1.24",
|
|
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",
|
|
@@ -62,19 +68,23 @@
|
|
|
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.9.
|
|
75
|
+
"@cyanheads/mcp-ts-core": "^0.9.6",
|
|
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
81
|
"@biomejs/biome": "^2.4.15",
|
|
72
|
-
"@types/node": "^25.
|
|
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.22.
|
|
86
|
+
"tsx": "^4.22.3",
|
|
77
87
|
"typescript": "^6.0.3",
|
|
78
|
-
"vitest": "^4.1.
|
|
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": "
|
|
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.
|
|
9
|
+
"version": "0.1.24",
|
|
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.
|
|
22
|
+
"version": "0.1.24",
|
|
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.
|
|
72
|
+
"version": "0.1.24",
|
|
73
73
|
"packageArguments": [
|
|
74
74
|
{
|
|
75
75
|
"type": "positional",
|