MCP Clusters API Server
MCP サーバー - クラスター API v1
これは、Clusters API v1 用の Model Context Protocol (MCP) サーバー実装です。認証、クラスター管理、名前登録などのエンドポイントを提供します。
依存関係
{
"@modelcontextprotocol/sdk": "^1.7.0",
"dotenv": "^16.4.7",
"zod": "^3.24.2"
}Related MCP server: MCP Boilerplate
設定
依存関係をインストールします:
npm installCLUSTERS_API_KEY={CLUSTERS_API_KEY} を含む
.envファイルを作成します。サーバーをビルドして起動します。
npm run devエンドポイントのテスト
このサーバーはStdioServerTransportを使用しているため、JSON-RPC メッセージを stdin 経由で送信する必要があります。各エンドポイントをテストするためのコマンド例を以下に示します。
認証エンドポイント
メッセージを取得
echo '{"jsonrpc":"2.0","id":1,"method":"auth_get_message","params":{"address":"0x123...","chainId":1,"nonce":"abc123"}}' | node dist/index.jsトークンを取得
echo '{"jsonrpc":"2.0","id":1,"method":"auth_get_token","params":{"signature":"0x123...","signingDate":"2024-03-21","type":"evm","wallet":"0x123..."}}' | node dist/index.jsトークンを検証する
echo '{"jsonrpc":"2.0","id":1,"method":"auth_validate_token","params":{"authKey":"your-auth-key"}}' | node dist/index.jsクラスター管理エンドポイント
クラスターの作成
echo '{"jsonrpc":"2.0","id":1,"method":"create_cluster","params":{"wallets":[{"address":"0x123...","name":"MyWallet","isPrivate":false}],"authKey":"your-auth-key","testnet":false}}' | node dist/index.jsIDでクラスターを取得
echo '{"jsonrpc":"2.0","id":1,"method":"get_cluster_by_id","params":{"id":"cluster-id","testnet":false}}' | node dist/index.js名前でクラスターを取得
echo '{"jsonrpc":"2.0","id":1,"method":"get_cluster_by_name","params":{"name":"cluster-name","testnet":false}}' | node dist/index.jsアドレスでクラスターIDを取得する
echo '{"jsonrpc":"2.0","id":1,"method":"get_cluster_id_by_address","params":{"address":"0x123...","testnet":false}}' | node dist/index.jsウォレットを追加
echo '{"jsonrpc":"2.0","id":1,"method":"add_wallets","params":{"wallets":[{"address":"0x123...","name":"NewWallet","isPrivate":false}],"authKey":"your-auth-key","testnet":false}}' | node dist/index.jsウォレットを生成する
echo '{"jsonrpc":"2.0","id":1,"method":"generate_wallet","params":{"type":"evm","name":"NewWallet","isPrivate":false,"authKey":"your-auth-key","testnet":false}}' | node dist/index.jsウォレットを更新する
echo '{"jsonrpc":"2.0","id":1,"method":"update_wallets","params":{"wallets":[{"address":"0x123...","name":"UpdatedName"}],"authKey":"your-auth-key","testnet":false}}' | node dist/index.jsウォレットを削除する
echo '{"jsonrpc":"2.0","id":1,"method":"remove_wallets","params":{"addresses":["0x123..."],"authKey":"your-auth-key","testnet":false}}' | node dist/index.jsウォレットを確認する
echo '{"jsonrpc":"2.0","id":1,"method":"verify_wallet","params":{"clusterId":"cluster-id","authKey":"your-auth-key","testnet":false}}' | node dist/index.jsアドレス↔名前解決エンドポイント
住所でデータを取得
echo '{"jsonrpc":"2.0","id":1,"method":"get_data_by_address","params":{"address":"0x123...","testnet":false}}' | node dist/index.js住所による一括データ取得
echo '{"jsonrpc":"2.0","id":1,"method":"get_bulk_data_by_addresses","params":{"addresses":["0x123...","0x456..."],"testnet":false}}' | node dist/index.js名前で一括データを取得する
echo '{"jsonrpc":"2.0","id":1,"method":"get_bulk_data_by_names","params":{"names":[{"name":"name1"}],"testnet":false}}' | node dist/index.js登録エンドポイント
名前の空き状況を確認する
echo '{"jsonrpc":"2.0","id":1,"method":"check_name_availability","params":{"names":["name1","name2"]}}' | node dist/index.js登録サインデータを取得する
echo '{"jsonrpc":"2.0","id":1,"method":"get_registration_sign_data","params":{"network":"1","sender":"0x123...","names":[{"name":"name1","amountWei":"1000000000000000000"}],"referralClusterId":"optional-id","testnet":false}}' | node dist/index.js取引ステータスを取得する
echo '{"jsonrpc":"2.0","id":1,"method":"get_transaction_status","params":{"txHash":"0x123..."}}' | node dist/index.js注記
プレースホルダー値(
0x123...、your-auth-keyなど)を実際の値に置き換えますtestnetパラメータはほとんどのエンドポイントではオプションですすべての応答はJSON-RPC 2.0形式になります
認証されたエンドポイントの場合は、有効な
authKeyを取得して含めるようにしてください。サーバーは設定に環境変数を使用します
.envファイルが正しく設定されていることを確認してください。
代替試験方法
テストを容易にするために、stdioではなくHTTPトランスポートを使用するようにサーバーを変更することができます。これにより、echoパイプの代わりにcurlコマンドを使用できるようになります。HTTPトランスポートへの切り替えをご希望の場合はお知らせください。
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Appeared in Searches
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ayv8er/mcp-clusters-api-v1'
If you have feedback or need assistance with the MCP directory API, please join our Discord server