BSC MCP Server

by ArcReactor9
Verified

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Provides tools for interacting with the Binance Smart Chain network, allowing access to blockchain data including block details, transaction information, wallet balances, BEP-20 token balances, and the ability to create Four.meme tokens on BSC.

  • Serves as the runtime environment for the MCP server, enabling server-side JavaScript execution for blockchain interactions and API requests to the BSC network.

BSC MCP 서버

바이낸스 스마트 체인(BSC) 네트워크와 상호 작용하는 모델 컨텍스트 프로토콜(MCP) 서버입니다. 이 서버를 통해 LLM은 블록체인 데이터에 접근하고 BSC 네트워크에서 쿼리를 수행할 수 있습니다.

특징

  • 현재 블록 번호 가져오기
  • 숫자 또는 해시로 블록 세부 정보 검색
  • 거래 세부 정보 가져오기
  • 거래 영수증 받기
  • 지갑 BNB 잔액 확인
  • BEP-20 토큰 잔액 확인
  • BSC에 Four.meme 토큰을 생성합니다.

필수 조건

  • Node.js(v16 이상)
  • npm 또는 yarn

설치

지엑스피1

용법

구성

기본적으로 서버는 BSC 메인넷에 연결됩니다. 환경 변수를 사용하여 RPC URL을 사용자 지정하고 토큰 생성에 필요한 개인 키를 설정할 수 있습니다.

# Windows set BSC_RPC_URL=https://your-custom-bsc-rpc-url set BSC_PRIVATE_KEY=your-private-key # Linux/macOS export BSC_RPC_URL=https://your-custom-bsc-rpc-url export BSC_PRIVATE_KEY=your-private-key

STDIO 서버 실행

STDIO 서버는 MCP 프로토콜을 지원하는 LLM 클라이언트와 통합되도록 설계되었습니다.

npm run start # or node dist/index.js

HTTP/SSE 서버 실행

HTTP/SSE 서버는 Server-Sent Events를 사용하여 HTTP를 통한 연결을 허용합니다.

npm run start:http # or node dist/server-http.js

기본적으로 서버는 포트 3000에서 실행됩니다. PORT 환경 변수를 사용하여 포트를 사용자 지정할 수 있습니다.

클라이언트 예시

BSC MCP 서버를 사용하는 방법을 보여주기 위해 여러 클라이언트 구현이 제공됩니다.

# Standard MCP client example npm run client # or node dist/client-example.js # HTTP client example npm run client:http # or node dist/client-http-example.js # Simple HTTP client example npm run client:simple # or node dist/simple-http-client.js

API 엔드포인트(HTTP 서버)

HTTP 서버는 다음과 같은 엔드포인트를 노출합니다.

엔드포인트방법설명
/얻다서버 상태 확인
/mcp/hello우편서버 정보 및 사용 가능한 도구 가져오기
/mcp/tools/:toolName우편인수를 사용하여 특정 도구 호출
/mcp/sse얻다스트리밍 연결을 위한 SSE(Server-Sent Events) 엔드포인트

MCP 도구

이 서버는 다음 MCP 도구를 제공합니다.

도구 이름매개변수설명
get-block-number없음현재 BSC 블록 번호를 반환합니다.
get-blockblockHashOrNumber : 문자열 또는 숫자주어진 블록 해시 또는 숫자에 대한 블록 세부 정보를 반환합니다.
get-transactiontxHash : 문자열주어진 거래 해시에 대한 거래 세부 정보를 반환합니다.
get-transaction-receipttxHash : 문자열주어진 거래 해시에 대한 거래 영수증을 반환합니다.
get-balanceaddress : 문자열지정된 지갑 주소에 대한 BNB 잔액을 반환합니다.
get-token-balancetokenAddress : 문자열, walletAddress : 문자열지정된 토큰과 지갑 주소에 대한 BEP-20 토큰 잔액을 반환합니다.
create-four-meme-tokenname : 문자열, symbol : 문자열, initialSupply : 숫자, decimals : 숫자, ownerAddress : 문자열지정된 매개변수를 사용하여 새로운 Four.meme 토큰을 생성합니다.

Four.meme 토큰 생성

BSC MCP 서버에는 바이낸스 스마트 체인에서 새로운 Four.meme 토큰을 생성하는 기능이 포함되어 있습니다. 이를 통해 사용자는 다음 매개변수를 사용하여 사용자 지정 밈 토큰을 쉽게 배포할 수 있습니다.

  • name : 토큰의 전체 이름(예: "Four Meme Token")
  • symbol : 토큰 기호(예: "4MEME")
  • initialSupply : mint에 필요한 초기 토큰 공급량
  • decimals : 토큰의 소수점 이하 자릿수(일반적으로 18)
  • ownerAddress : 초기 토큰 공급을 받을 BSC 주소

HTTP 클라이언트를 사용한 예

// Example of creating a Four.meme token using the HTTP client const client = new SimpleHttpClient('http://localhost:3000'); // Create a Four.meme token const tokenResponse = await client.createFourMemeToken( 'Four Pepe', // Token name '4PEPE', // Token symbol 420690000000, // Initial supply (before decimals) 18, // Decimals '0xYourWalletAddress' // Owner address ); console.log('Token creation response:', tokenResponse);

MCP.so와 통합

mcp.so 에서 이 서비스를 올바르게 표시하려면 저장소에 다음이 포함되어 있는지 확인하세요.

  1. 잘 문서화된 README.md(이 파일)
  2. 도구 사용 방법을 보여주는 코드 예제
  3. 명확하게 정의된 도구 사양

개발

프로젝트 구조

BSC_MCP_SERVICES/ ├── dist/ # Compiled JavaScript files ├── src/ # TypeScript source code │ ├── bsc-service.ts # BSC interaction service │ ├── index.ts # STDIO server implementation │ ├── server-http.ts # HTTP/SSE server implementation │ └── ... # Client examples and utilities ├── package.json # Project dependencies and scripts └── README.md # Project documentation (this file)

프로젝트 구축

npm run build

특허

아이에스씨

기여하다

기여를 환영합니다! 풀 리퀘스트를 제출해 주세요.

문제 해결

토큰 생성 문제

  • BSC_PRIVATE_KEY 환경 변수가 올바르게 설정되었는지 확인하세요.
  • 토큰 배포에 필요한 가스 비용을 충당할 만큼 충분한 BNB가 있는지 확인하세요.
  • 소유자 주소가 유효한 BSC 주소인지 확인하세요

연결 문제

  • RPC URL이 올바르고 접근 가능한지 확인하세요.
  • 네트워크 연결 확인
  • 서버가 예상 포트에서 실행 중인지 확인하세요.

지원하다

질문이나 지원이 필요하면 GitHub 저장소에서 이슈를 열어 주세요.

-
security - not tested
F
license - not found
-
quality - not tested

LLM이 Binance Smart Chain 데이터에 액세스하고, 블록체인 쿼리를 수행하고, Four.meme 토큰을 생성할 수 있도록 하는 모델 컨텍스트 프로토콜 서버입니다.

  1. Features
    1. Prerequisites
      1. Installation
        1. Usage
          1. Configuration
          2. Running the STDIO Server
          3. Running the HTTP/SSE Server
          4. Client Examples
        2. API Endpoints (HTTP Server)
          1. MCP Tools
            1. Creating Four.meme Tokens
              1. Example using HTTP Client
            2. Integration with MCP.so
              1. Development
                1. Project Structure
                2. Building the Project
              2. License
                1. Contributing
                  1. Troubleshooting
                    1. Token Creation Issues
                    2. Connection Issues
                  2. Support
                    ID: 0tuq5x909h