Skip to main content
Glama
Base Network MCP Server

Base Network MCP Server

by fakepixels

ベースネットワークMCPサーバー

これはBaseネットワーク用のMCPサーバーです。LLMは、ウォレット管理、残高確認、トランザクション実行など、自然言語コマンドを通じてBaseネットワーク上でブロックチェーン操作を実行できます。

このサーバーは、Base Mainnet と Base Sepolia テストネットの両方で動作します。

ツール

利用可能なツールは次のとおりです。

プロセスコマンド

ベースネットワーク操作のための自然言語コマンドを処理します。以下の引数を受け入れます。

  • command : 処理する自然言語コマンド(例:「0.5 ETHを0x1234に送信...」)

送信操作のトランザクションの詳細、残高チェックの残高情報、ウォレット作成のウォレットの詳細など、操作の結果を含む構造化された応答を返します。

ウォレットを作成する

ベースネットワーク上に新しいウォレットを作成します。以下の引数を受け入れます。

  • name : (オプション) ウォレットの名前

ウォレットのアドレス、名前、その他の詳細を含むオブジェクトを返します。

残高確認

Baseネットワーク上のウォレットの残高を確認します。以下の引数を受け入れます。

  • wallet : (オプション) 確認するウォレット名またはアドレス (デフォルトはプライマリウォレット)

ウォレットの残高を ETH で返します。

ウォレット一覧

利用可能なすべてのウォレットを一覧表示します。

ウォレット オブジェクトの配列を返します。各オブジェクトにはウォレット アドレス、名前、その他の詳細が含まれます。

Related MCP server: Base MCP Server

使用法

クロード・デスクトップ

Claude Desktopは、モデルコンテキストプロトコル(MCP)をサポートする人気のLLMクライアントです。Base MCPサーバーをClaude Desktopに接続することで、自然言語コマンドでブロックチェーン操作を実行できます。

次の設定ファイルを使用して、Claude Desktop に MCP サーバーを追加できます。

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Base MCP サーバーを Claude Desktop に追加するには、構成ファイルのmcpServersオブジェクトに次の構成を追加します。

{
  "mcpServers": {
    "base": {
      "command": "npx",
      "args": [
        "-y",
        "base-network-mcp-server"
      ],
      "env": {
        "BASE_PROVIDER_URL": "https://api.developer.coinbase.com/rpc/v1/base/YOUR_API_KEY",
        "WALLET_PRIVATE_KEY": "your_private_key_here"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

構成

  • BASE_PROVIDER_URL : ベースネットワークプロバイダー(メインネットまたはセポリア)のURL

  • WALLET_PRIVATE_KEY : 認証とトランザクション署名用のウォレット秘密鍵

  • DEFAULT_GAS_PRICE : (オプション) Gweiのデフォルトのガス価格

プログラムで(カスタム MCP クライアント)

独自のMCPクライアントを構築する場合は、お好みのトランスポートを使用してプログラム的にBase MCPサーバーに接続できます。MCP SDKには、組み込みのstdioおよびSSEトランスポートが用意されています。

インストール

npm i base-network-mcp-server
# or
yarn add base-network-mcp-server
# or
pnpm add base-network-mcp-server

例

次の例では、StreamTransport を使用して MCP クライアントとサーバー間を直接接続します。

import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import { StreamTransport } from '@modelcontextprotocol/sdk/client/stream.js';
import { BaseMcpServer } from 'base-network-mcp-server';

// Create a stream transport for both client and server
const clientTransport = new StreamTransport();
const serverTransport = new StreamTransport();

// Connect the streams together
clientTransport.readable.pipeTo(serverTransport.writable);
serverTransport.readable.pipeTo(clientTransport.writable);

const client = new Client(
  {
    name: 'MyClient',
    version: '0.1.0',
  },
  {
    capabilities: {},
  }
);

// Create and configure the Base MCP server
const server = new BaseMcpServer({
  providerUrl: 'https://api.developer.coinbase.com/rpc/v1/base/YOUR_API_KEY',
  privateKey: 'your_private_key_here',
});

// Connect the client and server to their respective transports
await server.connect(serverTransport);
await client.connect(clientTransport);

// Call tools
const output = await client.callTool({
  name: 'process_command',
  arguments: {
    command: 'Check my wallet balance',
  },
});

console.log(output);
// Example output:
// {
//   "success": true,
//   "message": "Balance of wallet \"default\": 1.5 ETH",
//   "balance": "1.5",
//   "wallet": "default"
// }

コマンド例

統合されると、次のような自然言語コマンドを使用できるようになります。

  • 「貯蓄用の新しいウォレットを作成する」

  • 「ウォレットの残高を確認してください」

  • 「私の貯金箱の残高はいくらですか?」

  • 「0.1 ETHを0x1234567890123456789012345678901234567890に送信」

  • 「貯蓄ウォレットから 0.5 ETH を 0xABCD に転送します...」

セキュリティに関する考慮事項

この実装は実際のブロックチェーン ネットワークと対話し、秘密鍵を処理するため、

  1. 秘密鍵のセキュリティ: 秘密鍵を安全に保管し、バージョン管理にコミットしないでください。

  2. まずはテストネットを使用する: メインネットに移行する前に、ベースとなる Sepolia テストネットから始める

  3. トランザクション検証: 送信前に必ずトランザクションパラメータを検証します

  4. エラー処理: ネットワークの問題に対する堅牢なエラー処理を実装する

  5. レート制限: 頻繁にリクエストを行う場合は、API レート制限に注意してください。

Available Tools

4 tools
check_balanceC

Check wallet balance

Inputs: wallet.

create_walletC

Create a new wallet

Inputs: name.

list_walletsB

List all available wallets

Inputs: no named parameters.

process_commandC

Process a natural language command for Base network operations

Inputs: command (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 4 tools

    Disambiguation4/5

    Three tools have clearly distinct purposes (check_balance, create_wallet, list_wallets) with no overlap, but process_command is ambiguous as it could potentially duplicate or overlap with the functionality of the other tools through natural language interpretation, creating some confusion in tool selection.

    Naming Consistency4/5

    Three tools follow a consistent verb_noun pattern (check_balance, create_wallet, list_wallets), but process_command deviates slightly by using a more abstract verb and including 'command' instead of a specific noun, breaking the pattern and reducing overall consistency.

    Tool Count4/5

    With 4 tools, the count is reasonable and well-scoped for a wallet management server, though it feels slightly thin as it lacks tools for operations like updating or deleting wallets, which are common in such domains.

    Completeness3/5

    The toolset covers basic wallet operations (create, list, check balance) and includes a general command processor, but there are notable gaps such as missing update_wallet, delete_wallet, or transaction-related tools, which are typical for network operations and could lead to agent workarounds or failures.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that connects Claude for Desktop with blockchain functionality, allowing users to check balances and send tokens on EVM and Solana chains through natural language interactions.
      MIT
    • A
      license
      Not graded
      quality
      F
      maintenance
      An MCP server that provides onchain tools for Claude AI to interact with the Base blockchain and Coinbase API, enabling wallet operations, testnet ETH, balance checks, fund transfers, and smart contract deployment.
      26 npm
      4
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      An MCP server that bridges AI models with Ethereum blockchains via all JSON-RPC calls, enabling natural language queries for block numbers, balances, transactions, and smart contract data.
      21
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that enables AI-driven on-chain interactions with the Zora Protocol on Base, supporting token queries, swaps, and transfers via natural language.
      20 npm
      2
      MIT