API Reference Overview
The Math-Physics-ML MCP System provides 57 tools across 4 specialized MCP servers.
Quick Navigation
- Math MCP - 14 tools for symbolic algebra and numerical computing
- Quantum MCP - 12 tools for wave mechanics and simulations
- Molecular MCP - 15 tools for molecular dynamics
- Neural MCP - 16 tools for neural network training
Tool Categories
Math MCP
| Category | Tools | Purpose |
|---|---|---|
| Discovery | info | Progressive capability discovery |
| Symbolic | symbolic_solve, symbolic_diff, symbolic_integrate, symbolic_simplify | Equation solving, calculus |
| Numerical | create_array, matrix_multiply, solve_linear_system | Array operations, linear algebra |
| Transforms | fft, ifft | Fast Fourier Transform |
| Optimization | optimize_function, find_roots | Function minimization, root finding |
Quantum MCP
| Category | Tools | Purpose |
|---|---|---|
| Discovery | info | Progressive capability discovery |
| Potentials | create_lattice_potential, create_custom_potential | Define quantum potentials |
| Wavepackets | create_gaussian_wavepacket, create_plane_wave | Initial states |
| Simulations | solve_schrodinger, solve_schrodinger_2d | Time evolution |
| Analysis | analyze_wavefunction, get_simulation_result | Extract observables |
| Visualization | render_video, visualize_potential | Generate plots/videos |
Molecular MCP
| Category | Tools | Purpose |
|---|---|---|
| Discovery | info | Progressive capability discovery |
| System | create_particles, add_potential | Define particle systems |
| Simulations | run_md, run_nvt, run_npt | Run MD in various ensembles |
| Analysis | compute_rdf, compute_msd, analyze_temperature, detect_phase_transition | Structural and thermodynamic analysis |
| Visualization | density_field, render_trajectory | Generate visualizations |
Neural MCP
| Category | Tools | Purpose |
|---|---|---|
| Discovery | info | Progressive capability discovery |
| Models | define_model, load_pretrained, get_model_summary | Model management |
| Data | load_dataset, create_dataloader | Dataset handling |
| Training | train_model, get_experiment_status | Training workflows |
| Evaluation | evaluate_model, compute_metrics | Model assessment |
| Tuning | tune_hyperparameters | Hyperparameter optimization |
| Visualization | plot_training_curves, confusion_matrix | Training analysis |
| Deployment | export_model | Model export |
Common Parameters
Most tools support these common parameters:
GPU Acceleration
use_gpu: bool = True # Use GPU if available, fallback to CPU
Progressive Discovery
info(topic: Optional[str] = None)
# topic=None → List all categories
# topic='category' → Show tools in category
# topic='tool_name' → Detailed help for tool
Resource URIs
The system uses URI-based references for efficient data sharing:
| URI Pattern | Source | Purpose |
|---|---|---|
array://{id} | Math MCP | Large numerical arrays |
potential://{id} | Quantum MCP | Quantum potentials |
simulation://{id} | Quantum MCP | Completed simulations |
system://{id} | Molecular MCP | Particle systems |
trajectory://{id} | Molecular MCP | MD trajectories |
model://{id} | Neural MCP | Neural network models |
experiment://{id} | Neural MCP | Training experiments |
Response Formats
All tools return JSON responses with a consistent structure:
Success Response
{
"status": "success",
"data": {
// Tool-specific data
}
}
Error Response
{
"status": "error",
"error": {
"type": "ValueError",
"message": "Clear error description",
"suggestion": "How to fix the issue"
}
}
Async Task Response
{
"status": "submitted",
"task_id": "task_abc123",
"simulation_id": "sim_def456" // Optional result ID
}
GPU Support
All numerical tools support GPU acceleration:
# Explicit GPU use
result = matrix_multiply(a, b, use_gpu=True)
# Automatic backend selection
xp = gpu_manager.get_array_module()
result = xp.matmul(a, b)
GPU Availability Check
# Via info tool
info(topic="gpu")
# Returns: {gpu_available: true, backend: "cuda", device_count: 1}
Error Handling
Common error types and solutions:
| Error Type | Cause | Solution |
|---|---|---|
ValueError | Invalid input parameters | Check parameter ranges and types |
GPUMemoryError | Insufficient GPU memory | Reduce array size or use CPU |
TimeoutError | Operation took too long | Increase timeout or reduce complexity |
ResourceNotFoundError | Invalid URI reference | Check URI exists and is accessible |
Rate Limits
Default resource limits (configurable in config.kdl):
- Max array size: 100M elements
- Max particles: 10M
- Max time steps: 1M
- Max epochs: 1000
- Symbolic operation timeout: 30 seconds
Next Steps
Explore the detailed API documentation for each server:
- Math MCP API - Start here for foundational operations
- Quantum MCP API - Quantum simulations
- Molecular MCP API - Classical MD
- Neural MCP API - Deep learning