Math MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Math MCP ServerWhat is 15 divided by 3?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Math MCP Server
A clean and simple Model Context Protocol (MCP) server built with FastMCP that provides four fundamental mathematical operations as tools.
Features
This MCP server exposes the following tools:
add - Add two numbers together
subtract - Subtract the second number from the first
multiply - Multiply two numbers together
divide - Divide the first number by the second (with zero-division protection)
Related MCP server: Math Operations MCP Server
Installation
# Install dependencies
uv syncUsage
Running the Server
The server can be run directly using:
uv run math-mcp-serverConfiguring in Kiro or Other MCP Clients
Add this server to your MCP client configuration (e.g., ~/.kiro/settings/mcp.json):
{
"mcpServers": {
"math": {
"command": "uv",
"args": [
"--directory",
"d:\\MCP\\math-mcp-server",
"run",
"math-mcp-server"
]
}
}
}Example Tool Usage
Once configured, you can use the tools through your MCP client:
Addition:
Input:
a=5, b=3Output:
5 + 3 = 8
Subtraction:
Input:
a=10, b=4Output:
10 - 4 = 6
Multiplication:
Input:
a=7, b=6Output:
7 × 6 = 42
Division:
Input:
a=15, b=3Output:
15 ÷ 3 = 5.0
Code Structure
The implementation is extremely simple and readable using FastMCP:
from fastmcp import FastMCP
mcp = FastMCP("Math Operations Server")
@mcp.tool()
def add(a: float, b: float) -> str:
"""Add two numbers together."""
result = a + b
return f"{a} + {b} = {result}"
# ... and so on for subtract, multiply, divideEach operation is a separate @mcp.tool() decorated function, making the code:
Easy to read and understand
Simple to extend with new operations
Self-documenting with type hints and docstrings
Project Structure
math-mcp-server/
├── src/
│ └── math_mcp_server/
│ └── __init__.py # Main server implementation (4 simple functions!)
├── pyproject.toml # Project configuration
└── README.md # This fileRequirements
Python >= 3.14
fastmcp >= 3.4.6
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides basic mathematical calculation functionality through MCP tools including arithmetic operations, exponentiation, and square root calculations. Features proper error handling for edge cases like division by zero and negative square roots.6352MIT
- Alicense-qualityDmaintenanceEnables AI applications to perform basic mathematical operations like addition and subtraction through MCP tools. Also provides REST API endpoints for the same operations.MIT
- Alicense-qualityDmaintenanceProvides a comprehensive set of mathematical functions as MCP tools, enabling language models to perform calculations including arithmetic, trigonometry, logarithms, and more.131MIT
- Flicense-qualityCmaintenanceProvides basic calculator operations (add, subtract, multiply, divide) as MCP tools for use with Claude Desktop and other MCP clients.
Related MCP Connectors
Number utilities MCP.
Educational MCP server with 17 math/stats tools, visualizations, and persistent workspace
This MCP server enables users to perform scientific computations regarding linear algebra and vect…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/DevCraftYaseen/MathMCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server