io.github.andylbrummer/math-mcp
平台与服务by andylbrummer
GPU 加速的 MCP 服务器,支持 symbolic algebra、数值计算、FFT、优化以及 linear algebra。
什么是 io.github.andylbrummer/math-mcp?
GPU 加速的 MCP 服务器,支持 symbolic algebra、数值计算、FFT、优化以及 linear algebra。
README
Math-Physics-ML MCP System
GPU-accelerated Model Context Protocol servers for computational mathematics, physics simulations, and machine learning.
📚 Documentation
| Guide | Description |
|---|---|
| Installation | Setup instructions for pip, uv, and uvx |
| Configuration | Claude Desktop & Claude Code setup |
| Quick Start | Get running in 5 minutes |
| API Reference | Complete tool documentation |
| Visual Demos | Interactive physics simulations |
About
This system enables AI assistants to perform real scientific computing — from solving differential equations to running molecular dynamics simulations.
<table> <tr> <td align="center" width="50%"> <img src="docs/static/img/demos/double_slit.webp" alt="Double-Slit Interference" width="100%"/> <br/><b>Quantum Wave Mechanics</b><br/> <sub>Double-slit interference pattern from solving the time-dependent Schrödinger equation</sub> </td> <td align="center" width="50%"> <img src="docs/static/img/demos/galaxy_collision.webp" alt="Galaxy Collision" width="100%"/> <br/><b>N-Body Dynamics</b><br/> <sub>Galaxy merger simulation using gravitational N-body calculations</sub> </td> </tr> <tr> <td align="center" width="50%"> <img src="docs/static/img/demos/bragg_hexagonal.webp" alt="Bragg Scattering" width="100%"/> <br/><b>Crystal Diffraction</b><br/> <sub>Bragg scattering from a hexagonal (graphene-like) lattice</sub> </td> <td align="center" width="50%"> <img src="docs/static/img/demos/triple_slit.webp" alt="Triple-Slit" width="100%"/> <br/><b>Multi-Slit Interference</b><br/> <sub>Complex interference patterns from three coherent sources</sub> </td> </tr> </table>Overview
This system provides 4 specialized MCP servers that bring scientific computing capabilities to AI assistants like Claude:
| Server | Description | Tools |
|---|---|---|
| Math MCP | Symbolic algebra (SymPy) + numerical computing | 14 |
| Quantum MCP | Wave mechanics & Schrodinger simulations | 12 |
| Molecular MCP | Classical molecular dynamics | 15 |
| Neural MCP | Neural network training & evaluation | 16 |
Key Features:
- GPU acceleration with automatic CUDA detection (10-100x speedup)
- Async task support for long-running simulations
- Cross-MCP workflows via URI-based data sharing
- Progressive discovery for efficient tool exploration
Quick Start
Installation with uvx (Recommended)
Run any MCP server directly without installation:
# Run individual servers
uvx scicomp-math-mcp
uvx scicomp-quantum-mcp
uvx scicomp-molecular-mcp
uvx scicomp-neural-mcp
Installation with pip/uv
# Install individual servers
pip install scicomp-math-mcp
pip install scicomp-quantum-mcp
pip install scicomp-molecular-mcp
pip install scicomp-neural-mcp
# Or install all at once
pip install scicomp-math-mcp scicomp-quantum-mcp scicomp-molecular-mcp scicomp-neural-mcp
# With GPU support (requires CUDA)
pip install scicomp-math-mcp[gpu] scicomp-quantum-mcp[gpu] scicomp-molecular-mcp[gpu] scicomp-neural-mcp[gpu]
Configuration
Claude Desktop
Add to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"math-mcp": {
"command": "uvx",
"args": ["scicomp-math-mcp"]
},
"quantum-mcp": {
"command": "uvx",
"args": ["scicomp-quantum-mcp"]
},
"molecular-mcp": {
"command": "uvx",
"args": ["scicomp-molecular-mcp"]
},
"neural-mcp": {
"command": "uvx",
"args": ["scicomp-neural-mcp"]
}
}
}
Claude Code
Add to your project's .mcp.json:
{
"mcpServers": {
"math-mcp": {
"command": "uvx",
"args": ["scicomp-math-mcp"]
},
"quantum-mcp": {
"command": "uvx",
"args": ["scicomp-quantum-mcp"]
}
}
}
Or configure globally in ~/.claude/settings.json.
Usage Examples
Math MCP
# Solve equations symbolically
symbolic_solve(equations="x**3 - 6*x**2 + 11*x - 6")
# Result: [1, 2, 3]
# Compute derivatives
symbolic_diff(expression="sin(x)*exp(-x**2)", variable="x")
# Result: cos(x)*exp(-x**2) - 2*x*sin(x)*exp(-x**2)
# GPU-accelerated matrix operations
result = matrix_multiply(a=matrix_a, b=matrix_b, use_gpu=True)
Quantum MCP
# Create a Gaussian wave packet
psi = create_gaussian_wavepacket(
grid_size=[256],
position=[64],
momentum=[2.0],
width=5.0
)
# Solve time-dependent Schrodinger equation
simulation = solve_schrodinger(
potential=barrier_potential,
initial_state=psi,
time_steps=1000,
dt=0.1,
use_gpu=True
)
Molecular MCP
# Create particle system
system = create_particles(
n_particles=1000,
box_size=[20, 20, 20],
temperature=1.5
)
# Add Lennard-Jones potential
add_potential(system_id=system, potential_type="lennard_jones")
# Run MD simulation
trajectory = run_nvt(system_id=system, n_steps=100000, temperature=1.0)
# Analyze diffusion
msd = compute_msd(trajectory_id=trajectory)
Neural MCP
# Define model
model = define_model(architecture="resnet18", num_classes=10, pretrained=True)
# Load dataset
dataset = load_dataset(dataset_name="CIFAR10", split="train")
# Train
experiment = train_model(
model_id=model,
dataset_id=dataset,
epochs=50,
batch_size=128,
use_gpu=True
)
# Export for deployment
export_model(model_id=model, format="onnx", output_path="model.onnx")
Development
# Clone the repository
git clone https://github.com/andylbrummer/math-mcp.git
cd math-mcp
# Install dependencies
uv sync --all-extras
# Install MCP servers in editable mode (required for entry points)
uv pip install --python .venv/bin/python \
-e servers/math-mcp \
-e servers/quantum-mcp \
-e servers/molecular-mcp \
-e servers/neural-mcp
# Run tests
uv run pytest -m "not gpu" # CPU only
uv run pytest # All tests (requires CUDA)
# Run with coverage
uv run pytest --cov=shared --cov=servers
Note: The editable install step is required because
uv syncdoesn't install entry point scripts for workspace packages. After this step, you can run servers directly withuv run scicomp-math-mcp.
See CONTRIBUTING.md for development guidelines.
Performance
GPU acceleration provides significant speedups for compute-intensive operations:
| MCP | Operation | CPU | GPU | Speedup |
|---|---|---|---|---|
| Math | Matrix multiply (4096x4096) | 2.1s | 35ms | 60x |
| Quantum | 2D Schrodinger (512x512, 1000 steps) | 2h | 2min | 60x |
| Molecular | MD (100k particles, 10k steps) | 1h | 30s | 120x |
| Neural | ResNet18 training (1 epoch) | 45min | 30s | 90x |
Architecture
For technical details about the system architecture, see ARCHITECTURE.md.
License
MIT License - see LICENSE for details.
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
常见问题
io.github.andylbrummer/math-mcp 是什么?
GPU 加速的 MCP 服务器,支持 symbolic algebra、数值计算、FFT、优化以及 linear algebra。
相关 Skills
MCP构建
by anthropics
聚焦高质量 MCP Server 开发,覆盖协议研究、工具设计、错误处理与传输选型,适合用 FastMCP 或 MCP SDK 对接外部 API、封装服务能力。
✎ 想让 LLM 稳定调用外部 API,就用 MCP构建:从 Python 到 Node 都有成熟指引,帮你更快做出高质量 MCP 服务器。
Slack动图
by anthropics
面向Slack的动图制作Skill,内置emoji/消息GIF的尺寸、帧率和色彩约束、校验与优化流程,适合把创意或上传图片快速做成可直接发送的Slack动画。
✎ 帮你快速做出适配 Slack 的动图,内置约束规则和校验工具,少踩上传与播放坑,做表情包和演示都更省心。
MCP服务构建器
by alirezarezvani
从 OpenAPI 一键生成 Python/TypeScript MCP server 脚手架,并校验 tool schema、命名规范与版本兼容性,适合把现有 REST API 快速发布成可生产演进的 MCP 服务。
✎ 帮你快速搭建 MCP 服务与后端 API,脚手架完善、扩展顺手,尤其适合想高效验证服务能力的开发者。
相关 MCP Server
Slack 消息
编辑精选by Anthropic
Slack 是让 AI 助手直接读写你的 Slack 频道和消息的 MCP 服务器。
✎ 这个服务器解决了团队协作中需要 AI 实时获取 Slack 信息的痛点,特别适合开发团队让 Claude 帮忙汇总频道讨论或发送通知。不过,它目前只是参考实现,文档有限,不建议在生产环境直接使用——更适合开发者学习 MCP 如何集成第三方服务。
by netdata
io.github.netdata/mcp-server 是让 AI 助手实时监控服务器指标和日志的 MCP 服务器。
✎ 这个工具解决了运维人员需要手动检查系统状态的痛点,最适合 DevOps 团队让 Claude 自动分析性能数据。不过,它依赖 NetData 的现有部署,如果你没用过这个监控平台,得先花时间配置。
by d4vinci
Scrapling MCP Server 是专为现代网页设计的智能爬虫工具,支持绕过 Cloudflare 等反爬机制。
✎ 这个工具解决了爬取动态网页和反爬网站时的头疼问题,特别适合需要批量采集电商价格或新闻数据的开发者。不过,它依赖外部浏览器引擎,资源消耗较大,不适合轻量级任务。