Calculator
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
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
Maintainer
Works with
Installation
NPM
npx -y mcp-server-calculatorManual Installation
npx -y mcp-server-calculatorConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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.
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-mcpAdd 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"
}
}
}
}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.
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.
Calculator Alternatives — Similar Developer Tools Servers
Looking for alternatives to Calculator? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
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.
Set Up Calculator in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.