@cyanheads/calculator-mcp-server 0.4.0 → 0.4.2
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 +41 -39
- package/CLAUDE.md +41 -39
- package/Dockerfile +14 -10
- package/LICENSE +1 -1
- package/README.md +88 -30
- package/changelog/0.1.x/0.1.0.md +20 -0
- package/changelog/0.1.x/0.1.1.md +28 -0
- package/changelog/0.1.x/0.1.10.md +25 -0
- package/changelog/0.1.x/0.1.11.md +29 -0
- package/changelog/0.1.x/0.1.12.md +21 -0
- package/changelog/0.1.x/0.1.13.md +20 -0
- package/changelog/0.1.x/0.1.14.md +18 -0
- package/changelog/0.1.x/0.1.15.md +20 -0
- package/changelog/0.1.x/0.1.16.md +26 -0
- package/changelog/0.1.x/0.1.17.md +24 -0
- package/changelog/0.1.x/0.1.18.md +21 -0
- package/changelog/0.1.x/0.1.19.md +18 -0
- package/changelog/0.1.x/0.1.2.md +22 -0
- package/changelog/0.1.x/0.1.20.md +21 -0
- package/changelog/0.1.x/0.1.21.md +26 -0
- package/changelog/0.1.x/0.1.22.md +33 -0
- package/changelog/0.1.x/0.1.23.md +32 -0
- package/changelog/0.1.x/0.1.24.md +16 -0
- package/changelog/0.1.x/0.1.25.md +23 -0
- package/changelog/0.1.x/0.1.26.md +16 -0
- package/changelog/0.1.x/0.1.3.md +19 -0
- package/changelog/0.1.x/0.1.4.md +20 -0
- package/changelog/0.1.x/0.1.5.md +19 -0
- package/changelog/0.1.x/0.1.6.md +26 -0
- package/changelog/0.1.x/0.1.7.md +19 -0
- package/changelog/0.1.x/0.1.8.md +18 -0
- package/changelog/0.1.x/0.1.9.md +29 -0
- package/changelog/0.2.x/0.2.0.md +18 -0
- package/changelog/0.3.x/0.3.0.md +19 -0
- package/changelog/0.3.x/0.3.1.md +30 -0
- package/changelog/0.3.x/0.3.2.md +18 -0
- package/changelog/0.3.x/0.3.3.md +27 -0
- package/changelog/0.3.x/0.3.4.md +17 -0
- package/changelog/0.3.x/0.3.5.md +23 -0
- package/changelog/0.4.x/0.4.0.md +28 -0
- package/changelog/0.4.x/0.4.1.md +28 -0
- package/changelog/0.4.x/0.4.2.md +26 -0
- package/changelog/template.md +151 -0
- package/dist/config/server-config.d.ts +3 -3
- package/dist/config/server-config.d.ts.map +1 -1
- package/dist/config/server-config.js +6 -8
- package/dist/config/server-config.js.map +1 -1
- package/dist/mcp-server/resources/definitions/help.resource.d.ts.map +1 -1
- package/dist/mcp-server/resources/definitions/help.resource.js +1 -0
- package/dist/mcp-server/resources/definitions/help.resource.js.map +1 -1
- package/dist/mcp-server/tools/definitions/calculate.tool.d.ts +3 -3
- 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.map +1 -1
- package/package.json +27 -16
- package/server.json +5 -5
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
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
|
|
|
@@ -27,55 +27,62 @@
|
|
|
27
27
|
|
|
28
28
|
---
|
|
29
29
|
|
|
30
|
-
##
|
|
30
|
+
## Overview
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
An MCP calculator powered by math.js. Verify numeric results, simplify algebraic expressions, and compute symbolic derivatives through one tool. Runs as a stdio process, a local Streamable HTTP server, or the public hosted endpoint above.
|
|
33
|
+
|
|
34
|
+
### Tools
|
|
33
35
|
|
|
34
36
|
| Tool Name | Description |
|
|
35
37
|
|:----------|:------------|
|
|
36
38
|
| `calculate` | Evaluate math expressions, simplify algebraic expressions, or compute symbolic derivatives. |
|
|
37
39
|
|
|
38
|
-
###
|
|
40
|
+
### Resources
|
|
41
|
+
|
|
42
|
+
| URI Pattern | Description |
|
|
43
|
+
|:------------|:------------|
|
|
44
|
+
| `calculator://help` | Available functions, operators, constants, and syntax reference. |
|
|
45
|
+
|
|
46
|
+
## Capability reference
|
|
39
47
|
|
|
40
|
-
|
|
48
|
+
### `calculate` <sub>tool</sub>
|
|
41
49
|
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
50
|
+
- One `expression` per call. `operation` selects `evaluate` (default), `simplify`, or `derivative`; derivatives require `variable` (e.g. `"x"`).
|
|
51
|
+
- Evaluate arithmetic, trigonometry, logarithms, statistics, matrices, complex numbers, units, and combinatorics; assign numeric variables through `scope`, e.g. `{ "x": 5 }`.
|
|
52
|
+
- `numericType` selects `number`, `BigNumber`, or `Fraction`. Fractions require exact rational results; irrational or transcendental results return `fraction_unsupported` with guidance to change numeric type.
|
|
53
|
+
- `precision` sets 1–16 significant digits for numeric results. Blank optional `variable` and `precision` values are treated as omitted; scope and precision do not affect symbolic operations.
|
|
54
|
+
- Simplification includes algebraic and trigonometric identities (`2x + 3x` → `5 * x`); `unchanged: true` identifies expressions the simplifier cannot reduce, including polynomial factoring and rational cancellation cases.
|
|
55
|
+
- Returns the result string, result type, original expression, and operation. Validation failures include typed reasons and recovery hints.
|
|
48
56
|
|
|
49
57
|
---
|
|
50
58
|
|
|
51
|
-
|
|
59
|
+
### `calculator://help` <sub>resource</sub>
|
|
52
60
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
| `calculator://help` | Available functions, operators, constants, and syntax reference. |
|
|
61
|
+
- Markdown reference for functions, operators, constants, units, and expression syntax; no parameters.
|
|
62
|
+
- Examples cover scope, matrices, complex numbers, precision, and all three operations.
|
|
56
63
|
|
|
57
64
|
---
|
|
58
65
|
|
|
59
66
|
## Features
|
|
60
67
|
|
|
61
|
-
Built on [`@cyanheads/mcp-ts-core`](https://github.com/cyanheads/mcp-ts-core):
|
|
62
|
-
|
|
63
|
-
- Declarative tool definitions — single file per tool, framework handles registration and validation
|
|
64
|
-
- Unified error handling across all tools
|
|
65
|
-
- Structured logging with optional OpenTelemetry tracing
|
|
66
|
-
- Runs locally (stdio/HTTP) or in Docker
|
|
68
|
+
Built on [`@cyanheads/mcp-ts-core`](https://github.com/cyanheads/mcp-ts-core): stdio and Streamable HTTP transports, pluggable auth (`none` / `jwt` / `oauth`), swappable storage (`in-memory`, `filesystem`, `Supabase`, `Cloudflare KV/R2/D1`), structured logging with optional OpenTelemetry tracing.
|
|
67
69
|
|
|
68
70
|
Calculator-specific:
|
|
69
71
|
|
|
70
72
|
- Hardened math.js v15 instance — dangerous functions disabled, evaluation sandboxed via `vm.runInNewContext()` with timeout
|
|
71
73
|
- No auth required — all operations are read-only and stateless
|
|
72
|
-
- Input validation: expression length limits,
|
|
74
|
+
- Input validation: expression length limits, numeric-only scope values, and rejection of multiple statements; matrix row separators and string contents remain valid
|
|
73
75
|
- Result validation: blocked result types (functions, parsers, result sets), configurable max result size
|
|
74
76
|
- Scope sanitization: numeric-only values, prototype pollution prevention (blocked `__proto__`, `constructor`, etc.)
|
|
75
77
|
|
|
78
|
+
Agent-friendly output:
|
|
79
|
+
|
|
80
|
+
- Calculation results and recovery hints appear in both structured JSON and readable text.
|
|
81
|
+
- Output echoes the expression and operation; numeric evaluations identify supplied scope variables and applied precision, while simplification reports whether it made progress.
|
|
82
|
+
|
|
76
83
|
---
|
|
77
84
|
|
|
78
|
-
## Getting
|
|
85
|
+
## Getting started
|
|
79
86
|
|
|
80
87
|
### Public Hosted Instance
|
|
81
88
|
|
|
@@ -94,7 +101,7 @@ A public instance is available at `https://calculator.caseyjhand.com/mcp` — no
|
|
|
94
101
|
|
|
95
102
|
### Self-Hosted / Local
|
|
96
103
|
|
|
97
|
-
Add to your MCP client
|
|
104
|
+
Add one of the following to your MCP client configuration file:
|
|
98
105
|
|
|
99
106
|
```json
|
|
100
107
|
{
|
|
@@ -108,23 +115,65 @@ Add to your MCP client config (e.g., `claude_desktop_config.json`):
|
|
|
108
115
|
}
|
|
109
116
|
```
|
|
110
117
|
|
|
118
|
+
Or with npx (no Bun required):
|
|
119
|
+
|
|
120
|
+
```json
|
|
121
|
+
{
|
|
122
|
+
"mcpServers": {
|
|
123
|
+
"calculator-mcp-server": {
|
|
124
|
+
"type": "stdio",
|
|
125
|
+
"command": "npx",
|
|
126
|
+
"args": ["-y", "@cyanheads/calculator-mcp-server@latest"]
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Or with Docker:
|
|
133
|
+
|
|
134
|
+
```json
|
|
135
|
+
{
|
|
136
|
+
"mcpServers": {
|
|
137
|
+
"calculator-mcp-server": {
|
|
138
|
+
"type": "stdio",
|
|
139
|
+
"command": "docker",
|
|
140
|
+
"args": [
|
|
141
|
+
"run", "-i", "--rm",
|
|
142
|
+
"-e", "MCP_TRANSPORT_TYPE=stdio",
|
|
143
|
+
"ghcr.io/cyanheads/calculator-mcp-server:latest"
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
For Streamable HTTP, set the transport and start the built server:
|
|
151
|
+
|
|
152
|
+
```sh
|
|
153
|
+
MCP_SESSION_MODE=stateless MCP_HTTP_PORT=3010 bun run start:http
|
|
154
|
+
# Server listens at http://localhost:3010/mcp
|
|
155
|
+
```
|
|
156
|
+
|
|
111
157
|
### Prerequisites
|
|
112
158
|
|
|
113
|
-
- [Bun v1.
|
|
159
|
+
- [Bun v1.4.0](https://bun.sh/) or higher
|
|
114
160
|
|
|
115
161
|
### Installation
|
|
116
162
|
|
|
117
163
|
1. **Clone the repository:**
|
|
164
|
+
|
|
118
165
|
```sh
|
|
119
166
|
git clone https://github.com/cyanheads/calculator-mcp-server.git
|
|
120
167
|
```
|
|
121
168
|
|
|
122
169
|
2. **Navigate into the directory:**
|
|
170
|
+
|
|
123
171
|
```sh
|
|
124
172
|
cd calculator-mcp-server
|
|
125
173
|
```
|
|
126
174
|
|
|
127
175
|
3. **Install dependencies:**
|
|
176
|
+
|
|
128
177
|
```sh
|
|
129
178
|
bun install
|
|
130
179
|
```
|
|
@@ -139,15 +188,21 @@ bun install
|
|
|
139
188
|
| `CALC_EVALUATION_TIMEOUT_MS` | Maximum evaluation time in milliseconds (100–30,000). | `5000` |
|
|
140
189
|
| `CALC_MAX_RESULT_LENGTH` | Maximum result string length in characters (1,000–1,000,000). | `100000` |
|
|
141
190
|
| `MCP_TRANSPORT_TYPE` | Transport: `stdio` or `http`. | `stdio` |
|
|
191
|
+
| `MCP_HTTP_HOST` | Hostname for the HTTP server. | `localhost` |
|
|
142
192
|
| `MCP_HTTP_PORT` | Port for HTTP server. | `3010` |
|
|
193
|
+
| `MCP_HTTP_ENDPOINT_PATH` | Path for the HTTP MCP endpoint. | `/mcp` |
|
|
194
|
+
| `MCP_HTTP_MAX_BODY_BYTES` | Maximum inbound HTTP request size; `0` disables the limit. | `1048576` |
|
|
143
195
|
| `MCP_AUTH_MODE` | Auth mode: `none`, `jwt`, or `oauth`. | `none` |
|
|
196
|
+
| `MCP_SESSION_MODE` | `auto`, `stateful`, or `stateless`. Supplied configuration pins `stateless`; the framework default `auto` resolves to `stateful`. | `stateless` in supplied configuration |
|
|
144
197
|
| `MCP_LOG_LEVEL` | Log level (RFC 5424). | `info` |
|
|
145
198
|
|
|
199
|
+
See [`.env.example`](./.env.example) for optional session, resumability, logging, and telemetry settings.
|
|
200
|
+
|
|
146
201
|
---
|
|
147
202
|
|
|
148
|
-
## Running the
|
|
203
|
+
## Running the server
|
|
149
204
|
|
|
150
|
-
### Local
|
|
205
|
+
### Local development
|
|
151
206
|
|
|
152
207
|
- **Build and run the production version:**
|
|
153
208
|
```sh
|
|
@@ -168,9 +223,11 @@ docker build -t calculator-mcp-server .
|
|
|
168
223
|
docker run -p 3010:3010 calculator-mcp-server
|
|
169
224
|
```
|
|
170
225
|
|
|
226
|
+
The image defaults to Streamable HTTP on port `3010`, stateless sessions, and logs at `/var/log/calculator-mcp-server`. OpenTelemetry dependencies are installed by default; build with `--build-arg OTEL_ENABLED=false` to omit them.
|
|
227
|
+
|
|
171
228
|
---
|
|
172
229
|
|
|
173
|
-
## Project
|
|
230
|
+
## Project structure
|
|
174
231
|
|
|
175
232
|
| Directory | Purpose |
|
|
176
233
|
|:----------|:--------|
|
|
@@ -179,10 +236,11 @@ docker run -p 3010:3010 calculator-mcp-server
|
|
|
179
236
|
| `src/services/` | Domain service integrations (MathService). |
|
|
180
237
|
| `src/config/` | Environment variable parsing and validation with Zod. |
|
|
181
238
|
| `docs/` | Generated directory tree. |
|
|
239
|
+
| `tests/` | Calculation, configuration, and response-contract tests. |
|
|
182
240
|
|
|
183
241
|
---
|
|
184
242
|
|
|
185
|
-
## Development
|
|
243
|
+
## Development guide
|
|
186
244
|
|
|
187
245
|
See [`AGENTS.md`](./AGENTS.md) or [`CLAUDE.md`](./CLAUDE.md) for development guidelines and architectural rules. The short version:
|
|
188
246
|
|
|
@@ -194,7 +252,7 @@ See [`AGENTS.md`](./AGENTS.md) or [`CLAUDE.md`](./CLAUDE.md) for development gui
|
|
|
194
252
|
|
|
195
253
|
## Contributing
|
|
196
254
|
|
|
197
|
-
Issues
|
|
255
|
+
Issues are welcome. Run checks before submitting:
|
|
198
256
|
|
|
199
257
|
```sh
|
|
200
258
|
bun run devcheck
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Initial project scaffold and design."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.1.0 — 2026-03-28
|
|
8
|
+
|
|
9
|
+
Initial project scaffold and design.
|
|
10
|
+
|
|
11
|
+
## Added
|
|
12
|
+
|
|
13
|
+
- Project scaffold from `@cyanheads/mcp-ts-core` framework
|
|
14
|
+
- Design document (`docs/design.md`) covering tool surface, resource design, security model, service architecture, and implementation plan
|
|
15
|
+
- Agent protocol (`CLAUDE.md`) with server-specific conventions, MCP surface reference, security model, and configuration
|
|
16
|
+
- Server metadata (`server.json`) with stdio and streamable-http transport configurations
|
|
17
|
+
- Directory structure documentation (`docs/tree.md`)
|
|
18
|
+
- Server configuration schema with `CALC_MAX_EXPRESSION_LENGTH` and `CALC_EVALUATION_TIMEOUT_MS` env vars
|
|
19
|
+
- CI scaffolding: Dockerfile, `.env.example`, Biome config, Vitest config, devcheck config
|
|
20
|
+
- GitHub issue templates (bug report, feature request)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Package metadata, documentation, and agent protocol polish."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.1.1 — 2026-03-28
|
|
8
|
+
|
|
9
|
+
Package metadata, documentation, and agent protocol polish.
|
|
10
|
+
|
|
11
|
+
## Added
|
|
12
|
+
|
|
13
|
+
- README.md with tool/resource reference, configuration, getting started, and project structure
|
|
14
|
+
- LICENSE (Apache 2.0)
|
|
15
|
+
- `bunfig.toml` for Bun runtime configuration
|
|
16
|
+
- Server-specific env vars (`CALC_MAX_EXPRESSION_LENGTH`, `CALC_EVALUATION_TIMEOUT_MS`) in `server.json` package definitions
|
|
17
|
+
- `depcheck` devDependency
|
|
18
|
+
|
|
19
|
+
## Changed
|
|
20
|
+
|
|
21
|
+
- Scoped package name to `@cyanheads/calculator-mcp-server`
|
|
22
|
+
- Updated `server.json` name to `io.github.cyanheads/calculator-mcp-server` with `bun` runtime hint
|
|
23
|
+
- Updated agent protocol (CLAUDE.md) with actual calculator tool/resource patterns; trimmed unused context properties
|
|
24
|
+
- Expanded package.json with keywords, homepage, bugs, author, and bun engine metadata
|
|
25
|
+
- Updated Dockerfile labels with description and source URL
|
|
26
|
+
- Updated `.env.example` with calculator-specific env vars
|
|
27
|
+
- Updated `devcheck.config.json` to ignore `depcheck` and `tsx` deps
|
|
28
|
+
- Regenerated `docs/tree.md`
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Framework bump to `@cyanheads/mcp-ts-core` 0.5.3, `parseEnvConfig` adoption, and skill sync."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.1.10 — 2026-04-20
|
|
8
|
+
|
|
9
|
+
Framework bump to `@cyanheads/mcp-ts-core` 0.5.3, `parseEnvConfig` adoption, and skill sync.
|
|
10
|
+
|
|
11
|
+
## Added
|
|
12
|
+
|
|
13
|
+
- Adopted `parseEnvConfig` in `src/config/server-config.ts` — validation errors now name the actual env var (`CALC_MAX_EXPRESSION_LENGTH`) instead of the internal Zod path
|
|
14
|
+
|
|
15
|
+
## Changed
|
|
16
|
+
|
|
17
|
+
- Upgraded `@cyanheads/mcp-ts-core` from `^0.3.5` to `^0.5.3` (spans 9 tags — new `parseEnvConfig` helper, format-parity linter rule with sentinel injection, devcheck CLAUDE.md/AGENTS.md sync check, Vitest 4 projects pattern, and multiple fixes)
|
|
18
|
+
- Upgraded `typescript` from `^6.0.2` to `^6.0.3`
|
|
19
|
+
- Synced seven external skills from the package (`add-tool`, `api-config`, `design-mcp-server`, `field-test`, `maintenance`, `polish-docs-meta`, `setup`) and mirrored all skills into `.claude/skills/`
|
|
20
|
+
- Regenerated `bun.lock` from a clean state
|
|
21
|
+
- Bumped package, server metadata, README badge, and agent protocol files to `0.1.10`
|
|
22
|
+
|
|
23
|
+
## Fixed
|
|
24
|
+
|
|
25
|
+
- Cleared the transitive hono moderate-severity advisory (GHSA-458j-xx4x-4375) via fresh lockfile resolution
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Framework bump to `@cyanheads/mcp-ts-core` 0.7.0, handler simplification, and skill sync."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.1.11 — 2026-04-24
|
|
8
|
+
|
|
9
|
+
Framework bump to `@cyanheads/mcp-ts-core` 0.7.0, handler simplification, and skill sync.
|
|
10
|
+
|
|
11
|
+
## Added
|
|
12
|
+
|
|
13
|
+
- Three new external skills from the framework: `api-linter` (rule reference), `release-and-publish` (post-wrapup publish workflow), and `security-pass` (8-axis MCP-specific audit)
|
|
14
|
+
- Three framework scripts newly synced into `scripts/`: `build-changelog.ts`, `check-docs-sync.ts`, `check-skills-sync.ts` (per the `maintenance` skill's new Phase C)
|
|
15
|
+
|
|
16
|
+
## Changed
|
|
17
|
+
|
|
18
|
+
- Upgraded `@cyanheads/mcp-ts-core` from `^0.5.3` to `^0.7.0` (spans 18 tags — landing page at `/`, SEP-1649 Server Card, directory-based changelog system, recursive `describe-on-fields` linter, flattened ZodError messages with structured `data.issues`, `MCP_PUBLIC_URL` TLS-proxy override, per-request HTTP close race fix, `HtmlExtractor` utility, and the new skills above)
|
|
19
|
+
- Upgraded `@biomejs/biome` from `^2.4.12` to `^2.4.13` (patch) and `vitest` from `^4.1.4` to `^4.1.5` (patch)
|
|
20
|
+
- Resynced 15 external skills to match framework 0.7.0 versions (`add-tool` 1.6→1.8, `design-mcp-server` 2.4→2.7, `field-test` 1.2→2.0, `polish-docs-meta` 1.4→1.7, `setup` 1.3→1.5, `maintenance` 1.3→1.5, and nine others)
|
|
21
|
+
- Resynced `scripts/devcheck.ts` and `scripts/tree.ts` from the framework (devcheck now runs Docs Sync, Skills Sync, and Changelog Sync steps)
|
|
22
|
+
- Simplified the `calculate` tool handler — destructured `input` once, spread `MathResult` into the return, dropped per-case block scopes; ~40% fewer lines, same 27/27 tests passing
|
|
23
|
+
- Agent protocol (`CLAUDE.md` / `AGENTS.md`): added `security-pass` and `release-and-publish` to the What's Next? progression, added `api-linter` / `security-pass` / `release-and-publish` to the skills table, rewrote the Publishing section to point at the `release-and-publish` skill
|
|
24
|
+
- `.github/ISSUE_TEMPLATE/` descriptions now use the scoped package name (`@cyanheads/calculator-mcp-server`) for consistency
|
|
25
|
+
- Bumped package, server metadata, README badge, and agent protocol files to `0.1.11`
|
|
26
|
+
|
|
27
|
+
## Fixed
|
|
28
|
+
|
|
29
|
+
- Added `.describe()` to each variant of the `variable` and `precision` unions in the `calculate` input schema — the 0.6.16 framework bump extended `describe-on-fields` to recurse into union options, which flagged the previously-bare `z.literal('')` and sibling variants
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Framework patch-series bump and a small `MathService` cleanup."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.1.12 — 2026-04-27
|
|
8
|
+
|
|
9
|
+
Framework patch-series bump and a small `MathService` cleanup.
|
|
10
|
+
|
|
11
|
+
## Changed
|
|
12
|
+
|
|
13
|
+
- Upgraded `@cyanheads/mcp-ts-core` from `^0.7.0` to `^0.7.5` (spans five patch releases — HTTP Origin guard now fails closed for remote browser origins (loopback-only when `MCP_ALLOWED_ORIGINS` is unset), landing-page `requireAuth` validates bearer tokens, raw caller payloads removed from default logs, opt-in `LOG_LLM_INTERACTIONS`, `vitest.config` shipped as `.mjs` to avoid Node 22.7+ type-strip failure, new `Framework Antipatterns` devcheck step, `format-parity` numeric normalization tightened to reject lossy decimal-shift transforms, `describe-on-fields` linter exempts `z.literal` union variants, `landing.connectSnippets` operator override, and Cloudflare email-rewrite defense in connect snippets)
|
|
14
|
+
- Renamed `MathService.sanitizeScope` to `validateScope` — function only validated and threw, never sanitized; new name and `void` return reflect actual behavior
|
|
15
|
+
- Resynced 5 external skills from the framework (`maintenance` 1.5→1.6, `api-linter` 1.1→1.2, plus content-only updates to `api-utils`, `design-mcp-server`, `field-test`)
|
|
16
|
+
- Resynced `scripts/devcheck.ts` from the framework (adds the new `Framework Antipatterns` check step)
|
|
17
|
+
- Bumped package, server metadata, README badge, and agent protocol files to `0.1.12`
|
|
18
|
+
|
|
19
|
+
## Added
|
|
20
|
+
|
|
21
|
+
- `scripts/check-framework-antipatterns.ts` — pulled in alongside the updated `devcheck.ts` so the new check has a script to invoke. (Required because the `maintenance` skill's Phase C currently uses a hardcoded script list — see [cyanheads/mcp-ts-core#69](https://github.com/cyanheads/mcp-ts-core/issues/69).)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Patch release: framework `0.7.5 → 0.7.6` bump, [#2](https://github.com/cyanheads/calculator-mcp-server/issues/2) fix lifting the single-expression contract into the `calculate` tool's published JSON Schema, and adoption of the framework template's new `start` script."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.1.13 — 2026-04-27
|
|
8
|
+
|
|
9
|
+
Patch release: framework `0.7.5 → 0.7.6` bump, [#2](https://github.com/cyanheads/calculator-mcp-server/issues/2) fix lifting the single-expression contract into the `calculate` tool's published JSON Schema, and adoption of the framework template's new `start` script.
|
|
10
|
+
|
|
11
|
+
## Changed
|
|
12
|
+
|
|
13
|
+
- Tightened the `calculate` tool descriptions so the single-expression contract is visible at tool-discovery time, preempting LLM callers that batch with `;` or newlines (closes [#2](https://github.com/cyanheads/calculator-mcp-server/issues/2)). Tool-level description gains `One expression per call.`; the `expression` field describe leads with the constraint and disambiguates `;` semantics — `One mathematical expression per call — neither \`;\` nor newlines separate statements. Inside matrices, \`;\` separates rows (e.g. \`[1, 2; 3, 4]\`).` Existing runtime guard (`hasExpressionSeparator` in `math-service.ts`) unchanged — purely a discoverability improvement.
|
|
14
|
+
- Upgraded `@cyanheads/mcp-ts-core` from `^0.7.5` to `^0.7.6` (patch — `maintenance` skill Phase C now enumerates the installed `scripts/*.ts` directly instead of a hardcoded list, and `release-and-publish` / `setup` / `maintenance` skill prose was reworded so agents pick whichever git tooling is available rather than literal `git <cmd>` invocations)
|
|
15
|
+
- Resynced 3 external skills from the framework (`maintenance` 1.6→1.7, `release-and-publish` 2.1→2.2, `setup` 1.5→1.6)
|
|
16
|
+
- Bumped package, server metadata, README badge, and agent protocol files to `0.1.13`
|
|
17
|
+
|
|
18
|
+
## Added
|
|
19
|
+
|
|
20
|
+
- `start` script in `package.json` (`"start": "node dist/index.js"`) — adopted from the framework template's 0.7.6 update so external MCP runners that assume the npm-canonical `start` script work out of the box. The new script defers to `.env` for transport selection (no inline `MCP_TRANSPORT_TYPE` override); existing `start:stdio` / `start:http` variants unchanged.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Patch release surfacing two field-test findings in the `calculate` tool: numeric results no longer flip into scientific notation at math.js's default `exp ≥ 5` threshold, and the schema descriptions stop naming a specific consumer."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.1.14 — 2026-04-27
|
|
8
|
+
|
|
9
|
+
Patch release surfacing two field-test findings in the `calculate` tool: numeric results no longer flip into scientific notation at math.js's default `exp ≥ 5` threshold, and the schema descriptions stop naming a specific consumer.
|
|
10
|
+
|
|
11
|
+
## Fixed
|
|
12
|
+
|
|
13
|
+
- **`calculate` numeric formatting** — widen `math.format()` thresholds to `lowerExp: -6, upperExp: 21` (matching JS `Number.toString`) so normal-magnitude integers render as plain digits. `12345 * 6789` now returns `"83810205"` instead of `"8.3810205e+7"`; `factorial(10)` returns `"3628800"` instead of `"3.6288e+6"`. BigNumbers and very-tiny / very-large doubles still use exponential notation, and the `precision` parameter is unaffected. Implementation: `src/services/math/math-service.ts`.
|
|
14
|
+
|
|
15
|
+
## Changed
|
|
16
|
+
|
|
17
|
+
- **`calculate` schema descriptions** — drop "for form-based clients" / "Blank values from form-based clients" phrasings from `variable.anyOf[0]`, `variable`, `precision.anyOf[0]`, and `precision` `.describe()` strings. The schema no longer references a specific consumer; the empty-string compat behavior is preserved. Implementation: `src/mcp-server/tools/definitions/calculate.tool.ts`.
|
|
18
|
+
- Bumped package, server metadata, README badge, and agent protocol files to `0.1.14`.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Patch release: framework `0.7.6 → 0.8.0` bump, agent protocol Errors section rewritten to lead with the new typed error contract pattern, and three external skills resynced from the framework."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.1.15 — 2026-04-28
|
|
8
|
+
|
|
9
|
+
Patch release: framework `0.7.6 → 0.8.0` bump, agent protocol Errors section rewritten to lead with the new typed error contract pattern, and three external skills resynced from the framework.
|
|
10
|
+
|
|
11
|
+
## Changed
|
|
12
|
+
|
|
13
|
+
- Upgraded `@cyanheads/mcp-ts-core` from `^0.7.6` to `^0.8.0` (minor — adds typed error contracts via `errors: [{ reason, code, when, retryable? }]` on `tool()` / `resource()` with typed `ctx.fail(reason, …)`, advertises the failure surface in `tools/list` under `_meta['mcp-ts-core/errors']`; ships `httpErrorFromResponse` and `partialResult` utilities, three new error factories (`internalError`, `serializationError`, `databaseError`), and handler-body + error-contract conformance lint rules. Fully backwards compatible).
|
|
14
|
+
- Agent protocol files (`CLAUDE.md` / `AGENTS.md`) — Errors section rewritten to lead with the typed error contract as the recommended path, demote factories + auto-classification to the fallback. Added `add-app-tool` to the skills table. Added a form-client safety bullet to the checklist.
|
|
15
|
+
- Resynced 3 external skills from the framework (`maintenance` 1.7→1.8, `report-issue-framework` 1.3→1.4, `security-pass` 1.1→1.2 — `security-pass` Axis 7 leakage check now greps `ctx.fail(` and `httpErrorFromResponse(` alongside `new McpError`).
|
|
16
|
+
- Bumped package, server metadata, README badge, and agent protocol files to `0.1.15`.
|
|
17
|
+
|
|
18
|
+
## Added
|
|
19
|
+
|
|
20
|
+
- `scripts/split-changelog.ts` adopted from the framework template — supports the directory-based changelog convention used upstream. The calculator continues to use a flat `CHANGELOG.md`; the script is in place for a future migration.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Adopt framework 0.8.0 typed error contract on `calculate`. Reclassify input-validation failures from `InvalidParams` (-32602) to `ValidationError` (-32007). 10 contract reasons declared. Wire-shape conformance test suite. Closes #3, #4."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.1.16 — 2026-04-28
|
|
8
|
+
|
|
9
|
+
Patch release: adopt the framework `0.8.0` typed error contract on the `calculate` tool and reclassify input-validation failures from JSON-RPC `InvalidParams` (`-32602`) to the framework's purpose-built `ValidationError` (`-32007`). Closes [#3](https://github.com/cyanheads/calculator-mcp-server/issues/3) and [#4](https://github.com/cyanheads/calculator-mcp-server/issues/4).
|
|
10
|
+
|
|
11
|
+
## Changed
|
|
12
|
+
|
|
13
|
+
- **`calculate` error codes** — swapped 8 `invalidParams` (`-32602`) throws to `validationError` (`-32007`) across `src/services/math/math-service.ts` (7 sites) and `src/mcp-server/tools/definitions/calculate.tool.ts` (1 site). `serviceUnavailable` on evaluation timeout retained. Observability dashboards keyed on `mcp_error_classified_code` will now group these under `Client: Validation` instead of the unmapped JSON-RPC bucket. Closes [#3](https://github.com/cyanheads/calculator-mcp-server/issues/3).
|
|
14
|
+
- **`calculate` typed error contract** — declared all 10 failure modes as `errors: [{ reason, code, when, retryable? }]` on the tool definition; published in `tools/list` under `_meta['mcp-ts-core/errors']`. Reasons: `empty_expression`, `expression_too_long`, `multiple_expressions`, `reserved_scope_key`, `disallowed_result_type`, `result_too_large`, `undefined_result`, `parse_failed`, `derivative_missing_variable`, `evaluation_timeout` (`ServiceUnavailable`, `retryable: false`). The handler-side cross-field check now routes through `ctx.fail('derivative_missing_variable', …)`; service throws carry `data: { reason }` so the framework's auto-classifier preserves a stable identifier on the wire. Closes [#4](https://github.com/cyanheads/calculator-mcp-server/issues/4).
|
|
15
|
+
|
|
16
|
+
## Added
|
|
17
|
+
|
|
18
|
+
- **Wire-shape conformance test suite** (`tests/mcp-server/tools/definitions/calculate.tool.test.ts`) — one test per contract reason (10 total) asserting the thrown `McpError`'s `code` and `data.reason` match the contract entry. Compensates for the framework lint's blind spot on service-thrown reasons. `result_too_large` and `evaluation_timeout` use a directly-constructed `MathService` with shrunken config (5-char limit / 1ms timeout) since the singleton's defaults can't trigger them.
|
|
19
|
+
|
|
20
|
+
## Fixed
|
|
21
|
+
|
|
22
|
+
- **Test helper now wires `ctx.fail`** — existing `derivative` failure tests had been passing accidentally: `createMockContext()` doesn't attach `ctx.fail`, the resulting `TypeError` happened to serialize a substring `vitest.toThrow()` matched. New `mockCtx()` helper passes `errors: calculateTool.errors` so `ctx.fail` is properly available in tests.
|
|
23
|
+
|
|
24
|
+
## Meta
|
|
25
|
+
|
|
26
|
+
- Bumped package, server metadata, README badge, and agent protocol files to `0.1.16`.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Natural-language ergonomics: `calculate` now accepts `average`/`avg` aliases for `mean`, and `mph`, `knot`, `lightyear` units (with plurals and standard abbreviations). Closes #5, #6."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.1.17 — 2026-04-28
|
|
8
|
+
|
|
9
|
+
Patch release: natural-language ergonomics — the `calculate` tool now accepts `average`/`avg` as aliases for `mean`, and the `mph`, `knot`, and `lightyear` units (with their plurals and standard abbreviations). Closes [#5](https://github.com/cyanheads/calculator-mcp-server/issues/5) and [#6](https://github.com/cyanheads/calculator-mcp-server/issues/6).
|
|
10
|
+
|
|
11
|
+
## Added
|
|
12
|
+
|
|
13
|
+
- **Function aliases** — `average` and `avg` registered as aliases for `mean` via `math.import()` in `MathService` constructor (`src/services/math/math-service.ts`). Both resolve to the same typed function as `mean`. Closes [#5](https://github.com/cyanheads/calculator-mcp-server/issues/5).
|
|
14
|
+
- **Custom units** — `mph` (= `1 mile/hour`), `knot` (= `1852 m/hour`, with aliases `knots`, `kt`, `kts`), and `lightyear` (= `9460730472580800 m`, with aliases `lightyears`, `ly`) registered via `math.createUnit()` in the constructor before the disabling step clobbers `createUnit` in the expression scope. Definitions use exact SI-derived values. Closes [#6](https://github.com/cyanheads/calculator-mcp-server/issues/6).
|
|
15
|
+
- **5 wire-shape tests** for the new aliases and units in `tests/mcp-server/tools/definitions/calculate.tool.test.ts` covering `average`/`avg` evaluation and `60 mph → m/s`, `1 lightyear → km`, `10 knots → m/s` conversions.
|
|
16
|
+
|
|
17
|
+
## Changed
|
|
18
|
+
|
|
19
|
+
- **Help resource** (`calculator://help`) — Statistics line now reads `mean (aliases: average, avg)`; Common units line now includes `lightyear (ly)`, `mph`, `knot (kt)`. Discovery surface stays in sync with the registered surface.
|
|
20
|
+
|
|
21
|
+
## Meta
|
|
22
|
+
|
|
23
|
+
- Bumped package, server metadata, README badge, and agent protocol files to `0.1.17`.
|
|
24
|
+
- [#7](https://github.com/cyanheads/calculator-mcp-server/issues/7) (intermediate overflow on factorial ratios) — left open with a [rejection comment](https://github.com/cyanheads/calculator-mcp-server/issues/7#issuecomment-4339684505) on the proposed BigNumber-as-default fix and a counter-proposal for an opt-in `numericType` tool parameter.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Framework bump `@cyanheads/mcp-ts-core` 0.8.0 → 0.8.3. Opt-in to landing-page `repoRoot` config (status-strip GitHub link, auto-derived per-tool `sourceUrl`, tagline). No runtime API changes for `calculate` callers."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.1.18 — 2026-04-29
|
|
8
|
+
|
|
9
|
+
Patch release: framework bump `@cyanheads/mcp-ts-core` `0.8.0 → 0.8.3` plus opt-in to the new HTTP landing-page `repoRoot` config. No runtime API changes for callers of the `calculate` tool — its typed `errors[]` contract continues to surface via `result.structuredContent.error.{code, message, data.reason}` (now the canonical wire location after the framework's 0.8.3 error-shape cleanup).
|
|
10
|
+
|
|
11
|
+
## Changed
|
|
12
|
+
|
|
13
|
+
- **`createApp()` landing config** (`src/index.ts`) — declares `landing.repoRoot` (`https://github.com/cyanheads/calculator-mcp-server`) and a `tagline`. Activates the 0.8.2 status-strip GitHub link, auto-derives per-tool `sourceUrl` and the default `changelogUrl`, and sets the public-facing tagline on the HTTP landing page at [calculator.caseyjhand.com](https://calculator.caseyjhand.com/).
|
|
14
|
+
- **Agent protocol files** (`CLAUDE.md`, `AGENTS.md`) — Errors section: removed the stale "advertise the failure surface in `tools/list` (under `_meta['mcp-ts-core/errors']`)" claim. The 0.8.3 release dropped that wire publication; contract-based ergonomics (typed `ctx.fail`, conformance lint) are unaffected. Added the error-path parity paragraph (`content[]` ↔ `structuredContent.error`). Refreshed the `format()` checklist line to match the structuredContent/content[] dual-surface invariant.
|
|
15
|
+
|
|
16
|
+
## Meta
|
|
17
|
+
|
|
18
|
+
- Bumped `@cyanheads/mcp-ts-core` to `0.8.3`. Field-tested the `calculate` tool against the live HTTP transport: happy path (evaluate, simplify, derivative), structured/text parity, and two contract reasons (`derivative_missing_variable` via `ctx.fail`, `undefined_result` via service-thrown `validationError`). All 42 unit tests pass.
|
|
19
|
+
- Synced project skills from the package: `add-service` (1.3 → 1.4), `add-tool` (1.8 → 2.0), `api-errors` (1.0 → 1.1), `field-test` (2.0 → 2.2), `maintenance` (1.8 → 2.0). Refreshed `.claude/skills/` and `.agents/skills/` from `skills/`.
|
|
20
|
+
- Filed [cyanheads/mcp-ts-core#86](https://github.com/cyanheads/mcp-ts-core/issues/86) — landing-page resource `sourceUrl` derivation embeds the URI host into the filename (e.g. `calculator help.resource.ts`), producing a 404 link. Tool source URLs are unaffected.
|
|
21
|
+
- Bumped package, server metadata, README badge, and agent protocol files to `0.1.18`.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Fix the `view source ↗` link for `calculator://help` on the HTTP landing page — set `sourceUrl` explicitly on the resource definition (URI-shaped names break the framework's auto-derivation)."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.1.19 — 2026-04-29
|
|
8
|
+
|
|
9
|
+
Patch release: fix the `view source ↗` link for the `calculator://help` resource on the HTTP landing page. The framework's auto-derivation builds the path from the definition name via `kebab-mirror`, which doesn't match URI-shaped resource names like `calculator://help` — the established override path is `sourceUrl` on the definition itself ([cyanheads/mcp-ts-core#42](https://github.com/cyanheads/mcp-ts-core/issues/42)), already adopted in `pubmed-mcp-server` on every tool. Calculator now does the same on the help resource.
|
|
10
|
+
|
|
11
|
+
## Fixed
|
|
12
|
+
|
|
13
|
+
- **`helpResource.sourceUrl`** (`src/mcp-server/resources/definitions/help.resource.ts`) — set explicitly to `https://github.com/cyanheads/calculator-mcp-server/blob/main/src/mcp-server/resources/definitions/help.resource.ts`. Replaces the framework auto-derived `.../calculator help.resource.ts` (URI host + path joined with a space) that 404'd on GitHub.
|
|
14
|
+
|
|
15
|
+
## Meta
|
|
16
|
+
|
|
17
|
+
- Closed [cyanheads/mcp-ts-core#86](https://github.com/cyanheads/mcp-ts-core/issues/86) as duplicate of [#42](https://github.com/cyanheads/mcp-ts-core/issues/42) — the override is the intended pattern, not a framework bug. The 0.1.18 CHANGELOG note mentioning #86 as a framework bug is superseded; treat that line as historical context rather than a current-state reference.
|
|
18
|
+
- Bumped package, server metadata, README badge, and agent protocol files to `0.1.19`.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Core calculator implementation — replaces scaffold echo tool with full math evaluation surface."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.1.2 — 2026-03-28
|
|
8
|
+
|
|
9
|
+
Core calculator implementation — replaces scaffold echo tool with full math evaluation surface.
|
|
10
|
+
|
|
11
|
+
## Added
|
|
12
|
+
|
|
13
|
+
- `calculate` tool — evaluate, simplify, or differentiate math expressions via a single tool with `operation` parameter (defaults to `evaluate`)
|
|
14
|
+
- `calculator://help` resource — static reference of available functions, operators, constants, and syntax
|
|
15
|
+
- `MathService` with hardened math.js v15 instance — dangerous functions disabled in expression scope, evaluation sandboxed via `vm.runInNewContext()` with configurable timeout
|
|
16
|
+
- Server config module (`src/config/server-config.ts`) — lazy-parsed Zod schema for `CALC_MAX_EXPRESSION_LENGTH` and `CALC_EVALUATION_TIMEOUT_MS`
|
|
17
|
+
- `mathjs` v15 dependency
|
|
18
|
+
- Test suite for calculate tool covering evaluate, simplify, derivative, error handling, and format output
|
|
19
|
+
|
|
20
|
+
## Removed
|
|
21
|
+
|
|
22
|
+
- Scaffold `echo` tool (`template_echo_message`)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Framework bump `@cyanheads/mcp-ts-core` 0.8.3 → 0.8.5. Adopt the new typed `recovery` field on all 10 `calculate` error contract entries — actionable hints now flow to `structuredContent.error.data.recovery.hint` and mirror into `content[0].text`."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.1.20 — 2026-04-29
|
|
8
|
+
|
|
9
|
+
Patch release: framework bump `@cyanheads/mcp-ts-core` `0.8.3 → 0.8.5` and adopt the new typed `recovery` field on every entry of the `calculate` error contract. Each declared failure mode now carries an actionable hint that flows to the wire on `result.structuredContent.error.data.recovery.hint` and is mirrored into `result.content[0].text` as `Recovery: <hint>` — agents recovering from a `validationError` no longer have to infer the next move from the message alone.
|
|
10
|
+
|
|
11
|
+
## Changed
|
|
12
|
+
|
|
13
|
+
- **`calculate` typed error contract** (`src/mcp-server/tools/definitions/calculate.tool.ts`) — added the required `recovery` field to all 10 entries (`empty_expression`, `expression_too_long`, `multiple_expressions`, `reserved_scope_key`, `disallowed_result_type`, `result_too_large`, `undefined_result`, `parse_failed`, `derivative_missing_variable`, `evaluation_timeout`). The 0.8.5 framework lints `recovery` for length and presence on every contract entry.
|
|
14
|
+
- **`MathService` recovery plumbing** (`src/services/math/math-service.ts`) — `evaluateExpression`, `simplifyExpression`, `differentiateExpression`, `validateInput`, `validateScope`, `validateResultType`, `validateResultSize`, and `runWithTimeout` now accept the request `Context` and spread `ctx.recoveryFor('reason')` into the `data` object on every service-thrown `validationError` / `serviceUnavailable`. The `derivative_missing_variable` `ctx.fail` site in the tool handler does the same. Test helpers updated to pass `mockCtx()` to the two direct service-layer calls in the wire-shape suite.
|
|
15
|
+
|
|
16
|
+
## Meta
|
|
17
|
+
|
|
18
|
+
- Bumped `@cyanheads/mcp-ts-core` to `0.8.5`.
|
|
19
|
+
- Synced project skills from the package: `add-service` (1.4 → 1.5), `add-tool` (2.0 → 2.4), `api-context` (1.1 → 1.2), `api-errors` (1.1 → 1.4), `design-mcp-server` (2.7 → 2.8). Refreshed `.claude/skills/` and `.agents/skills/` from `skills/`.
|
|
20
|
+
- Field-tested the live HTTP transport: happy paths (`evaluate`, `simplify`, `derivative`, `60 mph to m/s`, `average([...])`), `calculator://help` resource read, missing-required-arg Zod reject, and 5 contract-error reasons (`undefined_result`, `derivative_missing_variable`, `multiple_expressions`, `parse_failed`, `reserved_scope_key`). Verified `data.recovery.hint` populated on every error and mirrored into `content[0].text`. All 42 unit tests pass; devcheck clean.
|
|
21
|
+
- Bumped package, server metadata, README badge, and agent protocol files to `0.1.20`.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Framework bump `@cyanheads/mcp-ts-core` 0.8.5 → 0.8.15. Reclassify `evaluation_timeout` from `ServiceUnavailable` (-32000) to `Timeout` (-32004) — vm sandbox abort is a timeout primitive, not an upstream availability problem. `retryable: false` unchanged."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.1.21 — 2026-05-05
|
|
8
|
+
|
|
9
|
+
Patch release: framework bump `@cyanheads/mcp-ts-core` `0.8.5 → 0.8.15` and reclassify the `evaluation_timeout` failure mode from `ServiceUnavailable` (`-32000`) to `Timeout` (`-32004`). The vm sandbox abort is a timeout — not an upstream service availability problem — so the wire code now matches the semantics. Observability dashboards keyed on `mcp_error_classified_code` will group these under `Server: Timeout` instead of `Server: ServiceUnavailable`; clients shouldn't retry (`retryable: false` is unchanged).
|
|
10
|
+
|
|
11
|
+
## Changed
|
|
12
|
+
|
|
13
|
+
- **`calculate` typed error contract** (`src/mcp-server/tools/definitions/calculate.tool.ts`) — `evaluation_timeout` entry's `code` switched from `JsonRpcErrorCode.ServiceUnavailable` to `JsonRpcErrorCode.Timeout`. `when` and `recovery` unchanged.
|
|
14
|
+
- **`MathService.runWithTimeout`** (`src/services/math/math-service.ts`) — vm-script-timeout branch now throws via the `timeout()` factory instead of `serviceUnavailable()`. Import swapped accordingly. Wire-shape conformance test for `evaluation_timeout` updated to assert `JsonRpcErrorCode.Timeout`.
|
|
15
|
+
|
|
16
|
+
## Internal
|
|
17
|
+
|
|
18
|
+
- **`runWithTimeout` simplification** (`src/services/math/math-service.ts`) — dropped the redundant `vm.createContext(sandbox)` call. `vm.runInNewContext()` contextifies its sandbox argument internally; the intermediate variable was a no-op alias.
|
|
19
|
+
|
|
20
|
+
## Meta
|
|
21
|
+
|
|
22
|
+
- Bumped `@cyanheads/mcp-ts-core` to `0.8.15`, `@biomejs/biome` to `2.4.14`, `tsc-alias` to `1.8.17`.
|
|
23
|
+
- Removed unused `dev:stdio` / `dev:http` watch scripts from `package.json` per framework `0.8.6` / `0.8.7` cleanup.
|
|
24
|
+
- Synced project skills from the package: `add-tool` (2.4 → 2.8), `api-config` (1.2 → 1.3), `api-errors` (1.4 → 1.5), `api-workers` (1.1 → 1.3), `design-mcp-server` (2.8 → 2.10), `field-test` (2.2 → 2.3), `report-issue-framework` (1.4 → 1.5), `report-issue-local` (1.3 → 1.4), `security-pass` (1.2 → 1.3). Added `api-canvas` (1.2) and `tool-defs-analysis` (1.0). Refreshed `.claude/skills/` and `.agents/skills/` from `skills/`.
|
|
25
|
+
- **Agent protocol files** (`CLAUDE.md`, `AGENTS.md`) — added the "Declare contracts inline on each tool" guidance to the Errors section, added `api-canvas` and `tool-defs-analysis` rows to the skills table, and dropped the removed `dev:stdio` / `dev:http` rows from the Commands table.
|
|
26
|
+
- Bumped package, server metadata, README badge, and agent protocol files to `0.1.21`.
|