Provides tools for exporting exact arithmetic and verification code into notebook-ready formats for use in Jupyter Notebooks.
Integrates symbolic mathematics capabilities for performing exact arithmetic and mathematical verification of expressions.
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., "@mcp-mathcalculate 1/17 + 1/19 exactly and export the notebook-ready code"
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.
mcp-math
Exact arithmetic and verification tools for math competitions.
Purpose
Provides helpers for solving math problems with:
Exact arithmetic (fractions, bigints, SymPy)
Verification checks (integer, mod, range)
Notebook-exportable code
Design
The core is pure Python that works in Jupyter notebooks. The MCP server is a thin wrapper for local development.
mcp-math/
├── src/
│ ├── core/ # Pure Python helpers (notebook-compatible)
│ │ ├── exact.py # Exact arithmetic functions
│ │ └── verify.py # Verification functions
│ ├── server.py # MCP server wrapper
│ └── export.py # Export helpers for notebooks
└── tests/Usage
In Claude Code (via MCP)
mikey_math_exact expr="1/3 + 1/4"
mikey_math_verify value=42 check="integer"
mikey_math_export # Get notebook-ready codeIn Jupyter Notebook
# Copy from export or paste directly
from fractions import Fraction
from sympy import *
def exact_eval(expr):
"""Evaluate expression with exact arithmetic."""
...Installation
cd ~/Code/mcp-math
python3 -m venv .venv
source .venv/bin/activate
pip install sympy mcpAdd to ~/.claude.json:
"mcp-math": {
"command": "/Users/YOUR_USERNAME/Code/mcp-math/.venv/bin/python3",
"args": ["/Users/YOUR_USERNAME/Code/mcp-math/src/server.py"]
}