Math & Calculator MCP Server
Provides advanced mathematical utilities including basic arithmetic, statistical analysis, unit conversions, quadratic equation solving, percentage calculations, and trigonometric functions for AI assistants.
README
🧮 Math & Calculator MCP Server
A powerful Model Context Protocol (MCP) Server that provides advanced mathematical utilities and calculator tools for AI assistants like Claude and other MCP-compatible clients.
📖 About
This MCP server exposes mathematical tools that AI assistants can use to perform calculations, statistical analysis, unit conversions, and more. Built with the Model Context Protocol SDK, it seamlessly integrates with Claude Desktop, VSCode, and other MCP clients.
Author: Jefferson Rosas Chambilla
Repository: https://github.com/Ankluna72/Math-Calculator-MCP-Server-
✨ Features
🔢 Basic Calculator
- Addition, subtraction, multiplication, division
- Power, square root, modulo operations
- Error handling (division by zero, invalid operations)
📊 Statistical Analysis
- Mean, median, mode
- Standard deviation and variance
- Complete statistical summaries
🔄 Unit Conversions
- Length: meters, kilometers, miles, feet, inches
- Weight: kilograms, grams, pounds, ounces
- Temperature: Celsius, Fahrenheit, Kelvin
📐 Equation Solver
- Quadratic equation solver (ax² + bx + c = 0)
- Handles real and complex solutions
- Discriminant analysis
💯 Percentage Calculator
- Percentage of a number
- Percentage increase/decrease
- "What percentage is X of Y?"
📏 Trigonometry
- Sin, cos, tan (and inverse functions)
- Angle calculations in degrees
- Precise floating-point results
🚀 Installation
Prerequisites
- Node.js >= 18.0.0
- npm or yarn
Clone and Install
git clone https://github.com/Ankluna72/Math-Calculator-MCP-Server-.git
cd Math-Calculator-MCP-Server-
npm install
npm run build
⚙️ Configuration
For Claude Desktop
Add to your Claude Desktop config file (claude_desktop_config.json):
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"math-calculator": {
"command": "node",
"args": [
"C:\\path\\to\\Math-Calculator-MCP-Server-\\dist\\index.js"
]
}
}
}
For VSCode with Cline Extension
Add to VSCode settings (.vscode/settings.json or User Settings):
{
"mcp.servers": {
"math-calculator": {
"command": "node",
"args": [
"C:\\path\\to\\Math-Calculator-MCP-Server-\\dist\\index.js"
]
}
}
}
📚 Usage Examples
Once configured, your AI assistant can use these tools automatically. Here are some example requests:
Basic Calculations
"Calculate 25 * 4"
"What is the square root of 144?"
"Divide 100 by 7"
Statistics
"Calculate the mean of [10, 20, 30, 40, 50]"
"Find median and mode for these numbers: [5, 3, 5, 2, 8, 5]"
"Give me all statistics for [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]"
Unit Conversions
"Convert 100 kilometers to miles"
"How many pounds is 75 kilograms?"
"Convert 32 Fahrenheit to Celsius"
Solve Equations
"Solve x² - 5x + 6 = 0"
"Find solutions for 2x² + 3x - 2 = 0"
Percentages
"What is 15% of 200?"
"Increase 50 by 20%"
"What percentage is 25 of 200?"
Trigonometry
"Calculate sin(30°)"
"What is cos(45°)?"
"Find tan(60°)"
🛠️ Available Tools
| Tool | Description |
|---|---|
calculate |
Basic arithmetic operations |
statistics |
Statistical analysis of number arrays |
convert_units |
Convert between different units |
solve_equation |
Solve quadratic equations |
percentage |
Percentage calculations |
trigonometry |
Trigonometric functions |
📁 Project Structure
Math-Calculator-MCP-Server-/
├── src/
│ └── index.ts # Main MCP server implementation
├── dist/ # Compiled JavaScript (after build)
├── package.json # Project dependencies
├── tsconfig.json # TypeScript configuration
├── .gitignore
└── README.md
🔧 Development
# Install dependencies
npm install
# Build the project
npm run build
# Development mode (watch for changes)
npm run dev
# Start the server
npm start
🧪 Testing
You can test the server manually using stdio communication:
npm start
Then send MCP protocol messages via stdin to test tool execution.
📝 License
MIT License - see LICENSE file for details
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
📧 Contact
Jefferson Rosas Chambilla
- GitHub: @Ankluna72
- Repository: Math-Calculator-MCP-Server-
🌟 Acknowledgments
- Built with the Model Context Protocol SDK
- Inspired by the need for mathematical tools in AI assistants
- Thanks to Anthropic for developing the MCP standard
⭐ If you find this project useful, please consider giving it a star on GitHub!
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。