math-logic-mcp
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-logic-mcpsolve x^2 - 4 = 0"
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-logic-mcp
MCP server that gives small LLMs verified symbolic-math & logic tools.
Small language models (Mistral, Llama, Phi, Gemma) struggle with multi-step math and formal logic. Instead of fine-tuning, give them tools. This project exposes a set of verified math and logic solvers via the Model Context Protocol (MCP), so any MCP-compatible LLM can call them as functions.
Features
Tool | What it does | Backend |
| Safe arithmetic evaluation | Python stdlib (zero deps) |
| Symbolic equation solving | SymPy (optional) |
| Simplify / factor / expand | SymPy (optional) |
| Differentiation | SymPy (optional) |
| Integration | SymPy (optional) |
| SAT / tautology / truth tables | Z3 (optional) |
Every result includes proof steps and verification — the LLM gets a machine-checked answer, not a guess.
Related MCP server: verifiable-thinking-mcp
Quick Start
Install from PyPI
pip install math-logic-mcpInstall (full — all solvers)
pip install "math-logic-mcp[full]"Run the MCP server
# stdio transport (for Claude Desktop, Cursor, etc.)
math-logic-mcp
# HTTP/SSE transport (for remote clients)
math-logic-mcp --httpConfigure in Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"math-logic": {
"command": "math-logic-mcp"
}
}
}Configure in Cursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"math-logic": {
"command": "math-logic-mcp"
}
}
}Use as a Python Library
from math_logic import MathLogicEngine
engine = MathLogicEngine()
# Arithmetic (always available)
result = engine.solve("compute 2 + 3 * 4")
print(result.solutions) # ['14']
# Algebra (requires sympy)
result = engine.solve("Solve x^2 - 4 = 0")
print(result.solutions) # ['x = -2', 'x = 2']
# Logic (requires z3-solver)
result = engine.solve('Check satisfiability of "p and q"')
print(result.solutions) # ['Satisfiable: p=True, q=True']Architecture
LLM ─── MCP Protocol ──▶ mcp_server.py
│
engine.py (router → solver → result)
│
┌───────────────┼───────────────┐
▼ ▼ ▼
ArithmeticSolver SymPySolver Z3Solver
(zero deps) (pip: sympy) (pip: z3-solver)The router classifies each problem by regex patterns and routes to the best available solver. Solvers are loaded lazily — if SymPy isn't installed, algebra problems gracefully report the missing dependency.
Installation Extras
Extra | What it adds | Install size |
(none) | Arithmetic only | ~1 MB |
| + algebra, calculus, simplification | ~50 MB |
| + propositional logic, SAT | ~30 MB |
| Everything | ~80 MB |
| + pytest, ruff | ~85 MB |
pip install "math-logic-mcp[sympy]" # algebra + calculus
pip install "math-logic-mcp[z3]" # logic
pip install "math-logic-mcp[full]" # everything
pip install "math-logic-mcp[full,dev]" # everything + dev toolsDevelopment
git clone https://github.com/ismailkerimov/math-logic-mcp.git
cd math-logic-mcp
pip install -e ".[full,dev]"
pytest tests/ -vDocker
docker build -t math-logic-mcp .
docker run -p 8080:8080 math-logic-mcpLicense
Apache 2.0 — see LICENSE.
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
- Alicense-quality-maintenanceAn MCP server that enables Large Language Models to interactively create, edit, and solve constraint models using backends like MiniZinc, Z3, PySAT, and Clingo. It bridges natural language with symbolic reasoning for solving complex logical, SAT, SMT, and optimization problems.Last updated
- AlicenseBquality-maintenanceMCP server for structured reasoning with cognitive trap detection, verification, and context compressionLast updated5411
- AlicenseAqualityCmaintenanceGive brains to your small models. MCP server that enforces step-by-step Chain-of-Thought — turns 4B models into methodical reasoners.Last updated155MIT
- AlicenseCqualityDmaintenanceA universal mathematics MCP server that gives LLM clients full access to SageMath for symbolic calculus, number theory, linear algebra, and more, with persistent state across tool calls.Last updated339MIT
Related MCP Connectors
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
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/ismailkerimov/math-logic-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server