Basic Math MCP Server
A simple Model Context Protocol (MCP) server that provides basic mathematical operations.
Features
This MCP server provides two tools:
sum: Add two numbers together
subtraction: Subtract the second number from the first number
Installation
Install dependencies:
Build the TypeScript code:
Usage
Testing the server directly
Connecting to AI clients (Claude Desktop, etc.)
Copy the
mcp.json
configuration to your AI client's MCP configuration directoryUpdate the path in
mcp.json
to point to your server's locationRestart your AI client
Configuration for Claude Desktop
Add this to your Claude Desktop MCP configuration file:
Available Tools
sum
Description: Add two numbers together
Parameters:
a
(number): First numberb
(number): Second number
Returns: The sum of the two numbers
subtraction
Description: Subtract the second number from the first number
Parameters:
a
(number): First number (minuend)b
(number): Second number (subtrahend)
Returns: The result of a - b
Development
Build:
npm run build
Start:
npm start
Development:
npm run dev
(builds and starts)
Project Structure
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Tools
A simple server that provides basic mathematical operations (sum and subtraction) through the Model Context Protocol.
Related MCP Servers
- AsecurityFlicenseAqualityA server that provides tools for performing basic arithmetic operations (addition, subtraction, multiplication, division) via the Model Context Protocol.Last updated -4
- AsecurityFlicenseAqualityA simple server that provides basic arithmetic operations (addition, subtraction, multiplication, division) as tools that can be called by Large Language Models through the Model Context Protocol.
- AsecurityFlicenseAqualityA simple Model Context Protocol server that provides basic arithmetic operations (addition, subtraction, multiplication, division) as tools that can be called by Large Language Models.
- AsecurityAlicenseAqualityA Model Context Protocol server that provides basic calculator functionality for LLMs, enabling them to perform mathematical operations like addition, subtraction, multiplication, division, modulo, and square root.Last updated -622214MIT License