Skip to main content

MCP Server for Materials Project database - query material properties, crystal structures, and phase diagrams

Project description

Materials Project MCP Server

An MCP (Model Context Protocol) server that provides access to the Materials Project database for querying material properties, crystal structures, and phase diagrams.

PyPI version License: MIT

Features

🔍 Available Tools

  • fetch_full_material_data: Search materials by formula, elements, band gap, stability, and more
  • get_structure_details: Get detailed crystal structure with lattice parameters and atomic positions
  • search_materials_by_property: Search by specific property ranges (band gap, bulk modulus, density, etc.)
  • get_phase_diagram_info: Get phase diagram entries and stability information for chemical systems
  • compare_materials: Compare multiple materials side by side with key properties
  • export_to_excel: Export material data to professionally formatted Excel files

Installation

From PyPI (Recommended)

pip install mcp-materials-project

From Source

git clone https://github.com/luffysolution-svg/mcp-materials-project.git
cd mcp-materials-project
pip install -r requirements.txt

Configuration

1. Get API Key

Get your free API key from Materials Project

2. Set Environment Variable

# Windows
set MP_API_KEY=your_api_key_here

# Linux/macOS
export MP_API_KEY=your_api_key_here

3. Configure MCP Client

Claude Code Configuration

Add to your ~/.claude/settings.json or project .mcp.json:

{
  "mcpServers": {
    "materials-project": {
      "command": "mcp-materials-project",
      "env": {
        "MP_API_KEY": "your_api_key_here"
      }
    }
  }
}

Or run directly:

claude mcp add materials-project -- mcp-materials-project

Claude Desktop Configuration

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "materials-project": {
      "command": "mcp-materials-project",
      "env": {
        "MP_API_KEY": "your_api_key_here"
      }
    }
  }
}

Usage Examples

Once configured, you can interact with the Materials Project database through natural language:

Search Materials

"Search for stable materials containing Li and O with band gap > 2 eV"
"Find all materials with silicon and oxygen"
"Show me magnetic materials in the Fe-O system"

Get Structure Details

"Get the crystal structure of mp-149 (Silicon)"
"What's the lattice parameters of mp-2534?"
"Show me the atomic positions in mp-22862"

Property-based Search

"Find materials with band gap between 1.5 and 3.0 eV"
"Search for materials with density > 5 g/cm³"
"Show materials with bulk modulus > 200 GPa"

Compare Materials

"Compare mp-149, mp-2534, and mp-22862"
"What are the differences between these silicon polymorphs: mp-149, mp-157"

Phase Diagrams

"Show me the phase diagram for the Li-Fe-O system"
"What are the stable phases in the Si-O chemical system?"

Export to Excel

"Export silicon materials to Excel"
"Export all stable materials with band gap > 2 eV to Excel file named 'semiconductors.xlsx'"
"Search for Fe-O magnetic materials and export to Excel"

Data Available

The server provides access to comprehensive material properties including:

  • Thermodynamic: Formation energy, energy above hull, stability
  • Electronic: Band gap, band structure, DOS
  • Mechanical: Bulk modulus, shear modulus, elastic constants
  • Magnetic: Magnetization, magnetic ordering
  • Structural: Crystal structure, symmetry, lattice parameters
  • Chemical: Composition, elements, formula

License

MIT License - see LICENSE file for details

Links

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

mcp_materials_project-0.2.0.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

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

mcp_materials_project-0.2.0-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file mcp_materials_project-0.2.0.tar.gz.

File metadata

  • Download URL: mcp_materials_project-0.2.0.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for mcp_materials_project-0.2.0.tar.gz
Algorithm Hash digest
SHA256 73cfe6b902dc9020dd9c2150c51320717f72c1badc0fe43e0949fa510be0e192
MD5 79584d9499367c52e9f6411dba798ee0
BLAKE2b-256 c61e74f79c36b21a9ad5ffc296024997f0cfa669f4b1f7138e6ae8286abafed0

See more details on using hashes here.

File details

Details for the file mcp_materials_project-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_materials_project-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 23a681c15831cd398ea57c81d1d7fb2f29676ab71dd4849a2374cf7da74165f8
MD5 fd3b476a363debbf4b833a79bfabb316
BLAKE2b-256 b813b4117cd318748a6e26f979beb81b4bceff9bd418a7a9d6d6472800b26b7a

See more details on using hashes here.

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