@coo-quack/calc-mcp 1.6.1 → 1.6.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coo-quack/calc-mcp",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "calc-mcp": "dist/index.js"
Binary file
@@ -1,56 +0,0 @@
1
- import { defineConfig } from "vitepress";
2
-
3
- export default defineConfig({
4
- title: "Calc MCP",
5
- description: "21 tools for things AI is bad at",
6
- base: "/calc-mcp/",
7
-
8
- themeConfig: {
9
- logo: "/logo.svg",
10
-
11
- nav: [
12
- { text: "Home", link: "/" },
13
- { text: "Tools", link: "/tools" },
14
- { text: "Install", link: "/install" },
15
- { text: "Examples", link: "/examples" },
16
- { text: "Changelog", link: "/changelog" },
17
- ],
18
-
19
- sidebar: [
20
- {
21
- text: "Guide",
22
- items: [
23
- { text: "Getting Started", link: "/" },
24
- { text: "Installation", link: "/install" },
25
- { text: "Examples", link: "/examples" },
26
- ],
27
- },
28
- {
29
- text: "Reference",
30
- items: [
31
- { text: "All Tools", link: "/tools" },
32
- { text: "Changelog", link: "/changelog" },
33
- ],
34
- },
35
- ],
36
-
37
- socialLinks: [
38
- { icon: "github", link: "https://github.com/coo-quack/calc-mcp" },
39
- {
40
- icon: "npm",
41
- link: "https://www.npmjs.com/package/@coo-quack/calc-mcp",
42
- },
43
- ],
44
-
45
- footer: {
46
- message: "Released under the MIT License.",
47
- copyright: "Copyright © 2026 coo-quack",
48
- },
49
-
50
- search: {
51
- provider: "local",
52
- },
53
- },
54
-
55
- head: [["link", { rel: "icon", href: "/calc-mcp/favicon.ico" }]],
56
- });
@@ -1,4 +0,0 @@
1
- import DefaultTheme from "vitepress/theme";
2
- import "./style.css";
3
-
4
- export default DefaultTheme;
@@ -1,21 +0,0 @@
1
- :root {
2
- --vp-c-brand-1: #00a000;
3
- --vp-c-brand-2: #00c000;
4
- --vp-c-brand-3: #00e000;
5
- --vp-c-brand-soft: rgba(0, 160, 0, 0.14);
6
- }
7
-
8
- .dark {
9
- --vp-c-brand-1: #00d000;
10
- --vp-c-brand-2: #00b000;
11
- --vp-c-brand-3: #00a000;
12
- --vp-c-brand-soft: rgba(0, 208, 0, 0.16);
13
- }
14
-
15
- .vp-doc a {
16
- color: var(--vp-c-brand-1);
17
- }
18
-
19
- .vp-doc a:hover {
20
- color: var(--vp-c-brand-2);
21
- }
package/docs/changelog.md DELETED
@@ -1,117 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to Calc MCP are documented here.
4
-
5
- ## v1.6.1 (2026-02-12)
6
-
7
- ### Bug Fixes
8
-
9
- - **hash** — Replace `Bun.CryptoHasher` with `node:crypto` for Node.js compatibility (#18)
10
-
11
- ## v1.6.0 (2026-02-12)
12
-
13
- ### Features
14
-
15
- - **Documentation site** — Full VitePress-powered docs at [coo-quack.github.io/calc-mcp](https://coo-quack.github.io/calc-mcp/) with tool reference, examples, install guides, and changelog (#13)
16
-
17
- ### Documentation
18
-
19
- - Added documentation site link to README
20
- - Added release checklist to CONTRIBUTING.md (#15)
21
- - Updated npx examples with `--prefix /tmp` for better node_modules compatibility
22
- - Added common ignore patterns to .gitignore
23
-
24
- ## v1.5.0 (2026-02-11)
25
-
26
- ### Features
27
-
28
- - **Password generation** — Fine-grained options: `uppercase`, `numbers`, `symbols` (on/off), `readable` mode (excludes ambiguous chars like l/1/I/O/0/o), `excludeChars` for custom exclusions
29
- - **Shuffle** — Fisher-Yates algorithm with `crypto.getRandomValues` for unbiased list shuffling
30
-
31
- ### Documentation
32
-
33
- - README title: `@coo-quack/calc-mcp` → `Calc MCP`
34
- - Added "Why?" section with AI-alone vs calc-mcp comparison
35
- - Quick Start moved to top
36
- - Install guides consolidated (Claude Desktop/Cursor/Windsurf share same JSON format)
37
-
38
- ### Tests
39
-
40
- - Random tool tests: 12 → 27 (+15)
41
- - Total: 194 tests, 280 assertions
42
-
43
- ## v1.4.0 (2026-02-11)
44
-
45
- ### Features
46
-
47
- - **Time conversion** — ms, s, min, h, d, wk, mo, yr (now 8 categories, 72 units)
48
- - **`--version` flag** — `npx @coo-quack/calc-mcp --version`
49
-
50
- ### Improvements
51
-
52
- - serverInfo.version synced with package.json (was hardcoded "0.1.0")
53
- - Error messages now list all supported units on unknown unit
54
- - Semver test coverage: 9 → 23 tests
55
- - CI git config for tag authoring
56
- - README badges (npm, CI, license)
57
- - CONTRIBUTING.md added
58
- - GitHub topics set
59
- - README examples: Japanese text replaced with English alternatives
60
-
61
- ## v1.3.0 (2026-02-11)
62
-
63
- ### Documentation
64
-
65
- - Overhaul README with natural language examples (22 verified examples)
66
- - Add install guides for Claude Code, Claude Desktop, VS Code, Cursor, Windsurf
67
- - Add unit conversion coverage details (7 categories, 58 units)
68
- - Add encode/decode examples (Base64, URL, HTML)
69
-
70
- ## v1.1.0 (2026-02-11)
71
-
72
- ### Features
73
-
74
- - **random**: Add UUID v7 support (`uuidVersion: "v7"`) — Time-ordered UUIDs, ideal for database primary keys
75
-
76
- ## v1.0.0 (2026-02-11)
77
-
78
- ### Features
79
-
80
- Initial release with **21 MCP tools** for calculations and operations AI models struggle with:
81
-
82
- - **random** — UUID (v4), ULID, secure password, random number
83
- - **hash** — SHA-1, SHA-256, SHA-512, MD5
84
- - **base64** — Encode/decode Base64
85
- - **encode** — URL encode/decode, HTML entity encode/decode
86
- - **datetime** — Current time, convert, format, Unix timestamp
87
- - **count** — Character, word, line, byte counting (grapheme-aware)
88
- - **math** — Precise math evaluation via mathjs
89
- - **date** — Date arithmetic (add/subtract/diff)
90
- - **regex** — Test, match, replace with regex
91
- - **base** — Number base conversion (bin/oct/dec/hex/custom)
92
- - **diff** — Text diff between two strings
93
- - **json_validate** — JSON schema validation
94
- - **cron_parse** — Cron expression to human-readable description
95
- - **luhn** — Luhn algorithm validation (credit cards, etc.)
96
- - **ip** — IPv4/IPv6 parsing, CIDR subnet info
97
- - **color** — Color format conversion (hex/rgb/hsl/hwb)
98
- - **convert** — Unit conversion (length, weight, temp, data, time)
99
- - **char_info** — Unicode character info (codepoint, name, category)
100
- - **jwt_decode** — Decode JWT tokens (header + payload)
101
- - **url_parse** — URL parsing into components
102
- - **semver** — Semantic versioning operations (compare, satisfy, sort)
103
-
104
- ### CI/CD
105
-
106
- - GitHub Actions: test + lint on push/PR
107
- - Publish workflow: test + lint gate before npm publish on tag
108
-
109
- ### Infrastructure
110
-
111
- - Biome for linting and formatting
112
- - Renovate with OSV vulnerability alerts
113
- - 160 tests, 92%+ line coverage
114
-
115
- ---
116
-
117
- For the latest changes, see [GitHub Releases](https://github.com/coo-quack/calc-mcp/releases).
package/docs/examples.md DELETED
@@ -1,419 +0,0 @@
1
- # Examples
2
-
3
- Ask in natural language — the AI picks the right tool automatically. Here are real examples you can try:
4
-
5
- ## Math & Numbers
6
-
7
- ### Calculations
8
-
9
- ```
10
- What's 10 + 34 × 341 ÷ 23?
11
- → 514.087 (math)
12
-
13
- Calculate sqrt(144) + 2^8
14
- → 268 (math)
15
-
16
- What's the sum of [10, 20, 30, 40, 50]?
17
- → 150 (math)
18
- ```
19
-
20
- ### Statistics
21
-
22
- ```
23
- Calculate mean and stddev of [1, 2, 3, 4, 5]
24
- → { mean: 3, median: 3, stddev: 1.414, min: 1, max: 5 } (math)
25
-
26
- What's the median of [100, 50, 200, 75, 150]?
27
- → 100 (math)
28
- ```
29
-
30
- ### Base Conversion
31
-
32
- ```
33
- Convert 255 to binary
34
- → 11111111 (base)
35
-
36
- Convert FF from hex to decimal
37
- → 255 (base)
38
-
39
- Convert 12 from decimal to base 5
40
- → 22 (base)
41
- ```
42
-
43
- ### Card Validation
44
-
45
- ```
46
- Is 4539578763621486 a valid card number?
47
- → true (luhn)
48
-
49
- Generate check digit for 453957876362148
50
- → 6 (luhn)
51
- ```
52
-
53
- ## Text & Encoding
54
-
55
- ### Counting
56
-
57
- ```
58
- How many characters in "Hello, World! 🌍"?
59
- → 15 chars, 18 bytes (count)
60
-
61
- Count words in "The quick brown fox jumps"
62
- → 5 words (count)
63
-
64
- How many lines in this text? (multiline input)
65
- → 10 lines (count)
66
- ```
67
-
68
- ### Base64
69
-
70
- ```
71
- Base64 encode "Hello World"
72
- → SGVsbG8gV29ybGQ= (base64)
73
-
74
- Base64 decode "eyJhbGciOiJIUzI1NiJ9"
75
- → {"alg":"HS256"} (base64)
76
- ```
77
-
78
- ### URL Encoding
79
-
80
- ```
81
- URL-encode "hello world"
82
- → hello%20world (encode)
83
-
84
- URL-decode "hello%20world"
85
- → "hello world" (encode)
86
-
87
- HTML-encode "<script>alert('XSS')</script>"
88
- → &lt;script&gt;alert(&#39;XSS&#39;)&lt;/script&gt; (encode)
89
-
90
- HTML-decode "&lt;script&gt;"
91
- → <script> (encode)
92
- ```
93
-
94
- ### Hashing
95
-
96
- ```
97
- SHA-256 hash of "password123"
98
- → ef92b778bafe771e89b862eebf... (hash)
99
-
100
- MD5 of "hello world"
101
- → 5eb63bbbe01eeed093cb22bb8f5acdc3 (hash)
102
-
103
- CRC32 checksum of "test"
104
- → d87f7e0c (hash)
105
- ```
106
-
107
- ## Date & Time
108
-
109
- ### Current Time
110
-
111
- ```
112
- What time is it in New York?
113
- → 2026-02-10T19:00:00-05:00 (datetime)
114
-
115
- What time is it in Tokyo?
116
- → 2026-02-11T09:00:00+09:00 (datetime)
117
-
118
- What's the current UNIX timestamp?
119
- → 1707638400 (datetime)
120
- ```
121
-
122
- ### Date Arithmetic
123
-
124
- ```
125
- What's 100 days after 2026-02-11?
126
- → 2026-05-22 (date)
127
-
128
- What's 30 days before 2026-03-01?
129
- → 2026-01-30 (date)
130
-
131
- Add 6 months to 2026-01-15
132
- → 2026-07-15 (date)
133
- ```
134
-
135
- ### Date Differences
136
-
137
- ```
138
- How many days between 2026-01-01 and 2026-12-31?
139
- → 364 days (date)
140
-
141
- Difference in months between 2025-01-01 and 2026-01-01
142
- → 12 months (date)
143
- ```
144
-
145
- ### Weekdays
146
-
147
- ```
148
- What day of the week is 2026-02-11?
149
- → Wednesday (水曜日) (date)
150
- ```
151
-
152
- ### Cron Expressions
153
-
154
- ```
155
- When does "30 9 * * 1-5" run?
156
- → Mon–Fri at 9:30 (cron_parse)
157
-
158
- Parse "0 0 1 * *"
159
- → Monthly on the 1st at midnight (cron_parse)
160
-
161
- Next 5 runs of "*/15 * * * *"
162
- → Every 15 minutes: 10:00, 10:15, 10:30... (cron_parse)
163
- ```
164
-
165
- ## Generation
166
-
167
- ### UUIDs
168
-
169
- ```
170
- Generate a UUID v4
171
- → 550e8400-e29b-41d4-a716-446655440000 (random)
172
-
173
- Generate a UUID v7 (time-ordered)
174
- → 019c4b54-aad2-7e52-8a3b-... (random)
175
-
176
- Generate a ULID
177
- → 01HN8B6ZK9PQRSTVWXY0123456 (random)
178
- ```
179
-
180
- ### Passwords
181
-
182
- ```
183
- Generate a 20-character password
184
- → hT9jZDojX6sHRJt8vaKS (random)
185
-
186
- Generate a readable password (no ambiguous chars)
187
- → rTbPkWnF8sHuDxYz (random)
188
-
189
- Generate a 16-char password with only letters and numbers
190
- → aB3dE5fG7hJ9kL2m (random)
191
-
192
- Generate a password without symbols
193
- → xYz4AbC8DeFgHiJk (random)
194
- ```
195
-
196
- ### Random Numbers
197
-
198
- ```
199
- Random number between 1 and 100
200
- → 42 (random)
201
-
202
- Random number between 1 and 6 (dice roll)
203
- → 4 (random)
204
- ```
205
-
206
- ### Shuffle
207
-
208
- ```
209
- Shuffle ["Alice", "Bob", "Charlie"]
210
- → ["Charlie", "Alice", "Bob"] (random)
211
-
212
- Randomize order: ["A", "B", "C", "D", "E"]
213
- → ["D", "A", "E", "B", "C"] (random)
214
- ```
215
-
216
- ## Conversion
217
-
218
- ### Length
219
-
220
- ```
221
- 100 miles in kilometers?
222
- → 160.93 km (convert)
223
-
224
- 5 feet in meters?
225
- → 1.524 m (convert)
226
- ```
227
-
228
- ### Temperature
229
-
230
- ```
231
- 72°F in Celsius?
232
- → 22.22°C (convert)
233
-
234
- 100°C in Fahrenheit?
235
- → 212°F (convert)
236
-
237
- 300 Kelvin in Celsius?
238
- → 26.85°C (convert)
239
- ```
240
-
241
- ### Weight
242
-
243
- ```
244
- 10 pounds in kilograms?
245
- → 4.536 kg (convert)
246
-
247
- 500 grams in ounces?
248
- → 17.637 oz (convert)
249
- ```
250
-
251
- ### Area (including Japanese units)
252
-
253
- ```
254
- 10 tsubo in square meters?
255
- → 33.06 m² (convert)
256
-
257
- 100 m² in tatami?
258
- → 60.5 tatami (convert)
259
-
260
- 1 acre in square meters?
261
- → 4046.86 m² (convert)
262
- ```
263
-
264
- ### Data
265
-
266
- ```
267
- 5 GB in megabytes?
268
- → 5120 MB (convert)
269
-
270
- 1000 kilobytes in bits?
271
- → 8192000 bits (convert)
272
- ```
273
-
274
- ### Time
275
-
276
- ```
277
- 3600 seconds in hours?
278
- → 1 hour (convert)
279
-
280
- 2 weeks in days?
281
- → 14 days (convert)
282
-
283
- 1000000 milliseconds in minutes?
284
- → 16.667 minutes (convert)
285
- ```
286
-
287
- ## Analysis & Parsing
288
-
289
- ### Regular Expressions
290
-
291
- ```
292
- Extract numbers from "abc123def456"
293
- → ["123", "456"] (regex)
294
-
295
- Does "hello@example.com" match an email pattern?
296
- → true (regex)
297
-
298
- Replace all spaces with dashes in "hello world"
299
- → "hello-world" (regex)
300
- ```
301
-
302
- ### Text Diff
303
-
304
- ```
305
- Edit distance: "kitten" → "sitting"
306
- → 3 (diff)
307
-
308
- Line diff between two code snippets
309
- → - old line
310
- → + new line
311
- → unchanged line
312
- (diff)
313
- ```
314
-
315
- ### IP Addresses
316
-
317
- ```
318
- IP range of 192.168.1.0/24?
319
- → 192.168.1.1 – .254 (254 hosts) (ip)
320
-
321
- Is 192.168.1.50 in 192.168.1.0/24?
322
- → true (ip)
323
-
324
- Parse IPv6 address 2001:db8::1
325
- → { version: 6, address: "2001:0db8:0000:..." } (ip)
326
- ```
327
-
328
- ### Colors
329
-
330
- ```
331
- Convert #FF5733 to RGB
332
- → rgb(255, 87, 51) (color)
333
-
334
- Convert rgb(100, 200, 50) to HSL
335
- → hsl(100, 60%, 49%) (color)
336
-
337
- Convert hsl(120, 100%, 50%) to HEX
338
- → #00FF00 (color)
339
- ```
340
-
341
- ### Semver
342
-
343
- ```
344
- Does 1.5.3 satisfy ^1.0.0?
345
- → true (semver)
346
-
347
- Compare 2.0.0 and 1.9.9
348
- → 2.0.0 is greater (semver)
349
-
350
- Is "1.2.3-beta.1" a valid semver?
351
- → true (semver)
352
- ```
353
-
354
- ## Decode & Parse
355
-
356
- ### JSON Validation
357
-
358
- ```
359
- Is '{"name":"test"}' valid JSON?
360
- → valid, object, keys: ["name"] (json_validate)
361
-
362
- Validate CSV with 3 columns
363
- → valid, 10 rows, 3 columns (json_validate)
364
-
365
- Is this valid XML? (XML input)
366
- → valid (json_validate)
367
- ```
368
-
369
- ### JWT Decoding
370
-
371
- ```
372
- Decode this JWT: eyJhbGci...
373
- → {
374
- header: { alg: "HS256", typ: "JWT" },
375
- payload: { sub: "1234567890", name: "John Doe" }
376
- }
377
- (jwt_decode)
378
- ```
379
-
380
- ### URL Parsing
381
-
382
- ```
383
- Parse https://example.com/search?q=hello&lang=en
384
- → {
385
- host: "example.com",
386
- pathname: "/search",
387
- searchParams: { q: "hello", lang: "en" }
388
- }
389
- (url_parse)
390
-
391
- Extract query params from https://api.github.com/search?q=mcp&sort=stars
392
- → { q: "mcp", sort: "stars" } (url_parse)
393
- ```
394
-
395
- ### Unicode Info
396
-
397
- ```
398
- Unicode info for "€"
399
- → U+20AC, Currency Symbols (char_info)
400
-
401
- What's the code point for "🌍"?
402
- → U+1F30D, Miscellaneous Symbols and Pictographs (char_info)
403
-
404
- Character info for "あ"
405
- → U+3042, Hiragana (char_info)
406
- ```
407
-
408
- ---
409
-
410
- ## Tips for Natural Language Queries
411
-
412
- The AI automatically selects the right tool based on your question. For best results:
413
-
414
- 1. **Be specific** — "Convert 100°F to Celsius" is better than "temperature conversion"
415
- 2. **Include units** — "5 miles in km" is clearer than "5 miles"
416
- 3. **Use examples** — "Extract numbers from 'abc123'" shows what you want
417
- 4. **Ask naturally** — The AI understands conversational queries
418
-
419
- Try asking in your own words — the AI will figure it out! 🚀
package/docs/index.md DELETED
@@ -1,101 +0,0 @@
1
- ---
2
- layout: home
3
-
4
- hero:
5
- name: Calc MCP
6
- text: 21 tools for things AI is bad at
7
- tagline: Deterministic math, cryptographic randomness, accurate date arithmetic, encoding, hashing, and more
8
- actions:
9
- - theme: brand
10
- text: Get Started
11
- link: /install
12
- - theme: alt
13
- text: View Tools
14
- link: /tools
15
- - theme: alt
16
- text: GitHub
17
- link: https://github.com/coo-quack/calc-mcp
18
-
19
- features:
20
- - icon: 🧮
21
- title: Precise Math
22
- details: No more hallucinated calculations. Evaluate complex expressions with mathjs, compute statistics, all deterministic.
23
- - icon: 🎲
24
- title: True Randomness
25
- details: Cryptographically secure UUIDs, ULIDs, passwords, and shuffling. No fake random numbers from AI.
26
- - icon: 📅
27
- title: Accurate Dates
28
- details: Timezone conversion, date arithmetic, cron parsing. No more guessing what day it is 100 days from now.
29
- - icon: 🔐
30
- title: Hashing & Encoding
31
- details: SHA-256, Base64, URL encoding, JWT decoding. Real cryptographic operations, not hallucinated hashes.
32
- - icon: 🌈
33
- title: Conversions
34
- details: 8 categories, 72 units. Length, weight, temperature, area, volume, speed, data, time. Including Japanese units (tsubo, tatami).
35
- - icon: 🔍
36
- title: Parsing & Validation
37
- details: IP addresses, URLs, JSON, semver, Luhn checksums. Deterministic validation and parsing.
38
- ---
39
-
40
- ## Why Calc MCP?
41
-
42
- LLMs are incredible at natural language understanding, but terrible at things that require **precision**.
43
-
44
- | AI alone | With calc-mcp |
45
- |----------|---------------|
46
- | "10 + 34 × 341 ÷ 23 = 507.8" ❌ | `514.087` ✅ (math) |
47
- | "Here's a UUID: 550e8400-..." 🤷 fake | Cryptographically random UUID v4/v7 ✅ (random) |
48
- | "100 days from now is..." 🤔 guess | `2026-05-22` ✅ (date) |
49
- | "SHA-256 of password123 is..." 💀 hallucinated | `ef92b778bafe...` ✅ (hash) |
50
-
51
- Calc MCP gives your AI assistant the tools to **delegate** these tasks to deterministic, tested code.
52
-
53
- ## Quick Start
54
-
55
- ```bash
56
- # Claude Code
57
- claude mcp add -s user calc-mcp -- npx -y @coo-quack/calc-mcp
58
- ```
59
-
60
- Works with **Claude Desktop**, **VS Code Copilot**, **Cursor**, **Windsurf** — see [installation guides](/install).
61
-
62
- ## Usage
63
-
64
- Just ask in natural language. The AI picks the right tool automatically:
65
-
66
- ```
67
- You: What's 10 + 34 × 341 ÷ 23?
68
- AI: [uses math tool] → 514.087
69
-
70
- You: Generate a UUID v7
71
- AI: [uses random tool] → 019c4b54-aad2-7e52-8a3b-...
72
-
73
- You: What's 100 days after 2026-02-11?
74
- AI: [uses date tool] → 2026-05-22
75
-
76
- You: SHA-256 hash of "password123"
77
- AI: [uses hash tool] → ef92b778bafe771e89b862eebf...
78
- ```
79
-
80
- See more [examples →](/examples)
81
-
82
- ## All 21 Tools
83
-
84
- | Category | Tools |
85
- |----------|-------|
86
- | **Math** | math, count, convert, base |
87
- | **Random** | random (UUID, ULID, password, number, shuffle) |
88
- | **Dates** | datetime, date, cron_parse |
89
- | **Text** | base64, encode, hash, regex, diff, char_info |
90
- | **Validation** | json_validate, luhn, semver |
91
- | **Parsing** | ip, color, jwt_decode, url_parse |
92
-
93
- [View all tools →](/tools)
94
-
95
- ## Features
96
-
97
- - ✅ **21 MCP tools** covering calculations, randomness, dates, encoding, parsing
98
- - ✅ **Tested** — 194 tests, 280 assertions, 92%+ coverage
99
- - ✅ **Fast** — Pure JavaScript/TypeScript, no heavy dependencies
100
- - ✅ **Cross-platform** — Works with Claude Desktop, VS Code, Cursor, Windsurf
101
- - ✅ **MIT Licensed** — Free to use, modify, distribute
package/docs/install.md DELETED
@@ -1,163 +0,0 @@
1
- # Installation
2
-
3
- Calc MCP works with any MCP-compatible client. Below are setup guides for popular AI assistants.
4
-
5
- ## Claude Code
6
-
7
- The fastest way to add Calc MCP to Claude Code:
8
-
9
- ```bash
10
- claude mcp add -s user calc-mcp -- npx --prefix /tmp -y @coo-quack/calc-mcp
11
- ```
12
-
13
- This adds the server to your user config (`~/.config/openclaw/config.yml`).
14
-
15
- To verify it's working:
16
-
17
- ```bash
18
- claude mcp list
19
- ```
20
-
21
- You should see `calc-mcp` in the list.
22
-
23
- ## Claude Desktop
24
-
25
- Add to your Claude Desktop config file:
26
-
27
- **macOS:**
28
- ```bash
29
- ~/Library/Application Support/Claude/claude_desktop_config.json
30
- ```
31
-
32
- **Windows:**
33
- ```bash
34
- %APPDATA%\Claude\claude_desktop_config.json
35
- ```
36
-
37
- **Config:**
38
- ```json
39
- {
40
- "mcpServers": {
41
- "calc-mcp": {
42
- "command": "npx",
43
- "args": ["--prefix", "/tmp", "-y", "@coo-quack/calc-mcp"]
44
- }
45
- }
46
- }
47
- ```
48
-
49
- After editing, restart Claude Desktop. You should see "MCP" in the bottom-right corner with the 21 tools available.
50
-
51
- ## Cursor
52
-
53
- Add to `~/.cursor/mcp.json`:
54
-
55
- ```json
56
- {
57
- "mcpServers": {
58
- "calc-mcp": {
59
- "command": "npx",
60
- "args": ["--prefix", "/tmp", "-y", "@coo-quack/calc-mcp"]
61
- }
62
- }
63
- }
64
- ```
65
-
66
- Restart Cursor after adding the config.
67
-
68
- ## Windsurf
69
-
70
- Add to `~/.codeium/windsurf/mcp_config.json`:
71
-
72
- ```json
73
- {
74
- "mcpServers": {
75
- "calc-mcp": {
76
- "command": "npx",
77
- "args": ["--prefix", "/tmp", "-y", "@coo-quack/calc-mcp"]
78
- }
79
- }
80
- }
81
- ```
82
-
83
- Restart Windsurf after adding the config.
84
-
85
- ## VS Code (GitHub Copilot)
86
-
87
- For workspace-specific setup, add `.vscode/mcp.json` in your project:
88
-
89
- ```json
90
- {
91
- "servers": {
92
- "calc-mcp": {
93
- "command": "npx",
94
- "args": ["--prefix", "/tmp", "-y", "@coo-quack/calc-mcp"]
95
- }
96
- }
97
- }
98
- ```
99
-
100
- Reload VS Code after creating the file.
101
-
102
- ## Direct Usage
103
-
104
- You can also run the server directly for testing:
105
-
106
- ```bash
107
- npx --prefix /tmp -y @coo-quack/calc-mcp
108
- ```
109
-
110
- Or install globally:
111
-
112
- ```bash
113
- npm install -g @coo-quack/calc-mcp
114
- calc-mcp
115
- ```
116
-
117
- ## Troubleshooting
118
-
119
- ### "npx: command not found"
120
-
121
- Make sure Node.js (v18+) is installed:
122
-
123
- ```bash
124
- node --version
125
- npm --version
126
- ```
127
-
128
- Install from [nodejs.org](https://nodejs.org/) if needed.
129
-
130
- ### Tools not showing up
131
-
132
- 1. **Restart the app** after editing the config file
133
- 2. **Check the config path** — make sure you edited the right file
134
- 3. **Validate JSON** — use a JSON validator to check for syntax errors
135
- 4. **Check logs** — Claude Desktop and other apps may have logs showing connection errors
136
-
137
- ### "calc-mcp: command not found" inside a Node.js project
138
-
139
- If you run `npx` inside a directory that contains `node_modules`, npx may fail with:
140
-
141
- ```
142
- sh: calc-mcp: command not found
143
- ```
144
-
145
- This happens because npx resolves the scoped package locally but fails to link the binary correctly. All the examples on this page already include the fix (`--prefix /tmp`), which forces npx to use a separate directory for package resolution:
146
-
147
- ```bash
148
- npx --prefix /tmp -y @coo-quack/calc-mcp
149
- ```
150
-
151
- ### Version info
152
-
153
- To check the installed version:
154
-
155
- ```bash
156
- npx --prefix /tmp @coo-quack/calc-mcp --version
157
- ```
158
-
159
- ## Next Steps
160
-
161
- - [View all tools →](/tools)
162
- - [See examples →](/examples)
163
- - [Read the changelog →](/changelog)
@@ -1,79 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="512" height="512">
2
- <defs>
3
- <!-- Background gradient -->
4
- <linearGradient id="bgGrad" x1="0" y1="0" x2="1" y2="1">
5
- <stop offset="0%" stop-color="#5CB85C"/>
6
- <stop offset="100%" stop-color="#2E7D32"/>
7
- </linearGradient>
8
- <!-- Calculator body gradient -->
9
- <linearGradient id="bodyGrad" x1="0" y1="0" x2="0" y2="1">
10
- <stop offset="0%" stop-color="#FDFDFD"/>
11
- <stop offset="100%" stop-color="#E8E8E8"/>
12
- </linearGradient>
13
- <!-- Display gradient -->
14
- <linearGradient id="displayGrad" x1="0" y1="0" x2="0" y2="1">
15
- <stop offset="0%" stop-color="#1A1A2E"/>
16
- <stop offset="100%" stop-color="#16213E"/>
17
- </linearGradient>
18
- <!-- Green button gradient -->
19
- <linearGradient id="greenBtn" x1="0" y1="0" x2="0" y2="1">
20
- <stop offset="0%" stop-color="#6ABF47"/>
21
- <stop offset="100%" stop-color="#4A8C2A"/>
22
- </linearGradient>
23
- <!-- Orange button gradient -->
24
- <linearGradient id="orangeBtn" x1="0" y1="0" x2="0" y2="1">
25
- <stop offset="0%" stop-color="#FF8C42"/>
26
- <stop offset="100%" stop-color="#E8621A"/>
27
- </linearGradient>
28
- <!-- Gray button gradient -->
29
- <linearGradient id="grayBtn" x1="0" y1="0" x2="0" y2="1">
30
- <stop offset="0%" stop-color="#E0E0E0"/>
31
- <stop offset="100%" stop-color="#BDBDBD"/>
32
- </linearGradient>
33
- <!-- Accent green button -->
34
- <linearGradient id="accentBtn" x1="0" y1="0" x2="0" y2="1">
35
- <stop offset="0%" stop-color="#4CAF50"/>
36
- <stop offset="100%" stop-color="#2E7D32"/>
37
- </linearGradient>
38
- <!-- Shadow filter -->
39
- <filter id="shadow" x="-10%" y="-10%" width="130%" height="130%">
40
- <feDropShadow dx="0" dy="4" stdDeviation="8" flood-color="#000" flood-opacity="0.3"/>
41
- </filter>
42
- <filter id="btnShadow" x="-20%" y="-20%" width="140%" height="160%">
43
- <feDropShadow dx="0" dy="2" stdDeviation="3" flood-color="#000" flood-opacity="0.15"/>
44
- </filter>
45
- <filter id="innerGlow">
46
- <feDropShadow dx="0" dy="1" stdDeviation="1" flood-color="#FFF" flood-opacity="0.3"/>
47
- </filter>
48
- </defs>
49
-
50
- <!-- Background rounded square -->
51
- <rect x="0" y="0" width="512" height="512" rx="96" ry="96" fill="url(#bgGrad)"/>
52
- <!-- Subtle highlight on top-left -->
53
- <rect x="0" y="0" width="512" height="256" rx="96" ry="96" fill="url(#bgGrad)" opacity="0.15" style="filter: blur(2px)"/>
54
-
55
- <!-- Calculator body -->
56
- <rect x="88" y="64" width="336" height="400" rx="36" ry="36" fill="url(#bodyGrad)" filter="url(#shadow)"/>
57
-
58
- <!-- Display -->
59
- <rect x="116" y="92" width="280" height="88" rx="16" ry="16" fill="url(#displayGrad)"/>
60
- <!-- Display dots -->
61
- <circle cx="336" cy="136" r="4" fill="#4A5568" opacity="0.6"/>
62
- <circle cx="356" cy="136" r="4" fill="#4A5568" opacity="0.6"/>
63
- <circle cx="376" cy="136" r="4" fill="#48BB78"/>
64
-
65
- <!-- Row 1: Green, Green, Orange -->
66
- <rect x="116" y="204" width="76" height="60" rx="14" ry="14" fill="url(#greenBtn)" filter="url(#btnShadow)"/>
67
- <rect x="218" y="204" width="76" height="60" rx="14" ry="14" fill="url(#greenBtn)" filter="url(#btnShadow)"/>
68
- <rect x="320" y="204" width="76" height="60" rx="14" ry="14" fill="url(#orangeBtn)" filter="url(#btnShadow)"/>
69
-
70
- <!-- Row 2: Gray, Gray, Orange -->
71
- <rect x="116" y="284" width="76" height="60" rx="14" ry="14" fill="url(#grayBtn)" filter="url(#btnShadow)"/>
72
- <rect x="218" y="284" width="76" height="60" rx="14" ry="14" fill="url(#grayBtn)" filter="url(#btnShadow)"/>
73
- <rect x="320" y="284" width="76" height="60" rx="14" ry="14" fill="url(#orangeBtn)" filter="url(#btnShadow)"/>
74
-
75
- <!-- Row 3: Gray, Gray, Accent Green -->
76
- <rect x="116" y="364" width="76" height="60" rx="14" ry="14" fill="url(#grayBtn)" filter="url(#btnShadow)"/>
77
- <rect x="218" y="364" width="76" height="60" rx="14" ry="14" fill="url(#grayBtn)" filter="url(#btnShadow)"/>
78
- <rect x="320" y="364" width="76" height="60" rx="14" ry="14" fill="url(#accentBtn)" filter="url(#btnShadow)"/>
79
- </svg>
package/docs/tools.md DELETED
@@ -1,427 +0,0 @@
1
- # All Tools
2
-
3
- Calc MCP provides 21 tools for operations that AI models struggle with. Each tool is designed to be called automatically by your AI assistant when you ask questions in natural language.
4
-
5
- ## Math & Numbers
6
-
7
- ### math
8
-
9
- Evaluate mathematical expressions or compute statistics on numbers.
10
-
11
- **Parameters:**
12
- - `expression` (string, optional) — Math expression to evaluate
13
- - `action` (enum, optional) — `eval` (default) or `statistics`
14
- - `values` (array of numbers, optional) — Array of numbers for statistics
15
-
16
- **Examples:**
17
- ```
18
- What's 10 + 34 × 341 ÷ 23?
19
- → 514.087
20
-
21
- Calculate mean and stddev of [1, 2, 3, 4, 5]
22
- → { mean: 3, median: 3, stddev: 1.414, ... }
23
- ```
24
-
25
- ### count
26
-
27
- Count characters (grapheme-aware), words, lines, and bytes in text.
28
-
29
- **Parameters:**
30
- - `text` (string) — Text to analyze
31
- - `encoding` (enum, optional) — `utf8` (default) or `shift_jis` for byte count
32
-
33
- **Examples:**
34
- ```
35
- How many characters in "Hello, World! 🌍"?
36
- → 15 chars, 18 bytes
37
-
38
- Count words in "The quick brown fox"
39
- → 4 words
40
- ```
41
-
42
- ### base
43
-
44
- Convert numbers between different bases (2–36).
45
-
46
- **Parameters:**
47
- - `value` (string | number) — Value to convert
48
- - `from` (number) — Source base (2–36)
49
- - `to` (number) — Target base (2–36)
50
-
51
- **Examples:**
52
- ```
53
- Convert 255 to binary
54
- → 11111111
55
-
56
- Convert FF from hex to decimal
57
- → 255
58
- ```
59
-
60
- ### convert
61
-
62
- Convert between units across 8 categories: length, weight, temperature, area, volume, speed, data, time.
63
-
64
- **Parameters:**
65
- - `value` (number) — Value to convert
66
- - `from` (string) — Source unit
67
- - `to` (string) — Target unit
68
- - `category` (enum, optional) — Category (auto-detected if omitted)
69
-
70
- **Supported units:**
71
- - **Length:** m, km, cm, mm, in, ft, yd, mi, nm, um
72
- - **Weight:** kg, g, mg, lb, oz, t, st
73
- - **Temperature:** c, f, k (Celsius, Fahrenheit, Kelvin)
74
- - **Area:** m2, km2, cm2, ha, acre, ft2, in2, tsubo, jo, tatami
75
- - **Volume:** l, ml, m3, gal, qt, pt, cup, floz, tbsp, tsp
76
- - **Speed:** m/s, km/h, mph, kn, ft/s
77
- - **Data:** b, kb, mb, gb, tb, pb, bit, kbit, mbit
78
- - **Time:** ms, s, min, h, d, wk, mo, yr
79
-
80
- **Examples:**
81
- ```
82
- 100 miles in kilometers?
83
- → 160.93 km
84
-
85
- 72°F in Celsius?
86
- → 22.22°C
87
-
88
- 10 tsubo in square meters?
89
- → 33.06 m²
90
- ```
91
-
92
- ## Random Generation
93
-
94
- ### random
95
-
96
- Generate cryptographically random values: UUID, ULID, password, number, or shuffle a list.
97
-
98
- **Parameters:**
99
- - `type` (enum) — `uuid`, `ulid`, `password`, `number`, or `shuffle`
100
- - `uuidVersion` (enum, optional) — `v4` (random, default) or `v7` (time-ordered)
101
- - `length` (number, optional) — Length for password (default: 16, max: 256)
102
- - `min` (number, optional) — Minimum value for number (default: 0)
103
- - `max` (number, optional) — Maximum value for number (default: 100)
104
- - `charset` (string, optional) — Custom character set for password
105
- - `uppercase` (boolean, optional) — Include uppercase letters (default: true)
106
- - `numbers` (boolean, optional) — Include numbers (default: true)
107
- - `symbols` (boolean, optional) — Include symbols (default: true)
108
- - `excludeChars` (string, optional) — Characters to exclude (e.g., `"\\|{}"`)
109
- - `readable` (boolean, optional) — Exclude ambiguous characters (l/1/I/O/0/o)
110
- - `items` (array of strings, optional) — Items to shuffle (for `type=shuffle`)
111
-
112
- **Examples:**
113
- ```
114
- Generate a UUID v7
115
- → 019c4b54-aad2-7e52-8a3b-...
116
-
117
- Generate a readable 20-char password
118
- → hT9jZDojX6sHRJt8vaKS
119
-
120
- Shuffle ["Alice", "Bob", "Charlie"]
121
- → ["Charlie", "Alice", "Bob"]
122
-
123
- Random number between 1 and 100
124
- → 42
125
- ```
126
-
127
- ## Date & Time
128
-
129
- ### datetime
130
-
131
- Get current time, convert timezones, format datetime, or work with UNIX timestamps.
132
-
133
- **Parameters:**
134
- - `action` (enum) — `now`, `convert`, `format`, or `timestamp`
135
- - `timezone` (string, optional) — IANA timezone (e.g., `Asia/Tokyo`, `America/New_York`)
136
- - `datetime` (string, optional) — ISO8601 datetime string for convert/format
137
- - `fromTimezone` (string, optional) — Source timezone for conversion
138
- - `toTimezone` (string, optional) — Target timezone for conversion
139
- - `format` (string, optional) — Output format: `iso`, `date`, `time`, `full`, or Intl options
140
- - `timestamp` (number, optional) — UNIX timestamp in seconds for timestamp action
141
-
142
- **Examples:**
143
- ```
144
- What time is it in New York?
145
- → 2026-02-10T19:00:00-05:00
146
-
147
- Convert 1609459200 to ISO8601
148
- → 2021-01-01T00:00:00Z
149
- ```
150
-
151
- ### date
152
-
153
- Perform date arithmetic: difference, add/subtract, get weekday, or convert to wareki (Japanese era).
154
-
155
- **Parameters:**
156
- - `action` (enum) — `diff`, `add`, `weekday`, or `wareki`
157
- - `date` (string) — Date string (ISO8601)
158
- - `date2` (string, optional) — Second date for diff
159
- - `amount` (number, optional) — Amount to add
160
- - `unit` (enum, optional) — `days`, `months`, `years`, `hours`, `minutes`
161
-
162
- **Examples:**
163
- ```
164
- What's 100 days after 2026-02-11?
165
- → 2026-05-22
166
-
167
- Difference between 2026-01-01 and 2026-12-31
168
- → 364 days
169
-
170
- What day of the week is 2026-02-11?
171
- → Wednesday (水曜日)
172
- ```
173
-
174
- ### cron_parse
175
-
176
- Parse cron expressions into human-readable descriptions and get next occurrences.
177
-
178
- **Parameters:**
179
- - `expression` (string) — Cron expression (5 fields: min hour dom mon dow)
180
- - `count` (number, optional) — Number of next occurrences to return (default: 5)
181
- - `timezone` (string, optional) — IANA timezone (default: UTC)
182
-
183
- **Examples:**
184
- ```
185
- When does "30 9 * * 1-5" run?
186
- → Mon–Fri at 9:30, next runs: ...
187
- ```
188
-
189
- ## Text Processing
190
-
191
- ### hash
192
-
193
- Compute cryptographic hashes: MD5, SHA-1, SHA-256, SHA-512, CRC32.
194
-
195
- **Parameters:**
196
- - `input` (string) — String to hash
197
- - `algorithm` (enum) — `md5`, `sha1`, `sha256`, `sha512`, or `crc32`
198
-
199
- **Examples:**
200
- ```
201
- SHA-256 hash of "password123"
202
- → ef92b778bafe771e89b862eebf...
203
-
204
- MD5 of "hello world"
205
- → 5eb63bbbe01eeed093cb22bb8f5acdc3
206
- ```
207
-
208
- ### base64
209
-
210
- Encode or decode Base64 strings.
211
-
212
- **Parameters:**
213
- - `input` (string) — String to encode or decode
214
- - `action` (enum) — `encode` or `decode`
215
-
216
- **Examples:**
217
- ```
218
- Base64 encode "Hello World"
219
- → SGVsbG8gV29ybGQ=
220
-
221
- Base64 decode "eyJhbGciOiJIUzI1NiJ9"
222
- → {"alg":"HS256"}
223
- ```
224
-
225
- ### encode
226
-
227
- URL, HTML entity, or Unicode escape encoding/decoding.
228
-
229
- **Parameters:**
230
- - `input` (string) — String to encode or decode
231
- - `action` (enum) — `encode` or `decode`
232
- - `type` (enum) — `url`, `html`, or `unicode`
233
-
234
- **Examples:**
235
- ```
236
- URL-encode "hello world"
237
- → hello%20world
238
-
239
- HTML-decode "&lt;script&gt;"
240
- → <script>
241
- ```
242
-
243
- ### regex
244
-
245
- Test, match, or replace with regular expressions.
246
-
247
- **Parameters:**
248
- - `pattern` (string) — Regular expression pattern
249
- - `flags` (string, optional) — Regex flags (g, i, m, etc.)
250
- - `text` (string) — Text to search
251
- - `action` (enum) — `match`, `test`, `replace`, or `matchAll`
252
- - `replacement` (string, optional) — Replacement string for replace
253
-
254
- **Examples:**
255
- ```
256
- Extract numbers from "abc123def456"
257
- → ["123", "456"]
258
-
259
- Replace all spaces with dashes in "hello world"
260
- → "hello-world"
261
- ```
262
-
263
- ### diff
264
-
265
- Line diff or Levenshtein distance between two texts.
266
-
267
- **Parameters:**
268
- - `text1` (string) — First text
269
- - `text2` (string) — Second text
270
- - `action` (enum, optional) — `diff` (line diff, default) or `distance` (Levenshtein)
271
-
272
- **Examples:**
273
- ```
274
- Edit distance: "kitten" → "sitting"
275
- → 3
276
-
277
- Line diff between two texts
278
- → - old line
279
- → + new line
280
- ```
281
-
282
- ### char_info
283
-
284
- Get Unicode information about characters.
285
-
286
- **Parameters:**
287
- - `char` (string) — Character(s) to get info about
288
-
289
- **Examples:**
290
- ```
291
- Unicode info for "€"
292
- → U+20AC, Currency Symbols
293
-
294
- What's the code point for "🌍"?
295
- → U+1F30D, Miscellaneous Symbols and Pictographs
296
- ```
297
-
298
- ## Validation & Parsing
299
-
300
- ### json_validate
301
-
302
- Validate JSON, CSV, XML, or YAML format.
303
-
304
- **Parameters:**
305
- - `input` (string) — String to validate/parse
306
- - `format` (enum) — `json`, `csv`, `xml`, or `yaml`
307
-
308
- **Examples:**
309
- ```
310
- Is '{"name":"test"}' valid JSON?
311
- → valid, object, keys: ["name"]
312
-
313
- Validate CSV with 3 columns
314
- → valid, 10 rows, 3 columns
315
- ```
316
-
317
- ### luhn
318
-
319
- Validate or generate Luhn check digits (credit cards, etc.).
320
-
321
- **Parameters:**
322
- - `number` (string) — Number string to validate or generate check digit for
323
- - `action` (enum, optional) — `validate` (default) or `generate`
324
-
325
- **Examples:**
326
- ```
327
- Is 4539578763621486 a valid card number?
328
- → true
329
-
330
- Generate check digit for 453957876362148
331
- → 6
332
- ```
333
-
334
- ### semver
335
-
336
- Semantic versioning operations: compare, validate, or check range satisfaction.
337
-
338
- **Parameters:**
339
- - `action` (enum) — `compare`, `valid`, or `satisfies`
340
- - `version` (string) — Semver version string
341
- - `version2` (string, optional) — Second version for compare
342
- - `range` (string, optional) — Version range for satisfies (e.g., `^1.0.0`)
343
-
344
- **Examples:**
345
- ```
346
- Does 1.5.3 satisfy ^1.0.0?
347
- → true
348
-
349
- Compare 2.0.0 and 1.9.9
350
- → 2.0.0 is greater
351
- ```
352
-
353
- ### ip
354
-
355
- IPv4/IPv6 address information, CIDR range calculations, and membership checks.
356
-
357
- **Parameters:**
358
- - `action` (enum) — `info`, `contains`, or `range`
359
- - `ip` (string, optional) — IP address
360
- - `cidr` (string, optional) — CIDR notation (e.g., `192.168.1.0/24`)
361
- - `target` (string, optional) — Target IP to check against CIDR
362
-
363
- **Examples:**
364
- ```
365
- IP range of 192.168.1.0/24?
366
- → 192.168.1.1 – .254 (254 hosts)
367
-
368
- Is 192.168.1.50 in 192.168.1.0/24?
369
- → true
370
- ```
371
-
372
- ### color
373
-
374
- Convert between color formats: HEX ↔ RGB ↔ HSL.
375
-
376
- **Parameters:**
377
- - `color` (string) — Color value: `#hex`, `rgb(r,g,b)`, or `hsl(h,s%,l%)`
378
- - `to` (enum, optional) — `hex`, `rgb`, or `hsl` (returns all if omitted)
379
-
380
- **Examples:**
381
- ```
382
- Convert #FF5733 to RGB
383
- → rgb(255, 87, 51)
384
-
385
- Convert rgb(100, 200, 50) to HSL
386
- → hsl(100, 60%, 49%)
387
- ```
388
-
389
- ### jwt_decode
390
-
391
- Decode JWT tokens (header + payload, no signature verification).
392
-
393
- **Parameters:**
394
- - `token` (string) — JWT token to decode
395
-
396
- **Examples:**
397
- ```
398
- Decode this JWT: eyJhbGci...
399
- → { header: { alg: "HS256" }, payload: { name: "John Doe" } }
400
- ```
401
-
402
- ### url_parse
403
-
404
- Parse URLs into components.
405
-
406
- **Parameters:**
407
- - `url` (string) — URL to parse
408
-
409
- **Examples:**
410
- ```
411
- Parse https://example.com/search?q=hello
412
- → host: example.com, pathname: /search, q: "hello"
413
- ```
414
-
415
- ---
416
-
417
- ## Tool Categories Summary
418
-
419
- | Category | Count | Tools |
420
- |----------|-------|-------|
421
- | Math & Numbers | 4 | math, count, base, convert |
422
- | Random | 1 | random (5 types) |
423
- | Date & Time | 3 | datetime, date, cron_parse |
424
- | Text Processing | 6 | hash, base64, encode, regex, diff, char_info |
425
- | Validation & Parsing | 7 | json_validate, luhn, semver, ip, color, jwt_decode, url_parse |
426
-
427
- **Total: 21 tools**