@coo-quack/calc-mcp 1.7.2 β†’ 1.8.0

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/README.md CHANGED
@@ -3,10 +3,14 @@
3
3
  [![npm version](https://img.shields.io/npm/v/@coo-quack/calc-mcp)](https://www.npmjs.com/package/@coo-quack/calc-mcp)
4
4
  [![CI](https://github.com/coo-quack/calc-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/coo-quack/calc-mcp/actions/workflows/ci.yml)
5
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
-
6
+ <br />
7
+ <br />
8
+ <img width="1220" height="942" alt="Screenshot 2026-02-14 at 18 28 43" src="https://github.com/user-attachments/assets/364d3148-4c56-4b50-b504-28cc1de654ac" />
9
+ <br />
10
+ <br />
7
11
  πŸ“– **[Documentation](https://coo-quack.github.io/calc-mcp/)** β€” Full tool reference, examples, and install guides.
8
12
 
9
- **21 tools for things AI is bad at** β€” deterministic math, cryptographic randomness, accurate date arithmetic, encoding, hashing, and more.
13
+ **21 tools for things AI is not good at** β€” deterministic math, cryptographic randomness, accurate date arithmetic, encoding, hashing, and more.
10
14
 
11
15
  LLMs hallucinate calculations, can't generate true random numbers, and struggle with timezones. This MCP server fixes that.
12
16
 
@@ -20,18 +24,24 @@ claude mcp add -s user calc-mcp -- npx --prefix /tmp -y @coo-quack/calc-mcp@late
20
24
  npx --prefix /tmp -y @coo-quack/calc-mcp@latest
21
25
  ```
22
26
 
23
- > Works with Claude Desktop, VS Code Copilot, Cursor, Windsurf β€” [setup guides below](#install).
27
+ > Works with Claude Desktop, VS Code Copilot, Cursor, Windsurf, and any MCP client β€” [setup guides below](#install).
24
28
 
25
29
  ---
26
30
 
27
31
  ## Why?
28
32
 
29
- | AI alone | With calc-mcp |
30
- |----------|---------------|
31
- | "10 + 34 Γ— 341 Γ· 23 = 507.8" ❌ | `514.087` βœ… (math) |
32
- | "Here's a UUID: 550e8400-..." 🀷 fake | Cryptographically random UUID v4/v7 βœ… (random) |
33
- | "100 days from now is..." πŸ€” guess | `2026-05-22` βœ… (date) |
34
- | "SHA-256 of password123 is..." πŸ’€ hallucinated | `ef92b778bafe...` βœ… (hash) |
33
+ | AI alone | With calc-mcp |
34
+ | ---------------------------------------------- | ----------------------------------------------- |
35
+ | "10 + 34 Γ— 341 Γ· 23 = 507.8" ❌ | `514.087` βœ… (math) |
36
+ | "Here's a UUID: 550e8400-..." 🀷 fake | Cryptographically random UUID v4/v7 βœ… (random) |
37
+ | "100 days from now is..." πŸ€” guess | `2026-05-22` βœ… (date) |
38
+ | "SHA-256 of password123 is..." πŸ’€ hallucinated | `ef92b778bafe...` βœ… (hash) |
39
+
40
+ - **Deterministic** β€” Same input, same correct output, every time
41
+ - **Secure** β€” Sandboxed math, ReDoS protection, weak hash warnings
42
+ - **Private** β€” All computation runs locally, no data sent to external services
43
+ - **Zero config** β€” Install once, just ask in natural language
44
+ - **No API key** β€” Works offline, no external dependencies
35
45
 
36
46
  ## Examples
37
47
 
@@ -39,91 +49,94 @@ Ask in natural language β€” the AI picks the right tool automatically.
39
49
 
40
50
  ### Math & Numbers
41
51
 
42
- | You ask | You get | Tool |
43
- |---------|---------|------|
44
- | What's 10 + 34 Γ— 341 Γ· 23? | `514.087` | math |
45
- | Convert 255 to binary | `11111111` | base |
46
- | Is 4539578763621486 a valid card number? | `true` | luhn |
52
+ | You ask | You get | Tool |
53
+ | ---------------------------------------- | ---------- | ---- |
54
+ | What's 10 + 34 Γ— 341 Γ· 23? | `514.087` | math |
55
+ | Convert 255 to binary | `11111111` | base |
56
+ | Is 4539578763621486 a valid card number? | `true` | luhn |
47
57
 
48
58
  ### Text & Encoding
49
59
 
50
- | You ask | You get | Tool |
51
- |---------|---------|------|
52
- | How many characters in "Hello, World! 🌍"? | `15 chars, 18 bytes` | count |
53
- | Base64 encode "Hello World" | `SGVsbG8gV29ybGQ=` | base64 |
54
- | Base64 decode "eyJhbGciOiJIUzI1NiJ9" | `{"alg":"HS256"}` | base64 |
55
- | URL-encode "hello world" | `hello%20world` | encode |
56
- | URL-decode "hello%20world" | `hello world` | encode |
57
- | HTML-decode `&lt;script&gt;` | `<script>` | encode |
58
- | SHA-256 hash of "password123" | `ef92b778bafe...` | hash |
60
+ | You ask | You get | Tool |
61
+ | ------------------------------------------ | -------------------- | ------ |
62
+ | How many characters in "Hello, World! 🌍"? | `15 chars, 18 bytes` | count |
63
+ | Base64 encode "Hello World" | `SGVsbG8gV29ybGQ=` | base64 |
64
+ | Base64 decode "eyJhbGciOiJIUzI1NiJ9" | `{"alg":"HS256"}` | base64 |
65
+ | URL-encode "hello world" | `hello%20world` | encode |
66
+ | URL-decode "hello%20world" | `hello world` | encode |
67
+ | HTML-decode `&lt;script&gt;` | `<script>` | encode |
68
+ | SHA-256 hash of "password123" | `ef92b778bafe...` | hash |
69
+ | HMAC-SHA256 of "message" with key "secret" | `8b5f48702995...` | hash |
59
70
 
60
71
  ### Date & Time
61
72
 
62
- | You ask | You get | Tool |
63
- |---------|---------|------|
64
- | What time is it in New York? | `2026-02-10T19:00:00-05:00` | datetime |
65
- | What's 100 days after 2026-02-11? | `2026-05-22` | date |
66
- | When does "30 9 * * 1-5" run? | `Mon–Fri at 9:30` | cron_parse |
73
+ | You ask | You get | Tool |
74
+ | --------------------------------- | --------------------------- | ---------- |
75
+ | What time is it in New York? | `2026-02-10T19:00:00-05:00` | datetime |
76
+ | What's 100 days after 2026-02-11? | `2026-05-22` | date |
77
+ | When does "30 9 \* \* 1-5" run? | `Mon–Fri at 9:30` | cron_parse |
67
78
 
68
79
  ### Generation
69
80
 
70
- | You ask | You get | Tool |
71
- |---------|---------|------|
72
- | Generate a UUID v7 | `019c4b54-aad2-7e52-...` | random |
73
- | Generate a readable 20-char password | `hT9jZDojX6sHRJt8vaKS` | random |
74
- | Shuffle ["Alice", "Bob", "Charlie"] | `["Charlie", "Alice", "Bob"]` | random |
81
+ | You ask | You get | Tool |
82
+ | ------------------------------------ | ----------------------------- | ------ |
83
+ | Generate a UUID v7 | `019c4b54-aad2-7e52-...` | random |
84
+ | Generate a readable 20-char password | `hT9jZDojX6sHRJt8vaKS` | random |
85
+ | Shuffle ["Alice", "Bob", "Charlie"] | `["Charlie", "Alice", "Bob"]` | random |
75
86
 
76
87
  ### Conversion
77
88
 
78
- | You ask | You get | Tool |
79
- |---------|---------|------|
80
- | 100 miles in kilometers? | `160.93 km` | convert |
81
- | 72Β°F in Celsius? | `22.22Β°C` | convert |
82
- | Convert #FF5733 to RGB | `rgb(255, 87, 51)` | color |
89
+ | You ask | You get | Tool |
90
+ | ------------------------------------------- | ------------------ | ------- |
91
+ | 100 miles in kilometers? | `160.93 km` | convert |
92
+ | 72Β°F in Celsius? | `22.22Β°C` | convert |
93
+ | Convert #FF5733 to RGB | `rgb(255, 87, 51)` | color |
94
+ | Convert rgba(255, 0, 0, 0.5) to 8-digit HEX | `#ff000080` | color |
83
95
 
84
96
  ### Analysis & Parsing
85
97
 
86
- | You ask | You get | Tool |
87
- |---------|---------|------|
88
- | Extract numbers from "abc123def456" | `123, 456` | regex |
89
- | Does 1.5.3 satisfy ^1.0.0? | `true` | semver |
90
- | IP range of 192.168.1.0/24? | `192.168.1.1 – .254 (254 hosts)` | ip |
91
- | Edit distance: "kitten" β†’ "sitting" | `3` | diff |
92
- | Unicode info for "€" | `U+20AC, Currency Symbols` | char_info |
93
- | Is `{"name":"test"}` valid JSON? | `valid, object` | json_validate |
98
+ | You ask | You get | Tool |
99
+ | ------------------------------------ | -------------------------------- | ------------- |
100
+ | Extract numbers from "abc123def456" | `123, 456` | regex |
101
+ | Does 1.5.3 satisfy ^1.0.0? | `true` | semver |
102
+ | Does 1.8.0 satisfy ">=1.5.0 <2.0.0"? | `true` | semver |
103
+ | IP range of 192.168.1.0/24? | `192.168.1.1 – .254 (254 hosts)` | ip |
104
+ | Edit distance: "kitten" β†’ "sitting" | `3` | diff |
105
+ | Unicode info for "€" | `U+20AC, Currency Symbols` | char_info |
106
+ | Is `{"name":"test"}` valid JSON? | `valid, object` | json_validate |
94
107
 
95
108
  ### Decode & Parse
96
109
 
97
- | You ask | You get | Tool |
98
- |---------|---------|------|
99
- | Decode this JWT: eyJhbGci... | `{ alg: "HS256", name: "John Doe" }` | jwt_decode |
100
- | Parse https://example.com/search?q=hello | `host: example.com, q: "hello"` | url_parse |
110
+ | You ask | You get | Tool |
111
+ | ---------------------------------------- | ------------------------------------ | ---------- |
112
+ | Decode this JWT: eyJhbGci... | `{ alg: "HS256", name: "John Doe" }` | jwt_decode |
113
+ | Parse https://example.com/search?q=hello | `host: example.com, q: "hello"` | url_parse |
101
114
 
102
115
  ## All 21 Tools
103
116
 
104
- | Tool | Description |
105
- |------|-------------|
106
- | `math` | Evaluate expressions, statistics |
107
- | `count` | Characters (grapheme-aware), words, lines, bytes |
108
- | `datetime` | Current time, timezone conversion, UNIX timestamps |
109
- | `random` | UUID v4/v7, ULID, passwords (readable, custom charset), shuffle |
110
- | `hash` | MD5, SHA-1, SHA-256, SHA-512, CRC32 |
111
- | `base64` | Encode / decode |
112
- | `encode` | URL, HTML entity, Unicode escape |
113
- | `date` | Diff, add/subtract, weekday, wareki |
114
- | `regex` | Test, match, matchAll, replace |
115
- | `base` | Number base conversion (2–36) |
116
- | `diff` | Line diff, Levenshtein distance |
117
- | `json_validate` | Validate JSON, CSV, XML, YAML |
118
- | `cron_parse` | Human-readable cron + next runs |
119
- | `luhn` | Validate / generate check digits |
120
- | `ip` | IPv4/IPv6 info, CIDR range |
121
- | `color` | HEX ↔ RGB ↔ HSL |
122
- | `convert` | 8 categories, 72 units: length, weight, temperature, area (tsubo, tatami), volume, speed, data, time |
123
- | `char_info` | Unicode code point, block, category |
124
- | `jwt_decode` | Decode header + payload (no verification) |
125
- | `url_parse` | Protocol, host, path, params, hash |
126
- | `semver` | Compare, validate, range satisfaction |
117
+ | Tool | Description |
118
+ | --------------- | ---------------------------------------------------------------------------------------------------- |
119
+ | `math` | Evaluate expressions, statistics |
120
+ | `count` | Characters (grapheme-aware), words, lines, bytes |
121
+ | `datetime` | Current time, timezone conversion, UNIX timestamps |
122
+ | `random` | UUID v4/v7, ULID, passwords (readable, custom charset), random number, shuffle |
123
+ | `hash` | MD5, SHA-1, SHA-256, SHA-512, CRC32, HMAC |
124
+ | `base64` | Encode / decode |
125
+ | `encode` | URL, HTML entity, Unicode escape |
126
+ | `date` | Diff, add/subtract, weekday, wareki |
127
+ | `regex` | Test, match, matchAll, replace |
128
+ | `base` | Number base conversion (2–36) |
129
+ | `diff` | Line diff, Levenshtein distance |
130
+ | `json_validate` | Validate JSON, CSV, XML, YAML |
131
+ | `cron_parse` | Human-readable cron + next runs (weekday/month names supported) |
132
+ | `luhn` | Validate / generate check digits |
133
+ | `ip` | IPv4/IPv6 info, CIDR contains check, range calculation |
134
+ | `color` | HEX ↔ RGB ↔ HSL (alpha channel supported) |
135
+ | `convert` | 8 categories, 72 units: length, weight, temperature, area (tsubo, tatami), volume, speed, data, time |
136
+ | `char_info` | Unicode code point, block, category |
137
+ | `jwt_decode` | Decode header + payload (no verification) |
138
+ | `url_parse` | Protocol, host, path, params, hash |
139
+ | `semver` | Compare, validate, parse, range satisfaction |
127
140
 
128
141
  ## Install
129
142
 
@@ -137,12 +150,12 @@ claude mcp add -s user calc-mcp -- npx --prefix /tmp -y @coo-quack/calc-mcp@late
137
150
 
138
151
  Add to your config file:
139
152
 
140
- | App | Config path |
141
- |-----|-------------|
142
- | Claude Desktop (macOS) | `~/Library/Application Support/Claude/claude_desktop_config.json` |
143
- | Claude Desktop (Windows) | `%APPDATA%\Claude\claude_desktop_config.json` |
144
- | Cursor | `~/.cursor/mcp.json` |
145
- | Windsurf | `~/.codeium/windsurf/mcp_config.json` |
153
+ | App | Config path |
154
+ | ------------------------ | ----------------------------------------------------------------- |
155
+ | Claude Desktop (macOS) | `~/Library/Application Support/Claude/claude_desktop_config.json` |
156
+ | Claude Desktop (Windows) | `%APPDATA%\Claude\claude_desktop_config.json` |
157
+ | Cursor | `~/.cursor/mcp.json` |
158
+ | Windsurf | `~/.codeium/windsurf/mcp_config.json` |
146
159
 
147
160
  ```json
148
161
  {
@@ -170,6 +183,16 @@ Add to `.vscode/mcp.json` in your workspace:
170
183
  }
171
184
  ```
172
185
 
186
+ ### Other MCP Clients
187
+
188
+ Calc MCP works with any MCP-compatible client. Run the server via stdio:
189
+
190
+ ```bash
191
+ npx --prefix /tmp -y @coo-quack/calc-mcp@latest
192
+ ```
193
+
194
+ Point your client's MCP config to the command above. The server communicates over **stdio** using the standard [Model Context Protocol](https://modelcontextprotocol.io/).
195
+
173
196
  ## Development
174
197
 
175
198
  ```bash