mcp-atomictoolkit

An MCP-compatible server providing atomistic simulation capabilities through ASE, pymatgen, etc.

βš›οΈ MCP Atomic Toolkit

Python 3.11+ License: MIT MCP tests

[!NOTE] This project is under active development. Interfaces and behavior may evolve.

A FastMCP server for atomistic modeling workflows powered by ASE, pymatgen, and modern ML interatomic potentials.

It gives MCP clients a practical toolkit for:

  • building structures,
  • running geometry optimization + molecular dynamics,
  • analyzing structures/trajectories,
  • and downloading generated artifacts (data + plots).

✨ Why this repo

If you need atomistic workflows exposed as MCP tools (instead of hand-wiring scripts), this project gives you:

  • ready-to-call MCP tools for common simulation tasks,
  • file-first outputs that are easy to inspect/reuse,
  • artifact download URLs so clients don’t need binary blobs in chat context,
  • deployment-ready HTTP app with health and server-card endpoints.

πŸš€ Features

  • MCP-native workflows via FastMCP tools
  • Structure generation: bulk, surface, molecule, supercell, amorphous, liquid, bicrystal, polycrystal
  • Optimization workflows with MLIPs (kim default, nequix/orb supported)
  • Molecular dynamics workflows (Velocity Verlet, Langevin, NVT Berendsen)
  • Analysis outputs:
    • RDF + coordination stats
    • MSD + thermodynamic trends
    • VACF + diffusion (Green-Kubo)
  • Downloadable artifacts (xyz, extxyz, cif, traj, png, svg, csv, dat, ...)
  • Registry-friendly endpoints (/healthz, server card, Streamable HTTP root)

⚑ Quick Start

1) Requirements

  • Python 3.11+

2) Install

pip install -r requirements.txt

3) Run locally

uvicorn mcp_atomictoolkit.http_app:app --host 0.0.0.0 --port 10000

Alternative:

python main.py

4) Smoke check

curl -s http://localhost:10000/healthz

Expected response:

{"status":"ok"}

🧰 Tooling Overview

Main MCP tools exposed by the server:

  • build_structure_workflow
  • analyze_structure_workflow
  • write_structure_workflow
  • optimize_structure_workflow
  • run_md_workflow
  • analyze_trajectory_workflow
  • autocorrelation_workflow

Legacy aliases are also included for backward compatibility.


🌐 Endpoints

  • POST / β€” primary MCP Streamable HTTP endpoint
  • GET /healthz β€” health check
  • GET /.well-known/mcp/server-card.json β€” MCP server card metadata
  • GET /artifacts/{artifact_id}/{filename} β€” artifact download route
  • /sse/ β€” compatibility alias path mounted to the MCP app

πŸ“¦ Deployment

Render

render.yaml is included and ready to use.

Default start command:

uvicorn mcp_atomictoolkit.http_app:app --host 0.0.0.0 --port $PORT

Docker

docker build -t mcp-atomictoolkit .
docker run --rm -p 7860:7860 mcp-atomictoolkit

πŸ—‚οΈ Project Structure

src/mcp_atomictoolkit/
  mcp_server.py          # FastMCP tool definitions
  http_app.py            # Starlette app + routing/endpoints
  workflows/core.py      # High-level workflow orchestration
  analysis/              # Structure/trajectory/VACF analysis logic
  structure_operations.py
  optimizers.py
  md_runner.py
  artifact_store.py      # Download artifact registration + URLs

πŸ“ˆ GitHub Pulse

Add your repository path in the URLs below to enable live charts.

Star history

Star History Chart


🀝 Contributing

  • Keep outputs file-based and artifact-friendly.
  • When adding tools, usually update both:
    • workflows/core.py
    • mcp_server.py
  • Preserve http_app.py compatibility behavior unless intentionally changing deployment contracts.

πŸ“„ License

MIT β€” see LICENSE.

Related Servers