step-by-step-math
Click on "Deploy 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., "@step-by-step-math integrate x**2*sin(x) from 0 to pi and check the antiderivative"
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.
step-by-step-math
MCP server that solves math step by step with a symbolic engine and renders each step on a visual whiteboard.
Status: work in progress. Integrals are solved step by step (automatic, by parts, by substitution or by partial fractions, with the method the user picks) and shown on a whiteboard. Every step is checked by SymPy.
The model never does the math: it calls the tools, gets back a short summary (result, method, number of steps) and the user sees the steps on the whiteboard:
Inline in hosts that support MCP Apps (claude.ai, ChatGPT).
As a link (
board_url) over HTTP, or as a local HTML file (board_path) over stdio, for other hosts.
Requirements
Python 3.12+
Related MCP server: Symath-MCP
Run locally
uv sync
uv run pytest # run the tests
uv run step-by-step-math # start the MCP server over stdioTry it with MCP Inspector
npx @modelcontextprotocol/inspector uv --directory /path/to/step-by-step-math run step-by-step-mathUse it from Claude Code
claude mcp add step-by-step-math -- uv --directory /path/to/step-by-step-math run step-by-step-mathTools
Tool | Input | Output |
|
| result as text and LaTeX |
|
| antiderivative |
|
|
|
|
| internal: only the whiteboard app can call it (hidden from the model) |
Expressions use SymPy syntax (x**2, exp(x), sin(x), log(x)); sen, tg and ln are accepted too.
Configuration
Each computation runs in a separate process that is killed if it exceeds its limits.
Variable | Default | Meaning |
|
| seconds per computation |
|
| memory limit per computation ( |
|
| computations running at the same time |
|
|
|
| — | required with |
|
| public base URL used in whiteboard links |
|
| HTTP port (set by Railway) |
Deploy
The repo includes a Dockerfile (uv, python:3.14-slim) that starts the server over streamable HTTP:
MCP endpoint:
https://<your-domain>/mcp/<STEP_BY_STEP_MATH_PATH_TOKEN>Health check:
GET /healthWhiteboards:
GET /board/<id>(random 192-bit id, expires after 1 hour, kept in memory)
The full MCP URL is the secret. Custom connectors in claude.ai and ChatGPT cannot reliably send a fixed auth header, so the server is protected by an unguessable path segment instead. Anyone with the URL can use the server: don't share it, and rotate the token (redeploy with a new value) if it leaks. Any other path under /mcp returns 404, and request paths are not logged. Whiteboard links do not contain the token, so sharing one does not give access to the server.
Run the image locally:
podman build -t step-by-step-math . # or docker
TOKEN=$(python3 -c "import secrets; print(secrets.token_urlsafe(32))")
podman run --rm -p 8000:8000 -e STEP_BY_STEP_MATH_PATH_TOKEN="$TOKEN" step-by-step-math
npx @modelcontextprotocol/inspector --cli "http://127.0.0.1:8000/mcp/$TOKEN" --transport http --method tools/listOn Railway: deploy the repo (the Dockerfile is detected automatically), set STEP_BY_STEP_MATH_PATH_TOKEN, generate a public domain and set the health check path to /health. Railway sets PORT.
License
MIT
Available Tools
4 toolsdifferentiateARead-onlyIdempotent
Differentiate an expression with respect to a variable using a symbolic engine (SymPy). ALWAYS use it when a derivative is needed: do not differentiate by hand or adjust the result. Expression syntax (SymPy): x**2 (or x^2), 3*x (explicit multiplication), sin(x), cos(x), tan(x), exp(x), log(x) (natural log), sqrt(x), asin(x), atan(x). Also accepts sen, tg and ln. Constants: pi, E, oo (infinity). Returns the result in SymPy syntax and in LaTeX.
Inputs: expression (required), variable. Returns: latex, result, variable
get_boardARead-onlyIdempotent
Internal: loads a whiteboard's steps for the whiteboard UI. Do not call it.
Inputs: board_id (required). Returns: object
integrateARead-onlyIdempotent
Integrate an expression step by step with a symbolic engine (SymPy) and show every step on a visual whiteboard. NEVER integrate by hand and never change the result. method: 'auto' (default) or the method the user asks for: 'parts' (give u, optionally dv), 'substitution' (give u as a function of the variable, e.g. 'x2'), 'partial_fractions'. Use exactly the method and u the user chose; if the tool returns an error, tell the user and do not switch methods on your own. The user already sees all the steps on the whiteboard: do NOT rewrite or recompute them in your reply. Answer with the result and at most one short sentence about the method. If the whiteboard is not displayed in this app, give the user board_url (or board_path). Indefinite: omit 'lower'/'upper'; the result includes + C. Definite: give both limits (0, pi/2, E, oo, -oo); discontinuities are handled as improper integrals and status may be 'diverges' with an explanation. 'verification' is 'verified' or 'inconclusive' (only numeric). If the user brings their own antiderivative, use verify_antiderivative instead. Expression syntax (SymPy): x2 (or x^2), 3*x (explicit multiplication), sin(x), cos(x), tan(x), exp(x), log(x) (natural log), sqrt(x), asin(x), atan(x). Also accepts sen, tg and ln. Constants: pi, E, oo (infinity).
Inputs: expression (required), u, dv, lower, +3 more. Returns: kind, latex, steps, method, +11 more
verify_antiderivativeARead-onlyIdempotent
Check whether 'antiderivative' is a correct antiderivative of 'integrand' by differentiating it with a symbolic engine (SymPy). Use it whenever the user brings their own integration result: never compare or check by hand. Results that differ by a constant are correct. status: 'verified' (proven), 'inconclusive' (numerically correct but not proven symbolically) or 'incorrect' (with the simplified difference d/dx(antiderivative) - integrand). Expression syntax (SymPy): x**2 (or x^2), 3*x (explicit multiplication), sin(x), cos(x), tan(x), exp(x), log(x) (natural log), sqrt(x), asin(x), atan(x). Also accepts sen, tg and ln. Constants: pi, E, oo (infinity). A '+ C' in the antiderivative is fine.
Inputs: integrand (required), antiderivative (required), variable. Returns: note, status, difference, difference_latex
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
The three user-facing tools (integrate, differentiate, verify_antiderivative) have clearly distinct purposes backed by explicit guidance on when to use each. The presence of get_board, which is exposed but explicitly marked 'do not call', creates a mild ambiguity about what is actually callable.
All names are snake_case verb or verb_noun forms (integrate, differentiate, verify_antiderivative, get_board), forming a largely predictable pattern. The bare-verb names mix slightly with the noun-suffixed ones, but overall it reads consistently.
Four tools is a compact, coherent scope for a calculus helper, with each tool earning its place. However, one of the four is an internal UI helper that agents are told not to call, so the effective user-facing surface is only three, which is slightly thin.
The core workflow of step-by-step integration, differentiation, and antiderivative verification is covered, but obvious adjacent operations like simplify, limits, and equation solving are absent. Differentiate also lacks the step-by-step whiteboard treatment that integrate offers, leaving a gap in the domain's lifecycle.
Maintenance
Related MCP Connectors
Unofficial Math.js MCP — wraps the mathjs.org API (free, no auth)
Evaluate, simplify, and differentiate mathematical expressions.
This MCP server enables users to perform scientific computations regarding linear algebra and vect…
Exact arithmetic, algebra, calculus, physics, chemistry and finance with a checkable formula.
Related MCP Servers
- AlicenseCqualityDmaintenanceAn MCP server that provides access to SymPy's symbolic mathematics library for advanced algebraic computations. It enables users to perform complex tasks such as symbolic simplification, calculus, equation solving, matrix operations, and number theory.100MIT
- AlicenseAqualityDmaintenanceA symbolic mathematics MCP server supporting calculus, linear algebra, number theory, statistics, and unit conversion via natural language.8MIT
- AlicenseAqualityCmaintenanceEnables advanced mathematics operations including linear algebra, vector math, symbolic computation, and calculus through MCP tools. Designed for use with Claude and other MCP-compatible LLMs.192MIT
- AlicenseNot gradedqualityBmaintenanceProvides a token-efficient exact math engine for AI agents, enabling computation of derivatives, integrals, equations, and optimized Python/NumPy code via a single MCP tool.155 PyPI8MIT