Allows interaction with GitHub repositories, specifically accessing the Materials Project MCP repository for cloning and development purposes.
Supports testing of the Materials Project MCP codebase through pytest integration for verification of functionality.
Enables programmatic interaction with the Materials Project database through Python, allowing custom scripts to retrieve and process materials data.
Materials Project MCP
A fastmcp-based tool for writing prompts against data in the Materials Project database.
Installation
You can install the package from source:
Or using uv:
Related MCP server: WolframAlpha LLM MCP Server
Usage
You can use the CLI:
Or import in your Python code:
API Key Setup
The Materials Project API requires an API key. You can set up your API key in several ways:
Pass it directly to the MPRester:
from mp_api.client import MPRester with MPRester("your_api_key_here") as mpr: # do stuff with mprSet it as an environment variable:
export MP_API_KEY="your_api_key_here"
Example
Here's a simple example that demonstrates how to use the MCP tools directly: