Skip to main content
Glama

Base MCP Server

License: MIT Built for Base

A read-only MCP (Model Context Protocol) server that lets any MCP-compatible AI agent — Claude Desktop, Claude Code, or any other MCP client — inspect wallets and contracts on Base directly through natural conversation, instead of manually looking things up on a block explorer.

This server distills five standalone tools from this collection (a transaction monitor, a contract verifier, an airdrop eligibility checker, a rug-pull risk scorer, and a token approval checker) into one always-available set of MCP tools, backed by the same well-tested Base data logic.

Tools exposed

Tool

What it does

get_wallet_balance

ETH balance of an address

get_recent_transactions

Most recent transactions for an address

get_wallet_activity

0-100 heuristic on-chain activity score

check_contract_verification

Source verification, proxy status, owner status

check_rugpull_risk

0-100 heuristic scam-pattern risk score

check_token_approvals

Active ERC-20/NFT approvals granted by a wallet

Related MCP server: wallet-inspector-mcp

⚠️ This server is read-only

It never asks for or handles a private key, and cannot send transactions, sign anything, or revoke approvals — every tool only reads public Base blockchain data (via the Blockscout Pro API and Base's public RPC node).

Setup

1. Requirements

2. Install

git clone https://github.com/YOUR_USER/base-mcp-server.git
cd base-mcp-server
pip install -r requirements.txt

3. Configure your MCP client

Claude Desktop — edit your claude_desktop_config.json (Settings → Developer → Edit Config) and add:

{
  "mcpServers": {
    "base-tools": {
      "command": "python",
      "args": ["/absolute/path/to/base-mcp-server/server.py"],
      "env": {
        "BLOCKSCOUT_API_KEY": "your_key_here"
      }
    }
  }
}

Claude Code — from the project directory:

claude mcp add base-tools --env BLOCKSCOUT_API_KEY=your_key_here -- python /absolute/path/to/base-mcp-server/server.py

Any other MCP client — point it at python server.py with BLOCKSCOUT_API_KEY set in its environment; the server speaks standard MCP over stdio.

Restart your client after editing the config. You should see base-tools (with its 6 tools) show up as an available MCP server.

4. Try it

Once connected, just ask your agent things like:

  • "What's the ETH balance of 0x...?"

  • "Check this Base contract for rug-pull risk: 0x..."

  • "Does this wallet have any risky unlimited token approvals?"

  • "Is this contract's source code verified on Base?"

  • "Show me the last 10 transactions for this address."

The agent will call the relevant tool automatically based on what you ask.

How it works

  • All tools talk to Base (chainId 8453) through the free, Etherscan-compatible Blockscout Pro API, plus a couple of direct JSON-RPC calls to Base's official public node (mainnet.base.org) for on-chain reads like owner() and allowance() that are more reliable done directly than through an explorer's compatibility layer.

  • Every tool degrades gracefully: if an API call fails, the tool returns a clear text message explaining that, instead of crashing the whole server or the agent's turn.

  • The rug-pull risk score and activity score use the exact same heuristics as the standalone Base Rug Pull Early Warning and Base Airdrop Eligibility Checker tools — see those repos for more detail on the scoring logic.

Limitations

  • Heuristic tools (check_rugpull_risk, get_wallet_activity) are not a substitute for a real security audit or official program criteria — always verify independently before acting on the results.

  • Transaction and approval scanning samples up to 1,000 recent events for performance; very old activity outside that window won't be reflected.

  • Depends on the free tiers of the Blockscout Pro API and Base's public RPC node; if either is rate-limited or briefly down, the affected tool will report that instead of returning data.

License

MIT — use it, modify it, fork it freely.

Available Tools

6 tools
check_contract_verificationA

Check whether a contract on Base has verified source code, and basic metadata.

Reports source verification status, whether it's an upgradeable proxy, and whether ownership has been renounced (for contracts following the standard Ownable pattern).

Args: address: The 0x-prefixed contract address to check.

Inputs: address (required). Returns: result

check_rugpull_riskA

Run a heuristic rug-pull risk screen on a Base contract.

Checks source verification, common scam-token code patterns (blacklists, arbitrary fee/limit changes, trading kill-switches, uncapped minting, etc.), ownership status, and proxy/upgradeability. Returns a 0-100 risk score. This is a heuristic tool, NOT a security audit — always verify manually before making decisions involving money.

Args: address: The 0x-prefixed contract address to screen.

Inputs: address (required). Returns: result

check_token_approvalsA

Check a wallet's active ERC-20 and NFT token approvals on Base.

Scans historical Approval/ApprovalForAll events, then verifies the CURRENT on-chain state of each unique pair found (an old event doesn't mean the approval is still active — it may have been reduced or revoked since). Flags unlimited approvals as high-risk. This tool is READ-ONLY and cannot revoke anything.

Args: address: The 0x-prefixed wallet address to check.

Inputs: address (required). Returns: result

get_recent_transactionsA

Get the most recent transactions for an address on Base.

Args: address: The 0x-prefixed address to check. limit: Maximum number of recent transactions to return (default 10, max 50).

Inputs: address (required), limit. Returns: result

get_wallet_activityA

Compute a rough 0-100 on-chain activity score for a wallet on Base.

Based on transaction count, number of unique active days, contract diversity, and wallet age (all sampled from the most recent 1,000 transactions). This is a heuristic indicator, not an official metric of any airdrop or program.

Args: address: The 0x-prefixed wallet address to check.

Inputs: address (required). Returns: result

get_wallet_balanceA

Get the native ETH balance of a wallet or contract address on Base.

Args: address: The 0x-prefixed address to check.

Inputs: address (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool targets a distinct aspect of on-chain data—contract verification, rug-pull risk, token approvals, recent transactions, wallet activity, and balance. There is no functional overlap, making it easy for an agent to select the right tool.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern with snake_case (check_* and get_*). The verbs are descriptive and the nouns clearly indicate the resource being acted upon, forming a predictable naming scheme.

    Tool Count5/5

    With 6 tools, the server is lean and focused on essential on-chain analysis functions for the Base ecosystem. Each tool serves a clear purpose without redundancy or unnecessary features, making the set well-scoped.

    Completeness4/5

    The tool set covers key queries for contract safety and wallet activity, but lacks tools for fetching specific transaction details or token metadata. These are minor gaps that agents can work around, but the core use cases are addressed.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      An MCP server that enables LLMs to perform blockchain operations on the Base network through natural language commands, including wallet management, balance checking, and transaction execution.
      4
      82 npm
      3
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      A read-only MCP server connecting AI agents to MTRKR wallet intelligence on MegaETH, enabling wallet portfolio, DeFi positions, security scanning, and transaction analytics.
      14
      25 npm
      4
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that enables AI-driven on-chain interactions with the Zora Protocol on Base, supporting token queries, swaps, and transfers via natural language.
      22 npm
      2
      MIT