materials-project-mcp-from-scratch
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@materials-project-mcp-from-scratchFind semiconductors with band gap between 1 and 2 eV"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Materials Project MCP, from scratch
A small, heavily commented build of a Materials Project MCP server, made to understand how MCP actually works rather than to replace the official one. You go from a bare Materials Project API call, to the same call wrapped as an MCP tool, to an agent that discovers and calls those tools on its own.
If you just want to use Materials Project from an AI client in real work, use the official
server (it ships in the mp_api client, v0.46+, with ~23 tools). This repo is for learning the
mechanics from the inside.
What is here
mp_mcp_from_scratch.ipynb— the annotated, teach-along notebook. Every cell is explained: the bare API call, the FastMCP server, the low-level MCP client (including the auto-generated tool schema), and an agent driving the tools.mp_mcp_server.py— the standalone MCP server the notebook writes, four real tools over the live Materials Project API:search_system(chemsys)— search a chemical system (e.g."Li-Fe-O")get_summary(material_id)— full property summary for an mp-idfind_semiconductors(min_gap, max_gap)— stable materials in a band-gap windowget_structure(material_id)— key crystal-structure facts
Related MCP server: MOF Tools MCP Server
Run it
pip install -r requirements.txt
export MP_API_KEY=... # free key from materialsproject.orgThen either open the notebook (select a Python that has mp-api), or run the server standalone:
python mp_mcp_server.py # starts an MCP server on stdio; register it in an MCP clientThe agent step in the notebook also uses a Groq key (free tier).
The point (in one line)
A tool is just a typed Python function; MCP is the standard envelope that makes it discoverable; the model does the tool selection. Once that clicks, every other server is the same recipe with different tools.
The wider MCP + Materials Project landscape
This was built alongside a survey of what already exists, all worth a look:
Official Materials Project MCP, built into the
mp_apiclient (v0.46+).benedictdebrah/materials-project-mcp — 21+ tools, Docker-deployable (Benedict Debrah, Peniel Fiawornu).
janhq/material-project-mcp — focused on battery-material validation.
pathintegral-institute/mcp.science — a collection of science MCP servers (incl. Materials Project and a GPAW DFT server).
Xiangyu Yin's writeup: Building an MCP Server for the Materials Project.
Thanks
Built while learning MCP with atomcamp's Agentic AI cohort. Full write-up on Materials Decoded.
About
Ibtisam Ahmed Khan, a materials engineer working in data and AI. materialsdecoded.com · GitHub · LinkedIn
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityCmaintenanceThe Materials Project MCP Server is server that provides programmatic access to the Materials Project database. It enables LLMs, to search, analyze, and retrieve up to date materials science data.13MIT
- Alicense-qualityDmaintenanceA specialized MCP server for Metal-Organic Framework research that provides tools for database searching, structural optimization, and energy calculations via ASE. It enables scientific workflows by allowing users to interact with MOF data and perform chemical simulations through a standard SSE interface.MIT
- Flicense-qualityDmaintenanceAn MCP server for deconstructing and analyzing Metal-Organic Framework (MOF) structures, including SBU and ligand identification, guest removal, and COF stacking analysis. It enables AI agents to perform automated chemical informatics and structural characterization on crystal structures via CIF files.1
- Flicense-qualityCmaintenanceA Model Context Protocol (MCP) server that provides programmatic access to Catalysis Hub's GraphQL API, enabling querying of catalytic reactions, material systems, publications, and surface reaction data.2
Related MCP Connectors
Educational MCP server with 17 math/stats tools, visualizations, and persistent workspace
MCP server for generating rough-draft project plans from natural-language prompts.
This MCP server enables users to perform scientific computations regarding linear algebra and vect…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ibtisamkhan96/materials-project-mcp-from-scratch'
If you have feedback or need assistance with the MCP directory API, please join our Discord server