basescan
MCP server for AI agents to query Base Network blockchain data.
claude mcp add --transport stdio u-operating-system-basescan-mcp-server node /path/to/basescan-mcp-server/build/index.js \ --env BASESCAN_API_KEY="your-key-here"
How to use
Base Network MCP Server exposes a suite of blockchain tools to query Base Network data, including blocks, transactions, balances, and smart contracts. It supports both mainnet (Base Mainnet) and the Sepolia testnet, with nine available tools; seven function without an API key, while two require a BaseScan API key for enhanced capabilities. The server can be consumed over stdio or HTTP transports, offering flexibility for local development or remote access. Typical workflows include retrieving the latest block, fetching specific block or transaction details, checking account balances, and inspecting contract information. If you obtain a BaseScan API key, you can enable additional features such as account transaction history and token transfer history. To integrate with Claude Desktop, configure the MCP server in your Claude setup and provide the path to the built server entry point along with your API key if needed.
How to install
Prerequisites:
- Node.js (LTS version) and npm installed
- Git installed
- Optional: Docker if you want containerized usage
Install and build steps:
- Clone the repository git clone https://github.com/u-Operating-System/basescan-mcp-server.git
- Navigate to the project directory cd basescan-mcp-server
- Install dependencies npm install
- Build the project npm run build
Running the server:
- Local development (stdio or HTTP transport):
- Ensure environment variables are set as needed (see Environment variables below)
- Start the server npm start
- Or specify HTTP transport explicitly MCP_TRANSPORT_TYPE=http npm start
Optional: running with Docker (if you prefer containerization):
- Build the image locally (Dockerfile assumed in repo): docker build -t basescan-mcp-server .
- Run with optional API key: docker run -p 3010:3010 basescan-mcp-server docker run -p 3010:3010 -e BASESCAN_API_KEY=your-key basescan-mcp-server
Additional notes
Environment variables and configuration:
- BASESCAN_API_KEY: Optional API key for enhanced features (account/transaction/token history).
- MCP_TRANSPORT_TYPE: stdio (default) or http to expose an HTTP API (e.g., MCP_TRANSPORT_TYPE=http).
- MCP_HTTP_PORT: If using HTTP transport, specify the port (default 3010).
- NODE_ENV: development or production to control logging verbosity. Common issues:
- If API key is required but not set, some features may be unavailable; ensure you’ve added BASESCAN_API_KEY in the environment where the server runs.
- When using Claude Desktop integration, ensure the path in claude_desktop_config.json points to the built entry (build/index.js) and that environment variables are provided if needed.
- For Docker, remember to pass the API key via -e BASESCAN_API_KEY to enable enhanced features.
Related MCP Servers
iterm
A Model Context Protocol server that executes commands in the current iTerm session - useful for REPL and CLI assistance
mcp
Octopus Deploy Official MCP Server
furi
CLI & API for MCP management
editor
MCP Server for Phaser Editor
DoorDash
MCP server from JordanDalton/DoorDash-MCP-Server
mcp
MCP сервер для автоматического создания и развертывания приложений в Timeweb Cloud