SuperAPI AI Directory

stargate-bridge-mcp

Cross-chain token transfers via the Stargate protocol.

Open website

About this tool

Purpose

Stargate Bridge MCP is an MCP (Model Context Protocol) server designed to let users complete cross-chain token transfers through the Stargate protocol. It encapsulates on-chain bridging capabilities as MCP tools, making them easy to invoke in natural language within Claude, Cursor, or other MCP-compatible clients.

Main Capabilities

  • Chain discovery: List all blockchains that support bridging and their key information.
  • Token discovery: Find tokens that can be bridged between chains.
  • Quote retrieval: Get real-time bridging quotes, including fees, estimates, and transaction steps.
  • Automatic bridging: Use a private key to automatically sign and broadcast transfer transactions.
  • MCP integration: Fully compliant with the MCP specification and easy to use in MCP clients such as Claude and Cursor.

Usage

Environment Requirements

  • Use uv for dependency management (recommended; can fall back to pip).
  • Requires a .env file containing an Ethereum-compatible private key (for example, PRIVATE_KEY=0x...). Never commit this file.

Installation Steps

  1. Clone the repository:
    git clone https://github.com/kukapay/stargate-bridge-mcp.git
    cd stargate-bridge-mcp
    
  2. Install dependencies with uv:
    uv sync
    # 或
    uv add requests web3 python-dotenv "mcp[cli]"
    
  3. Install into Claude Desktop:
    uv run mcp install main.py --name "Stargate Bridge"
    
    Configuration file reference:
    {
      "mcpServers": {
        "Stargate Bridge": {
          "command": "uv",
          "args": ["--directory", "/path/to/stargate-bridge-mcp", "run", "main.py"],
          "env": {
            "PRIVATE_KEY": "your_private_key"
          }
        }
      }
    }
    
    Replace /path/to/stargate-bridge-mcp with the actual installation path, and replace your_private_key with the wallet private key.

Tool Invocation Examples

The following examples simulate interactions in MCP clients such as Claude Desktop. Each example includes a natural language prompt, a tool call, and sample output.

  1. List supported chains

    • Prompt: "Show me all the chains supported by Stargate for bridging."
    • Tool call:list_chains()
    • Sample output: A Markdown table, sorted by chainKey.
  2. List bridgeable tokens

    • Prompt: "What tokens can I bridge USDC from Ethereum to other chains?"
    • Tool call:list_bridgeable_tokens("ethereum", "0xA0b86a33E641b9E649bEe6b2D5D7b5b4D8f3a0a")(USDC on Ethereum)
    • Sample output: A Markdown table, sorted by Chain Key.
  3. Get bridging quotes

    • Prompt: "Get quotes for bridging 10 USDC from Ethereum to Polygon with 1% slippage."
    • Tool call:get_quotes("ethereum", "polygon", "0xA0b86a33E641b9E649bEe6b2D5D7b5b4D8f3a0a", "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174", 10.0, 9.9)
    • Sample output: Concise Markdown content.
  4. Execute a bridge transfer

    • Prompt: "Execute the bridge for 10 USDC from Ethereum to Polygon."
    • Tool call:bridge_transfer("ethereum", "polygon", "0xA0b86a33E641b9E649bEe6b2D5D7b5b4D8f3a0a", "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174", 10.0, 9.9)
    • Sample output: Returns Markdown content on success.
    • Note: If it fails (for example, insufficient gas), an error similar to # Error\nStep 1 failed (reverted). will be returned.

Use Cases

  • Users who need to transfer tokens across EVM-compatible chains (such as Ethereum, Polygon, and Arbitrum).
  • Users who want to complete bridging operations in natural language through MCP clients (such as Claude and Cursor).
  • Developers or users who need real-time bridging quotes, fees, and transaction steps.

Limitations

  • Currently only supports cross-chain bridging between EVM-compatible chains (for example, Ethereum, Polygon, and Arbitrum).
  • Non-EVM chains (such as Solana) are planned for future support.
  • Requires an Ethereum-compatible private key, which poses security risks; keep the .env file secure.

License

MIT License - see the LICENSE file for details.