Layer2 MCP Server

Layer2 MCP Server

layer2-mcp•byanylots

A Model Context Protocol server for interacting with Ethereum Layer 2 networks, giving AI models tools to deploy tokens and transfer ETH or ERC20 tokens.

License: ISC License•Runtime: Awaiting documentation review•Category: finance crypto

WHAT IT DOES

  • •Deploys new ERC20 token contracts and returns the contract address and transaction hash.
  • •Transfers ETH to a specified address with an amount parameter.
  • •Transfers ERC20 tokens to a specified address.
  • •Performs batch token transfers to random addresses over a configured time period.

BEST FOR

  • •Allowing AI assistants to deploy and transfer ERC20 tokens on Ethereum-compatible networks.
  • •Simulating or testing batch transfers of tokens to random addresses.
  • •Working with Ethereum Mainnet, Layer 2 networks, or local development networks via a configurable RPC URL.

ABOUT LAYER2-MCP

Layer2 MCP Server is cataloged as an MCP server attributed to anylots. A Model Context Protocol server for interacting with Ethereum Layer 2 networks, giving AI models tools to deploy tokens and transfer ETH or ERC20 tokens. It is categorized under finance crypto. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: ISC License. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Layer2 MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Which networks can the server interact with?

Any Ethereum-compatible network, configured via the ETH_L2_RPC environment variable, including Ethereum Mainnet, Layer 2 networks like Optimism and Arbitrum, and local development networks such as Hardhat and Ganache.

How is the network and wallet configured?

Through a .env file containing the PRIVATE_KEY and ETH_L2_RPC variables.

Upstream README

View this exact version on GitHub

README.md · 7328900b3de7 · Fetched 2026-11-13 14:03:59 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

Layer2 MCP Server MCP Implementation

A model context protocol server for interacting with the Ethereum layer 2 network for development and use, which provides a standardized interface for AI models to interact with blockchain networks, deploy tokens, and manage transactions.

Overview

The MCP Layer2 server implements the Model Context Protocol specification, providing AI models with tools to:

  1. Basic
  • Deploy new ERC20 token contracts
  • Transfer ETH to specific addresses
  • Transfer ERC20 tokens to specific addresses
  • Perform batch transfers to random addresses for testing and simulation
  1. Advance
  • L1 Settlement & Data Availability Verification
  • Support cross-chain

This implementation enables AI assistants to directly interact with blockchain networks through a standardized protocol, making it easier to integrate blockchain capabilities into AI workflows.

Example Usage

Here's an example of how an AI assistant might use these tools:

  1. Deploy a new ERC20 token contract:

    👤You: Deploy a new ERC20 token
    
    🤖AI: I'll deploy a new ERC20 token contract for you.
    [Tool call: deployToken]
    Result: Token deployed successfully!
            Contract Address: 0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512
            Transaction Hash: 0xd4ec9bf7ca67a581e78a8637974cd84c9c3524a75efe8851b808f0d58879ebd9
    
  2. Transfer tokens to an address:

    👤You: Transfer 100 erc20 tokens to the address 0x6ea5e8971eC8cf32d43AeB18a6999aFc3a3ec65d
    
    🤖AI: I need to deploy an ERC20 token contract before I can transfer 100 ERC20 tokens to a specified address.
    [Tool call: deployToken]
    Result: Token deployed successfully!
            Contract Address: 0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512
            Transaction Hash: 0xd4ec9bf7ca67a581e78a8637974cd84c9c3524a75efe8851b808f0d58879ebd9
    
    🤖AI: Now I will use the ERC20 token contract I just deployed to transfer 100 tokens to the address 0x6ea5e8971eC8cf32d43AeB18a6999aFc3a3ec65d.
    
    [Tool call: transferToken with tokenAddress=0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512, 
                targetAddress=0x6ea5e8971eC8cf32d43AeB18a6999aFc3a3ec65d]
                
    🤖AI: ERC20 token transfer has been successfully completed!
    Details:
    Token contract address: 0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512
    Receiving address: 0x6ea5e8971eC8cf32d43AeB18a6999aFc3a3ec65d
    Transfer transaction hash: 0x82b7bdc69ffebfc946ab5101cf853a06e64d5aceaf96ca4fe70622fcee89d83e
    The token has been successfully transferred to the specified address. Do you need to perform other operations?
    
  3. Transfer ETH to an address:

    🤖AI: I'll transfer 10 ETH to the specified address.
    [Tool call: transferETH with targetAddress=0x6ea5e8971eC8cf32d43AeB18a6999aFc3a3ec65d, amount=10]
    Result: ETH transfer successful!
            Transaction Hash: 0x9f46076f1c9b84d49c7314d8b8586e20c5c5b389ec56931e510408b3f6052bac
    
  4. Perform batch transfers:

    🤖AI: I'll execute 100 token transfers over 10 seconds.
    [Tool call: batchTransfer with tokenAddress=0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512, 
                transactionCount=100, durationSeconds=10]
    Result: Batch transfer initiated!
            Processing 100 transactions over 10 seconds.
    

Installation

# Clone the repository
git clone https://github.com/anylots/layer2-mcp.git
cd layer2-mcp

# Install dependencies
npm install

# Build the project
npm run build

How to use

Configuration

Create a .env file in the root directory with the following variables:

PRIVATE_KEY=your_ethereum_private_key
ETH_L2_RPC=your_layer2_rpc_url

Using with Cursor

Add a command type mcp server in the cursor mcp setting panel and fill in the execution command, for example: node \\wsl.localhost\Ubuntu-22.04\root\xxxx\xxxx\layer2-dev\build\index.js

Using with Claude Desktop

  1. Install Claude Desktop
  2. Add a new MCP server with the following configuration:
     "layer2-mcp": {
       "command": "node",
       "args": [
         "/path-to-layer2-mcp/build/src/index.js"
       ],
       "env": {
         "PRIVATE_KEY": "<<your eth-wallet private key>>",
         "ETH_L2_RPC": "<<The layer2 chain rpc you want to interact with>>"
       }
     }
    
  3. The tools will now be available in your Claude conversations

Testing with MCP Inspector

  1. Install the MCP Inspector:

    npm install -g @modelcontextprotocol/inspector
    
  2. Start the server:

    npm start
    
  3. In another terminal, run the inspector:

    mcp-inspector
    
  4. Open http://localhost:5173 in your browser to interact with the tools

Available Tools

Token Operations

  • deployToken: Deploy a new ERC20 token contract

    • Returns the contract address and transaction hash
  • transferETH: Transfer ETH to a specific address

    • Parameters:
      • targetAddress: The address to receive the ETH
      • amount: Amount of ETH to transfer (1 = 1 ETH)
    • Returns the transaction hash
  • transferToken: Transfer tokens to a specific address

    • Parameters:
      • tokenAddress: The address of the deployed ERC20 token contract
      • targetAddress: The address to receive the tokens
    • Returns the transaction hash
  • batchTransfer: Perform batch transfers to random addresses

    • Parameters:
      • tokenAddress: The address of the deployed ERC20 token contract
      • transactionCount: Number of transactions to perform
      • durationSeconds: Total duration in seconds for the batch operation
    • Executes the specified number of transactions over the given time period

Network Support

The server is configured to work with any Ethereum-compatible network, including:

  • Ethereum Mainnet
  • Layer 2 networks (Optimism, Arbitrum, etc.)
  • Local development networks (Hardhat, Ganache)

Configure the network by setting the ETH_L2_RPC environment variable to the appropriate RPC URL.

Development

# Install dependencies
npm install

# Run in development mode
npm run dev

# Build
npm run build

# Start the server
npm start

Contributing

Issues and pull requests are welcome on GitHub.

License

This project is licensed under the ISC License - see the LICENSE file for details.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Layer2 MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/layer2-mcp)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related finance crypto MCP Servers

Alternative and complementary servers in the same category

View all in finance crypto →
USA Spending MCP Server
usaspending-mcp-server•thsmale

A stateless streamable HTTP MCP server for interacting with the official source of government spending data.

Repository stats unavailable
Finance & Analytics
Fortnox MCP server — More AI
more-ai-chatgpt-claude-mcp-fortnox•amor3

A hosted, remote MCP server for Fortnox that lets AI assistants answer questions from a company's bookkeeping and propose changes for approval before writing them.

0
Finance & Analytics

OptimistFi is a read-only remote MCP server that provides perpetual futures market data, perps prop firm rules and pricing, and US equity investment research.

Repository stats unavailable
Finance & Analytics