MCP server for MACE machine learning interatomic potentials
Project description
mace-mcp-server
An MCP (Model Context Protocol) server that gives AI assistants direct access to MACE machine learning interatomic potentials. Run atomistic simulations -- energy calculations, geometry optimizations, molecular dynamics, vibrational analysis, and more -- through natural language.
Why?
MACE is the most widely-used ML force field with 11 foundation models covering 89 elements. This server bridges the gap between MACE's capabilities and AI assistants, enabling researchers to run sub-second atomistic simulations conversationally.
Features
- 10 Tools: Single-point energy, geometry optimization, molecular dynamics, vibrational frequencies, structure parsing/building/conversion, equation of state, descriptor extraction, parameter suggestion
- 4 Resources: Model catalog, individual model details, unit conventions, example structures
- 3 Prompts: Guided workflows for structure analysis, molecule optimization, MD simulation
- 11 Foundation Models: MACE-MPA-0, MACE-MP-0, MACE-OMAT-0, MACE-MATPES-PBE/r2SCAN, MACE-MH-1, MACE-OFF23, MACE-OMOL-0, MACE-Polar-1, MACE-ANI-CC, plus custom models
- All 3 MCP Primitives: Tools + Resources + Prompts
- Structured Output: Pydantic-validated JSON responses with full
outputSchema - LLM-Friendly Errors: Every error includes
hintandnext_actionfor self-correction - Model Caching: Lazy loading with lifespan-managed cache (avoids 5-30s reload penalty)
Installation
# Standard install
pip install mace-mcp-server
# With D3 dispersion support
pip install mace-mcp-server[dispersion]
# From source (development)
git clone https://github.com/zichengzhao/mace-mcp-server
cd mace-mcp-server
pip install -e ".[dev]"
# Run directly with uvx (no install needed)
uvx mace-mcp-server
Quick Start
Claude Code
claude mcp add mace -- mace-mcp-server
Then ask:
- "Parse the structure at examples/water.xyz"
- "What model should I use for silicon?"
- "Calculate the energy of ethanol with MACE-OFF"
- "Optimize this crystal structure"
- "Run NVT MD at 500K for 200 steps"
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"mace": {
"command": "uvx",
"args": ["mace-mcp-server"]
}
}
}
MCP Inspector
npx -y @modelcontextprotocol/inspector mace-mcp-server
Tools
| Tool | Description | Category |
|---|---|---|
single_point |
Energy, forces, stress evaluation | Calculation |
optimize |
Geometry optimization (BFGS/FIRE) | Calculation |
molecular_dynamics |
NVT/NPT/NVE simulations | Calculation |
vibrational_frequencies |
Normal modes and thermodynamics | Calculation |
parse_structure |
Read and analyze structure files | Structure |
build_structure |
Generate molecules, crystals, surfaces | Structure |
convert_structure |
Format conversion (XYZ, CIF, POSCAR, PDB) | Structure |
equation_of_state |
Bulk modulus and equilibrium volume | Analysis |
extract_descriptors |
MACE learned atomic representations | Analysis |
suggest_parameters |
AI-powered parameter recommendation | Intelligence |
Foundation Models
| Model | Elements | Domain | Use Case |
|---|---|---|---|
| MACE-MPA-0 (default) | 89 | Materials | Crystals, surfaces, interfaces |
| MACE-OFF23 | 10 | Organic | Drug-like molecules, polymers |
| MACE-OMOL-0 | 83 | Molecular | Organometallics, charged species |
| MACE-ANI-CC | 4 | High accuracy | Small H/C/N/O molecules (CCSD(T)) |
| MACE-OMAT-0 | 89 | Materials | Phonons, mechanical properties |
| MACE-MH-1 | 89 | Cross-domain | Multi-functional predictions |
See mace://models resource for the complete catalog.
Units
All calculations use ASE's unit system:
- Energy: eV
- Force: eV/A
- Distance: Angstrom
- Stress: eV/A^3 (Voigt: [xx, yy, zz, yz, xz, xy])
- Frequency: cm^-1
- Temperature: Kelvin
Development
# Install dev dependencies
pip install -e ".[dev]"
# Run tests
pytest tests/
# Run with logging
PYTHONPATH=src python -m mace_mcp_server.server
Architecture
src/mace_mcp_server/
server.py # FastMCP entry point + lifespan
tools/ # MCP tool wrappers (thin layer)
resources/ # URI-addressable data (model catalog, units, examples)
prompts/ # Workflow templates
engine/ # Scientific logic (testable without MCP)
schemas/ # Pydantic input/output models
The engine/ layer contains all scientific logic and is fully testable without MCP transport. Tools are thin wrappers that validate input, call the engine, and format structured output.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mace_mcp_server-0.1.0.tar.gz.
File metadata
- Download URL: mace_mcp_server-0.1.0.tar.gz
- Upload date:
- Size: 49.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90fcf2ab52ba805b750e0ca8b2efcf8f97f657740a1171dacd7cd63fbf8c6f04
|
|
| MD5 |
16a3c249c39df81fae7a6f1a0a9c3db1
|
|
| BLAKE2b-256 |
ecb8b7ea49c43a700e14090682b6768a9e14c21d30d1499d7ced31b199edd26a
|
Provenance
The following attestation bundles were made for mace_mcp_server-0.1.0.tar.gz:
Publisher:
publish.yml on Jamessfks/MACE-MCP-Server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mace_mcp_server-0.1.0.tar.gz -
Subject digest:
90fcf2ab52ba805b750e0ca8b2efcf8f97f657740a1171dacd7cd63fbf8c6f04 - Sigstore transparency entry: 1280520326
- Sigstore integration time:
-
Permalink:
Jamessfks/MACE-MCP-Server@8cc8b356c29a667d3cb64930fc66f6d21082558c -
Branch / Tag:
refs/tags/Initial-Release - Owner: https://github.com/Jamessfks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8cc8b356c29a667d3cb64930fc66f6d21082558c -
Trigger Event:
release
-
Statement type:
File details
Details for the file mace_mcp_server-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mace_mcp_server-0.1.0-py3-none-any.whl
- Upload date:
- Size: 39.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ec53eea09d60fea7abe58185ffa5f97020b403d43ecb52d54b3c53fadeae78f
|
|
| MD5 |
396fcda91fe3e697f9321b8b0d00880a
|
|
| BLAKE2b-256 |
087af741adb465098b81e7631a19c58a8deed244f86e104b2eefad7661c1f4fc
|
Provenance
The following attestation bundles were made for mace_mcp_server-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on Jamessfks/MACE-MCP-Server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mace_mcp_server-0.1.0-py3-none-any.whl -
Subject digest:
5ec53eea09d60fea7abe58185ffa5f97020b403d43ecb52d54b3c53fadeae78f - Sigstore transparency entry: 1280520333
- Sigstore integration time:
-
Permalink:
Jamessfks/MACE-MCP-Server@8cc8b356c29a667d3cb64930fc66f6d21082558c -
Branch / Tag:
refs/tags/Initial-Release - Owner: https://github.com/Jamessfks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8cc8b356c29a667d3cb64930fc66f6d21082558c -
Trigger Event:
release
-
Statement type: