@cyanheads/calculator-mcp-server 0.1.9 → 0.1.10

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,7 +1,7 @@
1
1
  # Agent Protocol
2
2
 
3
3
  **Server:** calculator-mcp-server
4
- **Version:** 0.1.9
4
+ **Version:** 0.1.10
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.
package/CLAUDE.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Agent Protocol
2
2
 
3
3
  **Server:** calculator-mcp-server
4
- **Version:** 0.1.9
4
+ **Version:** 0.1.10
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.
package/README.md CHANGED
@@ -8,9 +8,9 @@
8
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
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.9-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)
11
+ [![Version](https://img.shields.io/badge/Version-0.1.10-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)
12
12
 
13
- [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-1.28.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.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/)
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/)
14
14
 
15
15
  </div>
16
16
 
@@ -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;AAE3C,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;;;;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"}
@@ -3,6 +3,7 @@
3
3
  * @module config/server-config
4
4
  */
5
5
  import { z } from '@cyanheads/mcp-ts-core';
6
+ import { parseEnvConfig } from '@cyanheads/mcp-ts-core/config';
6
7
  const ServerConfigSchema = z.object({
7
8
  maxExpressionLength: z.coerce
8
9
  .number()
@@ -29,10 +30,10 @@ const ServerConfigSchema = z.object({
29
30
  let _config;
30
31
  /** Lazy-parsed server config from env vars. */
31
32
  export function getServerConfig() {
32
- _config ??= ServerConfigSchema.parse({
33
- maxExpressionLength: process.env.CALC_MAX_EXPRESSION_LENGTH,
34
- evaluationTimeoutMs: process.env.CALC_EVALUATION_TIMEOUT_MS,
35
- maxResultLength: process.env.CALC_MAX_RESULT_LENGTH,
33
+ _config ??= parseEnvConfig(ServerConfigSchema, {
34
+ maxExpressionLength: 'CALC_MAX_EXPRESSION_LENGTH',
35
+ evaluationTimeoutMs: 'CALC_EVALUATION_TIMEOUT_MS',
36
+ maxResultLength: 'CALC_MAX_RESULT_LENGTH',
36
37
  });
37
38
  return _config;
38
39
  }
@@ -1 +1 @@
1
- {"version":3,"file":"server-config.js","sourceRoot":"","sources":["../../src/config/server-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAE3C,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,mBAAmB,EAAE,CAAC,CAAC,MAAM;SAC1B,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,EAAE,CAAC;SACP,GAAG,CAAC,MAAM,CAAC;SACX,OAAO,CAAC,IAAI,CAAC;SACb,QAAQ,CAAC,sDAAsD,CAAC;IACnE,mBAAmB,EAAE,CAAC,CAAC,MAAM;SAC1B,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,GAAG,CAAC;SACR,GAAG,CAAC,MAAM,CAAC;SACX,OAAO,CAAC,IAAI,CAAC;SACb,QAAQ,CAAC,sDAAsD,CAAC;IACnE,eAAe,EAAE,CAAC,C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AAC;SACV,GAAG,CAAC,SAAS,CAAC;SACd,OAAO,CAAC,OAAO,CAAC;SAChB,QAAQ,CAAC,8DAA8D,CAAC;CAC5E,CAAC,CAAC;AAIH,IAAI,OAAiC,CAAC;AAEtC,+CAA+C;AAC/C,MAAM,UAAU,eAAe;IAC7B,OAAO,KAAK,cAAc,CAAC,kBAAkB,EAAE;QAC7C,mBAAmB,EAAE,4BAA4B;QACjD,mBAAmB,EAAE,4BAA4B;QACjD,eAAe,EAAE,wBAAwB;KAC1C,CAAC,CAAC;IACH,OAAO,OAAO,CAAC;AACjB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyanheads/calculator-mcp-server",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
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",
@@ -63,7 +63,7 @@
63
63
  "access": "public"
64
64
  },
65
65
  "dependencies": {
66
- "@cyanheads/mcp-ts-core": "^0.3.5",
66
+ "@cyanheads/mcp-ts-core": "^0.5.3",
67
67
  "mathjs": "^15.2.0",
68
68
  "pino-pretty": "^13.1.3"
69
69
  },
@@ -74,7 +74,7 @@
74
74
  "ignore": "^7.0.5",
75
75
  "tsc-alias": "^1.8.16",
76
76
  "tsx": "^4.21.0",
77
- "typescript": "^6.0.2",
77
+ "typescript": "^6.0.3",
78
78
  "vitest": "^4.1.4"
79
79
  }
80
80
  }
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",
9
+ "version": "0.1.10",
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.9",
22
+ "version": "0.1.10",
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.9",
72
+ "version": "0.1.10",
73
73
  "packageArguments": [
74
74
  {
75
75
  "type": "positional",