Skip to main content

Math-Physics-ML MCP System

Welcome to the Math-Physics-ML MCP System documentation!

The Math-Physics-ML MCP System is a comprehensive, GPU-accelerated platform providing Model Context Protocol (MCP) servers for computational mathematics, physics simulations, and machine learning.

Overviewโ€‹

This system consists of 4 specialized MCP servers that work together to provide a complete computational science platform:

๐Ÿงฎ Math MCPโ€‹

Symbolic algebra (SymPy) and GPU-accelerated numerical computing

  • 14 tools for symbolic math, linear algebra, FFT, and optimization
  • Foundation layer used by other MCPs

โš›๏ธ Quantum MCPโ€‹

Wave mechanics and Schrรถdinger equation simulations

  • 12 tools for quantum simulations
  • Split-step Fourier solver for time-dependent wave evolution
  • Support for 1D and 2D systems

๐Ÿ”ฌ Molecular MCPโ€‹

Classical molecular dynamics simulations

  • 15 tools for particle systems and MD simulations
  • NVE, NVT, and NPT ensemble support
  • Analysis tools for RDF, MSD, and phase transitions

๐Ÿง  Neural MCPโ€‹

Neural network training and experimentation

  • 16 tools for deep learning workflows
  • Pre-built architectures (ResNet, MobileNet) and custom models
  • Hyperparameter tuning and evaluation

Key Featuresโ€‹

  • GPU Acceleration: Automatic CUDA detection with graceful CPU fallback (10-100x speedup)
  • Async Tasks: Long-running operations use MCP Tasks primitive
  • Token Efficiency: URI-based references for large arrays and simulation data
  • Cross-MCP Workflows: Servers can exchange data and build on each other
  • Progressive Discovery: Built-in info tools for capability exploration
  • Comprehensive Testing: 75+ tests covering all functionality

Quick Startโ€‹

Get started with the Math-Physics-ML MCP system:

  1. Installation - Set up the system and dependencies
  2. Configuration - Configure the MCP servers
  3. Quick Start Guide - Run your first computations

Architectureโ€‹

The system is built as a monorepo with shared infrastructure:

math-mcp/
โ”œโ”€โ”€ servers/
โ”‚ โ”œโ”€โ”€ math-mcp/ # Symbolic & numerical computing
โ”‚ โ”œโ”€โ”€ quantum-mcp/ # Quantum mechanics
โ”‚ โ”œโ”€โ”€ molecular-mcp/ # Molecular dynamics
โ”‚ โ””โ”€โ”€ neural-mcp/ # Machine learning
โ”œโ”€โ”€ shared/
โ”‚ โ”œโ”€โ”€ mcp-common/ # GPU manager, async tasks, config
โ”‚ โ””โ”€โ”€ compute-core/ # Unified array interface, FFT, linalg

Learn more in the Architecture guide.

API Referenceโ€‹

Explore the complete API documentation for each MCP server:

Example: Quantum Wave Scatteringโ€‹

Here's a simple example combining Math MCP and Quantum MCP:

# Create a Gaussian potential barrier (Math MCP)
potential = create_array(
shape=[256],
fill_type='function',
function='10*exp(-(x-128)**2/100)'
)

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

# Solve Schrรถdinger equation (Quantum MCP)
simulation = solve_schrodinger(
potential=potential['array_id'],
initial_state=wavepacket,
time_steps=1000,
dt=0.1,
use_gpu=True
)

Performanceโ€‹

The GPU acceleration provides significant speedups:

MCPOperationCPU TimeGPU TimeSpeedup
MathMatrix multiply (1000ร—1000)~100ms~1ms100x
Quantum1D Schrรถdinger (1000 steps, 256 grid)~30s~5s6x
MolecularMD (100k steps)~minutes~seconds>10x

Statusโ€‹

All 4 MCP servers are fully implemented and tested:

  • โœ… 75/75 tests passing
  • โœ… GPU and CPU modes supported
  • โœ… Pre-commit hooks configured
  • โœ… Ready for production use

Licenseโ€‹

MIT License - see LICENSE file for details.