home / mcp / math-physics-ml mcp server

Math-Physics-ML MCP Server

GPU-accelerated MCP servers for symbolic math, quantum simulations, molecular dynamics, and neural network tasks.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "andylbrummer-math-mcp": {
      "command": "uvx",
      "args": [
        "scicomp-math-mcp"
      ]
    }
  }
}

You can run four GPU-accelerated MCP servers that provide symbolic and numerical math, quantum wave mechanics, molecular dynamics, and neural network capabilities. These servers enable you to offload heavy computations to specialized workers, speeding up AI-assisted scientific tasks and enabling complex simulations in a flexible, scalable way.

How to use

Use an MCP client to connect to the four servers and send requests for symbolic math, quantum simulations, molecular dynamics, or neural model tasks. Each server exposes a focused set of tools you can call to perform compute-heavy operations, run long simulations asynchronously, and share results across MCP workflows via shared URIs. You can start a server locally, then address it from your client by name (math_mcp, quantum_mcp, molecular_mcp, neural_mcp) using the standard MCP client workflow.

How to install

Prerequisites you need before installing any MCP server are a frontend MCP client, Python, and a runtime command like uvx that can launch MCP servers. If you plan GPU acceleration, ensure CUDA is installed and visible to your environment.

Install the four MCP servers with a single command per package, or install all at once if you prefer. You can install them with the following commands:

# 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]

Additional setup for running locally

You can run each MCP server directly without a full install by using the uvx runner. Start each server with its own command as shown below, then connect from your MCP client to the corresponding server name.

Configuration

Configure your MCP client to reference the four servers so you can send requests for math, quantum, molecular, and neural tasks. The following configuration examples show how to register each server in your client’s MCP map.

Claude Desktop configuration

Add the MCP server entries to your Claude Desktop configuration so Claude can route requests to the appropriate servers.

{
  "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 configuration

Add to your project’s MCP configuration so Claude can route to the selected servers.

{
  "mcpServers": {
    "math-mcp": {
      "command": "uvx",
      "args": ["scicomp-math-mcp"]
    },
    "quantum-mcp": {
      "command": "uvx",
      "args": ["scicomp-quantum-mcp"]
    }
  }
}

Usage examples by server

This section highlights practical tasks you can perform with each server. Use the client to dispatch requests to the corresponding MCP server and handle the results.

Math MCP

Solve equations symbolically, compute derivatives, and perform GPU-accelerated matrix operations.

# 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 and solve the time-dependent Schrödinger equation on a grid.

# Create a Gaussian wave packet
psi = create_gaussian_wavepacket(
  grid_size=[256],
  position=[64],
  momentum=[2.0],
  width=5.0
)

# Solve time-dependent Schrödinger equation
simulation = solve_schrodinger(
  potential=barrier_potential,
  initial_state=psi,
  time_steps=1000,
  dt=0.1,
  use_gpu=True
)

Molecular MCP

Set up a particle system, add a Lennard-Jones potential, run an MD trajectory, and compute diffusion metrics.

# 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 models, load datasets, train models, and export trained networks for deployment.

# 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")

Tools and capabilities

The system provides a suite of tools across the four MCP servers to perform symbolic algebra, wave mechanics, molecular dynamics, and neural model workflows. Each tool is designed to run on GPU when available and to support asynchronous execution for long-running tasks.

Notes on performance and setup

GPU acceleration offers substantial speedups for large matrix operations, wave propagation simulations, molecular dynamics trajectories, and neural network training. Ensure CUDA compatibility for GPU-enabled installations and verify that the CUDA toolkit and drivers are properly configured in your environment.

Available tools

symbolic_solve

Solves equations symbolically using symbolic algebra with automatic simplification and exact results when possible.

symbolic_diff

Computes symbolic derivatives of expressions with respect to a given variable.

matrix_multiply

Performs matrix multiplication on CPU or GPU, with optional GPU acceleration.

create_gaussian_wavepacket

Generates an initial Gaussian wave packet for quantum simulations.

solve_schrodinger

Solves the time-dependent Schrödinger equation for a given potential and initial state.

create_particles

Initializes a particle system for molecular dynamics simulations.

add_potential

Adds inter-particle potentials to a molecular system (e.g., Lennard-Jones).

run_nvt

Runs an NVT ensemble MD trajectory simulation.

compute_msd

Calculates mean squared displacement from a trajectory to assess diffusion.

define_model

Builds a neural network model with a chosen architecture and settings.

train_model

Trains a neural network on a given dataset with specified hyperparameters.

export_model

Exports a trained model to a deployment-friendly format (e.g., ONNX).