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., "@MOF Tools MCP Serversearch for MOFs containing Zirconium"
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.
MOF Tools MCP Server
A production-ready, professional MCP server for Metal-Organic Framework (MOF) research. This server uses the Streamable HTTP transport to provide scientific tools over HTTP with comprehensive Pydantic validation and a formal tool registry system.
β¨ Key Features
π Input/Output Validation: All tool inputs and outputs are validated using Pydantic models
π Formal Tool Registry: Centralized tool management with metadata, categories, and tags
π‘οΈ Production-Ready: Industry-standard code with comprehensive error handling
π Type Safety: Full type hints throughout the codebase
β Tested: Comprehensive test suite with over 35 tests
π Repository Structure
main.py: Server entrypoint with tool registration and initializationtools.py: Core scientific tools with Pydantic validation modelstool_registry.py: Formal tool registration system with metadata managementtool_definitions.yaml: YAML configuration file defining all available tools and their metadatatests/test_tools.py: Comprehensive test suite for tools and validationtests/test_tools_load.py: Load and consistency tests for tool definitionspyproject.toml: Dependency and package management
π Installation
π Running the Server
To run as the modern HTTP server (Streamable HTTP):
The server will start on http://0.0.0.0:50001 and display registered tools information:
π§ͺ Testing
Run the comprehensive test suite:
π§ͺ Testing the Server
Method 1: MCP Inspector
Method 2: Manual HTTP Check
Since the server runs on HTTP, you can verify it's up with a simple curl:
π οΈ Available Tools
All tools return validated JSON responses with comprehensive error handling.
Bohr Agent SDK integration also provides asynchronous job management tools:
submit_: Submit a calculation jobquery_job_status: Check job progressget_job_results: Retrieve completed job data
search_mofs
Category: Search
Description: Search for Metal-Organic Frameworks by name or formula in the database
Input:
Output:
calculate_energy
Category: Calculation
Description: Calculate the potential energy of a structure from CIF file content or path using ASE
Input:
Output:
optimize_structure
Category: Optimization
Description: Perform structure optimization for a named MOF structure (placeholder implementation)
Input:
Output:
π Integration
To connect your agent to this server, use the Streamable HTTP endpoint:
URL: http://localhost:50001/mcp
ποΈ Architecture
Pydantic Validation
All tools use Pydantic models for comprehensive input/output validation:
Input Models: Validate and sanitize user inputs
Output Models: Ensure consistent response structure
Field Validators: Custom validation logic (e.g., trimming whitespace, checking ranges)
Error Handling: Graceful error messages returned as validated JSON
Tool Registry System
The formal tool registry provides:
Metadata Management: Description, category, version, tags for each tool
Categorization: Tools organized by category (search, calculation, optimization, analysis)
Tag-based Discovery: Find tools by tags (e.g., "mof", "energy", "database")
Production-Ready Features
β Full type hints throughout
β Comprehensive error handling
β Input sanitization and validation
β Consistent JSON output format
β Detailed documentation
β Test coverage (38 tests)
β Modular, maintainable code structure
π Development
Tool Configuration
Tool definitions are stored in tool_definitions.yaml for easy configuration and management. This separates tool metadata from code logic.
Example tool definition:
Adding a New Tool
Define Pydantic models in
tools.py:
Implement the tool function in
tools.py:
Add the tool definition to
tool_definitions.yaml:
The tool will be automatically registered when the server starts.
Add tests in
test_tools.py:
π License
See LICENSE file for details.