
A Model Context Protocol (MCP) server that provides on-chain tools for AI applications to interact
A Model Context Protocol (MCP) server that provides on-chain tools for AI applications to interact with the Linea blockchain.
·
A Model Context Protocol (MCP) server that provides on-chain tools for AI applications to interact with the Linea blockchain.
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.
See examples.md for detailed usage examples.
# Install globally
npm install -g linea-mcp
# Create a basic .env file
echo "LINEA_MAINNET_RPC_URL=https://rpc.linea.build
LINEA_TESTNET_RPC_URL=https://rpc.sepolia.linea.build
WALLET_PRIVATE_KEY=your_wallet_private_key_here
INFURA_API_KEY=your_infura_key_here" > .env
# Start the server
linea-mcp# Clone the repository
git clone https://github.com/qvkare/linea-mcp.git
cd linea-mcp
# Install dependencies
npm install
# Configure environment
cp .env.example .env
# Edit .env with your configuration
# Build and start
npm run build
node dist/index.js # Using Node directly is more reliable than npm startThis MCP server can be integrated with any MCP-compatible client including Cursor, Claude Desktop, Windsurf, Cline, and other AI assistants.
{
"mcpServers": {
"linea": {
"command": "npx",
"args": ["linea-mcp@latest"],
"env": {
"PORT": "3000",
"LINEA_MAINNET_RPC_URL": "https://rpc.linea.build",
"LINEA_TESTNET_RPC_URL": "https://rpc.sepolia.linea.build",
"INFURA_API_KEY": "your_infura_key",
"ALCHEMY_API_KEY": "your_alchemy_key",
"PRIVATE_KEY_ENCRYPTION_KEY": "your_encryption_key_please_change",
"WALLET_PRIVATE_KEY": "your_wallet_private_key_or_mnemonic",
"NODE_ENV": "development",
"ETHEREUM_RPC_URL": "https://mainnet.infura.io/v3/your_infura_key",
"ETHEREUM_TESTNET_RPC_URL": "https://sepolia.infura.io/v3/your_infura_key"
}
}
}
}{
"mcpServers": {
"linea": {
"command": "node",
"args": ["/absolute/path/to/linea-mcp/dist/index.js"],
"cwd": "/absolute/path/to/linea-mcp",
"env": {
// Same environment variables as Option 1
"PORT": "3000",
"LINEA_MAINNET_RPC_URL": "https://rpc.linea.build",
// ... other variables from Option 1
}
}
}
}Important Note: When using a local installation, directly running the JavaScript file with Node.js provides more reliable communication than using npm scripts.
Cursor:
%APPDATA%\Cursor\mcp.json~/Library/Application Support/Cursor/mcp.json~/.config/Cursor/mcp.jsonClaude Desktop:
%APPDATA%\Claude\claude_desktop_config.json~/Library/Application Support/Claude/claude_desktop_config.json~/.config/Claude/claude_desktop_config.jsonOther Clients: Refer to your client's documentation for MCP configuration location
"No tools available" or "Client closed" errors:
"command": "node", "args": ["/path/to/dist/index.js"]) instead of npm scriptsJSON parsing errors in logs:
cwd property is set correctlyComplete troubleshooting guide:
The server provides tools across multiple categories:
For a complete list of tools and their usage, see docs/tools.md.
This project is licensed under the MIT License - see the LICENSE file for details.
Pick your client and paste the snippet. Each one is the same server, written the way that client expects it.
claude mcp add linea -- npx linea-mcp@latest{
"mcpServers": {
"linea": {
"env": {
"PORT": "",
"NODE_ENV": "",
"INFURA_API_KEY": "",
"ALCHEMY_API_KEY": "",
"ETHEREUM_RPC_URL": "",
"WALLET_PRIVATE_KEY": "",
"LINEA_MAINNET_RPC_URL": "",
"LINEA_TESTNET_RPC_URL": "",
"ETHEREUM_TESTNET_RPC_URL": "",
"PRIVATE_KEY_ENCRYPTION_KEY": ""
},
"args": [
"linea-mcp@latest"
],
"command": "npx"
}
}
}code --add-mcp '{"name":"linea","env":{"PORT":"","NODE_ENV":"","INFURA_API_KEY":"","ALCHEMY_API_KEY":"","ETHEREUM_RPC_URL":"","WALLET_PRIVATE_KEY":"","LINEA_MAINNET_RPC_URL":"","LINEA_TESTNET_RPC_URL":"","ETHEREUM_TESTNET_RPC_URL":"","PRIVATE_KEY_ENCRYPTION_KEY":""},"args":["linea-mcp@latest"],"command":"npx"}'[mcp_servers.linea]
command = "npx"
args = ["linea-mcp@latest"]Runs locally on your device. Your client starts the server itself, so nothing has to be hosted.
Paste this prompt into your agent. It reads this page and does the setup for you.
Read https://aiagentslisting.com/mcp/linea-mcp-server to learn what the "Linea MCP Server" MCP server does and how to install it. Add it to my coding agent's MCP configuration as documented on that page, then confirm the server connects and list the tools it exposes.Agents can also browse this directory over MCP at https://aiagentslisting.com/api/mcp
npm install -g linea-mcp| Name | What it does |
|---|---|
bridge_bridgeAssets | Bridge assets between Ethereum and Linea (supports ethereum, linea, linea-testnet) |
bridge_bridgeStatus | Check the status of a bridge transaction (supports ethereum, linea, linea-testnet) |
bridge_claimFunds | Claim bridged funds that are ready on the destination chain |
contracts_callContract | Call a function on a smart contract |
contracts_deployContract | Deploy a new smart contract to the Linea blockchain |
defi_getYieldInfo | Get yield farming info (staked amount, pending rewards) for a user from a SyncSwap farm. |
defi_liquidityPools | Get information about liquidity pools (e.g., reserves, token addresses) |
defi_stakeLpTokens | Stake SyncSwap LP tokens into a MasterChef farm to earn rewards. |
defi_swapTokens | Swap tokens on a DEX (e.g., SyncSwap) |
defi_unstakeLpTokens | Unstake (withdraw) SyncSwap LP tokens from a MasterChef farm. |
ens_checkNameAvailability | Check if an ENS name is available on Linea |
ens_getRecords | Get ENS records for a name on Linea |
ens_lookupAddress | Lookup ENS name for an address on Linea |
ens_resolveName | Resolve an ENS name to its address on Linea |
nft_listNfts | List NFTs owned by an address (supports ERC721 and ERC1155) |
nft_transferNft | Transfer an NFT to another address (supports ERC721 and ERC1155) |
tokens_erc20Balance | Get the balance of an ERC20 token for a wallet |
tokens_erc20Transfer | Transfer ERC20 tokens from one wallet to another |
transactions_getTransactionStatus | Get the status and details of a blockchain transaction by its hash. |
verax_verifyHuman | Verify if an address is a verified human using Linea Verax attestations |
wallet_getAddress | Retrieves a wallet address for Linea blockchain |
wallet_listBalances | Lists all balances for a wallet on Linea |
wallet_transferFunds | Transfers funds from your wallet to another address on Linea |
Read live from the server on September 26, 2026.
Maintain this server? Claiming proves you own the listing and earns the last 4 points.
Claim this listingPaste this line near the top of your repository's README. The badge always renders the current score.
[](https://aiagentslisting.com/mcp/linea-mcp-server)Nothing comparable is listed yet.
v0.4.20.4.2Release notesv0.4.1Release notesv0.4.0Release notesv0.3.0Release notesv0.2.0Release notesv0.1.3Release notesConnect to the AI Agents Listing MCP server at https://aiagentslisting.com/api/mcp using the HTTP transport and complete the sign-in when it asks. Then call the submit_review tool for the listing "linea-mcp-server" with a rating from 1 to 5 and a short note on what worked and what did not.No reviews yet
Be the first to share your experience with this tool.
One email a week. New agents, MCP servers and skills, and what is actually getting traction.