@cyanheads/calculator-mcp-server 0.1.16 → 0.1.18
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 +5 -3
- package/CLAUDE.md +5 -3
- package/README.md +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/services/math/math-service.d.ts.map +1 -1
- package/dist/services/math/math-service.js +16 -2
- package/dist/services/math/math-service.js.map +1 -1
- package/package.json +2 -2
- package/server.json +3 -3
package/AGENTS.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Agent Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** calculator-mcp-server
|
|
4
|
-
**Version:** 0.1.
|
|
4
|
+
**Version:** 0.1.18
|
|
5
5
|
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)
|
|
6
6
|
|
|
7
7
|
> **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.
|
|
@@ -160,7 +160,9 @@ Handlers receive a unified `ctx` object. Key properties:
|
|
|
160
160
|
|
|
161
161
|
Handlers throw — the framework catches, classifies, and formats.
|
|
162
162
|
|
|
163
|
-
**Recommended: typed error contract.** Declare `errors: [{ reason, code, when, retryable? }]` on `tool()` / `resource()` to
|
|
163
|
+
**Recommended: typed error contract.** Declare `errors: [{ reason, code, when, retryable? }]` on `tool()` / `resource()` to receive a typed `ctx.fail(reason, …)` keyed by the declared reason union. TypeScript catches `ctx.fail('typo')` at compile time, `data.reason` is auto-populated for observability, and the linter enforces conformance against the handler body. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`) bubble freely and don't need declaring.
|
|
164
|
+
|
|
165
|
+
On the wire, tool errors mirror the success-path `format-parity` invariant — both `content[]` (markdown, read by clients like Claude Desktop) and `structuredContent.error` (JSON `{ code, message, data? }`, read by clients like Claude Code) carry the same payload, with `data.recovery.hint` mirrored into the markdown text when present.
|
|
164
166
|
|
|
165
167
|
```ts
|
|
166
168
|
errors: [
|
|
@@ -344,7 +346,7 @@ import { getServerConfig } from '@/config/server-config.js';
|
|
|
344
346
|
- [ ] JSDoc `@fileoverview` + `@module` on every file
|
|
345
347
|
- [ ] `ctx.log` for logging, `ctx.state` for storage
|
|
346
348
|
- [ ] Handlers throw on failure — error factories or plain `Error`, no try/catch
|
|
347
|
-
- [ ] `format()` renders all data the LLM needs — `content[]`
|
|
349
|
+
- [ ] `format()` renders all data the LLM needs — different clients forward different surfaces (Claude Code → `structuredContent`, Claude Desktop → `content[]`); both must carry the same data
|
|
348
350
|
- [ ] Registered in `createApp()` arrays (directly or via barrel exports)
|
|
349
351
|
- [ ] Tests use `createMockContext()` from `@cyanheads/mcp-ts-core/testing`
|
|
350
352
|
- [ ] `bun run devcheck` passes
|
package/CLAUDE.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Agent Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** calculator-mcp-server
|
|
4
|
-
**Version:** 0.1.
|
|
4
|
+
**Version:** 0.1.18
|
|
5
5
|
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)
|
|
6
6
|
|
|
7
7
|
> **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.
|
|
@@ -160,7 +160,9 @@ Handlers receive a unified `ctx` object. Key properties:
|
|
|
160
160
|
|
|
161
161
|
Handlers throw — the framework catches, classifies, and formats.
|
|
162
162
|
|
|
163
|
-
**Recommended: typed error contract.** Declare `errors: [{ reason, code, when, retryable? }]` on `tool()` / `resource()` to
|
|
163
|
+
**Recommended: typed error contract.** Declare `errors: [{ reason, code, when, retryable? }]` on `tool()` / `resource()` to receive a typed `ctx.fail(reason, …)` keyed by the declared reason union. TypeScript catches `ctx.fail('typo')` at compile time, `data.reason` is auto-populated for observability, and the linter enforces conformance against the handler body. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`) bubble freely and don't need declaring.
|
|
164
|
+
|
|
165
|
+
On the wire, tool errors mirror the success-path `format-parity` invariant — both `content[]` (markdown, read by clients like Claude Desktop) and `structuredContent.error` (JSON `{ code, message, data? }`, read by clients like Claude Code) carry the same payload, with `data.recovery.hint` mirrored into the markdown text when present.
|
|
164
166
|
|
|
165
167
|
```ts
|
|
166
168
|
errors: [
|
|
@@ -344,7 +346,7 @@ import { getServerConfig } from '@/config/server-config.js';
|
|
|
344
346
|
- [ ] JSDoc `@fileoverview` + `@module` on every file
|
|
345
347
|
- [ ] `ctx.log` for logging, `ctx.state` for storage
|
|
346
348
|
- [ ] Handlers throw on failure — error factories or plain `Error`, no try/catch
|
|
347
|
-
- [ ] `format()` renders all data the LLM needs — `content[]`
|
|
349
|
+
- [ ] `format()` renders all data the LLM needs — different clients forward different surfaces (Claude Code → `structuredContent`, Claude Desktop → `content[]`); both must carry the same data
|
|
348
350
|
- [ ] Registered in `createApp()` arrays (directly or via barrel exports)
|
|
349
351
|
- [ ] Tests use `createMockContext()` from `@cyanheads/mcp-ts-core/testing`
|
|
350
352
|
- [ ] `bun run devcheck` passes
|
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
[](https://www.npmjs.com/package/@cyanheads/calculator-mcp-server)
|
|
10
10
|
[](https://github.com/users/cyanheads/packages/container/package/calculator-mcp-server)
|
|
11
|
-
[](./CHANGELOG.md) [](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)
|
|
12
12
|
|
|
13
13
|
[](https://modelcontextprotocol.io/) [](./LICENSE) [](https://www.typescriptlang.org/)
|
|
14
14
|
|
package/dist/index.js
CHANGED
|
@@ -11,6 +11,10 @@ import { initMathService } from './services/math/math-service.js';
|
|
|
11
11
|
await createApp({
|
|
12
12
|
tools: [calculateTool],
|
|
13
13
|
resources: [helpResource],
|
|
14
|
+
landing: {
|
|
15
|
+
repoRoot: 'https://github.com/cyanheads/calculator-mcp-server',
|
|
16
|
+
tagline: 'A hardened math.js calculator MCP server — evaluate, simplify, and differentiate expressions.',
|
|
17
|
+
},
|
|
14
18
|
setup() {
|
|
15
19
|
initMathService(getServerConfig());
|
|
16
20
|
},
|
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,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,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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"math-service.d.ts","sourceRoot":"","sources":["../../../src/services/math/math-service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"math-service.d.ts","sourceRoot":"","sources":["../../../src/services/math/math-service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAiH7C,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA4D;IACrF,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAmE;IAC5F,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA6D;IACxF,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAiB;IAC/C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAGX;IACZ,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA6B;IACpD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;gBAE1B,MAAM,EAAE,YAAY;IAgChC,6EAA6E;IAC7E,kBAAkB,CAChB,UAAU,EAAE,MAAM,EAClB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,SAAS,CAAC,EAAE,MAAM,GACjB,UAAU;IAyBb,qDAAqD;IACrD,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,UAAU;IAQlD,mFAAmF;IACnF,uBAAuB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,UAAU;IAQzE,qFAAqF;IACrF,cAAc,IAAI,MAAM;IAIxB,OAAO,CAAC,aAAa;IAoBrB,uEAAuE;IACvE,OAAO,CAAC,aAAa;IAWrB,iGAAiG;IACjG,OAAO,CAAC,kBAAkB;IAS1B,8DAA8D;IAC9D,OAAO,CAAC,kBAAkB;IAS1B,+EAA+E;IAC/E,OAAO,CAAC,cAAc;CAkBvB;AAMD,qEAAqE;AACrE,wBAAgB,eAAe,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAE1D;AAED,iDAAiD;AACjD,wBAAgB,cAAc,IAAI,WAAW,CAG5C"}
|
|
@@ -29,6 +29,16 @@ const TRIG_SIMPLIFY_RULES = [
|
|
|
29
29
|
'2 * sin(n) * cos(n) -> sin(2 * n)',
|
|
30
30
|
'cos(n)^2 - sin(n)^2 -> cos(2 * n)',
|
|
31
31
|
];
|
|
32
|
+
/**
|
|
33
|
+
* Custom units registered during service init. math.js disables `createUnit`
|
|
34
|
+
* in the expression scope, so these are added programmatically before the
|
|
35
|
+
* disabling step. Definitions use exact SI-derived values where possible.
|
|
36
|
+
*/
|
|
37
|
+
const CUSTOM_UNITS = {
|
|
38
|
+
mph: '1 mile/hour',
|
|
39
|
+
knot: { definition: '1852 m/hour', aliases: ['knots', 'kt', 'kts'] },
|
|
40
|
+
lightyear: { definition: '9460730472580800 m', aliases: ['lightyears', 'ly'] },
|
|
41
|
+
};
|
|
32
42
|
/**
|
|
33
43
|
* Functions disabled in the expression scope for security.
|
|
34
44
|
* These are overridden via math.import() — expressions cannot call them.
|
|
@@ -123,6 +133,10 @@ export class MathService {
|
|
|
123
133
|
this.simplifyRules = [...math.simplify.rules, ...TRIG_SIMPLIFY_RULES];
|
|
124
134
|
this.format = math.format.bind(math);
|
|
125
135
|
this.typeOf = math.typeOf.bind(math);
|
|
136
|
+
// Register custom units and natural-language function aliases.
|
|
137
|
+
// Must run before createUnit/import are disabled below.
|
|
138
|
+
math.createUnit(CUSTOM_UNITS);
|
|
139
|
+
math.import({ average: math.mean, avg: math.mean });
|
|
126
140
|
// Disable dangerous functions in expression scope
|
|
127
141
|
const disabled = {};
|
|
128
142
|
for (const fn of DISABLED_FUNCTIONS) {
|
|
@@ -277,7 +291,7 @@ abs, ceil, floor, round, sign, sqrt, cbrt, exp, expm1, log, log2, log10, log1p,
|
|
|
277
291
|
sin, cos, tan, asin, acos, atan, atan2, sinh, cosh, tanh, asinh, acosh, atanh, sec, csc, cot, asec, acsc, acot, sech, csch, coth
|
|
278
292
|
|
|
279
293
|
### Statistics
|
|
280
|
-
mean, median, mode, std, variance, min, max, sum, prod, quantileSeq, mad, count
|
|
294
|
+
mean (aliases: average, avg), median, mode, std, variance, min, max, sum, prod, quantileSeq, mad, count
|
|
281
295
|
|
|
282
296
|
### Matrix
|
|
283
297
|
det, inv, transpose, trace, zeros, ones, identity, diag, size, reshape, flatten, concat, sort, cross, dot, eigs, expm, sqrtm, kron, pinv, range
|
|
@@ -297,7 +311,7 @@ equal, unequal, larger, largerEq, smaller, smallerEq, compare, deepEqual
|
|
|
297
311
|
### Unit Conversion
|
|
298
312
|
Syntax: \`value unit to targetUnit\`
|
|
299
313
|
|
|
300
|
-
Common units: m, cm, mm, km, inch, ft, yard, mile, kg, g, lb, oz, s, min, hour, day, celsius, fahrenheit, kelvin, liter, gallon, joule, watt, newton, pascal, bar, psi, radian, degree
|
|
314
|
+
Common units: m, cm, mm, km, inch, ft, yard, mile, lightyear (ly), kg, g, lb, oz, s, min, hour, day, mph, knot (kt), celsius, fahrenheit, kelvin, liter, gallon, joule, watt, newton, pascal, bar, psi, radian, degree
|
|
301
315
|
|
|
302
316
|
## Syntax Examples
|
|
303
317
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"math-service.js","sourceRoot":"","sources":["../../../src/services/math/math-service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,S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gBACzF,MAAM,kBAAkB,CACtB,yCAAyC,IAAI,CAAC,MAAM,CAAC,mBAAmB,GAAG,IAAI,gEAAgE,EAC/I,EAAE,MAAM,EAAE,oBAAoB,EAAE,CACjC,CAAC;YACJ,CAAC;YACD,4DAA4D;YAC5D,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACjE,MAAM,eAAe,CAAC,uBAAuB,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC,CAAC;QACtF,CAAC;IACH,CAAC;CACF;AAED,gCAAgC;AAEhC,IAAI,QAAiC,CAAC;AAEtC,qEAAqE;AACrE,MAAM,UAAU,eAAe,CAAC,MAAoB;IAClD,QAAQ,GAAG,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC;AACrC,CAAC;AAED,iDAAiD;AACjD,MAAM,UAAU,cAAc;IAC5B,IAAI,CAAC,QAAQ;QAAE,MAAM,IAAI,KAAK,CAAC,iEAAiE,CAAC,CAAC;IAClG,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,uBAAuB;AAEvB,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgGpB,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.18",
|
|
4
4
|
"description": "Calculator MCP server — evaluate, simplify, and differentiate math expressions.",
|
|
5
5
|
"mcpName": "io.github.cyanheads/calculator-mcp-server",
|
|
6
6
|
"type": "module",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"access": "public"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@cyanheads/mcp-ts-core": "^0.8.
|
|
68
|
+
"@cyanheads/mcp-ts-core": "^0.8.3",
|
|
69
69
|
"mathjs": "^15.2.0",
|
|
70
70
|
"pino-pretty": "^13.1.3"
|
|
71
71
|
},
|
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.18",
|
|
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.18",
|
|
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.18",
|
|
73
73
|
"packageArguments": [
|
|
74
74
|
{
|
|
75
75
|
"type": "positional",
|