Materials Project MCP MCP Server

A Model Context Protocol (MCP) server for querying the Materials Project database using the mp_api client.

Local serverstdioPython

What is the Materials Project MCP MCP server?

A Model Context Protocol (MCP) server for querying the Materials Project database using the mp_api client. That is what the materials project mcp mcp server brings to an AI assistant: the same capability, reachable through the Model Context Protocol rather than a separate app or dashboard.

Getting it running

benedict2002/materials-project-mcp on a container image is all you need. Most clients run it directly, so configuration is a few lines and a restart.

The tools it exposes

The server publishes 14 tools. What each one is for:

  • search_materials — Search by elements, band gap range, stability
  • get_structure_by_id — Get crystal structures and lattice parameters
  • get_electronic_bandstructure — Plot electronic band structures
  • get_electronic_dos_by_id — Get electronic density of states
  • get_phonon_bandstructure — Plot phonon band structures
  • get_phonon_dos_by_id — Get phonon density of states
  • get_ion_reference_data_for_chemsys — Download aqueous ion reference data for Pourbaix diagrams
  • get_cohesive_energy — Calculate cohesive energies
  • get_atom_reference_data — Retrieve reference energies of isolated neutral atoms
  • get_magnetic_data_by_id — Magnetic properties and ordering
  • get_charge_density_by_id — Charge density data
  • get_dielectric_data_by_id — Dielectric constants and properties

What it needs from you

Configuration is passed through the environment: MP_API_KEY. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

  • Materials Project API Key - Get one here (free account required) - Docker Desktop (must be running) - Python 3.12+ with uv

Things to watch

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Materials Project MCP.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

How it compares

This sits in the database access group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Materials Project MCP's toolset — search_materials, get_structure_by_id, get_electronic_bandstructure and 11 more — is a fair guide to whether it matches your workflow. It is maintained by benedictdebrah; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Available tools

ToolWhat it does
search_materialsSearch by elements, band gap range, stability
get_structure_by_idGet crystal structures and lattice parameters
get_electronic_bandstructurePlot electronic band structures
get_electronic_dos_by_idGet electronic density of states
get_phonon_bandstructurePlot phonon band structures
get_phonon_dos_by_idGet phonon density of states
get_ion_reference_data_for_chemsysDownload aqueous ion reference data for Pourbaix diagrams
get_cohesive_energyCalculate cohesive energies
get_atom_reference_dataRetrieve reference energies of isolated neutral atoms
get_magnetic_data_by_idMagnetic properties and ordering
get_charge_density_by_idCharge density data
get_dielectric_data_by_idDielectric constants and properties
get_diffraction_patternsX-ray and neutron diffraction
get_xRay_absorption_spectraXAFS, XANES, EXAFS spectra

How to install the Materials Project MCP MCP server

{
     "mcpServers": {
       "Materials Project MCP": {
         "command": "docker",
         "args": [
           "run", "--rm", "-i",
           "-e", "MP_API_KEY=your-materials-project-api-key",
           "benedict2002/materials-project-mcp"
         ]
       }
     }
   }

Configuration as documented by the project. Restart the client after saving.

Configuration

  • Materials Project API Key - Get one here (free account required) - Docker Desktop (must be running) - Python 3.12+ with uv
VariableDescriptionRequired
MP_API_KEYCredential the server authenticates with.Yes

Example prompts to try

  • Use Materials Project MCP to search materials.
  • Use Materials Project MCP to get structure by id.
  • Use Materials Project MCP to get electronic bandstructure.

Frequently asked questions

It connects Materials Project MCP to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (search_materials, get_structure_by_id, get_electronic_bandstructure, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Materials Project MCP directly.