Mcp Math Server

Mcp Math Server

By AjinkyaSambare GitHub

-

mathgpt math-solver
Overview

what is Mcp Math Server?

Mcp Math Server is an MCP (Model Context Protocol) server that provides basic arithmetic operations such as addition, subtraction, multiplication, and division, designed for integration with LLMs like Claude.

how to use Mcp Math Server?

To use Mcp Math Server, install it via PyPI or from source, then run the mcp-math command to start the server. You can then use the available math tools through the command line or integrate it with Claude Desktop.

key features of Mcp Math Server?

  • Claude/LLM-ready math tools
  • Four core operations: add, subtract, multiply, divide
  • Designed for seamless MCP integration
  • Easy CLI usage via mcp-math command

use cases of Mcp Math Server?

  1. Performing basic arithmetic operations in applications.
  2. Integrating with AI models for enhanced math capabilities.
  3. Providing a backend for educational tools that require math computations.

FAQ from Mcp Math Server?

  • What operations does Mcp Math Server support?

It supports addition, subtraction, multiplication, and division.

  • How do I install Mcp Math Server?

You can install it using pip: pip install mcp-math-server.

  • Can I contribute to the project?

Yes! Contributions are welcome, and you can fork the repository to add more features.

Content

PyPI version Python License


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

ToolDescription
addAdds two numbers
subtractSubtracts one number from another
multiplyMultiplies two numbers
divideDivides one number by another

🤖 Using with Claude Desktop

  1. Download Claude Desktop if you haven’t.
  2. Make sure your MCP server is running via:
mcp-math
  1. In another terminal, register it with Claude:
mcp install $(which mcp-math) --name "Math Assistant"
  1. 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 🚀
No tools information available.

-

mathgpt math-solver
View Details
StatSource
StatSource by jamie7893

Statsource is a standalone MCP server designed to simplify data analysis. Whether you're pulling data from a PostgreSQL database or a CSV file, Statsource delivers actionable insights with ease

mathgpt math-solver
View Details

Mirror of

mathgpt math-solver
View Details

created from MCP server demo

mathgpt math-solver
View Details

-

mathgpt math-solver
View Details

created from MCP server demo

mathgpt math-solver
View Details