{
  "markdown": "# Calc MCP\n\n[![npm version](https://img.shields.io/npm/v/@coo-quack/calc-mcp)](https://www.npmjs.com/package/@coo-quack/calc-mcp)\n[![CI](https://github.com/coo-quack/calc-mcp/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/coo-quack/calc-mcp/actions/workflows/ci.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n<br />\n<br />\n<img width=\"100%\" alt=\"Calc MCP demo\" src=\"https://i.imgur.com/DcOhAD4.png\" />\n<br />\n<br />\n📖 **[Documentation](https://coo-quack.github.io/calc-mcp/)** — Full tool reference, examples, and install guides.\n\n**21 tools for things AI is not good at** — deterministic math, cryptographic randomness, accurate date arithmetic, encoding, hashing, and more.\n\nLLMs hallucinate calculations, can't generate true random numbers, and struggle with timezones. This MCP server fixes that.\n\n### Quick Start\n\n```bash\n# Claude Code\nclaude mcp add -s user calc-mcp -- npx -y @coo-quack/calc-mcp@2.1.0\n\n# Or just run it\nnpx -y @coo-quack/calc-mcp@2.1.0\n```\n\n> Works with Claude Desktop, VS Code Copilot, Cursor, Windsurf, and any MCP client — [setup guides below](#install).\n\n---\n\n## Why?\n\n| AI alone                                       | With calc-mcp                                   |\n| ---------------------------------------------- | ----------------------------------------------- |\n| \"10 + 34 × 341 ÷ 23 = 507.8\" ❌                | `514.087` ✅ (math)                             |\n| \"Here's a UUID: 550e8400-...\" 🤷 fake          | Cryptographically random UUID v4/v7 ✅ (random) |\n| \"100 days from now is...\" 🤔 guess             | `2026-05-22` ✅ (date)                          |\n| \"SHA-256 of password123 is...\" 💀 hallucinated | `{\"hash\": \"ef92b778bafe...\"}` ✅ (hash)          |\n\n- **Deterministic** — Same input, same correct output, every time\n- **Secure** — Sandboxed math, ReDoS protection, weak hash warnings\n- **Private** — All computation runs locally, no data sent to external services\n- **No server config** — Install once via npx; MCP client setup required\n- **No API key** — No account or API key required for calc-mcp itself; requires Node.js\n\n## Examples\n\nAsk in natural language — your AI assistant selects the appropriate tool.\n\n### Math & Numbers\n\n| You ask                                  | You get    | Tool |\n| ---------------------------------------- | ---------- | ---- |\n| What's 10 + 34 × 341 ÷ 23?               | `514.087`  | math |\n| Convert 255 to binary                    | `11111111` | base |\n| Is 4539578763621486 a valid card number? | `true`     | luhn |\n\n### Text & Encoding\n\n| You ask                                    | You get              | Tool   |\n| ------------------------------------------ | -------------------- | ------ |\n| How many characters in \"Hello, World! 🌍\"? | `15 chars, 18 bytes` | count  |\n| Base64 encode \"Hello World\"                | `SGVsbG8gV29ybGQ=`   | base64 |\n| Base64 decode \"eyJhbGciOiJIUzI1NiJ9\"       | `{\"alg\":\"HS256\"}`    | base64 |\n| URL-encode \"hello world\"                   | `hello%20world`      | encode |\n| URL-decode \"hello%20world\"                 | `hello world`        | encode |\n| HTML-decode `&lt;script&gt;`               | `<script>`           | encode |\n| SHA-256 hash of \"password123\"              | `{\"hash\": \"ef92b778bafe...\"}` | hash   |\n| HMAC-SHA256 of \"message\" with key \"secret\" | `{\"hash\": \"8b5f48702995...\"}` | hash   |\n\n### Date & Time\n\n| You ask                           | You get                     | Tool       |\n| --------------------------------- | --------------------------- | ---------- |\n| What time is it in New York?      | `2026-02-10T19:00:00-05:00` | datetime   |\n| What's 100 days after 2026-02-11? | `2026-05-22`                | date       |\n| When does \"30 9 \\* \\* 1-5\" run?   | `Mon–Fri at 9:30`           | cron_parse |\n\n### Generation\n\n| You ask                              | You get                       | Tool   |\n| ------------------------------------ | ----------------------------- | ------ |\n| Generate a UUID v7                   | `019c4b54-aad2-7e52-...`      | random |\n| Generate a readable 20-char password | `hT9jZDojX6sHRJt8vaKS`        | random |\n| Shuffle [\"Alice\", \"Bob\", \"Charlie\"]  | `[\"Charlie\", \"Alice\", \"Bob\"]` | random |\n\n### Conversion\n\n| You ask                                     | You get            | Tool    |\n| ------------------------------------------- | ------------------ | ------- |\n| 100 miles in kilometers?                    | `160.93 km`        | convert |\n| 72°F in Celsius?                            | `22.22°C`          | convert |\n| Convert #FF5733 to RGB                      | `rgb(255, 87, 51)` | color   |\n| Convert rgba(255, 0, 0, 0.5) to 8-digit HEX | `#ff000080`        | color   |\n\n### Analysis & Parsing\n\n| You ask                              | You get                          | Tool          |\n| ------------------------------------ | -------------------------------- | ------------- |\n| Extract numbers from \"abc123def456\"  | `123, 456`                       | regex         |\n| Does 1.5.3 satisfy ^1.0.0?           | `true`                           | semver        |\n| Does 1.8.0 satisfy \">=1.5.0 <2.0.0\"? | `true`                           | semver        |\n| IP range of 192.168.1.0/24?          | `192.168.1.1 – .254 (254 hosts)` | ip            |\n| Edit distance: \"kitten\" → \"sitting\"  | `3`                              | diff          |\n| Unicode info for \"€\"                 | `U+20AC, Currency Symbols`       | char_info     |\n| Is `{\"name\":\"test\"}` valid JSON?     | `valid, object`                  | format_validate |\n\n### Decode & Parse\n\n| You ask                                  | You get                              | Tool       |\n| ---------------------------------------- | ------------------------------------ | ---------- |\n| Decode this JWT: eyJhbGci...             | `{ alg: \"HS256\", name: \"John Doe\" }` | jwt_decode |\n| Parse https://example.com/search?q=hello | `host: example.com, q: \"hello\"`      | url_parse  |\n\n## All 21 Tools\n\n| Tool            | Description                                                                                          |\n| --------------- | ---------------------------------------------------------------------------------------------------- |\n| `math`          | Evaluate expressions, statistics                                                                     |\n| `count`         | Characters (grapheme-aware), words, lines, bytes                                                     |\n| `datetime`      | Current time, timezone conversion, UNIX timestamps                                                   |\n| `random`        | UUID v4/v7, ULID, passwords (readable, custom charset), random number, shuffle                       |\n| `hash`          | MD5, SHA-1, SHA-256, SHA-512, CRC32, HMAC                                                            |\n| `base64`        | Encode / decode                                                                                      |\n| `encode`        | URL, HTML entity, Unicode escape                                                                     |\n| `date`          | Diff, add/subtract, weekday, wareki                                                                  |\n| `regex`         | Test, match, matchAll, replace                                                                       |\n| `base`          | Number base conversion (2–36)                                                                        |\n| `diff`          | Line diff, Levenshtein distance                                                                      |\n| `format_validate` | Validate JSON, CSV, XML, YAML                                                                        |\n| `cron_parse`    | Human-readable cron + next runs (weekday/month names supported)                                      |\n| `luhn`          | Validate / generate check digits                                                                     |\n| `ip`            | IPv4/IPv6 info, CIDR contains check, range calculation                                               |\n| `color`         | HEX ↔ RGB ↔ HSL (alpha channel supported)                                                            |\n| `convert`       | 8 categories, 146 unit names: length, weight, temperature, area (tsubo, tatami), volume, speed, data, time |\n| `char_info`     | Unicode code point, block, category                                                                  |\n| `jwt_decode`    | Decode header + payload (no verification)                                                            |\n| `url_parse`     | Protocol, host, path, params, hash                                                                   |\n| `semver`        | Compare, validate, parse, range satisfaction                                                         |\n\n## Install\n\n### Claude Code\n\n```bash\nclaude mcp add -s user calc-mcp -- npx -y @coo-quack/calc-mcp@2.1.0\n```\n\n### Claude Code plugin\n\nAlso available as a plugin from the [coo-quack marketplace](https://github.com/coo-quack/claude-code-marketplace):\n\n```\n/plugin marketplace add coo-quack/claude-code-marketplace\n/plugin install calc-mcp@coo-quack\n```\n\nSee the [installation guide](https://coo-quack.github.io/calc-mcp/install) for details.\n\n### Claude Desktop / Cursor / Windsurf\n\nAdd to your config file:\n\n| App                      | Config path                                                       |\n| ------------------------ | ----------------------------------------------------------------- |\n| Claude Desktop (macOS)   | `~/Library/Application Support/Claude/claude_desktop_config.json` |\n| Claude Desktop (Windows) | `%APPDATA%\\Claude\\claude_desktop_config.json`                     |\n| Cursor                   | `~/.cursor/mcp.json`                                              |\n| Windsurf                 | `~/.codeium/windsurf/mcp_config.json`                             |\n\n```json\n{\n  \"mcpServers\": {\n    \"calc-mcp\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@coo-quack/calc-mcp@2.1.0\"]\n    }\n  }\n}\n```\n\n### VS Code (GitHub Copilot)\n\nAdd to `.vscode/mcp.json` in your workspace:\n\n```json\n{\n  \"servers\": {\n    \"calc-mcp\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@coo-quack/calc-mcp@2.1.0\"]\n    }\n  }\n}\n```\n\n### Docker Image\n\nCalc MCP is available as a Docker image from GitHub Container Registry:\n\n```bash\ndocker run --rm -i ghcr.io/coo-quack/calc-mcp:latest\n```\n\nOr use in MCP client config:\n\n```json\n{\n  \"mcpServers\": {\n    \"calc-mcp\": {\n      \"command\": \"docker\",\n      \"args\": [\"run\", \"--rm\", \"-i\", \"ghcr.io/coo-quack/calc-mcp:latest\"]\n    }\n  }\n}\n```\n\nAvailable tags:\n- `ghcr.io/coo-quack/calc-mcp:latest` — Latest release\n- `ghcr.io/coo-quack/calc-mcp:X.Y.Z` — Specific version (replace X.Y.Z with the desired version)\n\n### Other MCP Clients\n\nCalc MCP works with any MCP-compatible client. Run the server via stdio:\n\n```bash\nnpx -y @coo-quack/calc-mcp@2.1.0\n```\n\nPoint your client's MCP config to the command above. The server communicates over **stdio** using the standard [Model Context Protocol](https://modelcontextprotocol.io/).\n\n## Development\n\n```bash\nbun install\nbun run dev       # Start dev server\nbun test          # Run tests\nbun run lint      # Biome\nbun run format    # Biome\n```\n\n## Security\n\ncalc-mcp processes all data **locally** and does **not**:\n\n- ❌ Send data to external servers\n- ❌ Log data to files or remote services\n- ❌ Store processed data persistently\n\n**For detailed security information, see [SECURITY.md](SECURITY.md).**\n\n### Safe Usage with LLMs\n\n**calc-mcp itself is local-only.** However, when used via an LLM, your inputs are sent to the LLM provider (Anthropic, OpenAI, etc.).\n\n- ✅ **DO:** Use test/sample data when possible\n- ✅ **DO:** Use local-only LLMs for sensitive operations\n- ❌ **DON'T:** Pass production secrets to MCP tools (they will be sent to your LLM provider)\n\nExample:\n\n```bash\n# ❌ Unsafe: Any secret passed to MCP tool is sent to your LLM provider\n# Tool: hash\n# Input: { \"input\": \"sk-1234567890abcdef\", \"algorithm\": \"sha256\" }\n\n# ✅ Safe: Use test data only (for learning/development)\n# Tool: hash\n# Input: { \"input\": \"test-value-123\", \"algorithm\": \"sha256\" }\n\n# ✅ For production secrets: Use local-only LLMs or process outside MCP\n```\n\n**Note:** Error messages are automatically sanitized to prevent accidental data leakage.\n\nFor security issues, please see our [Security Policy](SECURITY.md#reporting-security-issues).\n\n## License\n\nMIT\n",
  "bytes": 12515,
  "sha": "d985a1b892ced8d912747bb72be2a2f63d2c229fd64573ce96da6b7f2135f76b",
  "repo_slug": "coo-quack/calc-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_coo_quack_calc_mcp_7cb9dc54/readme"
}