Resources

Learn Hedera by reading and running real code

133 small, complete programs in 16 modules. Read each one step by step, run it on Hedera testnet from this page, then run the same file on your machine.

  • 133 labs
  • 16 modules
  • English · Español
  • @hiero-ledger/sdk 2.90.1
A lab, running
Module 10 · Lab 9 of 10
Metered Payments with the x402 upto Scheme
Runs on Hedera testnet · ~15 ℏOpen this lab

How each lab works

  1. ReadThe walkthrough puts the explanation next to the lines it describes, with the line numbers of the real file.
  2. Run in the browserRun the lab against Hedera Testnet from this page. Labs that send transactions need a testnet account.
  3. Run on your machineDownload the course and run the same file with Node.js. Every lab page lists the exact command.

The course

Modules go in order and later labs build on earlier ones. Open a module to see its labs.

1

Foundations

Accounts, keys, consensus and reading the network

2

Tokens, messages and files

HTS, transfers and swaps, HCS and file storage

3

Automation and smart contracts

Multisig, scheduled transactions and the EVM

4

AI agents and payments

Agent registries and messaging, x402 micropayments

5

Advanced and real-world

Real-world assets, EVM tooling, cross-ledger data, advanced HCS, DePIN

MCP Server 2.1

Use the course from your AI assistant

Hedera by Example exposes a live Model Context Protocol server. Connect it to Cursor, Claude Desktop, Windsurf, Claude Code or VS Code, and your assistant answers directly from these 133 runnable labs and verified guardrails.

  • Search every lab: in English or Spanish, by idea, SDK class or standard (HIP-991, HCS-10), with what each lab needs and costs.
  • Read the full lab: concept, steps, labs to run first, how to run it on your machine, official references and the complete runnable code.
  • Verified guardrails: tinybars, Hbar math, fixed USD fees, gas, key types, EVM addresses, size limits: checked against the SDK and testnet.
  • Live network data: free Mirror Node reads and live HBAR cost estimates at the current network exchange rate.

Then ask, for example

  • “How do I airdrop a token to accounts that are not associated yet?”
  • “Show me the HIP-991 paid topic lab and explain what it costs.”
  • “How much HBAR do one token and 10 NFT mints cost today?”
  • “Review this code for Hedera mistakes.”
Full guide: tools, resources, prompts and HTTP transport

Zero setup required. Connect your IDE or web agent directly to our hosted endpoint without downloading or running anything locally.

Hosted Streamable HTTP Endpoint:
https://hbe.expo.app/api/mcp

IDE / Assistant Configuration

Configuration file: .cursor/mcp.json

{
  "mcpServers": {
    "hedera-by-example": {
      "url": "https://hbe.expo.app/api/mcp"
    }
  }
}