### Install Base MCP from Source Source: https://github.com/base/base-mcp/blob/master/README.md Details the steps required to install Base MCP by cloning its source repository. This includes fetching the code, installing all necessary dependencies, building the project, and optionally linking it globally for development purposes. ```bash git clone https://github.com/base/base-mcp.git cd base-mcp ``` ```bash npm install ``` ```bash npm run build ``` ```bash npm link ``` -------------------------------- ### Request Testnet ETH using Base MCP Tool Source: https://github.com/base/base-mcp/blob/master/examples.md Shows how Claude utilizes the `get-testnet-eth` tool to request testnet ETH for the user's wallet on Base Sepolia. ```APIDOC get-testnet-eth ``` -------------------------------- ### npm commands for Base MCP development environment setup Source: https://github.com/base/base-mcp/blob/master/CONTRIBUTING.md These commands are crucial for setting up and building the Base MCP development environment. They handle dependency installation, project compilation, and initial test execution to ensure the environment is ready for development. ```bash npm install npm run build npm test ``` -------------------------------- ### Check Wallet Balances using Base MCP Tool Source: https://github.com/base/base-mcp/blob/master/examples.md Illustrates Claude's use of the `list-balances` tool to display current wallet balances for various assets. ```APIDOC list-balances ``` -------------------------------- ### Get Wallet Address using Base MCP Tool Source: https://github.com/base/base-mcp/blob/master/examples.md Demonstrates how Claude uses the `get-address` tool to retrieve the user's wallet address on Base. ```APIDOC get-address ``` -------------------------------- ### Install Base MCP from npm Source: https://github.com/base/base-mcp/blob/master/README.md Provides commands to install the Base MCP package using npm, either globally for system-wide access or locally within a project. After installation, a separate command is provided to initialize client configurations. ```bash # Install globally npm install -g base-mcp # Or install locally in your project npm install base-mcp ``` ```bash base-mcp --init ``` -------------------------------- ### Buy OpenRouter credits using `buy_openrouter_credits` tool Source: https://github.com/base/base-mcp/blob/master/examples.md Demonstrates how Claude purchases OpenRouter credits for a given USD amount. This API call takes the amount in USD as its sole parameter. ```APIDOC buy_openrouter_credits( amountUsd: number ) amountUsd: The amount in USD to purchase OpenRouter credits. Returns: Transaction hash upon successful initiation. Example Call: buy_openrouter_credits( amountUsd: 20 ) ``` -------------------------------- ### List NFTs by Owner Address using Base MCP Tool Source: https://github.com/base/base-mcp/blob/master/examples.md Explains Claude's use of the `list_nfts` tool to retrieve a list of NFTs owned by a given address. ```APIDOC list_nfts: ownerAddress: 0x89A93a48C6Ef8085B9d07e46AaA96DFDeC717040 ``` -------------------------------- ### Get Morpho Vaults using Base MCP Tool Source: https://github.com/base/base-mcp/blob/master/examples.md Describes Claude's use of the `get_morpho_vaults` tool to retrieve available Morpho vaults for a specific asset symbol like USDC. ```APIDOC get_morpho_vaults: assetSymbol: "USDC" ``` -------------------------------- ### Deploy ERC20 Smart Contract using Base MCP Tool Source: https://github.com/base/base-mcp/blob/master/examples.md Explains how Claude employs the `deploy-contract` tool to deploy an ERC20 token contract, specifying constructor arguments, contract name, Solidity input JSON, and Solidity version. ```APIDOC deploy-contract: constructorArgs: ["ExampleToken", "EXT", "1000000000000000000000000"] contractName: "ERC20Token" solidityInputJson: _[JSON containing the ERC20 contract source code]_ solidityVersion: "0.8.20" ``` -------------------------------- ### Transfer Funds using Base MCP Tool Source: https://github.com/base/base-mcp/blob/master/examples.md Details the `transfer-funds` tool's usage by Claude to initiate an ETH transfer to a specified destination address with a given amount. ```APIDOC transfer-funds: destination: 0x9876543210abcdef9876543210abcdef98765432 assetId: ETH amount: 0.01 ``` -------------------------------- ### Onramp funds using `onramp` tool Source: https://github.com/base/base-mcp/blob/master/examples.md Shows how Claude initiates an onramp transaction for a specified amount and asset. This API call requires the desired amount in USD and the asset ID. ```APIDOC onramp( amountUsd: number, assetId: string ) amountUsd: The amount in USD to onramp. assetId: The ID of the asset to purchase (e.g., "eth"). Returns: A URL for the onramp transaction. Example Call: onramp( amountUsd: 100, assetId: "eth" ) ``` -------------------------------- ### Call Contract Function using Base MCP Tool Source: https://github.com/base/base-mcp/blob/master/examples.md Illustrates how Claude uses the `call_contract` tool to invoke a specific function on a smart contract, providing the contract address, function name, arguments, and ABI. ```APIDOC call_contract: contractAddress: "0x1234567890abcdef1234567890abcdef12345678" functionName: "balanceOf" functionArgs: ["0x9876543210abcdef9876543210abcdef98765432"] abi: _[JSON containing the contract ABI]_ ``` -------------------------------- ### Transfer NFT using `transfer_nft` tool Source: https://github.com/base/base-mcp/blob/master/examples.md Demonstrates how Claude initiates an NFT transfer by calling the `transfer_nft` tool. This API call requires the NFT's contract address, token ID, the recipient's address, and the amount to transfer. ```APIDOC transfer_nft( contractAddress: string, tokenId: string, toAddress: string, amount: number ) contractAddress: The contract address of the NFT. tokenId: The unique identifier of the NFT. toAddress: The recipient's Ethereum address. amount: The amount of NFTs to transfer (typically 1 for unique NFTs). Example Call: transfer_nft( contractAddress: 0x3F06FcF75f45F1bb61D56D68fA7b3F32763AA15c, tokenId: 56090175025510453004781233574040052668718235229192064098345825090519343038548, toAddress: 0x1234567890abcdef1234567890abcdef12345678, amount: 1 ) ``` -------------------------------- ### Configure Base MCP Environment Variables Source: https://github.com/base/base-mcp/blob/master/README.md An example .env file demonstrating the required and optional environment variables for configuring the Base MCP server. This includes API keys for Coinbase, Alchemy, OpenRouter, and Neynar, along with a wallet seed phrase and Chain ID for network selection. ```dotenv # 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 ``` -------------------------------- ### Resolve Farcaster username to Ethereum address using `farcaster_username` tool Source: https://github.com/base/base-mcp/blob/master/examples.md Explains how Claude resolves a Farcaster username to its associated Ethereum address and other details. This API call takes the Farcaster username as input. ```APIDOC farcaster_username( username: string ) username: The Farcaster username to resolve. Returns: Username: The resolved Farcaster username. FID: The Farcaster ID. Ethereum Address: The associated Ethereum address. Example Call: farcaster_username( username: "dwr" ) ``` -------------------------------- ### Check ERC20 Token Balance using Base MCP Tool Source: https://github.com/base/base-mcp/blob/master/examples.md Shows Claude's use of the `erc20_balance` tool to query the balance of a specific ERC20 token for the user's wallet, given the token's contract address. ```APIDOC erc20_balance: contractAddress: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" ``` -------------------------------- ### Transfer ERC20 Tokens using Base MCP Tool Source: https://github.com/base/base-mcp/blob/master/examples.md Details how Claude uses the `erc20_transfer` tool to initiate a transfer of a specified amount of an ERC20 token to a recipient address, requiring the token's contract address. ```APIDOC erc20_transfer: contractAddress: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" toAddress: "0x9876543210abcdef9876543210abcdef98765432" amount: "10" ``` -------------------------------- ### Check available onramp assets using `get_onramp_assets` tool Source: https://github.com/base/base-mcp/blob/master/examples.md Illustrates how Claude queries for available onramp assets in a specific geographical location. This API call takes country and subdivision as parameters to filter assets. ```APIDOC get_onramp_assets( country: string, subdivision: string ) country: The country code (e.g., "US"). subdivision: The subdivision code (e.g., "NY" for New York). Returns: An array of available asset IDs (e.g., ["ETH", "USDC", "DAI", "WBTC"]). Example Call: get_onramp_assets( country: "US", subdivision: "NY" ) ``` -------------------------------- ### Buy OpenRouter Credits Function Source: https://github.com/base/base-mcp/blob/master/README.md Describes the `buy_openrouter_credits` function, used for purchasing OpenRouter credits with USDC. The function requires the desired amount in USD. An example query to Claude would be: "Buy $20 worth of OpenRouter credits." ```APIDOC buy_openrouter_credits: description: Buys OpenRouter credits with USDC. parameters: - name: amountUsd type: number description: The amount of credits to buy, in USD ``` -------------------------------- ### Transfer NFT Function (ERC721/ERC1155) Source: https://github.com/base/base-mcp/blob/master/README.md Describes the `transfer_nft` function, which allows transferring NFTs conforming to ERC721 or ERC1155 standards to a specified address. It requires the contract address, token ID, recipient address, and an optional amount for ERC1155 transfers. An example query to Claude would be: "Transfer my NFT with contract 0x3F06FcF75f45F1bb61D56D68fA7b3F32763AA15c and token ID 56090175025510453004781233574040052668718235229192064098345825090519343038548 to 0x1234567890abcdef1234567890abcdef12345678." ```APIDOC transfer_nft: description: Transfers an NFT to another address. Supports both ERC721 and ERC1155 standards. parameters: - name: contractAddress type: string description: The address of the NFT contract - name: tokenId type: string description: The token ID of the NFT to transfer - name: toAddress type: string description: The address of the recipient - name: amount type: number description: The amount to transfer (only used for ERC1155, default: 1) ``` -------------------------------- ### Basic Git Commands for Contribution Source: https://github.com/base/base-mcp/blob/master/README.md Illustrates the fundamental Git commands required for contributing to the project, including creating a new feature branch, committing changes, and pushing to the remote repository. ```bash git checkout -b feature/amazing-feature git commit -m 'Add some amazing feature' git push origin feature/amazing-feature ``` -------------------------------- ### Base MCP Server Project Structure for Tools Source: https://github.com/base/base-mcp/blob/master/README.md Illustrates the recommended directory structure for adding new tools to the Base MCP server. Each tool should reside in its own directory within 'src/tools/' and include 'index.ts' for tool definition and 'schemas.ts' for input validation, along with optional 'utils/' for shared utilities. ```plaintext src/ ├── tools/ │ ├── [TOOL_NAME]/ <-------------------------- ADD DIR HERE │ │ ├── index.ts (defines and exports tools) │ │ ├── schemas.ts (defines input schema) │ └── utils/ (shared tool utilities) ``` -------------------------------- ### Directory structure for adding new tools in Base MCP Source: https://github.com/base/base-mcp/blob/master/CONTRIBUTING.md This snippet outlines the required file and directory structure for integrating new tools into the Base MCP server. It specifies the placement of tool definition, schema, and handler files within the `src/tools` directory, ensuring proper organization and integration. ```text src/ ├── tools/ │ ├── index.ts (exports toolsets) │ ├── [TOOL_NAME]/ <-------------------------- ADD DIR HERE │ │ ├── index.ts (defines and exports tools) │ │ ├── schemas.ts (defines input schema) │ │ └── handlers.ts (implements tool functionality) │ └── utils/ (shared tool utilities) ``` -------------------------------- ### Configure Base MCP Server for Claude Desktop Integration Source: https://github.com/base/base-mcp/blob/master/README.md This JSON configuration snippet defines how the Base MCP server integrates with Claude Desktop. It specifies the command to run the server, environment variables for API keys and sensitive data, and options for auto-approval and disabling the server, enabling seamless interaction. ```json { "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": [] } } } ``` -------------------------------- ### APIDOC: deploy-contract Tool Source: https://github.com/base/base-mcp/blob/master/README.md Deploys a smart contract to the blockchain using the provided Solidity compiler input. This tool is essential for deploying new decentralized applications, requiring constructor arguments, contract name, Solidity JSON input, and compiler version for successful deployment. ```APIDOC deploy-contract: description: 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 ``` -------------------------------- ### APIDOC: list-balances Tool Source: https://github.com/base/base-mcp/blob/master/README.md Lists all cryptocurrency balances held by the wallet managed by the Base MCP server. This tool provides an overview of available assets and their quantities without requiring any input parameters, offering a quick financial snapshot. ```APIDOC list-balances: description: Lists all balances for your wallet. parameters: None ``` -------------------------------- ### Command to execute Base MCP test suite Source: https://github.com/base/base-mcp/blob/master/CONTRIBUTING.md This command is used to run all automated tests for the Base MCP server. It's essential to ensure all tests pass before submitting any pull requests to maintain code quality and stability. ```bash npm test ``` -------------------------------- ### APIDOC: onramp Tool Source: https://github.com/base/base-mcp/blob/master/README.md Generates a URL for initiating a fiat-to-crypto onramp transaction via Coinbase. This tool streamlines the process of adding funds to a crypto wallet by specifying the amount in USD and the target asset. ```APIDOC onramp: description: Gets a URL for onramping funds via Coinbase. parameters: amountUsd: The amount of funds to onramp assetId: The asset ID to onramp ``` -------------------------------- ### Test Base MCP Server Connection Source: https://github.com/base/base-mcp/blob/master/README.md This command executes the test suite for the Base MCP server. It verifies the server's connectivity and the functionality of its integrated tools, ensuring proper operation and readiness for use. ```bash npm test ``` -------------------------------- ### Git commands for Base MCP pull request workflow Source: https://github.com/base/base-mcp/blob/master/CONTRIBUTING.md This snippet provides the essential Git commands for contributing a new feature or bugfix to the Base MCP server. It covers creating a new branch, committing changes with a descriptive message, and pushing the branch to the remote repository in preparation for a pull request. ```bash git checkout -b feature/amazing-feature git commit -m 'Add some amazing feature' git push origin feature/amazing-feature ``` -------------------------------- ### APIDOC: get_onramp_assets Tool Source: https://github.com/base/base-mcp/blob/master/README.md Identifies assets available for onramping (converting fiat to crypto) in a specific country and subdivision. This tool assists users in understanding their options for funding their crypto wallets by providing localized asset availability. ```APIDOC get_onramp_assets: description: 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) ``` -------------------------------- ### APIDOC: call_contract Tool Source: https://github.com/base/base-mcp/blob/master/README.md Executes a function on a smart contract deployed on the blockchain. This versatile tool requires the contract address, function name, arguments, ABI, and an optional ETH value for the transaction, enabling complex contract interactions. ```APIDOC call_contract: description: 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) ``` -------------------------------- ### APIDOC: erc20_transfer Tool Source: https://github.com/base/base-mcp/blob/master/README.md Executes a transfer of ERC20 tokens from the user's wallet to another address. This tool facilitates token transactions, requiring the ERC20 contract address, the recipient's address, and the amount of tokens to transfer. ```APIDOC erc20_transfer: description: 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 ``` -------------------------------- ### APIDOC: list_nfts Tool Source: https://github.com/base/base-mcp/blob/master/README.md Lists Non-Fungible Tokens (NFTs) owned by a specified blockchain address. This tool can be used to view a collection of NFTs, with an optional limit on the number of results for pagination or brevity. ```APIDOC list_nfts: description: 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) ``` -------------------------------- ### APIDOC: erc20_balance Tool Source: https://github.com/base/base-mcp/blob/master/README.md Retrieves the balance of a specific ERC20 token for the user's wallet. This tool is essential for managing token holdings, requiring the contract address of the ERC20 token to query its balance. ```APIDOC erc20_balance: description: Gets the balance of an ERC20 token. parameters: contractAddress: The address of the ERC20 contract ``` -------------------------------- ### APIDOC: check-address-reputation Tool Source: https://github.com/base/base-mcp/blob/master/README.md Checks the reputation score or status of a given Ethereum address. This tool is useful for security analysis and due diligence in blockchain interactions, requiring only the target Ethereum address as an input parameter. ```APIDOC check-address-reputation: description: Checks the reputation of an address. parameters: address: The Ethereum address to check ``` -------------------------------- ### APIDOC: transfer-funds Tool Source: https://github.com/base/base-mcp/blob/master/README.md Facilitates the transfer of funds from the user's wallet to a specified destination address. This tool is crucial for executing blockchain transactions, requiring the destination address, asset ID, and the amount to be transferred as parameters. ```APIDOC transfer-funds: description: 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 ``` -------------------------------- ### APIDOC: get_morpho_vaults Tool Source: https://github.com/base/base-mcp/blob/master/README.md Retrieves a list of available vaults on the Morpho protocol, optionally filtered by asset symbol. This tool helps users discover investment opportunities within the Morpho ecosystem by providing relevant vault information. ```APIDOC get_morpho_vaults: description: Gets the vaults for a given asset on Morpho. parameters: assetSymbol: Asset symbol by which to filter vaults (optional) ``` -------------------------------- ### APIDOC: get-address Tool Source: https://github.com/base/base-mcp/blob/master/README.md Retrieves the wallet address associated with the Base MCP server. This tool requires no parameters and is used to quickly obtain the user's primary blockchain address for various operations. ```APIDOC get-address: description: Retrieves the address for your wallet. parameters: None ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.