hashgraph / hashgraph/hedera-agent-kit-py

Feature Request: Add Hedera-native x402 payment mechanism support

Open
#324 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
11
Forks
10
PR merge metrics
No merged PRs in 30d

Description

## Feature Request

### Description
Add native support for the **x402 payment protocol** ([x402-foundation/x402](https://github.com/x402-foundation/x402)) on Hedera networks as a first-class integration in the Hedera Agent Kit.

### Motivation
The x402 protocol is an open standard for HTTP 402 "Payment Required" payments. It currently supports EVM chains, Solana, and TON — but **Hedera is not listed as a supported network** despite being EVM-compatible.

We built a working prototype ([hedera-x402-agent](https://github.com/aggreyeric/hedera-x402-agent)) that bridges this gap by:
1. Extending x402's EVM mechanism to Hedera chain IDs (296 testnet, 295 mainnet)
2. Implementing custom EIP-712 payment signing for Hedera-native transactions
3. Building a facilitator pattern for HBAR payment verification and settlement

### Proposed Changes
1. **Add Hedera to x402 supported networks** in the MCP server configuration
2. **Document Hedera chain IDs** for x402 integration (testnet: 296, mainnet: 295)
3. **Add payment-gated MCP tools** — tools that require x402 payment verification before execution
4. **Hedera-specific x402 facilitator** — verify and settle HBAR payments via Hiero SDK

### Use Cases
- Pay-per-query AI agents on Hedera (e.g., token analysis, account insights)
- Monetized Hedera MCP tools exposed to Claude Desktop / other MCP clients
- Micropayment gates for Hedera dApp APIs

### Additional Context
- x402 Python SDK: https://github.com/x402-foundation/x402/tree/main/python
- Our prototype: https://github.com/aggreyeric/hedera-x402-agent
- Hedera RPC endpoints confirmed working: testnet.hashio.io (chain_id=296), mainnet.hashio.io (chain_id=295)

Contributor guide

Open the contributing guide

Research direction

Start with the MCP server configuration and the existing MCP tool entry points, then compare the x402 Python SDK with the linked hedera-x402-agent prototype. Clarify how Hedera chain IDs 296 and 295, payment-gated tools, and Hiero SDK verification and settlement fit together. Done means native Hedera support is documented and the proposed payment flow works end to end.

Written by the indexing model from the issue text.

Assessment

Tech stack
blockchain, python
Domain
api, backend-api-design, blockchain, payments
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.