Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

BNBChain MCP - AI-Powered Blockchain Assistant

A ready-to-use template that combines BNBChain's Model Context Protocol (MCP) with Anthropic's Claude AI to create an intelligent blockchain interaction interface. This template enables natural language conversations for blockchain operations, making it easier for developers and users to interact with BNB Smart Chain and BNB Greenfield.

Key Features

  • 🤖 AI-powered blockchain interactions using Claude-3
  • 🔗 Direct integration with BNB Smart Chain
  • 📦 Built-in support for common blockchain operations
  • 🔒 Secure private key management
  • 💬 Interactive chat interface
  • 📊 Real-time blockchain data access

This directory contains the integration code for using BNBChain MCP with Anthropic's Claude models. This is a Replit template for playground use; for more stable integration, we recommend using Cursor or Claude desktop. You can configure it by referring to the integration guide.

How to Run Locally

Prerequisites

  • Node.js (v16 or higher)
  • pnpm (v7 or higher)
  • An Anthropic API key from console.anthropic.com
  • Your private key (optional)

Step 1: Install Dependencies

pnpm install

Step 2: Set Up Environment Variables

  1. Copy the example environment file:
cp .env.example .env
  1. Update the following variables in .env:
    • ANTHROPIC_API_KEY: Your Anthropic API key
    • PRIVATE_KEY: Your blockchain private key (optional)

Step 3: Run the Application

pnpm start

Wait for the initialization to complete - you'll see "MCP Client Started!" in the console.

Step 4: Try Some Example Queries

Once the client is running, you can enter queries in the console. Here are some example prompts:

  1. Check BNB balance:
What's my BNB balance?
  1. Get network status:
What's the current status of the BNB Smart Chain?
  1. Token information:
Show me information about the CAKE token
  1. Transaction analysis:
Can you analyze the latest transactions on PancakeSwap?
  1. Smart contract interaction:
What's the current TVL in Venus Protocol?

To exit the application, simply type quit or exit.

Features

  • Real-time blockchain data access
  • Natural language interaction with Claude AI
  • Secure handling of private keys
  • Support for multiple blockchain operations
  • Interactive chat interface

Troubleshooting

If you encounter any issues:

  1. Make sure your Anthropic API key is valid and has sufficient credits
  2. Check your internet connection
  3. Verify that you're using the correct Node.js version
  4. Ensure all dependencies are properly installed
  5. Check the console for any error messages
  6. Verify your .env file is properly configured

Note

Make sure to keep your API keys and private keys secure and never share them with others. The secrets tool in Replit ensures your sensitive information remains encrypted and safe.