Hedera Mcp

io.github.ExpertVagabond由 GitHub 账号 ExpertVagabond 发布v0.5.0更新于 Oct 24, 2026

Build-only Hedera (Hashgraph) MCP — 73 tools across all core services plus analytics reads.

概览

AI 生成的概览

一个仅构建交易的 Hedera(Hashgraph)MCP 服务器,让助手构造并检查 Hedera 交易、读取网络数据,自身从不持有密钥。

可以做什么
为账户、代币、共识主题、智能合约、文件和调度交易构建未签名、已冻结的交易,以 base64 返回供你在别处签名。解码并检查已构建的交易后再签名。从公共 Mirror Node 读取网络与分析数据:区块、交易、余额、代币与 NFT 持有、授权额度、合约状态与结果、质押、供应量、费用和汇率。按公钥或 EVM 地址查找账户,并读取汇率、供应量、账户和代币等无需密钥的资源。
适用场景
适合让 AI 助手协助起草 Hedera 操作(如创建代币、主题、合约或调度交易),而由你自己签名并提交。也适合通过 Mirror Node 读取来查询 Hedera 网络与账户数据。
运行要求
通过 npx 从 npm 包启动的本地进程,需要 Node.js。可选环境变量:HEDERA_NETWORK(mainnet、testnet 或 previewnet,默认 testnet)、HEDERA_OPERATOR_ID(作为默认付款方的账户 ID,不是密钥)以及用于覆盖 Mirror Node REST 地址的 HEDERA_MIRROR_URL。读取需要访问 Mirror Node 的网络连接。
安装前请注意
写入不会被执行:服务器返回未签名交易,需你用自有钱包或 SDK 签名并提交,提交前请先审阅,例如使用解码工具。它从不索取私钥;operator id 只是账户 ID。README 中的实盘测试脚本使用本地环境文件里的临时 testnet 密钥,这属于服务器之外的部分。读取会发往公共 Mirror Node,或 HEDERA_MIRROR_URL 所指向的端点。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Hedera Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

hedera-mcp

[hedera-mcp]

[MCP Registry] [npm] [license]

Comprehensive Model Context Protocol server for Hedera (Hashgraph). Full coverage of every core Hedera service — Account, Token (HTS), Consensus (HCS), Smart Contract (EVM), File, Schedule, and Network — exposed as 79 MCP tools any AI agent (Claude, Cursor, etc.) can call.

Build-only. Never holds keys. Reads hit the public Mirror Node REST API (no auth). Writes return an unsigned, frozen transaction (base64) for you to sign and submit with your own wallet/SDK/CLI. This server never sees a private key and never executes anything.


Why this exists

The official Hedera Agent Kit ships a preconfigured MCP server, but its tool surface is intentionally small (balance, transfer, deploy). This server fills the gap with end-to-end coverage of the Hedera API, organized for developer education and agent-driven onboarding — so a developer can go from "certified" to "shipping their first HTS token / HCS topic / contract" inside a single AI session.

ServiceOfficial starter MCPhedera-mcp
Accountbalancecreate, transfer, update, delete, allowances, info, balances, NFTs
Token (HTS)transfer, deploycreate FT/NFT, mint, burn, transfer, associate, freeze, KYC, pause, wipe, delete, info
Consensus (HCS)—create/update/delete topic, submit + read messages
Smart contract—deploy, execute, eth_call read, info
File—create, append, delete, info
Schedule—create, sign, delete, info
Network—tx lookup, nodes, fees, supply, exchange rate, decode

Security model

  • Reads → public Mirror Node REST. No keys, no account required.
  • Writes → the tool constructs the transaction, freezes it for offline signing, and returns base64 bytes plus a human summary. You inspect it (hedera_decode_transaction), then sign and submit yourself.
  • The only optional environment input is HEDERA_OPERATOR_ID — an account id, used as the default payer/treasury when building. Never a key.

This mirrors the posture of goat-network-mcp: safe to run anywhere, safe to give to an autonomous agent.

Published on npm and the MCP Registry as io.github.ExpertVagabond/hedera-mcp.

Install

Run directly with npx (no clone needed):

bash
npx @purplesquirrel/hedera-mcp

Or from source:

bash
npm installnpm run build

Configure (Claude Desktop / Claude Code)

json
{  "mcpServers": {    "hedera": {      "command": "npx",      "args": ["-y", "@purplesquirrel/hedera-mcp"],      "env": {        "HEDERA_NETWORK": "testnet",        "HEDERA_OPERATOR_ID": "0.0.1234"      }    }  }}
Env varDefaultNotes
HEDERA_NETWORKtestnetmainnet | testnet | previewnet
HEDERA_OPERATOR_ID(unset)Optional default payer/treasury account id (not a key)
HEDERA_MIRROR_URLper-networkOverride Mirror Node REST base (e.g. a private/HGraph node)

Build-only workflow

agent calls hedera_create_fungible_token        │        ▼hedera-mcp builds + freezes the TokenCreateTransaction        │        ▼returns base64 (unsigned)  ──►  you sign in HashPack / SDK / CLI  ──►  submit to Hedera

Inspect anything before signing:

hedera_decode_transaction { transactionBase64: "<bytes>" }→ { type: "TokenCreateTransaction", transactionId, nodeAccountIds, maxTransactionFee, ... }

Tool catalog (79)

Account (8): create_account · transfer_hbar · update_account · delete_account · approve_hbar_allowance · get_account_info · get_account_balance · get_account_nfts

Token / HTS (23): create_fungible_token · create_nft_collection · mint_fungible · mint_nft · burn_token · transfer_token · transfer_nft · associate_token · dissociate_token · freeze_token_account · unfreeze_token_account · grant_kyc · revoke_kyc · pause_token · unpause_token · wipe_token · delete_token · update_token · token_airdrop · reject_token · approve_token_allowance · approve_nft_allowance · get_token_info · get_nft_info

Consensus / HCS (6): create_topic · submit_message · update_topic · delete_topic · get_topic_info · get_topic_messages

Smart contract / EVM (6): deploy_contract · execute_contract · update_contract · delete_contract · query_contract · get_contract_info — execute_contract & query_contract are ABI-aware (pass { abi, functionName, args }; calldata encoded + results decoded automatically)

File (4): create_file · append_file · update_file · delete_file

Schedule (4): create_schedule · sign_schedule · delete_schedule · get_schedule_info

Network / utility (7): prng · get_transaction · get_network_nodes · get_exchange_rate · get_network_supply · get_network_fees · decode_transaction

Analytics (Mirror Node reads, 14): get_block · get_blocks · get_account_transactions · get_token_balances · get_token_nfts · get_nft_history · get_account_allowances · get_account_token_allowances · get_account_nft_allowances · get_contract_results · get_contract_state · get_network_stake · search_accounts_by_pubkey · get_account_by_evm

Resources (4)

Besides tools, the server exposes addressable, keyless MCP resources agents can read by URI:

hedera://network/exchange-rate · hedera://network/supply · hedera://account/{accountId} · hedera://token/{tokenId}

Examples & learning

  • examples/TUTORIAL.md — Build on Hedera in 5 prompts (the certified→shipping learning path)
  • examples/agent-demo.md — wire into Claude Desktop and build by asking; node examples/agent-sim.mjs prints a reproducible agent transcript
  • examples/scenarios/ — unique use cases, each runnable + Mirror Node-verified: HCS notary, AI agent audit trail, agent-to-agent payments, self-taxing token

Verification

  • npm run lint / npm run build — clean against @hashgraph/sdk 2.81.0
  • node test-battle.mjs — 72/73 in the auto-discovery suite (1 skip: query_contract needs a known ABI, verified separately) → all 73 tools verified (pre-MPP; 79 with the MPP charge tools)
  • node test-live.mjs — 10/10 write paths executed on testnet, Mirror Node-verified
  • node test-battle-live.mjs — battle mode: 31/31 operations on testnet across two accounts (full token lifecycle incl. freeze/KYC/pause/wipe, NFT, topic, file, scheduled transfer requiring a 2nd signer, PRNG), Mirror Node-verified. Re-run signed by an ED25519 operator: 31/31 still pass — non-EVM tools are key-type-agnostic (the server holds no keys; EVM tools inherently require ECDSA per Hedera's EVM-alias rule)
  • node test-contract.mjs — real Solidity contract compiled → deployed → executed → read end-to-end (store(42) → retrieve() = 42), confirming the full EVM path and query_contract
  • node test-contract-abi.mjs — ABI-aware query_contract: fed a raw ABI, it auto-encodes/decodes — answer() → 73 (uint), title() → "hedera-mcp" (string), ping() → 73 (pure)
  • node test-edge-cases.mjs — 12/12 edge paths on testnet the happy-path suites miss: large file via create+append (>1 tx chunk), HCS message >1024 B auto-chunked across 2 mirror entries (reassembled to 1200 B), NFT collection with a 10% royalty + 1ℏ fallback custom fee, delegated approved spend (operator approves B → B pulls 200 paying its own fee), HBAR → fresh ED25519 alias auto-account-create, and a decode_transaction round-trip

Development

bash
npm run lint       # tsc --noEmitnpm run build      # compile to dist/node test-smoke.mjs    # MCP stdio: live Mirror Node read + build-only write + decodenode demo.mjs          # narrated "developer's first session" walkthrough (build-only)node test-execute.mjs  # LIVE testnet submit (needs a throwaway key in .env — see below)

Live execution verification

test-execute.mjs proves the build-only output is real: the MCP server builds an unsigned transaction, the harness signs it with a throwaway testnet key from .env and submits it, then confirms the result independently via Mirror Node. The server stays build-only the whole time — only the test harness ever touches a key.

HEDERA_NETWORK=testnetHEDERA_OPERATOR_ID=0.0.xxxxxxHEDERA_OPERATOR_KEY=302e0201...    # rotate/discard after verifying

Get a free testnet account at portal.hedera.com.

Built on @hashgraph/sdk and @modelcontextprotocol/sdk.

Releasing

Bump the version in package.json, server.json (both top-level version and packages[0].version), and src/index.ts; update CHANGELOG.md; then publish to npm and the MCP Registry.

bash
npm run buildnpm publish --access public

Then sync the MCP Registry. Run mcp-publisher from /tmp, not from the project directory — on this setup the project lives on a volume where the publisher can't persist its OAuth token (operation not permitted), which silently fails the publish step. Copying server.json to a writable scratch dir sidesteps it:

bash
mkdir -p /tmp/hedera-publishcp server.json /tmp/hedera-publish/cd /tmp/hedera-publishmcp-publisher login github      # device-code flow, authorize as ExpertVagabondmcp-publisher publish

Verify all three surfaces are aligned:

bash
curl -s "https://registry.modelcontextprotocol.io/v0/servers?search=ExpertVagabond/hedera-mcp&version=latest" | jq '.servers[0].server | {name, version}'npm view @purplesquirrel/hedera-mcp version

License

MIT © Matthew Karsten

来源:README.md,提交 5f9a722

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.5.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分