calculate-mcp-server
v1.0.0
Published
MCP server for basic arithmetic calculations
Downloads
5
Maintainers
Readme
Calculate MCP Server
A simple Model Context Protocol (MCP) server that provides basic arithmetic calculation tools.
Features
This MCP server provides three tools for basic arithmetic operations:
- add: Add two numbers together
- subtract: Subtract the second number from the first number
- multiply: Multiply two numbers together
Installation
Clone or download this project
Install dependencies:
npm installBuild the project:
npm run build
Usage
Running the Server
npm startFor development with auto-reload:
npm run devAvailable Tools
add
Add two numbers together.
- Parameters:
a(number): First numberb(number): Second number
- Returns: The sum of a and b
subtract
Subtract the second number from the first number.
- Parameters:
a(number): First number (minuend)b(number): Second number (subtrahend)
- Returns: The difference (a - b)
multiply
Multiply two numbers together.
- Parameters:
a(number): First numberb(number): Second number
- Returns: The product of a and b
Claude Desktop Configuration
To use this MCP server with Claude Desktop, add the following to your claude_desktop_config.json:
{
"mcpServers": {
"calculate": {
"command": "node",
"args": ["/path/to/calculate-mcp-server/dist/index.js"]
}
}
}Replace /path/to/calculate-mcp-server with the actual path to your server installation.
Examples
Once configured with Claude Desktop, you can use the calculator like this:
- "Add 15 and 27"
- "Subtract 10 from 50"
- "Multiply 6 by 8"
Development
The project structure follows MCP best practices:
calculate-mcp-server/
├── package.json # Dependencies and scripts
├── tsconfig.json # TypeScript configuration
├── README.md # This file
└── src/ # Source code
├── index.ts # Main server entry point
└── tools/ # Individual tool implementations
├── add.ts
├── subtract.ts
└── multiply.tsLicense
MIT
