Hive MCP Server
Hive MCP 服务器
MCP 服务器使 AI 助手能够通过模型上下文协议与 Hive 区块链进行交互。
概述
该服务器在 AI 助手(如 Claude)和 Hive 区块链之间架起了一座桥梁,使 AI 模型能够:
获取帐户信息和历史记录
检索博客文章和讨论
按标签或用户获取帖子
对内容进行投票并创建帖子(经过正确身份验证后)
将 HIVE 或 HBD 代币发送到其他账户
使用 Hive 密钥对消息进行签名和验证
发送和接收加密消息
Related MCP server: Bankless Onchain MCP Server
特征
提示
create-post- 创建结构化提示,指导 AI 创建具有正确格式和标签的新 Hive 帖子analyze-account- 生成提示来分析 Hive 帐户的统计数据、发布历史记录和活动模式
工具
读取数据
get_account_info- 获取有关 Hive 区块链帐户的详细信息get_post_content- 根据作者和永久链接检索特定帖子get_posts_by_tag- 按标签和类别检索帖子(趋势、热门等)get_posts_by_user- 获取特定用户的帖子或他们的动态get_account_history- 获取账户的交易历史记录(可选操作过滤)get_chain_properties- 获取当前 Hive 区块链属性和统计数据get_vesting_delegations- 获取特定账户的归属委托列表
区块链交互(需要身份验证)
vote_on_post- 对 Hive 内容进行投票(需要发布密钥)create_post- 在 Hive 区块链上创建新的博客文章(需要发布密钥)create_comment- 评论现有帖子或回复评论(需要发布密钥)send_token- 将 HIVE 或 HBD 加密货币发送到其他账户(需要活动密钥)
密码学
sign_message- 使用 Hive 私钥对消息进行签名verify_signature- 根据 Hive 公钥验证消息签名
加密消息
encrypt_message- 为特定 Hive 帐户加密消息decrypt_message- 解密来自特定 Hive 帐户的加密消息send_encrypted_message- 使用令牌传输发送加密消息get_encrypted_messages- 从帐户历史记录中检索并选择性解密消息
使用 MCP Inspector 进行调试
MCP Inspector 提供了一个用于测试和调试服务器的交互式界面:
npx @modelcontextprotocol/inspector npx @gluneau/hive-mcp-server身份验证配置
要启用经过身份验证的操作(投票、发布、发送令牌),您需要设置环境变量:
export HIVE_USERNAME=your-hive-username
export HIVE_POSTING_KEY=your-hive-posting-private-key # For content operations
export HIVE_ACTIVE_KEY=your-hive-active-private-key # For token transfers
export HIVE_MEMO_KEY=your-hive-memo-private-key # For encrypted messaging安全提示:切勿分享您的私钥或将其提交到版本控制中。请使用环境变量或安全的配置方法。
与人工智能助手集成
克劳德桌面
要将此服务器与 Claude Desktop 一起使用:
确保已安装Claude Desktop
打开或创建 Claude 配置文件:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
将此服务器添加到您的配置中:
{
"mcpServers": {
"hive": {
"command": "npx",
"args": ["-y", "@gluneau/hive-mcp-server"],
"env": {
"HIVE_USERNAME": "your-hive-username",
"HIVE_POSTING_KEY": "your-hive-posting-private-key",
"HIVE_ACTIVE_KEY": "your-hive-active-private-key",
"HIVE_MEMO_KEY": "your-hive-memo-private-key"
}
}
}
}风帆冲浪和光标
相同的 JSON 配置适用于 Windsurf (在windsurf_config.json中) 和 Cursor (在~/.cursor/mcp.json中,版本 >= 0.47)。
在以前的版本中,您必须在设置的 MCP 部分使用 1 行命令格式: env HIVE_USERNAME=your-hive-username env HIVE_POSTING_KEY=your-hive-posting-private-key env HIVE_ACTIVE_KEY=your-hive-active-private-key env HIVE_MEMO_KEY=your-hive-memo-private-key npx -y @gluneau/hive-mcp-server
示例
连接到 MCP 客户端后,您可以提出以下问题:
“Hive 上 #photography 标签中的热门帖子有哪些?”
“显示用户名‘alice’的近期帖子”
“‘bob’的账户余额和详细信息是多少?”
“获取‘charlie’的交易历史记录”
“您能为‘dave’的帖子点赞,并将永久链接设为‘my-awesome-post’吗?”
“在 Hive 上创建关于 AI 技术的新帖子”
“向用户‘frank’发送 1 个 HIVE,并附上备注‘感谢您的帮助!’”
“使用我的 Hive 发布密钥签署此消息:‘验证我的身份’”
“当前的 Hive 区块链属性是什么?”
“显示用户‘grace’授予的授权委托”
“为用户‘alice’加密此消息:‘这是一条秘密消息’”
“解密来自‘bob’的此消息:‘#4f3a5b...’”
“向‘查理’发送一条加密信息,内容是‘我们明天见面吧’”
“显示我的加密信息并解密它们”
“获取我与‘dave’交换的最后 10 条加密消息”
工具文档
get_account_info
获取有关 Hive 区块链账户的详细信息,包括余额、权限、投票权和其他指标。
参数:
username:用于获取信息的 Hive 用户名
get_post_content
检索由作者和永久链接标识的特定 Hive 博客文章。
参数:
author:文章作者permlink:帖子的永久链接
get_posts_by_tag
检索按特定标签过滤并按类别排序的 Hive 帖子。
参数:
category:排序类别(趋势、热门、创建等)tag:用于过滤帖子的标签limit:返回的帖子数量(1-20)
get_posts_by_user
检索特定 Hive 用户撰写的帖子或该用户 feed 中的帖子。
参数:
category:要获取的用户帖子类型(博客或动态)username:用于获取帖子的 Hive 用户名limit:返回的帖子数量(1-20)
get_account_history
使用可选操作类型过滤检索 Hive 帐户的交易历史记录。
参数:
username:Hive 用户名limit:返回的操作数operation_filter:要过滤的操作类型的可选列表
get_chain_properties
获取当前 Hive 区块链属性和统计数据。
参数:无
get_vesting_delegations
获取特定 Hive 帐户授予的委托列表。
参数:
username:用于获取授权的 Hive 帐户limit:检索的最大委托数量from:可选的分页起始帐户
vote_on_post
使用配置的 Hive 帐户对 Hive 帖子进行投票(赞成或反对)。
参数:
author:要投票的帖子的作者permlink:要投票的帖子的永久链接weight:投票权重从 -10000(100%反对)到 10000(100%赞成)
create_post
使用配置的帐户在 Hive 区块链上创建新的博客文章。
参数:
title:博客文章的标题body:博客文章的内容(支持 Markdown)tags:帖子的标签奖励、受益人等各种可选参数。
create_comment
在现有的 Hive 帖子上创建评论或回复另一条评论。
参数:
parent_author:您要回复的帖子作者或评论的用户名parent_permlink:您正在回复的帖子或评论的永久链接body:评论内容(支持Markdown)奖励、受益人等各种可选参数。
send_token
使用配置的帐户将 HIVE 或 HBD 代币发送到另一个 Hive 帐户。
参数:
to:Hive 用户名amount:发送的代币数量currency:发送货币(HIVE 或 HBD)memo:交易中包含的可选备忘录
sign_message
使用来自环境变量的 Hive 私钥对消息进行签名。
参数:
message:要签名的消息key_type:要使用的密钥类型(发布、活动或备忘录)
verify_signature
根据 Hive 公钥验证数字签名。
参数:
message_hash:消息的 SHA-256 哈希值(十六进制格式)signature:需要验证的签名字符串public_key:用于验证的公钥
encrypt_message
使用备忘录加密为特定 Hive 帐户加密消息。
参数:
message:要加密的消息recipient:收件人的 Hive 用户名
decrypt_message
解密从特定 Hive 帐户收到的加密消息。
参数:
encrypted_message:加密消息(以#开头)sender:发件人的 Hive 用户名
send_encrypted_message
使用小额令牌传输向 Hive 帐户发送加密消息。
参数:
message:要加密并发送的消息recipient:收件人的 Hive 用户名amount:要发送的 HIVE 数量(最小 0.001,默认值:0.001)
get_encrypted_messages
从帐户历史记录中检索加密消息,并可选择解密。
参数:
username:用于获取加密消息的 Hive 用户名limit:检索的最大消息数(默认值:20)decrypt:是否尝试解密消息(默认值:false)
发展
项目结构
src/index.ts- 主服务器实现src/tools/——所有工具的实现src/schemas/- 工具参数的 Zod 模式src/utils/- 与 Hive 区块链交互的实用函数src/config/——客户端配置和日志级别处理
依赖项
@hiveio/dhive - Hive 区块链客户端
@modelcontextprotocol/sdk -MCP SDK
zod - 模式验证
执照
国际学习中心
贡献
欢迎贡献代码!欢迎提交 Pull 请求。
请参阅CONTRIBUTING.md文件以获取更详细的贡献指南。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceA Model Context Protocol server that enables AI assistants to access Flow blockchain data and perform operations such as checking balances, resolving domains, executing scripts, and submitting transactions.1
- AlicenseBqualityFmaintenanceImplements the Model Context Protocol to allow AI models to access and interact with blockchain data, including reading contract states, retrieving events, and accessing transaction information across various networks.101580MIT
- Alicense-qualityDmaintenanceEnables AI applications to interact with decentralized storage through a standardized Model Context Protocol interface, allowing file uploads, retrievals, and identity management.13Apache 2.0
- AlicenseAqualityDmaintenanceA Model Context Protocol server that enables AI assistants to interact with Hedera blockchain in real-time, allowing them to check account balances, view block information, and estimate transaction costs.3051Apache 2.0
Related MCP Connectors
Provide AI agents and automation tools with contextual access to blockchain data including balance…
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Create, browse, remix, collaborate on, and run durable AI workflow nodes from MCP hosts.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/gluneau/hive-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server