Calc Mcp

io.github.coo-quackPublished by GitHub account coo-quackv2.1.5Updated Oct 25, 2026

21 MCP tools for math, randomness, dates, encoding, hashing, and more — deterministic and accurate.

The publisher's own server: calc.engineer

VerifiedSTDIODesktop onlyDeveloper ToolsData & Analytics

Overview

AI-generated overview

A local stdio MCP server with 21 deterministic utility tools for math, randomness, dates, encoding, hashing, parsing and unit conversion.

What you can do
  • Evaluate math expressions and statistics, convert number bases, and validate or generate Luhn check digits
  • Generate UUIDs, ULIDs, passwords, random numbers and shuffled lists, and compute hashes or HMACs
  • Encode and decode Base64, URL, HTML and Unicode, and count characters, words, lines and bytes
  • Work with dates and times: current time, timezone conversion, date arithmetic, UNIX timestamps and cron schedules
  • Parse and analyze text: regex test/match/replace, line diffs, Levenshtein distance, JSON/CSV/XML/YAML validation, Unicode character info
  • Convert units and colors, inspect IP addresses and CIDR ranges, parse URLs, compare semantic versions, and decode JWT headers and payloads
When to use it
Useful when an assistant needs exact arithmetic, real randomness, reliable timezone and date math, or repeatable encoding, hashing and parsing results instead of guessing. A good fit for everyday developer and data chores that should be deterministic and stay on the local machine.
Requirements
Runs as a local process over stdio, started with npx from the npm package (Node.js required) or from the published Docker image. No account, API key or environment variables are needed.
Before you install
The hash tool warns that MD5 and SHA-1 are cryptographically broken and should not be used for security. The JWT tool only decodes and does not verify signatures, so its output must not be trusted for authentication. Computation is local, but anything passed to the tools is sent to whichever LLM provider you use, so avoid real secrets and production credentials.

Installation

In SourceWeft

  1. Open Calc Mcp in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

Calc MCP

[npm version] [CI] [License: MIT]

[Calc MCP demo]

📖 Documentation — Full tool reference, examples, and install guides.

21 tools for things AI is not good at — deterministic math, cryptographic randomness, accurate date arithmetic, encoding, hashing, and more.

LLMs hallucinate calculations, can't generate true random numbers, and struggle with timezones. This MCP server fixes that.

Quick Start

bash
# Claude Codeclaude mcp add -s user calc-mcp -- npx -y @coo-quack/[email protected]
# Or just run itnpx -y @coo-quack/[email protected]

Works with Claude Desktop, VS Code Copilot, Cursor, Windsurf, and any MCP client — setup guides below.


Why?

AI aloneWith calc-mcp
"10 + 34 × 341 ÷ 23 = 507.8" ❌514.087 ✅ (math)
"Here's a UUID: 550e8400-..." 🤷 fakeCryptographically random UUID v4/v7 ✅ (random)
"100 days from now is..." 🤔 guess2026-05-22 ✅ (date)
"SHA-256 of password123 is..." 💀 hallucinated{"hash": "ef92b778bafe..."} ✅ (hash)
  • Deterministic — Same input, same correct output, every time
  • Secure — Sandboxed math, ReDoS protection, weak hash warnings
  • Private — All computation runs locally, no data sent to external services
  • No server config — Install once via npx; MCP client setup required
  • No API key — No account or API key required for calc-mcp itself; requires Node.js

Examples

Ask in natural language — your AI assistant selects the appropriate tool.

Math & Numbers

You askYou getTool
What's 10 + 34 × 341 ÷ 23?514.087math
Convert 255 to binary11111111base
Is 4539578763621486 a valid card number?trueluhn

Text & Encoding

You askYou getTool
How many characters in "Hello, World! 🌍"?15 chars, 18 bytescount
Base64 encode "Hello World"SGVsbG8gV29ybGQ=base64
Base64 decode "eyJhbGciOiJIUzI1NiJ9"{"alg":"HS256"}base64
URL-encode "hello world"hello%20worldencode
URL-decode "hello%20world"hello worldencode
HTML-decode &lt;script&gt;<script>encode
SHA-256 hash of "password123"{"hash": "ef92b778bafe..."}hash
HMAC-SHA256 of "message" with key "secret"{"hash": "8b5f48702995..."}hash

Date & Time

You askYou getTool
What time is it in New York?2026-02-10T19:00:00-05:00datetime
What's 100 days after 2026-02-11?2026-05-22date
When does "30 9 * * 1-5" run?Mon–Fri at 9:30cron_parse

Generation

You askYou getTool
Generate a UUID v7019c4b54-aad2-7e52-...random
Generate a readable 20-char passwordhT9jZDojX6sHRJt8vaKSrandom
Shuffle ["Alice", "Bob", "Charlie"]["Charlie", "Alice", "Bob"]random

Conversion

You askYou getTool
100 miles in kilometers?160.93 kmconvert
72°F in Celsius?22.22°Cconvert
Convert #FF5733 to RGBrgb(255, 87, 51)color
Convert rgba(255, 0, 0, 0.5) to 8-digit HEX#ff000080color

Analysis & Parsing

You askYou getTool
Extract numbers from "abc123def456"123, 456regex
Does 1.5.3 satisfy ^1.0.0?truesemver
Does 1.8.0 satisfy ">=1.5.0 <2.0.0"?truesemver
IP range of 192.168.1.0/24?192.168.1.1 – .254 (254 hosts)ip
Edit distance: "kitten" → "sitting"3diff
Unicode info for "€"U+20AC, Currency Symbolschar_info
Is {"name":"test"} valid JSON?valid, objectformat_validate

Decode & Parse

You askYou getTool
Decode this JWT: eyJhbGci...{ alg: "HS256", name: "John Doe" }jwt_decode
Parse https://example.com/search?q=hellohost: example.com, q: "hello"url_parse

All 21 Tools

ToolDescription
mathEvaluate expressions, statistics
countCharacters (grapheme-aware), words, lines, bytes
datetimeCurrent time, timezone conversion, UNIX timestamps
randomUUID v4/v7, ULID, passwords (readable, custom charset), random number, shuffle
hashMD5, SHA-1, SHA-256, SHA-512, CRC32, HMAC
base64Encode / decode
encodeURL, HTML entity, Unicode escape
dateDiff, add/subtract, weekday, wareki
regexTest, match, matchAll, replace
baseNumber base conversion (2–36)
diffLine diff, Levenshtein distance
format_validateValidate JSON, CSV, XML, YAML
cron_parseHuman-readable cron + next runs (weekday/month names supported)
luhnValidate / generate check digits
ipIPv4/IPv6 info, CIDR contains check, range calculation
colorHEX ↔ RGB ↔ HSL (alpha channel supported)
convert8 categories, 146 unit names: length, weight, temperature, area (tsubo, tatami), volume, speed, data, time
char_infoUnicode code point, block, category
jwt_decodeDecode header + payload (no verification)
url_parseProtocol, host, path, params, hash
semverCompare, validate, parse, range satisfaction

Install

Claude Code

bash
claude mcp add -s user calc-mcp -- npx -y @coo-quack/[email protected]

Claude Code plugin

Also available as a plugin from the coo-quack marketplace:

/plugin marketplace add coo-quack/claude-code-marketplace/plugin install calc-mcp@coo-quack

See the installation guide for details.

Claude Desktop / Cursor / Windsurf

Add to your config file:

AppConfig path
Claude Desktop (macOS)~/Library/Application Support/Claude/claude_desktop_config.json
Claude Desktop (Windows)%APPDATA%\Claude\claude_desktop_config.json
Cursor~/.cursor/mcp.json
Windsurf~/.codeium/windsurf/mcp_config.json
json
{  "mcpServers": {    "calc-mcp": {      "command": "npx",      "args": ["-y", "@coo-quack/[email protected]"]    }  }}

VS Code (GitHub Copilot)

Add to .vscode/mcp.json in your workspace:

json
{  "servers": {    "calc-mcp": {      "command": "npx",      "args": ["-y", "@coo-quack/[email protected]"]    }  }}

Docker Image

Calc MCP is available as a Docker image from GitHub Container Registry:

bash
docker run --rm -i ghcr.io/coo-quack/calc-mcp:latest

Or use in MCP client config:

json
{  "mcpServers": {    "calc-mcp": {      "command": "docker",      "args": ["run", "--rm", "-i", "ghcr.io/coo-quack/calc-mcp:latest"]    }  }}

Available tags:

  • ghcr.io/coo-quack/calc-mcp:latest — Latest release
  • ghcr.io/coo-quack/calc-mcp:X.Y.Z — Specific version (replace X.Y.Z with the desired version)

Other MCP Clients

Calc MCP works with any MCP-compatible client. Run the server via stdio:

bash
npx -y @coo-quack/[email protected]

Point your client's MCP config to the command above. The server communicates over stdio using the standard Model Context Protocol.

Development

bash
bun installbun run dev       # Start dev serverbun test          # Run testsbun run lint      # Biomebun run format    # Biome

Security

calc-mcp processes all data locally and does not:

  • ❌ Send data to external servers
  • ❌ Log data to files or remote services
  • ❌ Store processed data persistently

For detailed security information, see SECURITY.md.

Safe Usage with LLMs

calc-mcp itself is local-only. However, when used via an LLM, your inputs are sent to the LLM provider (Anthropic, OpenAI, etc.).

  • ✅ DO: Use test/sample data when possible
  • ✅ DO: Use local-only LLMs for sensitive operations
  • ❌ DON'T: Pass production secrets to MCP tools (they will be sent to your LLM provider)

Example:

bash
# ❌ Unsafe: Any secret passed to MCP tool is sent to your LLM provider# Tool: hash# Input: { "input": "sk-1234567890abcdef", "algorithm": "sha256" }
# ✅ Safe: Use test data only (for learning/development)# Tool: hash# Input: { "input": "test-value-123", "algorithm": "sha256" }
# ✅ For production secrets: Use local-only LLMs or process outside MCP

Note: Error messages are automatically sanitized to prevent accidental data leakage.

For security issues, please see our Security Policy.

License

MIT

Source: README.md at commit 5b71335

Tools

21

random

Generate random values: UUID, ULID, secure password (with fine-grained options), random number, or shuffle a list

ParametersmaxmintyperequireditemslengthcharsetnumberssymbolsreadableuppercaseuuidVersionexcludeChars

hash

Compute hash or HMAC of a string using MD5, SHA1, SHA256, SHA512, or CRC32. WARNING: MD5 and SHA1 are cryptographically broken and MUST NOT be used for security (use SHA-256 or SHA-512 instead).

Parameterskeyinputrequiredactionalgorithmrequired

base64

Encode or decode Base64 strings

Parametersinputrequiredactionrequired

encode

Encode or decode strings using URL, HTML, or Unicode encoding

Parameterstyperequiredinputrequiredactionrequired

datetime

Get current datetime, convert timezones, format dates, and convert UNIX timestamps

ParametersactionrequiredformatdatetimetimezonetimestamptoTimezonefromTimezone

count

Count characters (grapheme clusters), words, lines, and bytes in text

Parameterstextrequiredencoding

math

Evaluate math expressions or compute statistics on numbers

Parametersactionvaluesexpression

date

Date calculations: diff between dates, add to date, weekday, and Japanese wareki conversion

Parametersdaterequiredunitdate2actionrequiredamount

regex

Test, match, matchAll, or replace using regular expressions

Parameterstextrequiredflagsactionrequiredpatternrequiredreplacement

base

Convert numbers between bases (2-36), supports large numbers via BigInt

Parameterstorequiredfromrequiredvaluerequired

diff

Compare two texts: line-by-line diff (Myers algorithm, falls back to full replacement if edit distance exceeds 1000) or Levenshtein distance

Parameterstext1requiredtext2requiredaction

format_validate

Validate and parse JSON, CSV, XML, or YAML strings

Parametersinputrequiredformatrequired

cron_parse

Parse cron expression and return next N execution times

Parameterscounttimezoneexpressionrequired

luhn

Validate or generate check digits using the Luhn algorithm

Parametersactionnumberrequired

ip

IP address info, CIDR contains check, and range calculation

Parametersipcidractionrequiredtarget

color

Convert colors between HEX, RGB, and HSL formats

Parameterstocolorrequired

convert

Convert between units: length, weight, temperature, area, volume, speed, data, time

Parameterstorequiredfromrequiredvaluerequiredcategory

char_info

Get Unicode information about characters (code point, block, category)

Parameterscharrequired

jwt_decode

Decode JWT token header and payload for inspection only. WARNING: this tool does NOT verify the signature; never trust the payload for authentication or authorization without separate signature verification using the issuer's verification key (shared secret or public key, depending on alg).

Parameterstokenrequired

url_parse

Parse a URL into its components (protocol, host, path, params, etc.)

Parametersurlrequired

semver

Semantic versioning: compare, validate, and check range satisfaction

Parametersrangeactionrequiredversionrequiredversion2

Version history

5
  1. v2.1.5LatestOct 25, 2026
  2. v2.1.4Oct 13, 2026
  3. v2.1.3Oct 11, 2026
  4. v2.1.2Sep 26, 2026
  5. v2.1.1Sep 16, 2026

Score

90% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts
  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

Other Calc integrations