Base Blockchain

Base Blockchain

Official
base

Connects to the Base blockchain network to manage wallets, check balances, and execute transactions through simple natural language commands.

Enables Claude to interact with the Base blockchain and Coinbase API for cryptocurrency operations including wallet management, fund transfers, and smart contract deployments.

342363 views126Local (stdio)

What it does

  • Create new blockchain wallets
  • Check wallet balances in ETH
  • Send cryptocurrency transactions
  • List all available wallets
  • Process natural language blockchain commands
  • Work with Base Mainnet and testnet

Best for

DeFi developers building on BaseManaging cryptocurrency wallets conversationallyBlockchain automation and scripting
Natural language commandsBoth mainnet and testnet support

About Base Blockchain

Base Blockchain is an official MCP server published by base that provides AI assistants with tools and capabilities via the Model Context Protocol. Interact with the Base blockchain using the Coinbase API for wallet management, transfers, and smart contract deployment It is categorized under finance, developer tools.

How to install

You can install Base Blockchain in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.

License

Base Blockchain is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.

Base MCP Server πŸ”΅

OpenRouter Integration

npm version License: MIT

A Model Context Protocol (MCP) server that provides onchain tools for AI applications like Claude Desktop and Cursor, allowing them to interact with the Base Network and Coinbase API.

Overview

This MCP server extends any MCP client's capabilities by providing tools to do anything on Base:

  • Retrieve wallet addresses
  • List wallet balances
  • Transfer funds between wallets
  • Deploy smart contracts
  • Interact with Morpho vaults for onchain lending
  • Call contract functions
  • Onramp funds via Coinbase
  • Manage ERC20 tokens
  • List and transfer NFTs (ERC721 and ERC1155)
  • Buy OpenRouter credits with USDC
  • Resolve Farcaster usernames to Ethereum addresses

The server interacts with Base, powered by Base Developer Tools and AgentKit.

Extending Base MCP with 3P Protocols, Tools, and Data Sources

Base MCP is designed to be extensible, allowing you to add your own third-party protocols, tools, and data sources. This section provides an overview of how to extend the Base MCP server with new capabilities.

Adding New Tools

If you want to add a new tool to the Base MCP server, follow these steps:

  1. Create a new directory in the src/tools directory for your tool
  2. Implement the tool following the existing patterns:
    • index.ts: Define and export your tools. Tools are defined as AgentKit ActionProviders.
    • schemas.ts: Define input schemas for your tools
    • types.ts: Define types required for your tools
    • utils.ts: Utilities for your tools
  3. Add your tool to the list of available tools in src/main.ts
  4. Add documentation for your tool in the README.md
  5. Add examples of how to use your tool in examples.md
  6. Write tests for your tool

Project Structure

The Base MCP server follows this structure for tools:

src/
β”œβ”€β”€ tools/
β”‚   β”œβ”€β”€ [TOOL_NAME]/ <-------------------------- ADD DIR HERE
β”‚   β”‚   β”œβ”€β”€ index.ts (defines and exports tools)
β”‚   β”‚   β”œβ”€β”€ schemas.ts (defines input schema)
β”‚   └── utils/ (shared tool utilities)

Best Practices for Tool Development

When developing new tools for Base MCP:

  • Follow the existing code style and patterns
  • Ensure your tool has a clear, focused purpose
  • Provide comprehensive input validation
  • Include detailed error handling
  • Write thorough documentation
  • Add examples demonstrating how to use your tool
  • Include tests for your tool

For more detailed information on contributing to Base MCP, including adding new tools and protocols, see the CONTRIBUTING.md file.

Prerequisites

  • Node.js (v16 or higher)
  • npm or yarn
  • Coinbase API credentials (API Key Name and Private Key)
  • A wallet seed phrase
  • Coinbase Project ID (for onramp functionality)
  • Alchemy API Key (required for NFT functionality)
  • Optional: OpenRouter API Key (for buying OpenRouter credits)

Installation

Option 1: Install from npm (Recommended)

# Install globally
npm install -g base-mcp

# Or install locally in your project
npm install base-mcp

Once the package is installed, you can configure clients with the following command:

base-mcp --init

Option 2: Install from Source

  1. Clone this repository:

    git clone https://github.com/base/base-mcp.git
    cd base-mcp
    
  2. Install dependencies:

    npm install
    
  3. Build the project:

    npm run build
    
  4. Optionally, link it globally:

    npm link
    

Configuration

Create a .env file with your credentials:

# Coinbase API credentials
# You can obtain these from the Coinbase Developer Portal: https://cdp.coinbase.com/
COINBASE_API_KEY_NAME=your_api_key_name
COINBASE_API_PRIVATE_KEY=your_private_key

# Wallet seed phrase (12 or 24 words)
# This is the mnemonic phrase for your wallet
SEED_PHRASE=your seed phrase here

# Coinbase Project ID (for onramp functionality)
# You can obtain this from the Coinbase Developer Portal
COINBASE_PROJECT_ID=your_project_id

# Alchemy API Key (required for NFT functionality)
# You can obtain this from https://alchemy.com
ALCHEMY_API_KEY=your_alchemy_api_key

# OpenRouter API Key (optional for buying OpenRouter credits)
# You can obtain this from https://openrouter.ai/keys
OPENROUTER_API_KEY=your_openrouter_api_key

# Chain ID (optional for Base Sepolia testnet)
# Use 84532 for Base Sepolia testnet
# You do not have to include this if you want to use Base Mainnet
CHAIN_ID=your_chain_id

# Neynar API Key (required for Farcaster functionality)
# You can obtain this from https://neynar.com
NEYNAR_API_KEY=your_neynar_api_key

Testing

Test the MCP server to verify it's working correctly:

npm test

This script will verify that your MCP server is working correctly by testing the connection and available tools.

Examples

See the examples.md file for detailed examples of how to interact with the Base MCP tools through Claude.

Integration with Claude Desktop

To add this MCP server to Claude Desktop:

  1. Create or edit the Claude Desktop configuration file at:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    • Linux: ~/.config/Claude/claude_desktop_config.json

You can easily access this file via the Claude Desktop app by navigating to Claude > Settings > Developer > Edit Config.

  1. Add the following configuration:

    {
      "mcpServers": {
        "base-mcp": {
          "command": "npx",
          "args": ["-y", "base-mcp@latest"],
          "env": {
            "COINBASE_API_KEY_NAME": "your_api_key_name",
            "COINBASE_API_PRIVATE_KEY": "your_private_key",
            "SEED_PHRASE": "your seed phrase here",
            "COINBASE_PROJECT_ID": "your_project_id",
            "ALCHEMY_API_KEY": "your_alchemy_api_key",
            "PINATA_JWT": "your_pinata_jwt",
            "OPENROUTER_API_KEY": "your_openrouter_api_key",
            "CHAIN_ID": "optional_for_base_sepolia_testnet"
          },
          "disabled": false,
          "autoApprove": []
        }
      }
    }
    
  2. Restart Claude Desktop for the changes to take effect.

Available Tools

get-address

Retrieves the address for your wallet.

Example query to Claude:

"What's my wallet address?"

list-balances

Lists all balances for your wallet.

Example query to Claude:

"Show me my wallet balances."

transfer-funds

Transfers funds from your wallet to another address.

Parameters:

  • destination: The address to which to transfer funds
  • assetId: The asset ID to transfer
  • amount: The amount of funds to transfer

Example query to Claude:

"Transfer 0.01 ETH to 0x1234567890abcdef1234567890abcdef12345678."

deploy-contract

Deploys a smart contract to the blockchain.

Parameters:

  • constructorArgs: The arguments for the contract constructor
  • contractName: The name of the contract to deploy
  • solidityInputJson: The JSON input for the Solidity compiler containing contract source and settings
  • solidityVersion: The version of the solidity compiler

Example query to Claude:

"Deploy a simple ERC20 token contract for me."

check-address-reputation

Checks the reputation of an address.

Parameters:

  • address: The Ethereum address to check

Example query to Claude:

"What's the reputation of 0x1234567890abcdef1234567890abcdef12345678?"

get_morpho_vaults

Gets the vaults for a given asset on Morpho.

Parameters:

  • assetSymbol: Asset symbol by which to filter vaults (optional)

Example query to Claude:

"Show me the available Morpho vaults for USDC."

call_contract

Calls a contract function on the blockchain.

Parameters:

  • contractAddress: The address of the contract to call
  • functionName: The name of the function to call
  • functionArgs: The arguments to pass to the function
  • abi: The ABI of the contract
  • value: The value of ETH to send with the transaction (optional)

Example query to Claude:

"Call the balanceOf function on the contract at 0x1234567890abcdef1234567890abcdef12345678."

get_onramp_assets

Gets the assets available for onramping in a given country/subdivision.

Parameters:

  • country: ISO 3166-1 two-digit country code string representing the purchasing user's country of residence
  • subdivision: ISO 3166-2 two-digit country subdivision code (required for US)

Example query to Claude:

"What assets can I onramp in the US, specifically in New York?"

onramp

Gets a URL for onramping funds via Coinbase.

Parameters:

  • amountUsd: The amount of funds to onramp
  • assetId: The asset ID to onramp

Example query to Claude:

"I want to onramp $100 worth of ETH."

erc20_balance

Gets the balance of an ERC20 token.

Parameters:

  • contractAddress: The address of the ERC20 contract

Example query to Claude:

"What's my balance of the token at 0x1234567890abcdef1234567890abcdef12345678?"

erc20_transfer

Transfers an ERC20 token to another address.

Parameters:

  • contractAddress: The address of the ERC20 contract
  • toAddress: The address of the recipient
  • amount: The amount of tokens to transfer

Example query to Claude:

"Transfer 10 USDC to 0x1234567890abcdef1234567890abcdef12345678."

list_nfts

Lists NFTs owned by a specific address.

Parameters:

  • ownerAddress: The address of the owner whose NFTs to list
  • limit: Maximum number of NFTs to return (default: 50)

Example query to Claude:

"Show me the NFTs owned by 0x89A93a48C6Ef8085B9d07e46AaA96DFDeC717040."

transfer_nft

Transfers an NFT to another address. Supports both ERC7


README truncated. View full README on GitHub.

Alternatives

Related Skills

Browse all skills
azure-identity-rust

Azure Identity SDK for Rust authentication. Use for DeveloperToolsCredential, ManagedIdentityCredential, ClientSecretCredential, and token-based authentication. Triggers: "azure-identity", "DeveloperToolsCredential", "authentication rust", "managed identity rust", "credential rust".

1
godot

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

732
slidev

Comprehensive guide for Slidev - a web-based presentation framework for developers. Covers Markdown syntax, layouts, components, animations, theming, and exporting. Use this skill when creating or working with developer presentations using Slidev.

264
dotnet-backend

.NET/C# backend developer for ASP.NET Core APIs with Entity Framework Core. Builds REST APIs, minimal APIs, gRPC services, authentication with Identity/JWT, authorization, database operations, background services, SignalR real-time features. Activates for: .NET, C#, ASP.NET Core, Entity Framework Core, EF Core, .NET Core, minimal API, Web API, gRPC, authentication .NET, Identity, JWT .NET, authorization, LINQ, async/await C#, background service, IHostedService, SignalR, SQL Server, PostgreSQL .NET, dependency injection, middleware .NET.

109
supabase-developer

Build full-stack applications with Supabase (PostgreSQL, Auth, Storage, Real-time, Edge Functions). Use when implementing authentication, database design with RLS, file storage, real-time features, or serverless functions.

87
ui-ux-expert-skill

Technical workflow for implementing accessible React user interfaces with shadcn/ui, Tailwind CSS, and TanStack Query. Includes 6-phase process with mandatory Style Guide compliance, Context7 best practices consultation, Chrome DevTools validation, and WCAG 2.1 AA accessibility standards. Use after Test Agent, Implementer, and Supabase agents complete their work.

66