Gluneau_hive Mcp Server

Gluneau_hive Mcp Server

🚀 Hive MCP 工具集合服务器实现

本项目是一个强大的工具集合,它将 Model Context Protocol (MCP) 集成到 Hive 区块链 中,可执行各类区块链操作。借助 @hiveio/dhive@modelcontextprotocol/sdk 开发,为区块链应用开发提供了便利。

🚀 快速开始

本项目是用于使用 MCP 与 Hive 区块链交互的工具集合。只需配置环境变量,就能轻松实现签名、加密、区块链交易等功能。

✨ 主要特性

  • 账户操作:可获取账户余额、查看交易历史。
  • 博客发布:支持发布新文章。
  • 评论管理:能够发布新评论。
  • 投票功能:可对帖子进行投票。
  • 代币发送:实现代币的发送操作。
  • 消息加密与解密:保障信息安全。
  • 交易记录查询:方便查询交易记录。
  • 区块链属性获取:获取区块链的相关属性。
  • 委托信息查询:查询委托信息。

📦 安装指南

使用以下命令进行安装:

npm install hive-mcp-server

💻 使用示例

基础用法

账户操作

获取账户余额
interface GetBalanceParams {
account?: string;
}

export async function getBalance(params: GetBalanceParams): Promise<Balance> {
// 实现获取账户余额的逻辑
}
查看交易历史
interface GetHistoryParams {
account?: string;
limit?: number;
operationFilter?: string[];
}

export async function getHistory(params: GetHistoryParams): Promise<Transaction[]> {
// 实现获取交易历史的逻辑
}

博客发布

发布新文章
interface CreatePostParams {
title: string;
body: string;
tags: string[];
// 其他可选参数
}

export async function createPost(params: CreatePostParams): Promise<Post> {
// 实现发布博客的逻辑
}

评论管理

发布新评论
interface CreateCommentParams {
parentAuthor: string;
parentPermlink: string;
body: string;
// 可选参数
}

export async function createComment(params: CreateCommentParams): Promise<Comment> {
// 实现发布评论的逻辑
}

投票功能

对帖子投票
interface VotePostParams {
author: string;
permlink: string;
weight: number;
}

export async function votePost(params: VotePostParams): Promise<void> {
// 实现投票逻辑
}

📚 详细文档

配置要求

  • Node.js v14 或更高版本
  • npm v6 或更高版本
  • 安装依赖:@hiveio/dhive、@modelcontextprotocol/sdk、zod

源代码结构

  • src/index.ts - 服务器主程序
  • src/tools/ - 各个工具的实现
  • src/schemas/ - Zod 架构用于参数验证
  • src/utils/ - 辅助函数用于与 Hive 区块链交互
  • src/config/ - 客户端配置和日志等级处理

📄 许可证

本项目采用 ISC 协议。

贡献指南

欢迎贡献!请随意提交 Pull Request。更多详细的贡献指南,请参阅 CONTRIBUTING.md 文件。

  • 0 关注
  • 0 收藏,9 浏览
  • system 提出于 2025-09-28 10:42

相似服务问题