mcpField
B
Base Network MCP Server

Base Network MCP Server

Local
github.com/u-Operating-SystemFinance4Updated 73w ago

About Base Network MCP Server

Base Network MCP Server provides AI agents with tools to query Base blockchain data on mainnet and the Sepolia testnet. Most queries need no API key; account transaction and token transfer history queries do.

Key features

  1. 01Base mainnet and Sepolia support
  2. 02Query blocks, transactions, and balances
  3. 03Get gas prices and network stats
  4. 04Detect smart contracts
  5. 05API key for account history
  6. 06stdio and HTTP transports

Use cases

  1. 01Query the latest or a specified block
  2. 02Inspect transactions and ETH balances
  3. 03Check current gas prices
  4. 04Retrieve account transactions or token transfer history

MCP support

Provides MCP clients with blockchain query tools for Base mainnet and the Sepolia testnet. Supports stdio and HTTP transports.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"basescan": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"basescan-mcp-server"
]
}
}
}
Run commanddocker run -i --rm basescan-mcp-server

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
ocibasescan-mcp-server

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

Base Network MCP Server

A Model Context Protocol (MCP) server for accessing Base Network blockchain data. Provides tools for querying blocks, transactions, balances, and smart contracts on Base mainnet and testnet.

Features

  • 9 blockchain tools (7 work without API key)
  • Base mainnet and Sepolia testnet support
  • Real-time blockchain data access
  • Docker support
  • Multiple transport options (stdio, HTTP)

Quick Start

Install and Build
git clone https://github.com/u-Operating-System/basescan-mcp-server.git
cd basescan-mcp-server
npm install
npm run build
Run the Server
# For Claude Desktop (recommended)
npm start

# For HTTP server
MCP_TRANSPORT_TYPE=http npm start
Optional: BaseScan API Key

Get enhanced features by adding a free BaseScan API key:

  1. Visit https://basescan.org/apis
  2. Create account and get API key
  3. Add to environment: BASESCAN_API_KEY=your-key

Claude Desktop Setup

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "base-network": {
      "command": "node",
      "args": ["/path/to/basescan-mcp-server/build/index.js"],
      "env": {
        "BASESCAN_API_KEY": "your-key-here"
      }
    }
  }
}

Docker

# Basic setup
docker run -p 3010:3010 basescan-mcp-server

# With API key
docker run -p 3010:3010 -e BASESCAN_API_KEY=your-key basescan-mcp-server

Available Tools

ToolDescriptionRequires API Key
get_latest_blockLatest block informationNo
get_blockBlock by number/hashNo
get_transactionTransaction detailsNo
get_balanceETH balance lookupNo
get_gas_priceCurrent gas pricesNo
check_contractSmart contract detectionNo
get_network_statsNetwork statisticsNo
get_account_transactionsAccount transaction historyYes
get_account_tokensToken transfer historyYes

Configuration

Configure via environment variables:

NODE_ENV=development              # development|production
MCP_TRANSPORT_TYPE=stdio          # stdio|http
MCP_HTTP_PORT=3010               # HTTP port
BASESCAN_API_KEY=your-key        # BaseScan API key (optional)
MCP_LOG_LEVEL=info               # debug|info|warning|error

Security

  • Store API keys in environment variables
  • Never commit .env files with real values
  • Use HTTPS in production

Networks

  • Base Mainnet: Chain ID 8453
  • Base Sepolia: Chain ID 84532

Development

npm run dev            # Development with hot reload
npm test               # Run tests
npm run lint           # Code linting
npm run format         # Code formatting

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.