@cyanheads/calculator-mcp-server 0.1.23 → 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 +30 -2
- package/CLAUDE.md +30 -2
- package/README.md +2 -2
- package/dist/config/server-config.d.ts +5 -1
- package/dist/config/server-config.d.ts.map +1 -1
- package/dist/mcp-server/resources/definitions/help.resource.d.ts +3 -1
- package/dist/mcp-server/resources/definitions/help.resource.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/calculate.tool.d.ts +16 -1
- package/dist/mcp-server/tools/definitions/calculate.tool.d.ts.map +1 -1
- package/package.json +2 -2
- package/server.json +3 -3
package/AGENTS.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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) `^0.9.
|
|
4
|
+
**Version:** 0.1.24
|
|
5
|
+
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.9.6`
|
|
6
6
|
**Engines:** Bun ≥1.3.0, Node ≥24.0.0
|
|
7
7
|
**MCP SDK:** `@modelcontextprotocol/sdk` 1.29.0
|
|
8
8
|
**Zod:** 4.4.3
|
|
@@ -154,6 +154,11 @@ Handlers receive a unified `ctx` object. Key properties:
|
|
|
154
154
|
| Property | Description |
|
|
155
155
|
|:---------|:------------|
|
|
156
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)`. |
|
|
157
162
|
| `ctx.requestId` | Unique request ID. |
|
|
158
163
|
| `ctx.tenantId` | Tenant ID from JWT or `'default'` for stdio. |
|
|
159
164
|
|
|
@@ -338,6 +343,29 @@ node -p 'encodeURIComponent(JSON.stringify({name:"@cyanheads/calculator-mcp-serv
|
|
|
338
343
|
|
|
339
344
|
---
|
|
340
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
|
+
|
|
341
369
|
## Publishing
|
|
342
370
|
|
|
343
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.
|
package/CLAUDE.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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) `^0.9.
|
|
4
|
+
**Version:** 0.1.24
|
|
5
|
+
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.9.6`
|
|
6
6
|
**Engines:** Bun ≥1.3.0, Node ≥24.0.0
|
|
7
7
|
**MCP SDK:** `@modelcontextprotocol/sdk` 1.29.0
|
|
8
8
|
**Zod:** 4.4.3
|
|
@@ -154,6 +154,11 @@ Handlers receive a unified `ctx` object. Key properties:
|
|
|
154
154
|
| Property | Description |
|
|
155
155
|
|:---------|:------------|
|
|
156
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)`. |
|
|
157
162
|
| `ctx.requestId` | Unique request ID. |
|
|
158
163
|
| `ctx.tenantId` | Tenant ID from JWT or `'default'` for stdio. |
|
|
159
164
|
|
|
@@ -338,6 +343,29 @@ node -p 'encodeURIComponent(JSON.stringify({name:"@cyanheads/calculator-mcp-serv
|
|
|
338
343
|
|
|
339
344
|
---
|
|
340
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
|
+
|
|
341
369
|
## Publishing
|
|
342
370
|
|
|
343
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.
|
package/README.md
CHANGED
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
|
|
8
8
|
<div align="center">
|
|
9
9
|
|
|
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/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
13
13
|
|
|
14
14
|
<div align="center">
|
|
15
15
|
|
|
16
|
-
[](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)
|
|
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
17
|
|
|
18
18
|
[](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)
|
|
19
19
|
|
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
* @module config/server-config
|
|
4
4
|
*/
|
|
5
5
|
import { z } from '@cyanheads/mcp-ts-core';
|
|
6
|
-
declare const ServerConfigSchema:
|
|
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>;
|
|
7
11
|
export type ServerConfig = z.infer<typeof ServerConfigSchema>;
|
|
8
12
|
/** Lazy-parsed server config from env vars. */
|
|
9
13
|
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,
|
|
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"}
|
|
@@ -2,5 +2,7 @@
|
|
|
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<ZodObject<
|
|
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>;
|
|
6
8
|
//# 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,
|
|
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"}
|
|
@@ -3,8 +3,23 @@
|
|
|
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';
|
|
6
7
|
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
7
|
-
export declare const calculateTool: import("@cyanheads/mcp-ts-core").ToolDefinition<
|
|
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 [{
|
|
8
23
|
readonly reason: "empty_expression";
|
|
9
24
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
10
25
|
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;
|
|
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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyanheads/calculator-mcp-server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.24",
|
|
4
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",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"zod": "^4.4.3"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@cyanheads/mcp-ts-core": "^0.9.
|
|
75
|
+
"@cyanheads/mcp-ts-core": "^0.9.6",
|
|
76
76
|
"mathjs": "^15.2.0",
|
|
77
77
|
"pino-pretty": "^13.1.3",
|
|
78
78
|
"zod": "^4.4.3"
|
package/server.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
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",
|