base-mcp
Base MCP: Connect AI models to Base network with on-chain tools for secure blockchain interactions.

base-mcp Solution Overview
Base MCP is a versatile Model Context Protocol (MCP) server designed to empower AI applications with on-chain capabilities for the Base network and Coinbase API. It acts as a bridge, enabling AI models to securely interact with blockchain functionalities.
This server extends MCP client capabilities by providing tools for wallet management (retrieval, balance listing), fund transfers, smart contract deployment, and interaction with Morpho vaults for on-chain lending. It also supports Coinbase onramp, ERC20 token management, and NFT (ERC721 and ERC1155) interactions.
Base MCP seamlessly integrates with AI models, allowing them to execute on-chain actions based on user requests. By leveraging Base Developer Tools and AgentKit, it simplifies the process of building AI-powered blockchain applications. Developers can also extend Base MCP with custom tools and protocols, following a well-defined structure for easy integration. This enhances AI's ability to interact with and leverage the Base blockchain.
base-mcp Key Capabilities
On-Chain Interaction Tools
Base-MCP provides a suite of tools that enable AI models to interact directly with the Base blockchain. These tools include functionalities for retrieving wallet addresses and balances, transferring funds, deploying smart contracts, and interacting with Morpho vaults for on-chain lending. This allows AI applications to perform actions such as managing digital assets, participating in DeFi protocols, and executing smart contracts, all through natural language commands. For example, a user could instruct an AI assistant to "Transfer 0.01 ETH to 0x123...", and the Base-MCP server would handle the transaction execution on the Base network. This bridges the gap between AI-driven interfaces and blockchain technology, enabling new possibilities for decentralized applications.
Technically, each tool is implemented as a separate module within the src/tools
directory, following a defined structure with index.ts
, schemas.ts
, and handlers.ts
files. This modular design allows for easy extension and maintenance of the available on-chain interaction capabilities.
Coinbase Onramp Integration
Base-MCP integrates directly with the Coinbase API to facilitate the onramping of funds. This feature allows users to purchase cryptocurrencies directly through the AI interface, using fiat currency. The onramp
tool generates a URL that directs the user to Coinbase to complete the purchase, streamlining the process of acquiring digital assets. For example, a user could ask the AI, "I want to onramp $100 worth of ETH," and the Base-MCP server would generate a Coinbase URL for the user to complete the transaction. This integration simplifies the process of funding blockchain interactions, making it more accessible to a wider audience.
The onramp functionality requires a Coinbase Project ID and API credentials, which are configured through environment variables. The server uses these credentials to securely interact with the Coinbase API and generate the onramp URL.
NFT Management Capabilities
Base-MCP includes tools for managing Non-Fungible Tokens (NFTs), enabling AI models to list and transfer NFTs (ERC721 and ERC1155 standards). This allows users to manage their digital collectibles and assets through natural language commands. For example, a user could ask the AI, "Show me the NFTs owned by 0x...", and the Base-MCP server would retrieve and display the NFTs associated with that address. Similarly, a user could instruct the AI to "Transfer my NFT with contract 0x... and token ID ... to 0x...", and the server would execute the transfer transaction. This functionality opens up new possibilities for AI-driven NFT management and interaction.
The NFT management tools utilize the Alchemy API, requiring an Alchemy API Key for proper functionality. The server interacts with the Alchemy API to retrieve NFT ownership data and execute transfer transactions.
Extensible Architecture
Base-MCP is designed with an extensible architecture, allowing developers to easily add new tools and functionalities. The server follows a modular structure, with each tool implemented as a separate module within the src/tools
directory. This makes it easy to add new third-party protocols, tools, and data sources to the server. Developers can create new tools by following the existing patterns, defining input schemas, implementing the tool's functionality, and adding documentation and examples. This extensible architecture ensures that Base-MCP can adapt to the evolving needs of the AI and blockchain ecosystems.
The project structure encourages modularity, with clear guidelines for adding new tools. This includes creating a new directory in the src/tools
directory, implementing the tool following the existing patterns, and adding documentation and examples.