Manages Docker containers for running Hyperlane validators and relayers, handling container lifecycle and persistent storage for cross-chain infrastructure.
Enables deployment of Hyperlane core contracts, cross-chain messaging, and asset transfers on Ethereum and other EVM-compatible blockchains.
Accesses Hyperlane registry data stored on GitHub for chain metadata, contract configurations, and warp route information.
Supports cross-chain messaging and asset transfers between Polygon and other blockchain networks through Hyperlane protocol.
Hyperlane MCP Server
A powerful Model Context Protocol (MCP) server that provides seamless integration with the Hyperlane protocol, enabling LLM assistants to interact with cross-chain messaging and smart contracts across multiple blockchains.
Table of Contents
Overview
The Hyperlane MCP Server bridges the gap between LLM assistants and the Hyperlane cross-chain infrastructure. It provides a standardized interface for deploying chains, managing validators and relayers, sending cross-chain messages, and deploying warp routes for asset transfers.
How It Works
Architecture
The server operates as an MCP (Model Context Protocol) server that:
Connects to Multiple Blockchains: Uses Hyperlane's MultiProvider to manage connections to various blockchain networks
Manages Local Registry: Maintains a local cache of chain metadata, deployed contracts, and warp route configurations
Deploys Infrastructure: Handles deployment of Hyperlane core contracts, validators, and relayers
Facilitates Cross-Chain Operations: Enables message passing and asset transfers between chains
Provides Docker Integration: Runs validators and relayers in Docker containers for isolation
Core Components
LocalRegistry: Extends Hyperlane's registry system with local storage capabilities
HyperlaneDeployer: Handles deployment of core Hyperlane contracts
ValidatorRunner: Manages validator Docker containers
RelayerRunner: Manages relayer Docker containers
WarpRoute: Handles deployment and management of cross-chain asset routes
Features
Cross-Chain Messaging
Send messages between different blockchain networks
Monitor message delivery status
Handle message verification and execution
Contract Deployment & Management
Deploy Hyperlane core contracts to new chains
Deploy and configure warp routes for asset transfers
Manage contract configurations and upgrades
Infrastructure Management
Run validators for message verification
Run relayers for message delivery
Monitor validator and relayer health
Handle Docker container lifecycle
Asset Transfers
Deploy warp routes for cross-chain asset transfers
Execute multi-hop asset transfers
Support various token types (native, synthetic, collateral, etc.)
Requirements
System Requirements
Node.js: v18 or higher
Package Manager: pnpm (recommended)
Docker: For running validators and relayers
Operating System: Linux, macOS, or Windows with WSL2
Network Requirements
Access to RPC endpoints for target blockchain networks
Stable internet connection for cross-chain operations
Sufficient bandwidth for Docker image downloads
Blockchain Requirements
Private key with sufficient native tokens for gas fees
Access to blockchain RPC endpoints
Understanding of target chain configurations
Installation & Setup
1. Clone the Repository
2. Install Dependencies
3. Build the Project
4. Set Up Environment Variables
Create a .env file in the project root:
Edit the .env file with your configuration:
5. Verify Docker Installation
Configuration
Environment Variables
Variable | Required | Description | Default |
| Yes | Private key for transaction signing (without 0x prefix) | None |
| Yes | GitHub PAT for accessing Hyperlane registry | None |
| No | Directory for storing local data |
|
| No | Home directory (fallback for CACHE_DIR) | System default |
MCP Client Configuration
For Claude Desktop or other MCP clients, add this configuration:
Usage
Starting the Server
Basic Workflow
Deploy a New Chain: Use
deploy-chaintool to add a new blockchainRun Validator: Use
run-validatorto start message validationRun Relayer: Use
run-relayerto enable message deliveryDeploy Warp Route: Use
deploy-warp-routefor asset transfersSend Messages/Assets: Use transfer tools for cross-chain operations
Available Tools
Chain Management
deploy-chain: Deploy Hyperlane core contracts to a new chainrun-validator: Start a validator for a specific chainrun-relayer: Start a relayer for cross-chain message delivery
Cross-Chain Operations
cross-chain-message-transfer: Send messages between chainscross-chain-asset-transfer: Transfer assets using warp routes
Warp Route Management
deploy-warp-route: Deploy new warp routes for asset transfers
Resources
Warp Route Configs: Access via
hyperlane-warp:///{symbol}/{/chain*}URI
Project Structure
Files & Folders Created
The server creates and manages several directories and files during operation:
Cache Directory Structure
File Types Created
Chain Configuration Files
{chainName}.yaml: Contains chain metadata (RPC URLs, chain ID, native token info){chainName}.deploy.yaml: Deployed contract addresses (mailbox, ISM, hooks, etc.){chainName}-core-config.yaml: Core deployment configuration
Warp Route Files
{symbol}-{hash}.yaml: Warp route configuration for cross-chain asset transfers
Agent Configuration Files
{chainName}-agent-config.json: Configuration for validators and relayers
Docker Volumes
Validator databases: Persistent storage for validator state
Relayer databases: Persistent storage for relayer state
Signature storage: Validator checkpoint signatures
Temporary Files
Docker containers: Validator and relayer containers (managed automatically)
Log files: Runtime logs from validators and relayers
Examples
1. Deploy a New Chain
2. Send Cross-Chain Message
3. Deploy Warp Route
4. Transfer Assets
5. Run Infrastructure
6. Multi-Chain Asset Transfer
7. Check Warp Route Resources
8. Deploy Custom Token Route
Troubleshooting
Common Issues
1. Docker Permission Errors
2. Insufficient Gas Fees
Ensure your wallet has sufficient native tokens for gas
Check current gas prices on target networks
3. RPC Connection Issues
Verify RPC URLs are accessible
Check for rate limiting on RPC providers
Consider using multiple RPC endpoints
4. Container Startup Failures
Debug Mode
Run with MCP Inspector for detailed debugging:
Log Files
Check logs in the cache directory:
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Development Setup
Fork the repository
Create a feature branch
Make your changes
Add tests if applicable
Submit a pull request
Code Style
Use TypeScript for all new code
Follow existing code formatting (Prettier)
Add JSDoc comments for public APIs
Include error handling
Authors
License
This project is licensed under the MIT License.
Disclaimer
The software is provided as is. No guarantee, representation or warranty is being made, express or implied, as to the safety or correctness of the software. It has not been audited and as such there can be no assurance it will work as intended. Users may experience delays, failures, errors, omissions, loss of transmitted information or loss of funds. The creators are not liable for any of the foregoing. Users should proceed with caution and use at their own risk.