Hedwig
Provides a Hedera wallet interface, enabling agents to check balances, transfer HBAR and USDC, and make x402 payments on the Hedera network.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@HedwigCheck my HBAR and USDC balances."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Features
Native HBAR + USDC transfers on Hedera through Hedera Token Service, no bridges or wrapped assets. Charge either asset for x402 endpoints by toggling
X402_ASSET.x402 autopay with the full protocol loop: detect 402, sign payment, retry with proof, deliver content. Buyer pays no gas because the resource server acts as fee payer.
Budget caps enforced before every signature, both per-call and per-UTC-day, so a runaway agent cannot drain the account.
MCP native with seven JSON-RPC tools exposed over stdio, works with Claude Desktop, Cursor, Windsurf, and any MCP host.
Reliable balance queries via Hedera Mirror Node REST so cross-region traffic never times out on gRPC.
Full audit trail through the spending report tool: session totals, budget usage, and a rolling history of the last 25 payments.
Local x402 demo server included, so you can exercise the full flow on your own machine without any hosted dependency.
MetaMask-compatible ECDSA keys, use a single private key across web3 wallets and Hedwig without conversion.
Related MCP server: Pay MCP Server
Architecture
Tools
Seven tools exposed to the agent over MCP. Every tool that moves money runs through the budget checker before it signs.
Tool | What it does |
| Return HBAR and USDC balances plus a HashScan account link. Reads from Mirror Node REST for reliability. |
| Send HBAR to any Hedera account. Real on-chain transfer, optional memo, HashScan link returned. |
| Send USDC (HTS token |
| Sign an x402 payment authorization without submitting anything. Useful when you want to drive the HTTP retry yourself. |
| Full protocol loop: fetch a URL, catch the 402, sign the payment, retry with the signature header, return the paid body. |
| Session totals, current budget usage, and a rolling history of the last 25 signed payments. |
| Return your account ID plus a link to the Hedera Portal faucet, for topping up testnet HBAR. |
Quick start
Three lines and you have a wallet an agent can drive.
git clone https://github.com/DarshanKrishna-DK/Hedwig.git
cd Hedwig
run.bat # Windows. Or ./run.sh on macOS or Linux.run.bat installs dependencies, compiles TypeScript, runs the unit test suite, submits a real on-chain smoke transaction (produces HashScan links), boots the MCP server on stdio, and opens the landing page site in a separate window. Leave both windows open. On first run it will pause and ask you to fill in .env with your Hedera testnet Account ID and ECDSA private key from portal.hedera.com/dashboard.
For the paid endpoint your agent will hit, open another terminal:
start-x402-server.bat # Windows
node examples/x402-server/server.mjs # cross-platformBy default the demo server charges 0.001 HBAR per request. To switch to USDC, add X402_ASSET=usdc to .env and restart the server.
Wire Hedwig into Claude Desktop
Edit %APPDATA%\Claude\claude_desktop_config.json on Windows, or ~/Library/Application Support/Claude/claude_desktop_config.json on macOS. Add this block and restart Claude Desktop fully from the system tray.
{
"mcpServers": {
"hedwig": {
"command": "node",
"args": ["C:/path/to/Hedwig/dist/index.js"],
"env": {
"HEDERA_ACCOUNT_ID": "0.0.YOUR_ID",
"HEDERA_PRIVATE_KEY": "YOUR_ECDSA_KEY",
"NETWORK": "hedera-testnet",
"MAX_PER_CALL": "0.10",
"MAX_PER_DAY": "20.00"
}
}
}
}Open a new chat and check the plug icon in the bottom-left. You should see hedwig with seven tools.
Talk to your agent
> Check my Hedera balance.
> Send 0.05 HBAR to 0.0.9865777 with the memo "coffee tip".
> Send 0.001 USDC to 0.0.9865777.
> Fetch http://localhost:4021/premium/quote and pay if it costs HBAR.
> Fetch http://localhost:4021/premium/quote and pay if it costs USDC.
> Show me my spending report.Live testnet transactions
Every link below is a real transaction on Hedera testnet, submitted through Hedwig during a live demo run.
Accounts. Buyer: 0.0.6886052. Auto-created x402 server: 0.0.9865777.
# | What | Asset | On-chain proof |
1 | HBAR transfer (0.05 HBAR) | HBAR native | |
2 | USDC transfer (0.001 USDC) | HTS 0.0.429274 | |
3 | x402 payment (first run) | USDC | |
4 | x402 payment (repeat) | USDC |
Rows 3 and 4 are the heart of the project. Agent hit 402, signed a payment on its own, retried with the payment signature header, and only got content after settlement reached consensus. No wallet popup, no manual approval, no bridge. Notice both transaction IDs start with the server account rather than the buyer, which proves gasless UX: the resource server pays HBAR gas as facilitator while the buyer only signs the transfer authorization.
Repo layout
Path | Role |
| MCP server: seven tools, config, Hedera helpers, spending tracker |
| Vitest unit tests for spending, config, and Hedera helpers |
| Local x402 paid endpoint, auto-creates its own Hedera account |
| React site with landing page and docs (Vite + Tailwind + Framer Motion) |
| Architecture diagrams as SVG |
| End-to-end on-chain smoke test that produces HashScan links |
| Beat-by-beat script for the demo video recording |
Scripts
Command | Purpose |
| Full end-to-end. Install, build, test, smoke, launch MCP + landing site. |
| Landing page + docs site only, on port 5173. |
| Boot the local paid endpoint on port 4021. |
| Fast re-run of the on-chain smoke test only. |
| Compile the MCP server TypeScript to |
| Run the 10 unit tests. |
| On-chain smoke test producing HashScan links. |
| Package as an .mcpb bundle for one-click Claude Desktop install. |
Network: Hedera testnet. HBAR asset id in x402: 0.0.0. USDC HTS token id: 0.0.429274 (testnet). HashScan: https://hashscan.io/testnet.
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
- AlicenseAqualityAmaintenanceAn MCP server that enables AI agents to access paid AI inference and web tools via HTTP 402 micropayments in USDC on Base, using the agent's wallet as identity.Last updated14543MIT
- Alicense-qualityBmaintenanceMCP server for Pay – the complete x402 payment stack for AI agents, enabling direct USDC payments on Base, metered tabs, service discovery, and wallet management within any MCP-compatible client.Last updated50MIT
- Alicense-qualityDmaintenanceAn MCP server for USDC payments on Base, enabling AI agents to check balances, send payments, generate payment requests, and view transaction history.Last updated1MIT
- Alicense-qualityCmaintenanceMCP server that gives terminal AI agents a guarded USDC wallet with firewall, automatic 402 payment handling, and budget limits.Last updated9MIT
Related MCP Connectors
Agent-commerce MCP server for x402/USDC payments and affiliate splits on Base.
Agent Commerce Protocol MCP — bridges Stripe ACP + Google AP2 + Coinbase x402 for agent payments
HiveCapital MCP Server — autonomous investment layer for AI agents
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/DarshanKrishna-DK/Hedwig'
If you have feedback or need assistance with the MCP directory API, please join our Discord server