Calc Mcp

io.github.coo-quack由 GitHub 帳號 coo-quack 發布v2.1.5更新於 Oct 25, 2026

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

發布方自己的服務:calc.engineer

已驗證STDIO僅桌面開發者工具資料與分析

概覽

AI 產生的概覽

本機 stdio MCP 伺服器,提供 21 個確定性工具,涵蓋數學運算、隨機產生、日期時間、編碼、雜湊、解析與單位換算。

可以做什麼
  • 計算數學式與統計量、進行進位轉換、驗證或產生 Luhn 檢查碼
  • 產生 UUID、ULID、密碼、隨機數與打亂清單,並計算雜湊或 HMAC
  • 進行 Base64、URL、HTML 與 Unicode 編解碼,統計字元、單字、行與位元組數
  • 處理日期時間:目前時間、時區轉換、日期加減、UNIX 時間戳與 cron 執行時間
  • 解析與分析文字:正規表示式測試/比對/取代、逐行差異、Levenshtein 距離、JSON/CSV/XML/YAML 驗證、Unicode 字元資訊
  • 換算單位與顏色、查詢 IP 與 CIDR 網段、解析 URL、比較語意化版本、解碼 JWT 標頭與內容
適用情境
適合需要精確算術、真正隨機數、可靠的時區與日期計算,或需要可重現的編碼、雜湊與解析結果,而不是讓模型自行猜測的情境。也適合希望運算在本機完成、結果確定的日常開發與資料處理工作。
執行需求
以本機程序透過 stdio 執行,可用 npx 從 npm 套件啟動(需要 Node.js),也可使用已發布的 Docker 映像。不需帳號、API 金鑰或環境變數。
安裝前請注意
雜湊工具提醒 MD5 與 SHA-1 在密碼學上已被破解,不應用於安全用途。JWT 工具僅解碼、不驗證簽章,其輸出不可用於身分驗證或授權判斷。運算雖在本機進行,但傳給工具的內容仍會送到你所使用的 LLM 供應商,因此不要傳入真實密鑰或正式環境憑證。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Calc Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

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

來源:README.md,提交 5b71335

工具

21

random

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

輸入參數maxmintype必填itemslengthcharsetnumberssymbolsreadableuppercaseuuidVersionexcludeChars

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).

輸入參數keyinput必填actionalgorithm必填

base64

Encode or decode Base64 strings

輸入參數input必填action必填

encode

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

輸入參數type必填input必填action必填

datetime

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

輸入參數action必填formatdatetimetimezonetimestamptoTimezonefromTimezone

count

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

輸入參數text必填encoding

math

Evaluate math expressions or compute statistics on numbers

輸入參數actionvaluesexpression

date

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

輸入參數date必填unitdate2action必填amount

regex

Test, match, matchAll, or replace using regular expressions

輸入參數text必填flagsaction必填pattern必填replacement

base

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

輸入參數to必填from必填value必填

diff

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

輸入參數text1必填text2必填action

format_validate

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

輸入參數input必填format必填

cron_parse

Parse cron expression and return next N execution times

輸入參數counttimezoneexpression必填

luhn

Validate or generate check digits using the Luhn algorithm

輸入參數actionnumber必填

ip

IP address info, CIDR contains check, and range calculation

輸入參數ipcidraction必填target

color

Convert colors between HEX, RGB, and HSL formats

輸入參數tocolor必填

convert

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

輸入參數to必填from必填value必填category

char_info

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

輸入參數char必填

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).

輸入參數token必填

url_parse

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

輸入參數url必填

semver

Semantic versioning: compare, validate, and check range satisfaction

輸入參數rangeaction必填version必填version2

版本歷史

5
  1. v2.1.5最新Oct 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

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Calc 整合