什么是 V-Sekai-fire's Sympy?
Solve symbolic mathematics problems using SymPy.
README
SymPy MCP
An Elixir-based MCP (Model Context Protocol) server that provides symbolic mathematics capabilities using SymPy.
Features
- Symbolic Equation Solving: Solve algebraic equations for variables
- Expression Simplification: Simplify complex symbolic expressions
- Differentiation & Integration: Compute derivatives and integrals
- Expression Manipulation: Expand and factor algebraic expressions
- Numerical Evaluation: Evaluate expressions with variable substitutions
Quick Start
Prerequisites
- Elixir 1.18+
- OpenSSL development libraries
Note: Python 3.12 and SymPy are automatically installed during compilation.
Installation
git clone https://github.com/V-Sekai-fire/sympy-mcp.git
cd sympy-mcp
mix deps.get
mix compile
Usage
STDIO Transport (Default)
For local development:
mix mcp.server
Or using release:
./_build/prod/rel/sympy_mcp/bin/sympy_mcp start
HTTP Transport
For web deployments (e.g., Smithery):
PORT=8081 MIX_ENV=prod ./_build/prod/rel/sympy_mcp/bin/sympy_mcp start
Endpoints:
POST /- JSON-RPC 2.0 MCP requestsGET /sse- Server-Sent Events for streamingGET /health- Health check
Docker
docker build -t sympy-mcp .
docker run -d -p 8081:8081 --name sympy-mcp sympy-mcp
Available Tools
sympy_solve- Solve equations (e.g.,x**2 - 1forx)sympy_simplify- Simplify expressionssympy_differentiate- Compute derivativessympy_integrate- Compute integralssympy_expand- Expand expressionssympy_factor- Factor expressionssympy_evaluate- Evaluate numerically
Example
STDIO:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "sympy_solve",
"arguments": {
"equation": "x**2 - 4",
"variable": "x"
}
}
}
HTTP:
curl -X POST http://localhost:8081/ \
-H "Content-Type: application/json" \
-H "mcp-protocol-version: 2025-06-18" \
-d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "sympy_solve", "arguments": {"equation": "x**2 - 4", "variable": "x"}}}'
Configuration
Optional MCP Configuration:
The server supports optional configuration during initialization:
timeout_ms(integer, optional): Maximum time in milliseconds allowed for SymPy operations. If not provided, no timeout is enforced. Must be between 100 and 300000. Prevents resource exhaustion and DoS attacks.- Example values:
5000,10000,30000
- Example values:
Environment Variables:
PORT- HTTP server port (default: 8081)HOST- HTTP server host (default:0.0.0.0if PORT set, elselocalhost)MIX_ENV- Environment (prod,dev,test)ELIXIR_ERL_OPTIONS- Erlang options (set to"+fnu"for UTF-8)
The server uses HTTP streaming only (no stdio transport).
Troubleshooting
Python/SymPy not found: The build process installs Python 3.12 automatically. Run mix clean && mix compile if issues persist.
Port already in use: Change PORT environment variable or stop conflicting services.
Compilation errors: Run mix deps.get && mix clean && mix compile.
Debug mode: Use MIX_ENV=dev mix mcp.server for verbose logging.
License
MIT License - see LICENSE.md for details.
Contributing
See DEVELOPING.md for development setup and contribution guidelines.
常见问题
V-Sekai-fire's Sympy 是什么?
Solve symbolic mathematics problems using SymPy.
相关 Skills
面试体系设计
by alirezarezvani
按岗位、级别和团队设计面试流程,生成能力矩阵、题库与评分标准,分析面试官偏差并校准招聘门槛,适合搭建或优化企业招聘体系。
✎ 团队招人没章法时,用它快速搭建岗位化面试流程、题库与评分标准,还能兼顾校准面试偏差,招聘更稳更准。
相关 MCP Server
by boosted-chat
Flight search & booking for AI agents. 400+ airlines, $20-50 cheaper than OTAs.
by jjlabsio
Search company disclosures and financial statements from the Korean market. Retrieve stock profiles, market classifications, and historical trading data across major exchanges. Accelerate equity research with accurate, date-specific insights for Korean securities.
✎ 做韩国股研时,用它能一站查公司披露、财报和历史行情,按日期精确追溯关键信息,比手动翻交易所高效太多。
by jjlabsio
检索韩国市场公司的披露文件与财务报表,并获取股票概况等关键信息。
✎ 想研究韩股公司时,它能一站式拉取披露、财报和股票概况,省去跨站查资料的麻烦,对跨境投研尤其省时。