Calculator

v1.0.0Developer Toolsstable

A fully functional calculator server based on Model Context Protocol (MCP), providing rich mathematical operation functions It includes 13 specialized mathematics modules such as basic arithmetic, radical operations, trigonometric functions, logarith

calculatormcpai-integration
Share:
57
Stars
0
Downloads
0
Weekly
0/5

What is Calculator?

Calculator is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to fully functional calculator server based on model context protocol (mcp), providing rich mathematical operation functions it includes 13 specialized mathematics modules such as basic arithmetic, radic...

A fully functional calculator server based on Model Context Protocol (MCP), providing rich mathematical operation functions It includes 13 specialized mathematics modules such as basic arithmetic, radical operations, trigonometric functions, logarith

This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • calculate

Use Cases

Perform complex mathematical operations including trigonometric and logarithmic functions.
Execute specialized calculations from 13 mathematics modules.
xiaobenyang-com

Maintainer

LicenseApache 2.0
Languagepython
Versionv1.0.0
UpdatedMay 12, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y mcp-server-calculator

Manual Installation

npx -y mcp-server-calculator

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Calculator

The Calculator MCP server provides a comprehensive mathematical computation layer for AI assistants through 13 specialized modules covering arithmetic, trigonometry, logarithms, statistics, combinatorics, number theory, complex numbers, matrix operations, numerical analysis, financial calculations, unit conversion, and geometry. It is published as an npm package and runs via npx, requiring a free API key from xiaobenyang.com to authenticate requests. Engineers, data scientists, and educators use it to offload precise, multi-step mathematical work to a dedicated computation server rather than relying on the LLM's built-in arithmetic.

Prerequisites

  • Node.js 18 or later installed (required to run npx)
  • A free account at https://xiaobenyang.com to obtain an XBY-APIKEY
  • An MCP-compatible client such as Claude Desktop or Cursor
  • Internet access to reach the xiaobenyang.com computation API
1

Register and obtain your API key

Create a free account at https://xiaobenyang.com. After registration, navigate to the API section and copy your XBY-APIKEY — it is required as an environment variable for the server.

2

Test the server locally with npx

Run the server once manually to confirm it starts. Set the XBY_APIKEY environment variable before running.

XBY_APIKEY=your-api-key npx -y xiaobenyang-mcp
3

Add the server to your Claude Desktop configuration

Open ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%/Claude/claude_desktop_config.json (Windows) and add the mcpServers entry.

{
  "mcpServers": {
    "calculator": {
      "command": "npx",
      "args": ["-y", "xiaobenyang-mcp"],
      "env": {
        "XBY_APIKEY": "your-api-key"
      }
    }
  }
}
4

Restart Claude Desktop and verify the tools are available

Quit and reopen Claude Desktop. Ask Claude to list available calculator tools or perform a sample calculation to confirm the server is connected.

5

Use the MCP inspector for debugging

If you encounter issues, the online inspector at https://mcp.xiaobenyang.com/inspector/1777316659204099 lets you test tool calls directly in a browser without an MCP client.

Calculator Examples

Client configuration

Complete claude_desktop_config.json entry for the Calculator MCP server.

{
  "mcpServers": {
    "calculator": {
      "command": "npx",
      "args": ["-y", "xiaobenyang-mcp"],
      "env": {
        "XBY_APIKEY": "your-xiaobenyang-api-key"
      }
    }
  }
}

Prompts to try

Example prompts spanning the 13 mathematical modules available.

- "Calculate the determinant and inverse of the matrix [[1,2],[3,4]]."
- "What is the NPV of cash flows [-1000, 300, 400, 500] at a discount rate of 8%?"
- "Convert 15 miles to kilometers and 72 Fahrenheit to Celsius."
- "Find all prime factors of 1234567890."
- "Compute the standard deviation and variance of [12, 15, 18, 22, 30]."
- "Calculate the area and perimeter of a triangle with sides 3, 4, and 5."

Troubleshooting Calculator

Server fails with 'authentication error' or 'invalid API key'

Ensure XBY_APIKEY is set correctly in the env block of your MCP config. The variable name is case-sensitive. Verify the key by testing it at https://mcp.xiaobenyang.com/inspector/1777316659204099.

npx downloads the package but the server immediately exits

Run 'XBY_APIKEY=your-key npx -y xiaobenyang-mcp' in a terminal to see the startup error output. Missing or invalid credentials are the most common cause.

Calculation results differ from expected values

The server uses server-side computation via the xiaobenyang.com API. Ensure you have an internet connection. For sensitive financial calculations, cross-check results with a dedicated calculator as the server rounds intermediate values.

Frequently Asked Questions about Calculator

What is Calculator?

Calculator is a Model Context Protocol (MCP) server that fully functional calculator server based on model context protocol (mcp), providing rich mathematical operation functions it includes 13 specialized mathematics modules such as basic arithmetic, radical operations, trigonometric functions, logarith It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Calculator?

Install via npm with the command: npx -y mcp-server-calculator. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).

Which AI clients work with Calculator?

Calculator works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Calculator free to use?

Yes, Calculator is open source and available under the Apache 2.0 license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "calculator": { "command": "npx", "args": ["-y", "mcp-server-calculator"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Calculator?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides