Mcp Math Server
AjinkyaSambare
README
β
README.md for mcp-math-server
# π MCP Math Server
An [MCP (Model Context Protocol)](https://modelcontextprotocol.io) server that provides basic arithmetic operations β addition, subtraction, multiplication, and division β to integrate easily with LLMs like Claude.
> Built using the official `mcp` Python SDK and `FastMCP`.
---
## π Features
- β¨ Claude/LLM-ready math tools
- π’ Four core operations: add, subtract, multiply, divide
- π§ Designed for seamless MCP integration
- π Easy CLI usage via `mcp-math` command
---
## π¦ Installation
You need Python 3.10 or later.
### Option 1: From PyPI (once published)
```bash
pip install mcp-math-server
Then run:
mcp-math
Option 2: From source (for development)
git clone https://github.com/yourusername/mcp-math-server.git
cd mcp-math-server
# Recommended: use virtualenv or uv
python3 -m venv venv
source venv/bin/activate
pip install -e .
mcp-math
π§ͺ Usage
After running mcp-math, your server will expose these tools:
π§ Tools
| Tool | Description |
|---|---|
add |
Adds two numbers |
subtract |
Subtracts one number from another |
multiply |
Multiplies two numbers |
divide |
Divides one number by another |
π€ Using with Claude Desktop
- Download Claude Desktop if you havenβt.
- Make sure your MCP server is running via:
mcp-math
- In another terminal, register it with Claude:
mcp install $(which mcp-math) --name "Math Assistant"
- Claude will now show βMath Assistantβ as an available context/tool.
π§ Example prompt in Claude:
βUse the multiply tool from Math Assistant to calculate 12 Γ 6.β
π§° Example MCP Inspector Test
You can also test it manually:
mcp dev mcp_math/server.py
Try calling:
{
"tool": "divide",
"arguments": { "x": 100, "y": 5 }
}
π Project Structure
mcp-math-server/
βββ mcp_math/
β βββ __init__.py
β βββ server.py # All MCP logic
βββ pyproject.toml # Package config
βββ README.md # You're reading this
π οΈ Development
Feel free to fork or clone this repo and add more math tools, logging, or context history!
To build & publish to PyPI:
pip install build twine
python -m build
twine upload dist/*
π License
MIT Β© 2025 Ajinkya
See LICENSE for details.
π Contributions Welcome
If you have an idea or improvement, feel free to open an issue or pull request. Let's make LLMs better at math β together!
---
## β
Next Steps for You
- β
Save this `README.md` to your root folder
- β
Replace placeholder fields:
- `https://github.com/yourusername/...`
- Your name + email
- β
Add a `LICENSE` file (MIT recommended β I can generate one)
---
Would you like me to:
- Create a matching `LICENSE` file?
- Help write a `setup.cfg` or GitHub Actions CI?
- Add more advanced math (e.g. percentages, square roots)?
Letβs keep leveling it up π
Recommended Servers
mixpanel
Connect to your Mixpanel data. Query events, retention, and funnel data from Mixpanel analytics.
Sequential Thinking MCP Server
This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.
dbt Semantic Layer MCP Server
A server that enables querying the dbt Semantic Layer through natural language conversations with Claude Desktop and other AI assistants, allowing users to discover metrics, create queries, analyze data, and visualize results.
MCP PubMed Search
Server to search PubMed (PubMed is a free, online database that allows users to search for biomedical and life sciences literature). I have created on a day MCP came out but was on vacation, I saw someone post similar server in your DB, but figured to post mine.
Crypto Price & Market Analysis MCP Server
A Model Context Protocol (MCP) server that provides comprehensive cryptocurrency analysis using the CoinCap API. This server offers real-time price data, market analysis, and historical trends through an easy-to-use interface.
Nefino MCP Server
Provides large language models with access to news and information about renewable energy projects in Germany, allowing filtering by location, topic (solar, wind, hydrogen), and date range.
Vectorize
Vectorize MCP server for advanced retrieval, Private Deep Research, Anything-to-Markdown file extraction and text chunking.
MATLAB MCP Server
Integrates MATLAB with AI to execute code, generate scripts from natural language, and access MATLAB documentation seamlessly.
Macrostrat MCP Server
Enables Claude to query comprehensive geologic data from the Macrostrat API, including geologic units, columns, minerals, and timescales through natural language.
MCP Word Counter
A Model Context Protocol server that provides tools for analyzing text documents, including counting words and characters. This server helps LLMs perform text analysis tasks by exposing simple document statistics functionality.