Skip to main content

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 hint and next_action for 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mace_mcp_server-0.1.1.tar.gz (49.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mace_mcp_server-0.1.1-py3-none-any.whl (39.7 kB view details)

Uploaded Python 3

File details

Details for the file mace_mcp_server-0.1.1.tar.gz.

File metadata

  • Download URL: mace_mcp_server-0.1.1.tar.gz
  • Upload date:
  • Size: 49.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mace_mcp_server-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a6a1d49065db5b502537cb7397940aaa4279189046949a564ffcbdd07a8b9391
MD5 878a6247e84d747bc2e9bb16b1155120
BLAKE2b-256 b0309d46b693e7e576a7054acd8031a6a163783d6d58ed1038a1e2cd1000a7b8

See more details on using hashes here.

Provenance

The following attestation bundles were made for mace_mcp_server-0.1.1.tar.gz:

Publisher: publish.yml on Jamessfks/MACE-MCP-Server

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mace_mcp_server-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: mace_mcp_server-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 39.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mace_mcp_server-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6946a4f2935ad870ea5504c8db739be93ff6c92fe7215f4c48ef2703f65a51b7
MD5 21d8a1008024f0926a1b90998602c7e9
BLAKE2b-256 986e8b186557451ff930a820252b0b8b002c395c672c25825b82b7a53199d86b

See more details on using hashes here.

Provenance

The following attestation bundles were made for mace_mcp_server-0.1.1-py3-none-any.whl:

Publisher: publish.yml on Jamessfks/MACE-MCP-Server

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page