CalculatorLib MCP
Connect thousands of calculators and 9 unit-converter categories — exposed as just 12 compact tools (you search for a calculator, then run it) — to any Model Context Protocol client. Ask Claude things like “what’s my BMI at 70 kg / 170 cm?” or “convert 5 meters to feet” and get an authoritative answer instead of hallucinated arithmetic.
Install in 60 seconds
Pick the client you use, paste the snippet, restart. That’s it.
Run a single command and Claude Code wires the connection up:
claude mcp add --transport http calculatorlib https://calculatorlib.com/mcp
Or, if you prefer editing the config file at ~/.claude/mcp.json manually:
{
"mcpServers": {
"calculatorlib": {
"url": "https://calculatorlib.com/mcp"
}
}
}
Verify with /mcp inside Claude Code — you should see calculatorlib connected and 12 tools listed.
Edit your Claude Desktop config:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add the mcpServers entry below (merge with anything you already have):
{
"mcpServers": {
"calculatorlib": {
"url": "https://calculatorlib.com/mcp"
}
}
}
Restart Claude Desktop. The hammer icon in the input box will show calculatorlib with 12 tools.
Open Cursor settings → MCP → Add new MCP server, then paste:
{
"mcpServers": {
"calculatorlib": {
"url": "https://calculatorlib.com/mcp"
}
}
}
Cursor uses the same Streamable HTTP transport, so the JSON schema is identical to Claude Desktop’s.
Edit your Zed settings (cmd+, / ctrl+, → Open Settings) and add the calculator server under context_servers:
{
"context_servers": {
"calculatorlib": {
"source": "custom",
"transport": {
"type": "streamable-http",
"url": "https://calculatorlib.com/mcp"
}
}
}
}
Reload the assistant panel; the calculator tools become available to any agent thread. Zed’s MCP support requires v0.165 or later.
Open the Cline extension in VS Code → MCP Servers → Edit Configuration. The settings file lives at ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json on macOS (Linux/Win paths are similar):
{
"mcpServers": {
"calculatorlib": {
"url": "https://calculatorlib.com/mcp",
"transportType": "streamableHttp"
}
}
}
Cline auto-reloads server config; the new tools show up in the MCP panel within a few seconds.
Open Windsurf → Cascade → Configure MCP, or edit ~/.codeium/windsurf/mcp_config.json directly:
{
"mcpServers": {
"calculatorlib": {
"serverUrl": "https://calculatorlib.com/mcp"
}
}
}
Restart Windsurf and the calculator tools surface in Cascade’s tool picker. The HTTP transport requires Windsurf 1.5+.
Any MCP-compliant client that supports the Streamable HTTP transport (spec version 2025-06-18) can connect:
{
"transport": "streamable-http",
"endpoint": "https://calculatorlib.com/mcp"
}
Or call the JSON-RPC endpoint directly with curl:
curl -X POST https://calculatorlib.com/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
Try these prompts
After installing, just talk to Claude in plain English — it picks the right tool.
“What’s my BMI if I weigh 70 kg and I’m 170 cm tall? Am I in the healthy range?”
Claude calls bmi_calculator, returns BMI 24.22 with the WHO category.
“Convert 5 meters to feet, then 200 pounds to kilograms.”
Claude calls convert_length and convert_mass in turn.
“If I invest $10 000 at 5% compounded annually for 20 years, what’s the final value?”
Claude calls compound_interest_calculator and shows the breakdown.
“What’s the monthly payment on a $300k home loan at 6.5% for 30 years?”
Claude calls home_loan_calculator with principal, rate, term.
Live playground
Call the server right here — real JSON-RPC to https://calculatorlib.com/mcp, real responses. No signup.
Authorization token (optional)
Raw JSON-RPC request & response
npx @modelcontextprotocol/inspector, then connect to https://calculatorlib.com/mcp (transport: Streamable HTTP). Tool browser
Search the calculator library and 9 converter categories by name or title. Useful when discovering what to ask Claude for.
How it works
- Endpoint: single
POSThandler athttps://calculatorlib.com/mcpspeaking JSON-RPC 2.0 over Streamable HTTP (transport spec2025-06-18). - Tool naming: calculator slugs use snake_case (
bmi_calculator,compound_interest_calculator); converters areconvert_<category>. - Inputs: each tool advertises a JSON Schema derived from the calculator’s form fields (type, enum, min/max). Conditional fields (e.g. metric vs imperial in BMI) are listed as optional — read each field’s description to know which combinations are valid.
- Outputs: a one-line text summary plus a
structuredContentJSON object the LLM can parse (e.g.{ "main": [{...}], "data": [...] }). - Updates: the catalog refreshes every 5 minutes — newly published calculators show up automatically.
Direct API (no MCP client needed)
Want to integrate without an MCP client? The same data is available via plain JSON endpoints.
curl -X POST https://calculatorlib.com/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
curl -X POST https://calculatorlib.com/mcp \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc":"2.0","id":2,"method":"tools/call",
"params":{
"name":"bmi_calculator",
"arguments":{"unitSystem":"metric","weight":70,"height":170}
}
}'
curl -X POST https://calculatorlib.com/mcp \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc":"2.0","id":3,"method":"tools/call",
"params":{
"name":"convert_length",
"arguments":{"value":5,"from":"Meter","to":"Foot"}
}
}'
REST endpoints (no JSON-RPC envelope):
/api/calculators/schemas?q=<keywords>— search calculators (bounded matches with input schemas)- /api/converter/categories — converter categories with units
POST /api/converter/convert— direct converter, body{ category, from, to, value }
Authentication (optional but recommended)
Anonymous calls work — auth is opt-in. Adding a token unlocks per-user usage analytics at /account/mcp-logs: every call you make through a token shows up there with latency, error reason, and the calc you hit.
Get a token (60 seconds)
- Sign in (or create an account first).
- Go to /account/api-tokens.
- Click Generate token. Copy the value — it’s shown only once.
Add it to your MCP client
Same config file as the public install, plus a headers.Authorization field:
{
"mcpServers": {
"calculatorlib": {
"url": "https://calculatorlib.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_TOKEN_HERE"
}
}
}
}
Why bother?
- Personal usage logs — see which calculators you call most and which fail, scoped only to your token (/account/mcp-logs).
- Multiple clients, separate tokens — mint one per device (laptop, server, agent). Revoking one doesn’t disrupt the others.
- Foundation for future per-user features — when we add rate limits / quotas / saved presets, they attach to authenticated calls.
curl with Bearer token
curl -X POST https://calculatorlib.com/mcp \
-H 'Authorization: Bearer YOUR_TOKEN_HERE' \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
Server operators: set MCP_REQUIRE_AUTH=true to require a token for every call (anonymous → 401). The legacy MCP_API_TOKEN env still works as a single-shared-secret bypass.
FAQ & troubleshooting
Is this free? Are there rate limits?
Do you store my queries?
Why does Claude sometimes say a tool returned no useful data?
Can I authenticate so my usage shows up under my account?
Authorization: Bearer <token> on every /mcp request and your calls appear at /account/mcp-logs. See the Authentication section above for the full client config.I lost my token. Can I recover it?
I just published a new calculator — when does it show up?
Tool name doesn’t match the slug I see in the URL?
/bmi-calculator becomes bmi_calculator.