@cyanheads/calculator-mcp-server 0.1.13 → 0.1.15
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 +28 -9
- package/CLAUDE.md +28 -9
- package/README.md +1 -1
- package/dist/mcp-server/resources/definitions/help.resource.d.ts +1 -1
- package/dist/mcp-server/resources/definitions/help.resource.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/calculate.tool.d.ts +1 -1
- package/dist/mcp-server/tools/definitions/calculate.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/calculate.tool.js +4 -4
- package/dist/mcp-server/tools/definitions/calculate.tool.js.map +1 -1
- package/dist/services/math/math-service.d.ts.map +1 -1
- package/dist/services/math/math-service.js +7 -1
- package/dist/services/math/math-service.js.map +1 -1
- package/package.json +4 -3
- 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.15
|
|
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.
|
|
@@ -158,24 +158,41 @@ Handlers receive a unified `ctx` object. Key properties:
|
|
|
158
158
|
|
|
159
159
|
## Errors
|
|
160
160
|
|
|
161
|
-
Handlers throw — the framework catches, classifies, and formats.
|
|
161
|
+
Handlers throw — the framework catches, classifies, and formats.
|
|
162
|
+
|
|
163
|
+
**Recommended: typed error contract.** Declare `errors: [{ reason, code, when, retryable? }]` on `tool()` / `resource()` to advertise the failure surface in `tools/list` (under `_meta['mcp-ts-core/errors']`) and 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.
|
|
162
164
|
|
|
163
165
|
```ts
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
166
|
+
errors: [
|
|
167
|
+
{ reason: 'no_match', code: JsonRpcErrorCode.NotFound, when: 'No item matched the query' },
|
|
168
|
+
],
|
|
169
|
+
async handler(input, ctx) {
|
|
170
|
+
const item = await db.find(input.id);
|
|
171
|
+
if (!item) throw ctx.fail('no_match', `No item ${input.id}`);
|
|
172
|
+
return item;
|
|
173
|
+
}
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
**Fallback (no contract entry fits, prototype tools, service-layer code):** throw via factories or plain `Error`.
|
|
167
177
|
|
|
168
|
-
|
|
169
|
-
|
|
178
|
+
```ts
|
|
179
|
+
// Error factories — explicit code, concise
|
|
180
|
+
import { notFound, validationError, serviceUnavailable } from '@cyanheads/mcp-ts-core/errors';
|
|
170
181
|
throw notFound('Item not found', { itemId });
|
|
171
182
|
throw serviceUnavailable('API unavailable', { url }, { cause: err });
|
|
172
183
|
|
|
173
|
-
//
|
|
184
|
+
// Plain Error — framework auto-classifies from message patterns
|
|
185
|
+
throw new Error('Item not found'); // → NotFound
|
|
186
|
+
throw new Error('Invalid query format'); // → ValidationError
|
|
187
|
+
|
|
188
|
+
// McpError — when no factory exists for the code
|
|
174
189
|
import { McpError, JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
175
190
|
throw new McpError(JsonRpcErrorCode.DatabaseError, 'Connection failed', { pool: 'primary' });
|
|
176
191
|
```
|
|
177
192
|
|
|
178
|
-
|
|
193
|
+
Available factories: `invalidParams`, `invalidRequest`, `notFound`, `forbidden`, `unauthorized`, `validationError`, `conflict`, `rateLimited`, `timeout`, `serviceUnavailable`, `configurationError`, `internalError`, `serializationError`, `databaseError`. For HTTP responses from upstream APIs, use `httpErrorFromResponse(response, { service, data })` from `/utils`.
|
|
194
|
+
|
|
195
|
+
See framework CLAUDE.md and the `api-errors` skill for the full auto-classification table and contract reference.
|
|
179
196
|
|
|
180
197
|
---
|
|
181
198
|
|
|
@@ -225,6 +242,7 @@ Available skills:
|
|
|
225
242
|
| `setup` | Post-init project orientation |
|
|
226
243
|
| `design-mcp-server` | Design tool surface, resources, and services for a new server |
|
|
227
244
|
| `add-tool` | Scaffold a new tool definition |
|
|
245
|
+
| `add-app-tool` | Scaffold an MCP App tool + paired UI resource |
|
|
228
246
|
| `add-resource` | Scaffold a new resource definition |
|
|
229
247
|
| `add-prompt` | Scaffold a new prompt definition |
|
|
230
248
|
| `add-service` | Scaffold a new service integration |
|
|
@@ -322,6 +340,7 @@ import { getServerConfig } from '@/config/server-config.js';
|
|
|
322
340
|
## Checklist
|
|
323
341
|
|
|
324
342
|
- [ ] Zod schemas: all fields have `.describe()`, only JSON-Schema-serializable types (no `z.custom()`, `z.date()`, `z.transform()`, etc.)
|
|
343
|
+
- [ ] 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`.
|
|
325
344
|
- [ ] JSDoc `@fileoverview` + `@module` on every file
|
|
326
345
|
- [ ] `ctx.log` for logging, `ctx.state` for storage
|
|
327
346
|
- [ ] Handlers throw on failure — error factories or plain `Error`, no try/catch
|
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.15
|
|
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.
|
|
@@ -158,24 +158,41 @@ Handlers receive a unified `ctx` object. Key properties:
|
|
|
158
158
|
|
|
159
159
|
## Errors
|
|
160
160
|
|
|
161
|
-
Handlers throw — the framework catches, classifies, and formats.
|
|
161
|
+
Handlers throw — the framework catches, classifies, and formats.
|
|
162
|
+
|
|
163
|
+
**Recommended: typed error contract.** Declare `errors: [{ reason, code, when, retryable? }]` on `tool()` / `resource()` to advertise the failure surface in `tools/list` (under `_meta['mcp-ts-core/errors']`) and 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.
|
|
162
164
|
|
|
163
165
|
```ts
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
166
|
+
errors: [
|
|
167
|
+
{ reason: 'no_match', code: JsonRpcErrorCode.NotFound, when: 'No item matched the query' },
|
|
168
|
+
],
|
|
169
|
+
async handler(input, ctx) {
|
|
170
|
+
const item = await db.find(input.id);
|
|
171
|
+
if (!item) throw ctx.fail('no_match', `No item ${input.id}`);
|
|
172
|
+
return item;
|
|
173
|
+
}
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
**Fallback (no contract entry fits, prototype tools, service-layer code):** throw via factories or plain `Error`.
|
|
167
177
|
|
|
168
|
-
|
|
169
|
-
|
|
178
|
+
```ts
|
|
179
|
+
// Error factories — explicit code, concise
|
|
180
|
+
import { notFound, validationError, serviceUnavailable } from '@cyanheads/mcp-ts-core/errors';
|
|
170
181
|
throw notFound('Item not found', { itemId });
|
|
171
182
|
throw serviceUnavailable('API unavailable', { url }, { cause: err });
|
|
172
183
|
|
|
173
|
-
//
|
|
184
|
+
// Plain Error — framework auto-classifies from message patterns
|
|
185
|
+
throw new Error('Item not found'); // → NotFound
|
|
186
|
+
throw new Error('Invalid query format'); // → ValidationError
|
|
187
|
+
|
|
188
|
+
// McpError — when no factory exists for the code
|
|
174
189
|
import { McpError, JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
175
190
|
throw new McpError(JsonRpcErrorCode.DatabaseError, 'Connection failed', { pool: 'primary' });
|
|
176
191
|
```
|
|
177
192
|
|
|
178
|
-
|
|
193
|
+
Available factories: `invalidParams`, `invalidRequest`, `notFound`, `forbidden`, `unauthorized`, `validationError`, `conflict`, `rateLimited`, `timeout`, `serviceUnavailable`, `configurationError`, `internalError`, `serializationError`, `databaseError`. For HTTP responses from upstream APIs, use `httpErrorFromResponse(response, { service, data })` from `/utils`.
|
|
194
|
+
|
|
195
|
+
See framework CLAUDE.md and the `api-errors` skill for the full auto-classification table and contract reference.
|
|
179
196
|
|
|
180
197
|
---
|
|
181
198
|
|
|
@@ -225,6 +242,7 @@ Available skills:
|
|
|
225
242
|
| `setup` | Post-init project orientation |
|
|
226
243
|
| `design-mcp-server` | Design tool surface, resources, and services for a new server |
|
|
227
244
|
| `add-tool` | Scaffold a new tool definition |
|
|
245
|
+
| `add-app-tool` | Scaffold an MCP App tool + paired UI resource |
|
|
228
246
|
| `add-resource` | Scaffold a new resource definition |
|
|
229
247
|
| `add-prompt` | Scaffold a new prompt definition |
|
|
230
248
|
| `add-service` | Scaffold a new service integration |
|
|
@@ -322,6 +340,7 @@ import { getServerConfig } from '@/config/server-config.js';
|
|
|
322
340
|
## Checklist
|
|
323
341
|
|
|
324
342
|
- [ ] Zod schemas: all fields have `.describe()`, only JSON-Schema-serializable types (no `z.custom()`, `z.date()`, `z.transform()`, etc.)
|
|
343
|
+
- [ ] 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`.
|
|
325
344
|
- [ ] JSDoc `@fileoverview` + `@module` on every file
|
|
326
345
|
- [ ] `ctx.log` for logging, `ctx.state` for storage
|
|
327
346
|
- [ ] Handlers throw on failure — error factories or plain `Error`, no try/catch
|
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
|
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export declare const helpResource: import("@cyanheads/mcp-ts-core").ResourceDefinition<import("zod").ZodObject<Readonly<{
|
|
6
6
|
[k: string]: import("zod/v4/core").$ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>;
|
|
7
|
-
}>, import("zod/v4/core").$strip>, undefined>;
|
|
7
|
+
}>, import("zod/v4/core").$strip>, undefined, undefined>;
|
|
8
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;;wDAOvB,CAAC"}
|
|
@@ -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;AAIjD,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;AAIjD,eAAO,MAAM,aAAa;;;;;;;;;;;;;;6BA6FxB,CAAC"}
|
|
@@ -24,7 +24,7 @@ export const calculateTool = tool('calculate', {
|
|
|
24
24
|
.describe('Operation to perform. "evaluate" computes a numeric result (default). "simplify" reduces an algebraic expression symbolically (e.g., "2x + 3x" -> "5 * x"). Supports algebraic and trigonometric identities. "derivative" computes the symbolic derivative (requires the variable parameter).'),
|
|
25
25
|
variable: z
|
|
26
26
|
.union([
|
|
27
|
-
z.literal('').describe('Empty string — treated as omitted
|
|
27
|
+
z.literal('').describe('Empty string — treated as omitted.'),
|
|
28
28
|
z
|
|
29
29
|
.string()
|
|
30
30
|
.max(50)
|
|
@@ -32,18 +32,18 @@ export const calculateTool = tool('calculate', {
|
|
|
32
32
|
.describe('Variable identifier (alphanumeric and underscores, max 50 chars).'),
|
|
33
33
|
])
|
|
34
34
|
.optional()
|
|
35
|
-
.describe('Variable to differentiate with respect to. Required when operation is "derivative".
|
|
35
|
+
.describe('Variable to differentiate with respect to. Required when operation is "derivative". Empty string is treated as omitted. Example: "x".'),
|
|
36
36
|
scope: z
|
|
37
37
|
.record(z.string(), z.number())
|
|
38
38
|
.optional()
|
|
39
39
|
.describe('Variable assignments for the expression. Example: { "x": 5, "y": 3 } makes "x + y" evaluate to 8.'),
|
|
40
40
|
precision: z
|
|
41
41
|
.union([
|
|
42
|
-
z.literal('').describe('Empty string — treated as omitted
|
|
42
|
+
z.literal('').describe('Empty string — treated as omitted.'),
|
|
43
43
|
z.number().int().min(1).max(16).describe('Significant digits (integer, 1–16).'),
|
|
44
44
|
])
|
|
45
45
|
.optional()
|
|
46
|
-
.describe('Significant digits (1–16) for numeric results. Omit for full precision.
|
|
46
|
+
.describe('Significant digits (1–16) for numeric results. Omit for full precision. Empty string is treated as omitted. Ignored for symbolic operations (simplify, derivative).'),
|
|
47
47
|
}),
|
|
48
48
|
output: z.object({
|
|
49
49
|
result: z.string().describe('The computed result as a string.'),
|
|
@@ -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,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,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,
|
|
1
|
+
{"version":3,"file":"calculate.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/calculate.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,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UAAU,CAAC,EAAE,UAAU,EAAE,CAAC;YAChE,KAAK,YAAY;gBACf,IAAI,CAAC,QAAQ,EAAE,CAAC;oBACd,MAAM,aAAa,CACjB,sEAAsE,CACvE,CAAC;gBACJ,CAAC;gBACD,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,2BAA2B,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC,CAAC;gBACpE,OAAO,EAAE,GAAG,IAAI,CAAC,uBAAuB,CAAC,UAAU,EAAE,QAAQ,CAAC,EAAE,UAAU,EAAE,CAAC;QACjF,CAAC;IACH,CAAC;IAED,MAAM,EAAE,CAAC,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 +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;AAsG7C,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,
|
|
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,KA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S Number.toString thresholds — math.js defaults to exp ≥ 5,
|
|
151
|
+
// which would render 83810205 as "8.3810205e+7".
|
|
152
|
+
const result = this.format(raw, {
|
|
153
|
+
lowerExp: -6,
|
|
154
|
+
upperExp: 21,
|
|
155
|
+
...(precision != null && { precision }),
|
|
156
|
+
});
|
|
151
157
|
this.validateResultSize(result);
|
|
152
158
|
return { result, resultType };
|
|
153
159
|
}
|
|
@@ -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,SAAS,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAClF,OAAO,EAAE,GAAG,EAAE,MAAM,EAAqB,MAAM,QAAQ,CAAC;AAIxD;;;;GAIG;AACH,MAAM,mBAAmB,GAAmB;IAC1C,yBAAyB;IACzB,0BAA0B;IAC1B,0BAA0B;IAC1B,0BAA0B;IAC1B,0BAA0B;IAC1B,sCAAsC;IACtC,0BAA0B;IAC1B,0BAA0B;IAC1B,0BAA0B;IAC1B,0BAA0B;IAC1B,0BAA0B;IAC1B,0BAA0B;IAC1B,0BAA0B;IAC1B,mCAAmC;IACnC,mCAAmC;CACpC,CAAC;AAEF;;;;GAIG;AACH,MAAM,kBAAkB,GAAG;IACzB,QAAQ;IACR,YAAY;IACZ,UAAU;IACV,OAAO;IACP,UAAU;IACV,YAAY;IACZ,SAAS;IACT,SAAS;IACT,SAAS;IACT,OAAO;IACP,QAAQ;IACR,QAAQ;CACA,CAAC;AAEX;;;;GAIG;AAEH;;;GAGG;AACH,MAAM,kBAAkB,GAA2B;IACjD,OAAO,EAAE,UAAU;CACpB,CAAC;AAEF;;;;GAIG;AACH,MAAM,oBAAoB,GAAG,IAAI,GAAG,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC;AAEtF;;;GAGG;AACH,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAC;IACjC,WAAW;IACX,kBAAkB;IAClB,kBAAkB;IAClB,kBAAkB;IAClB,kBAAkB;IAClB,aAAa;IACb,WAAW;IACX,UAAU;IACV,SAAS;IACT,gBAAgB;IAChB,eAAe;IACf,sBAAsB;IACtB,gBAAgB;CACjB,CAAC,CAAC;AAEH;;;;GAIG;AACH,SAAS,sBAAsB,CAAC,IAAY;IAC1C,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,KAAK,MAAM,EAAE,IAAI,IAAI,EAAE,CAAC;QACtB,IAAI,EAAE,KAAK,GAAG;YAAE,KAAK,EAAE,CAAC;aACnB,IAAI,EAAE,KAAK,GAAG;YAAE,KAAK,EAAE,CAAC;aACxB,IAAI,EAAE,KAAK,IAAI,IAAI,EAAE,KAAK,IAAI;YAAE,OAAO,IAAI,CAAC;aAC5C,IAAI,EAAE,KAAK,GAAG,IAAI,KAAK,KAAK,CAAC;YAAE,OAAO,IAAI,CAAC;IAClD,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,OAAO,WAAW;IACL,QAAQ,CAA4D;IACpE,QAAQ,CAAmE;IAC3E,UAAU,CAA6D;IACvE,aAAa,CAAiB;IAC9B,MAAM,
|
|
1
|
+
{"version":3,"file":"math-service.js","sourceRoot":"","sources":["../../../src/services/math/math-service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAClF,OAAO,EAAE,GAAG,EAAE,MAAM,EAAqB,MAAM,QAAQ,CAAC;AAIxD;;;;GAIG;AACH,MAAM,mBAAmB,GAAmB;IAC1C,yBAAyB;IACzB,0BAA0B;IAC1B,0BAA0B;IAC1B,0BAA0B;IAC1B,0BAA0B;IAC1B,sCAAsC;IACtC,0BAA0B;IAC1B,0BAA0B;IAC1B,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,IAAI,gEAAgE,CAChJ,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,aAAa,CAAC,uBAAuB,OAAO,EAAE,CAAC,CAAC;QACxD,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.15",
|
|
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",
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
"dev:http": "MCP_TRANSPORT_TYPE=http bun --watch src/index.ts",
|
|
24
24
|
"start": "node dist/index.js",
|
|
25
25
|
"start:stdio": "MCP_TRANSPORT_TYPE=stdio node dist/index.js",
|
|
26
|
-
"start:http": "MCP_TRANSPORT_TYPE=http node dist/index.js"
|
|
26
|
+
"start:http": "MCP_TRANSPORT_TYPE=http node dist/index.js",
|
|
27
|
+
"publish-mcp": "mcp-publisher login github -token \"$(security find-generic-password -a \"$USER\" -s mcp-publisher-github-pat -w)\" && mcp-publisher publish"
|
|
27
28
|
},
|
|
28
29
|
"keywords": [
|
|
29
30
|
"mcp",
|
|
@@ -64,7 +65,7 @@
|
|
|
64
65
|
"access": "public"
|
|
65
66
|
},
|
|
66
67
|
"dependencies": {
|
|
67
|
-
"@cyanheads/mcp-ts-core": "^0.
|
|
68
|
+
"@cyanheads/mcp-ts-core": "^0.8.0",
|
|
68
69
|
"mathjs": "^15.2.0",
|
|
69
70
|
"pino-pretty": "^13.1.3"
|
|
70
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.15",
|
|
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.15",
|
|
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.15",
|
|
73
73
|
"packageArguments": [
|
|
74
74
|
{
|
|
75
75
|
"type": "positional",
|