
sdiehl/sympy-mcp
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
sdiehl/sympy-mcp는 MCP 서버 후보가 https://github.com/sdiehl/sympy-mcp.에서 수입됩니다
개요
sdiehl/sympy-mcp는 MCP 서버 후보가 https://github.com/sdiehl/sympy-mcp.에서 수입됩니다
개요(AI 번역)
이 라이브러리는 더 이상 유지되지 않습니다. 그것은 아파치 라이센스이므로 포크로 자유롭게 느끼실 수 있습니다.
Sympy-MCP는 LLM을 자율적으로 실행하는 상징적인 수학 및 컴퓨터 algebra를 허용하는 모델 Context Protocol 서버입니다. SymPy의 핵심 기능에서 수학 표현과 방정식을 조작하기 위한 MCP 클라이언트에 수많은 도구를 노출합니다.
왜?
언어 모델은 상징적인 조작에 절대적으로 abysmal입니다. 그들은 변수를 복종, 무작위 상수, permute 용어를 만들고 일반적으로 메시를 만듭니다. 그러나 우리는 상징적인 조작을 위해 특별히 건축된 컴퓨터 algebra 체계가 있습니다, 그래서 우리는 심볼 커널이 모든 무거운 드는 것을 허용하기 때문에 변환의 순서에 관칭을 사용할 수 있습니다.
LLM은 확실히 Mathematica 또는 Python 코드를 생성 할 수 있지만 에이전트 또는 on-the-fly 계산기로 LLM을 사용하려는 경우 MCP 서버를 사용하고 심볼 도구를 직접 노출하는 더 나은 경험입니다.
서버는 일반적인 반향성 및 일반 차동식 방정식, 통합 및 차동, 벡터 calculus, 10sor calculus를 포함한 상징적 인 수학 기능을 포함합니다.
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
Symbolic Algebra MCP Server
This library is no longer maintained. It is Apache licensed, so feel free to fork it.
Sympy-MCP is a Model Context Protocol server for allowing LLMs to autonomously perform symbolic mathematics and computer algebra. It exposes numerous tools from SymPy’s core functionality to MCP clients for manipulating mathematical expressions and equations.
Why?
Language models are absolutely abysmal at symbolic manipulation. They hallucinate variables, make up random constants, permute terms and generally make a mess. But we have computer algebra systems specifically built for symbolic manipulation, so we can use tool-calling to orchestrate a sequence of transforms so that the symbolic kernel does all the heavy lifting.
While you can certainly have an LLM generate Mathematica or Python code, if you want to use the LLM as an agent or on-the-fly calculator, it’s a better experience to use the MCP server and expose the symbolic tools directly.
The server exposes a subset of symbolic mathematics capabilities including algebraic equation solving, integration and differentiation, vector calculus, tensor calculus for general relativity, and both ordinary and partial differential equations.
For example, you can ask it in natural language to solve a differential equation:
Solve the damped harmonic oscillator with forcing term: the mass-spring-damper system described by the differential equation where m is mass, c is the damping coefficient, k is the spring constant, and F(t) is an external force.
$$ m\frac{d^2x}{dt^2} + c\frac{dx}{dt} + kx = F(t) $$
Or involving general relativity:
Compute the trace of the Ricci tensor $R_{\mu\nu}$ using the inverse metric $g^{\mu\nu}$ for Anti-de Sitter spacetime to determine its constant scalar curvature $R$.
Usage
You need uv first.
- Homebrew :
brew install uv - Curl :
curl -LsSf https://astral.sh/uv/install.sh | sh
Then you can install and run the server with the following commands:
# Setup the project
git clone https://github.com/sdiehl/sympy-mcp.git
cd sympy-mcp
uv sync
# Install the server to Claude Desktop
uv run mcp install server.py
# Run the server
uv run mcp run server.py
You should see the server available in the Claude Desktop app now. For other clients, see below.
If you want a completely standalone version that just runs with a single command, you can use the following. Note this is running arbitrary code from Github, so be careful.
uv run --with https://github.com/sdiehl/sympy-mcp/releases/download/0.1/sympy_mcp-0.1.0-py3-none-any.whl python server.py
If you want to do general relativity calculations, you need to install the einsteinpy library.
uv sync --group relativity
Available Tools
The sympy-mcp server provides the following tools for symbolic mathematics:
설치
docker run -i -p 8081:8081 --rm sympy-mcp설정
{
"mcpServers": {
"sympy-mcp": {
"command": "/opt/homebrew/bin/uv",
"args": [
"run",
"--with",
"einsteinpy",
"--with",
"mcp[cli]",
"--with",
"pydantic",
"--with",
"sympy",
"mcp",
"run",
"/ABSOLUTE_PATH_TO_SYMPY_MCP/server.py"
]
}
}
}