MCP Clusters API Server
Servidor MCP - API de clústeres v1
Esta es una implementación de servidor del Protocolo de Contexto de Modelo (MCP) para la API de Clústeres v1. Proporciona puntos finales para autenticación, gestión de clústeres, registro de nombres y más.
Dependencias
{
"@modelcontextprotocol/sdk": "^1.7.0",
"dotenv": "^16.4.7",
"zod": "^3.24.2"
}Related MCP server: Hedera MCP Server
Configuración
Instalar dependencias:
npm installCree un archivo
.envcon: CLUSTERS_API_KEY={CLUSTERS_API_KEY}Construya e inicie el servidor:
npm run devPrueba de puntos finales
Dado que este servidor usa StdioServerTransport , deberá enviar mensajes JSON-RPC a través de la entrada estándar. A continuación, se muestran comandos de ejemplo para probar cada punto final:
Puntos finales de autenticación
Recibir mensaje
echo '{"jsonrpc":"2.0","id":1,"method":"auth_get_message","params":{"address":"0x123...","chainId":1,"nonce":"abc123"}}' | node dist/index.jsObtener token
echo '{"jsonrpc":"2.0","id":1,"method":"auth_get_token","params":{"signature":"0x123...","signingDate":"2024-03-21","type":"evm","wallet":"0x123..."}}' | node dist/index.jsValidar token
echo '{"jsonrpc":"2.0","id":1,"method":"auth_validate_token","params":{"authKey":"your-auth-key"}}' | node dist/index.jsPuntos finales de administración de clústeres
Crear clúster
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.jsObtener clúster por ID
echo '{"jsonrpc":"2.0","id":1,"method":"get_cluster_by_id","params":{"id":"cluster-id","testnet":false}}' | node dist/index.jsObtener clúster por nombre
echo '{"jsonrpc":"2.0","id":1,"method":"get_cluster_by_name","params":{"name":"cluster-name","testnet":false}}' | node dist/index.jsObtener el ID del clúster por dirección
echo '{"jsonrpc":"2.0","id":1,"method":"get_cluster_id_by_address","params":{"address":"0x123...","testnet":false}}' | node dist/index.jsAgregar billeteras
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.jsGenerar billetera
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.jsActualizar billeteras
echo '{"jsonrpc":"2.0","id":1,"method":"update_wallets","params":{"wallets":[{"address":"0x123...","name":"UpdatedName"}],"authKey":"your-auth-key","testnet":false}}' | node dist/index.jsEliminar carteras
echo '{"jsonrpc":"2.0","id":1,"method":"remove_wallets","params":{"addresses":["0x123..."],"authKey":"your-auth-key","testnet":false}}' | node dist/index.jsVerificar billetera
echo '{"jsonrpc":"2.0","id":1,"method":"verify_wallet","params":{"clusterId":"cluster-id","authKey":"your-auth-key","testnet":false}}' | node dist/index.jsDirección ↔ Puntos finales de resolución de nombres
Obtener datos por dirección
echo '{"jsonrpc":"2.0","id":1,"method":"get_data_by_address","params":{"address":"0x123...","testnet":false}}' | node dist/index.jsObtener datos masivos por direcciones
echo '{"jsonrpc":"2.0","id":1,"method":"get_bulk_data_by_addresses","params":{"addresses":["0x123...","0x456..."],"testnet":false}}' | node dist/index.jsObtener datos masivos por nombres
echo '{"jsonrpc":"2.0","id":1,"method":"get_bulk_data_by_names","params":{"names":[{"name":"name1"}],"testnet":false}}' | node dist/index.jsPuntos finales de registro
Comprobar disponibilidad de nombre
echo '{"jsonrpc":"2.0","id":1,"method":"check_name_availability","params":{"names":["name1","name2"]}}' | node dist/index.jsObtener datos de la señal de registro
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.jsObtener el estado de la transacción
echo '{"jsonrpc":"2.0","id":1,"method":"get_transaction_status","params":{"txHash":"0x123..."}}' | node dist/index.jsNotas
Reemplace los valores de marcador de posición (como
0x123...,your-auth-key, etc.) con valores realesEl parámetro
testnetes opcional para la mayoría de los puntos finalesTodas las respuestas tendrán formato JSON-RPC 2.0
Para los puntos finales autenticados, asegúrese de obtener e incluir una
authKeyválidaEl servidor utiliza variables de entorno para la configuración, asegúrese de que su archivo
.envesté configurado correctamente
Método de prueba alternativo
Para facilitar las pruebas, podrías modificar el servidor para que use el transporte HTTP en lugar de stdio. Esto te permitiría usar comandos curl en lugar de canales de eco. Avísame si quieres cambiar al transporte HTTP.
Maintenance
Related MCP Connectors
MCP server for mandates, delegation, policy-gated execution, credential grants, and audit.
Tenzro Network MCP server: wallet, identity, payments, inference, staking, bridges, verification.
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Hosted AgentLux MCP server for marketplace, identity, creator, services, and social flows.
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol (MCP) server that provides JSON-RPC functionality through OpenRPC.230 npm43Apache 2.0
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables interactions with the Hedera network, providing tools for wallet creation, balance checking, transaction building, and sending signed transactions.3-
- FlicenseNot gradedqualityDmaintenanceA server implementation of the Model Context Protocol (MCP) that provides REST API endpoints for managing and interacting with MCP resources.-
- AlicenseBqualityDmaintenanceA Model Context Protocol (MCP) server based on OpenRPC, providing JSON-RPC function invocation and method discovery services.21Apache 2.0