Linea MCP Server

A Model Context Protocol (MCP) server that provides on-chain tools for AI applications to interact with the Linea blockchain.

Local serverstdio

What is the Linea MCP Server?

A Model Context Protocol (MCP) server that provides on-chain tools for AI applications to interact with the Linea blockchain.

What it actually does

Linea-MCP extends any MCP client's capabilities by providing tools to interact with the Linea blockchain, an Ethereum Layer 2 scaling solution using zero-knowledge proof technology. This server enables AI assistants like Claude, Cursor, and other MCP-compatible clients to perform blockchain operations through natural language requests.

  • Wallet Management — Retrieve addresses and check balances
  • Token Operations — Transfer ERC20 tokens, check balances, list tokens
  • Smart Contract Interactions — Deploy and call contracts
  • NFT Management — List and transfer NFTs
  • Bridge Operations — Bridge assets between Ethereum and Linea
  • DeFi Integrations — Interact with DeFi protocols

Configuration

  • Node.js (v16+) - npm or yarn - Access to Linea RPC endpoints

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

How to install the Linea MCP Server

{
  "mcpServers": {
    "linea": {
      "command": "npx",
      "args": ["-y", "linea-mcp"],
      "env": {
        "PORT": "your-value",
        "LINEA_MAINNET_RPC_URL": "your-value",
        "LINEA_TESTNET_RPC_URL": "your-value",
        "INFURA_API_KEY": "your-value",
        "ALCHEMY_API_KEY": "your-value",
        "PRIVATE_KEY_ENCRYPTION_KEY": "your-value",
        "WALLET_PRIVATE_KEY": "your-value",
        "ETHEREUM_RPC_URL": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

  • Node.js (v16+) - npm or yarn - Access to Linea RPC endpoints
VariableDescriptionRequired
PORTConfiguration value read at startup.Optional
LINEA_MAINNET_RPC_URLEndpoint or connection string the server talks to.Yes
LINEA_TESTNET_RPC_URLEndpoint or connection string the server talks to.Yes
INFURA_API_KEYCredential the server authenticates with.Yes
ALCHEMY_API_KEYCredential the server authenticates with.Yes
PRIVATE_KEY_ENCRYPTION_KEYCredential the server authenticates with.Yes
WALLET_PRIVATE_KEYCredential the server authenticates with.Yes
ETHEREUM_RPC_URLEndpoint or connection string the server talks to.Yes

Example prompts to try

  • “Use Linea to Wallet.”
  • “Use Linea to Tokens.”
  • “Use Linea to Contracts.”

Frequently asked questions

Node.js v16+, npm or yarn, and access to Linea RPC endpoints (mainnet or testnet).