# Lineascan MCP for AI Agents AI Agent Connect

> Lineascan MCP lets you query the Linea blockchain directly from your AI client. Check balances, track token transfers, and pull smart contract source code or ABIs instantly. It turns the Linea explorer into a functional data source for your agent, allowing you to audit contracts and monitor on-chain movements without leaving your workspace.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_nhhUsEHSvwD1uqYm24RMCjNnXYX1pV7tZAiveKcQ/ai-agent-connect
- **Tags:** linea, ethereum-l2, block-explorer, smart-contracts, web3

## Description

Stop jumping between tabs every time you need to check a wallet balance or pull a contract's source code. This Connector lets you query the Linea blockchain directly from your AI client. You can track token movements, find specific NFT transfers, and grab verified ABIs without the friction of a web UI. It handles the heavy lifting of parsing transaction histories and estimating gas costs so you don't have to. If you're digging into the Linea ecosystem, this turns your agent into a real-time analyst. You can monitor network health or verify contract logic just by asking a question. It's a massive time saver for anyone who spends their day looking at on-chain data. When you connect this through the Vinkius catalog, you get a direct line to the data you need without the usual browser clutter.

## Tools

### eth_estimate_gas
See how much gas a specific transaction will cost before you send it. This helps you avoid unexpected fees.

### eth_get_block_by_number
Pull all the data associated with a specific block number. This is useful for deep diving into historical data.

### eth_get_transaction_by_hash
Get the full details of a transaction using its unique hash. Use this to see exactly what happened in a specific move.

### eth_get_transaction_receipt
View the final receipt for a transaction to see its status. Use this to confirm if a payment or move succeeded.

### eth_price
Get the current price of ETH in both USD and BTC. This helps you keep an eye on market values in real time.

### eth_supply
Find out the total circulating supply of ETH on Linea. Use this to understand the overall tokenomics of the network.

### get_abi
Pull the ABI for a verified smart contract to understand its functions. This is essential for interacting with contracts.

### get_balance
Check the ETH balance of a single wallet address. Use this for a quick look at a specific account's holdings.

### get_block_countdown
See how much time is left until the next block is mined. This gives you a sense of the current network speed.

### get_block_no_by_time
Find the block number for a specific point in time. This is great for looking up historical events.

### get_logs
Filter and retrieve event logs from the blockchain. This is perfect for tracking specific contract events.

### get_mined_blocks
List all the blocks that a specific address has mined. Use this to track the activity of block producers.

### get_source_code
Pull the verified Solidity source code for a smart contract. Use this to audit logic without leaving your workspace.

### get_status
Check if a transaction succeeded, failed, or is pending. Use this for a quick status update on any hash.

### get_tx_receipt_status
Verify the specific receipt status of a transaction. This gives you a more detailed view of the final result.

### token_nft_tx
List all ERC-721 NFT transfers for a specific wallet. Use this to track the movement of unique digital assets.

### token_tx
List all ERC-20 token transfers for a specific wallet. Use this to follow the flow of stablecoins and other tokens.

### tx_list_internal
Find internal transactions for a specific address. Use this to see how tokens move between contracts.

### tx_list
List all normal transactions for a specific wallet. Use this to see the full history of an account's moves.

### balance_multi
Get ETH balances for multiple addresses at once. This makes it easy to check a list of wallets in one go.

### check_verify_status
Check if a contract verification request is still pending. Use this to see if your code is ready for the explorer.

### eth_block_number
Find the number of the most recent block on the network. This gives you a quick snapshot of the current chain height.

### eth_call
Execute a message call on-chain without creating a transaction. Use this to test contract logic without spending gas.

### get_block_reward
Look up the rewards for a specific block and its uncles. Use this to see how the network distributes incentives.

### verify_source_code
Submit a smart contract to the network for verification. Use this to make your code public on the explorer.

## Prompt Examples

**Prompt:** 
```
What's the ETH balance for 0x123...?
```

**Response:** 
```
I've checked the balance for that address on Linea. It currently holds **1.25 ETH**.
```

**Prompt:** 
```
Show me the last 5 USDC transfers for 0xabc...?
```

**Response:** 
```
I found the recent ERC-20 transfers for that address. The most recent ones include:

| Token | Amount | Status |
|---|---|---|
| USDC | 500.0 | Success |
| USDC | 1,200.0 | Success |

Would you like the specific transaction hashes?
```

**Prompt:** 
```
Get the source code for 0x789...?
```

**Response:** 
```
I've retrieved the data for the contract. It is a verified **LiquidityPool** contract. I have the ABI ready for function calls and the Solidity source code for your review:

```solidity
// Verified Source Code
contract LiquidityPool {
    // ... logic ...
}```
```

## Capabilities

### Fetch multiple wallet balances
Get ETH balances for a list of addresses in a single request.

### Track real-time token movements
Monitor ERC-20 and NFT transfers for any specific wallet.

### Pull verified contract source code
Retrieve the Solidity source code for verified smart contracts.

### Estimate transaction gas costs
See how much gas a specific transaction will cost before you send it.

### Monitor block rewards
Access block and uncle rewards to see network incentive distribution.

### Retrieve transaction receipts
Check the final status and receipt of any transaction hash.

## Use Cases

### Auditing a new protocol
A developer asks for the source code of a contract to check for vulnerabilities. The agent uses get_source_code to pull the logic.

### Whale watching
An analyst tracks all NFT transfers for a specific wallet to see what's moving. The agent uses token_nft_tx to find the history.

### Portfolio management
A user checks the ETH balance of five different wallets to see total holdings. The agent uses balance_multi to pull all data.

### Gas monitoring
A trader asks for the current ETH price and gas estimate before making a swap. The agent uses eth_price and eth_estimate_gas.

## Benefits

- Stop manual copying: Use get_source_code to pull contract logic directly into your editor or chat.
- Track tokens faster: Use token_tx and token_nft_tx to monitor movements without refreshing browser pages.
- Real-time wallet audits: Check multiple balances at once with balance_multi for a bird's eye view of holdings.
- Better gas planning: Use eth_estimate_gas and eth_price to plan your next move with accurate network data.
- Deep contract inspection: Access ABIs with get_abi to understand exactly how a contract functions before interacting.
- Instant transaction status: Use get_status and get_tx_receipt_status to know exactly what happened on-chain immediately.

## How It Works

The bottom line is you get real-time Linea blockchain data without leaving your chat interface.

1. Connect your Lineascan API key to the Connector in your client settings.
2. Ask your agent to perform a specific task like checking a balance or pulling code.
3. Get structured blockchain data or contract source code in your chat window.

## Frequently Asked Questions

**Can Lineascan MCP check multiple wallets at once?**
Yes, it can pull ETH balances for a list of addresses in one go, making it much faster to audit multiple accounts.

**How do I get contract source code using Lineascan MCP?**
You can simply ask your agent to pull the verified source code for any specific contract address on the Linea network.

**Does Lineascan MCP support NFT transfers?**
Yes, it can specifically track ERC-721 NFT transfers for any wallet you provide.

**Can it estimate gas costs for me?**
It can generate an estimate of how much gas is needed for a transaction before you actually send it.

**Is Lineascan MCP for the Linea network only?**
This Connector is specifically designed for the Linea blockchain. For other networks, you would need a different explorer connection.

**How do I see transaction receipts?**
You can ask your agent to fetch the receipt for any transaction hash to see its final status and details.

**Can I check the ETH balance of multiple wallet addresses at once?**
Yes! Use the `balance_multi` tool and provide a comma-separated list of addresses. The agent will return the current ETH balance for each one in a single request.

**How can I see the history of NFT transfers for a specific address?**
You can use the `token_nft_tx` tool. Just provide the wallet address, and optionally a contract address, to list all ERC-721 token transfer events associated with that account.

**Is it possible to read the source code of a verified smart contract?**
Absolutely. Use the `get_source_code` tool with the contract's address. If the contract is verified on Lineascan, the agent will retrieve the full source code for your inspection.