Skip to main content
Glama
fair2wise

Materials Project MCP

by fair2wise
main.py906 B
################################################################################ # materials_project_mcp/main.py # This module sets up the FastMCP CLI interface ################################################################################ from fastmcp import FastMCP from materials_project_mcp.tools import ( get_materials_with_elements, get_material_details, find_materials_by_formula ) def create_mcp(): """Create the FastMCP instance with registered tools.""" # Create a new FastMCP instance mcp = FastMCP("materials_project_mcp") # Register all tools mcp.tool(get_materials_with_elements) mcp.tool(get_material_details) mcp.tool(find_materials_by_formula) return mcp # Create the FastMCP instance at module level mcp = create_mcp() def main(): """Main entry point for the application.""" mcp.run() if __name__ == "__main__": main()

Implementation Reference

Latest Blog Posts

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/fair2wise/materials_project_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server