Hyperlane MCP Server

by suryansh-23

Not rated
GitHub

About

Integrates with the Hyperlane protocol for cross-chain messaging and smart contract interactions.

Details

Author
suryansh-23
Categories
Developer Tools, Finance, Other

Setup

Install Hyperlane MCP Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/suryansh-23/hyperlane-mcp

Follow the installation instructions in the repository README, then restart your MCP client.

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.

- Overview
-
How It Works
-
Features
-
Requirements
-
Installation & Setup
-
Configuration
-
Usage
-
Available Tools
-
Project Structure
-
Files & Folders Created
-
Examples
-
Troubleshooting
-
Contributing
-
License

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.

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

- 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

- Send messages between different blockchain networks
- Monitor message delivery status
- Handle message verification and execution

- Deploy Hyperlane core contracts to new chains
- Deploy and configure warp routes for asset transfers
- Manage contract configurations and upgrades

- Run validators for message verification
- Run relayers for message delivery
- Monitor validator and relayer health
- Handle Docker container lifecycle

- Deploy warp routes for cross-chain asset transfers
- Execute multi-hop asset transfers
- Support various token types (native, synthetic, collateral, etc.)

- Node.js: v18 or higher
- Package Manager: pnpm (recommended)
- Docker: For running validators and relayers
- Operating System: Linux, macOS, or Windows with WSL2

- Access to RPC endpoints for target blockchain networks
- Stable internet connection for cross-chain operations
- Sufficient bandwidth for Docker image downloads

- Private key with sufficient native tokens for gas fees
- Access to blockchain RPC endpoints
- Understanding of target chain configurations

git clone https://github.com/yourusername/hyperlane-mcp.git cd hyperlane-mcp
# Install pnpm if not already installed npm install -g pnpm # Install project dependencies pnpm install

Edit the.envfile with your configuration:

# Required: Private key for signing transactions (without 0x prefix) PRIVATE_KEY=your_private_key_here # Required: GitHub Personal Access Token for registry access GITHUB_TOKEN=your_github_personal_access_token # Optional: Custom cache directory (defaults to ~/.hyperlane-mcp) CACHE_DIR=/path/to/custom/cache/directory
# Ensure Docker is running docker --version docker ps

For Claude Desktop or other MCP clients, add this configuration:

{ "mcpServers": { "hyperlane": { "command": "node", "args": [ "/path/to/hyperlane-mcp/build/index.js" ], "env": { "PRIVATE_KEY": "your_private_key", "GITHUB_TOKEN": "your_github_token" "CACHE_DIR": "your_cache_dir" } } } }
# Development mode pnpm start # Production mode node build/index.js # With MCP Inspector (for debugging) pnpm inspect

- Deploy a New Chain: Usedeploy-chaintool to add a new blockchain
- Run Validator: Userun-validatorto start message validation
- Run Relayer: Userun-relayerto enable message delivery
- Deploy Warp Route: Usedeploy-warp-routefor asset transfers
- Send Messages/Assets: Use transfer tools for cross-chain operations

- deploy-chain: Deploy Hyperlane core contracts to a new chain
- run-validator: Start a validator for a specific chain
- run-relayer: Start a relayer for cross-chain message delivery

- cross-chain-message-transfer: Send messages between chains
- cross-chain-asset-transfer: Transfer assets using warp routes

- deploy-warp-route: Deploy new warp routes for asset transfers

- Warp Route Configs: Access viahyperlane-warp:///{symbol}/{/chain}URI

hyperlane-mcp/ ├── src/ # Source code │ ├── index.ts # Main MCP server entry point │ ├── localRegistry.ts # Local registry implementation │ ├── hyperlaneDeployer.ts # Core contract deployment │ ├── RunValidator.ts # Validator Docker management │ ├── RunRelayer.ts # Relayer Docker management │ ├── warpRoute.ts # Warp route deployment │ ├── msgTransfer.ts # Message transfer logic │ ├── assetTransfer.ts # Asset transfer logic │ ├── config.ts # Configuration utilities │ ├── utils.ts # Utility functions │ ├── types.ts # Type definitions │ ├── logger.ts # Logging configuration │ ├── gcr.ts # Google Container Registry utilities │ ├── file.ts # File system utilities │ ├── configOpts.ts # Configuration options │ └── consts.ts # Constants ├── build/ # Compiled JavaScript output ├── node_modules/ # Dependencies ├── package.json # Project configuration ├── tsconfig.json # TypeScript configuration ├── .env # Environment variables (create this) └── README.md # This file

The server creates and manages several directories and files during operation:

~/.hyperlane-mcp/ # Main cache directory ├── chains/ # Chain configurations │ ├── {chainName}.yaml # Chain metadata │ ├── {chainName}.deploy.yaml # Deployed contract addresses │ └── {chainName}-core-config.yaml # Core deployment config ├── routes/ # Warp route configurations │ └── {symbol}-{hash}.yaml # Warp route configs ├── agents/ # Agent configurations │ └── {chainName}-agent-config.json # Validator/relayer configs └── logs/ # Runtime data and logs ├── hyperlane_db_validator_{chain}/ # Validator database ├── hyperlane_db_relayer/ # Relayer database └── hyperlane-validator-signatures-{chain}/ # Validator signatures

- {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

- {symbol}-{hash}.yaml: Warp route configuration for cross-chain asset transfers

- {chainName}-agent-config.json: Configuration for validators and relayers

- Validator databases: Persistent storage for validator state
- Relayer databases: Persistent storage for relayer state
- Signature storage: Validator checkpoint signatures

- Docker containers: Validator and relayer containers (managed automatically)
- Log files: Runtime logs from validators and relayers

Deploy Hyperlane core contracts to a new blockchain called "mytestnet" with chain ID 12345, RPC URL "https://rpc.mytestnet.com", native token symbol "MTN", and token name "MyTestNet Token". This should be marked as a testnet.
Send a cross-chain message from Ethereum to Polygon. The recipient address should be 0x742d35Cc6634C0532925a3b8D4C9db96c4b4d8b6 and the message body should be "Hello from Ethereum!"
Deploy a warp route for asset transfers between Ethereum and Arbitrum chains. Use collateral token type for Ethereum and synthetic token type for Arbitrum.
Transfer assets using the USDC warp route from Ethereum to Arbitrum. Transfer 100 USDC to recipient address 0x742d35Cc6634C0532925a3b8D4C9db96c4b4d8b6. First, fetch the warp route configuration for USDC on these chains using the resources.
Start a validator for the "mytestnet" chain that we deployed earlier.
Start a relayer to handle message delivery between Ethereum and mytestnet chains. Use "mytestnet" as the validator chain name.
Transfer 50 USDC from Ethereum to Polygon, then from Polygon to Arbitrum, using the existing USDC warp routes. The final recipient should be 0x742d35Cc6634C0532925a3b8D4C9db96c4b4d8b6.
Show me the available warp route configurations for USDC token across Ethereum and Polygon chains.
Deploy a new warp route for a custom token called "MyToken" (symbol: MTK) between three chains: Ethereum (collateral type), Polygon (synthetic type), and Arbitrum (synthetic type).
# Add user to docker group (Linux) sudo usermod -aG docker $USER # Restart shell or logout/login

- Ensure your wallet has sufficient native tokens for gas
- Check current gas prices on target networks

- Verify RPC URLs are accessible
- Check for rate limiting on RPC providers
- Consider using multiple RPC endpoints

# Check Docker logs docker logs <container_id> # Verify Docker image availability docker pull gcr.io/abacus-labs-dev/hyperlane-agent:agents-v1.4.0

Run with MCP Inspector for detailed debugging:

# Validator logs tail -f ~/.hyperlane-mcp/logs/validator-{chain}.log # Relayer logs tail -f ~/.hyperlane-mcp/logs/relayer.log

Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request

- Use TypeScript for all new code
- Follow existing code formatting (Prettier)
- Add JSDoc comments for public APIs
- Include error handling

This project is licensed under the MIT License.

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.*

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

About MCP server for TRON blockchain — connect AI agents to TRX, TRC20, smart contracts, staking & governance via GoTRON SDK

Provides onchain tools for AI applications to interact with the Hashkey Network.

Deploy and manage compliant tokens from Claude, Cursor, or any AI agent — by typing a sentence.

An MCP server for interacting with Web3 and EVM-compatible chains.

MCP server for Base L2 DeFi operations with 9 monetized endpoints: gas estimates, yield farming, token analysis, contract audit, wallet health, DEX quotes, price feeds, mnemonic generation. Built with FastMCP Python SDK.

Interact with BNB Chain and other EVM-compatible networks using natural language and AI assistance.

On-chain token verification across 31 blockchains. 16 tools for ECDSA-signed attestations, discount codes, merchant discovery, and autonomous onboarding.

Read/write to over 2k blockchains, enabling data querying, contract analysis/deployment, and transaction execution, powered by Thirdweb.

Server-side EVM wallet for Ai agents. Send transactions, manage tokens, and interact with smart contracts across multiple chains.

An MCP server providing onchain tools for AI applications to interact with the Base Network and Coinbase API.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.