Performs basic arithmetic calculations. A TypeScript-based server demonstrating core MCP concepts.
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. The angles
input requires at least one number.
sin
, cos
, tan
angles
(array of numbers), mode
('radians' or 'degrees', defaults to 'radians').asin
, acos
, atan
values
(array of numbers).sinh
, cosh
, tanh
values
(array of numbers).asinh
, acosh
, atanh
values
(array of numbers).set_precision
- Configures decimal precision for all subsequent calculations.
precision
parameter as the number of decimal places.Install dependencies:
bun install
Run the development server:
bun start
To use with Claude Desktop, add the server config:
On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On 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:
docker build -t calculator-mcp .
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 the MCP Inspector, which is available as a package script:
bun run inspector
The Inspector will provide a URL to access debugging tools in your browser.
Manage complex AI agent workflows with a Kanban-based task management system.
Breaks down complex tasks into manageable pieces and stores them in structured JSON.
MCP server for the incident management platform Rootly.
A server for migrating subscription businesses from RevenueCat to Adapty, requiring a RevenueCat API key.
Interact with Quire.io projects and tasks using the Quire API, enabling AI assistants to manage your workflow.
A server for date-time manipulation and timezone conversion.
Integrates with the Mautic marketing automation platform.
Integrates with the Scenext AI platform to generate educational videos on various topics.
Generates Decent Sampler drum kit configurations.
Generates PowerPoint presentations (PPTs) based on specified topics using the Gezhe API.