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 サーバー

Binance Smart Chain(BSC)ネットワークとやり取りするためのモデルコンテキストプロトコル(MCP)サーバー。このサーバーにより、LLMはブロックチェーンデータにアクセスし、BSCネットワーク上でクエリを実行できるようになります。

特徴

  • 現在のブロック番号を取得する
  • 番号またはハッシュでブロックの詳細を取得する
  • 取引の詳細を取得する
  • 取引の領収書を取得する
  • ウォレットのBNB残高を確認する
  • BEP-20トークンの残高を確認する
  • BSCでFour.memeトークンを作成する

前提条件

  • Node.js (v16 以上)
  • npmまたはyarn

インストール

# Clone the repository git clone https://github.com/ArcReactor9/BSC_MCP_SERVICES.git cd BSC_MCP_SERVICES # Install dependencies npm install # Build the project npm run build

使用法

構成

デフォルトでは、サーバーは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 環境変数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得るストリーミング接続用の Server-Sent Events (SSE) エンドポイント

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サーバーには、Binance Smart Chain上に新しいFour.memeトークンを作成する機能が含まれています。これにより、ユーザーは以下のパラメータを使用して、カスタムミームトークンを簡単にデプロイできます。

  • name : トークンのフルネーム(例:「Four Meme Token」)
  • symbol : トークンシンボル(例: "4MEME")
  • initialSupply : ミントする初期トークン供給量
  • 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

ライセンス

ISC

貢献

貢献を歓迎します!お気軽にプルリクエストを送信してください。

トラブルシューティング

トークン作成の問題

  • 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