Calculator MCP Server

by ericvrp

Not rated
GitHub

About

Performs basic arithmetic calculations. A TypeScript-based server demonstrating core MCP concepts.

Details

Author
ericvrp
Categories
Productivity, Developer Tools

Setup

Install Calculator MCP Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/ericvrp/calculator-mcp

Follow the installation instructions in the repository README, then restart your MCP client.

A TypeScript-based MCP server that implements a robust calculator with precise decimal arithmetic. This server demonstrates core MCP concepts by providing arithmetic operations with support for multiple operands and configurable precision using Decimal.js.

These functions take an array of at least two numbers and return a single numerical result.

- add- Adds an array of numbers.
- subtract- Subtracts numbers sequentially from the first.
- multiply- Multiplies an array of numbers.
- divide- Divides numbers sequentially. Handles division by zero.

These functions operate on arrays of numbers and return an array of results. Theanglesinput requires at least one number.

- Basic Trigonometry:sin,cos,tan

- Input:angles(array of numbers),mode('radians' or 'degrees', defaults to 'radians').

- set_precision- Configures decimal precision for all subsequent calculations.

- Takesprecisionparameter as the number of decimal places.

To use with Claude Desktop, add the server config:

On MacOS:~/Library/Application Support/Claude/claude_desktop_config.jsonOn Windows:%APPDATA%/Claude/claude_desktop_config.json

{ "mcpServers": { "Calculator": { "command": "/path/to/calculator-mcp/src/index.ts" } } }

Or for Cline VSCode extension, add a modified version of this to your MCP config file:

"Calculator": { "autoApprove": [ "add", "subtract", "multiply", "divide", "set_precision" ], "disabled": true, "timeout": 60, "type": "stdio", "command": "bun", "args": [ "/path-to-your/calculator-mcp/src/index.ts" ] }

To run the MCP server using Docker, you should first build the image using:

Followed by adding this to the (Cline) MCP config file:

"Calculator (docker)": { "autoApprove": [ "add", "subtract", "multiply", "divide", "set_precision" ], "disabled": false, "timeout": 60, "type": "stdio", "command": "docker", "args": [ "run", "--rm", "-i", "calculator-mcp" ] }

Since MCP servers communicate over stdio, debugging can be challenging. We recommend using theMCP Inspector, which is available as a package script:

The Inspector will provide a URL to access debugging tools in your browser.

Power up your AI agents with 31 production-ready tools. Features local-first Python analysis, real-time SearXNG search, and a secure local proxy to sanitize prompts. Built for developers who value performance and privacy. Install once, use everywhere.

An MCP server that equips your AI coding assistant with live, verified Android knowledge — so it builds from official sources, not from memory.

Integrates AutoCAD with large language models (LLMs) for natural language interaction. Requires AutoCAD 2018+ on Windows.

//beforeyouship - LLM cost modeling from your editor

Model the realistic monthly cost of an LLM app before you build it. Not a token calculator: retries, prompt caching, batch discounts, infra overhead, and 3×/10× growth are modeled in, across GPT-5.x, Claude, Gemini, DeepSeek, and more. Works without a key. Connect and ask — demo mode covers the six free-tier models. A Pro API key (beforeyouship.dev) unlocks the full 18-model catalog.

Debug and drive live React Native apps: logs, network, screenshots, UI automation, and fiber-tree inspection.

24 AI-callable tools for API mocking, chaos engineering, security scanning, SSL checks, CORS debugging, OpenAPI validation, JWT decoding, HAR analysis, distributed tracing, webhook capture, automation workflows, and uptime monitoring. Supports OAuth2 and Bearer token auth.

Provides access to over 70 IT tools and utilities for developers and IT professionals, including encoding, text manipulation, and network tools.

A manager server for MCP servers that handles process management and tool routing.

A Windows and MacOS app to manage local and remote MCP servers from a single interface with secure access control and logging.

A CLI tool to synchronize MCP (Model Context Protocol) settings across multiple AI coding tools.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.