mcpField
H
HashA2A

HashA2A

Local
github.com/ymiydev-progFinance0Updated 11w ago

About HashA2A

HashA2A is a Hedera-based data marketplace for agents, trading bots, DeFi protocols, and enterprise teams. It combines multi-source market feeds, prediction-market data, arbitrage scanning, and research, with on-chain payment options.

Key features

  1. 01Aggregate prices from multiple oracles
  2. 02Scan cross-oracle arbitrage spreads
  3. 03Retrieve cross-validated prediction-market data
  4. 04Run web, news, and AI research
  5. 05Use Hedera account and topic tools
  6. 06Pay with HBAR or USDC

Use cases

  1. 01Compare asset prices across oracle sources
  2. 02Find cross-market arbitrage opportunities
  3. 03Research markets using news and prediction data
  4. 04Inspect Hedera accounts or manage topics

MCP support

Exposes market data, research, and Hedera operations through MCP tools on a remote Streamable HTTP server or via stdio with `mcp-remote`. The README describes 19 tools and HBAR or USDC payment rails.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"HashA2A": {
"command": "npx",
"args": [
"-y",
"mcp-remote"
]
}
}
}
Run commandnpx -y mcp-remote

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmmcp-remote

Tools

19

Saved tool list · updated 3w ago

This tool takes no parameters.

Details

From the project README

🤖 HashA2A — The Agent-to-Agent Intelligence Layer

Python Hedera FastAPI A2A MCP License Tests

HashA2A is a decentralized agent-to-agent data marketplace running on Hedera mainnet. AI agents buy verified multi-oracle intelligence via HBAR (HIP-991) or USDC (x402/AP2) micropayments.

What it does

  • Multi-oracle prices — 36 assets across 5 sources (Pyth, CoinGecko, Binance, DeFiLlama, ForexAPI). Median with IQR confidence intervals.
  • Prediction markets — 5 providers (Polymarket, Kalshi, PredictIt, Manifold, Hyperliquid). Cross-validated probabilities.
  • Arbitrage scanning — Real-time cross-oracle spread detection across all assets, ranked by opportunity.
  • Deep research — Web search + news + social signals + prediction markets + AI analysis (LangChain + GPT-5-nano).
  • Enterprise plugin — Hedera Agent Kit bridge with 6 tools: account balance, transfers, topic management, account info.

Built for

AI agents, trading bots, DeFi protocols, and enterprise teams that need verified, cross-validated market data with on-chain payment rails.

Connect

  • Server URL: https://hasha2a.com/mcp
  • Auth: HBAR (HIP-991 auto-fees) or USDC (x402/Circle Gateway, gasless)
  • Transport: Streamable HTTP (remote) or stdio via mcp-remote
  • Install: npx hasha2a-mcp-client add

Trust

  • 19 MCP tools, 5 oracle sources (36 assets), 5 prediction market providers
  • 115 tests passing, mainnet live on Hedera
  • HIP-991 fee collection, HIP-1261 simple fees
  • x402 6-rule verification: layout, amount, fee payer, signature, nonce, asset

Links


Features

FeatureDescription
🔮 OracleHub v236 assets × 5 sources — Pyth, CoinGecko, DeFiLlama, Binance, ForexAPI. Median with IQR confidence intervals
📊 Arbitrage EngineReal-time cross-oracle spread detection across all 36 assets
🔌 A2A ProtocolFull Google A2A compliance — JSON-RPC 2.0, SSE streaming, task lifecycle, context passing, AP2 mandates
🛠️ MCP Server18 Model Context Protocol tools — available via Smithery registry or one-command install
🧠 AI AnalysisLangChain + OpenAI (GPT-5-nano) for deep market analysis
🔍 Deep ResearchWeb search + news + social signals + prediction markets + AI
💳 x402 Triple RailUSDC on Base + HBAR/HTS on Hedera + Circle Gateway (gasless USDC via Agent Wallet, 6/6 verification rules: layout, amount, fee payer safety, signature, nonce, asset)
🔐 JWT AuthEphemeral tokens (60s-3600s TTL) with scope-based authorization
🎯 Prediction MarketsPolymarket, Kalshi, PredictIt, Manifold, Hyperliquid — cross-validated probabilities
⭐ Quality EvaluationAuto-score every provider response — latency, completeness, accuracy, outlier detection
🏢 Enterprise PluginIsolated hedera-agent-kit bridge — 6 additional MCP tools for account/topic/tx management
📈 DashboardsLive oracle prices, spread history, A2A tasks, wallet balance/transactions
🔄 Reverse AuctionsProviders bid on requests — agents get the best price/quality
🥩 Staking & SlashingProvider reputation with stake-based slashing for bad data
💚 Health ChecksLive API health indicators (green/red) per provider — auto-detects outages
🐳 DockerOne-command deployment with docker-compose → mainnet live

Quick Start

# One command — any agent, any machine
npx hasha2a-mcp-client add

# Or via shell script (no Node.js needed)
curl -fsSL https://raw.githubusercontent.com/ymiydev-prog/HashA2A/main/scripts/install-mcp.sh | bash

# Or run the server locally
docker compose up -d
curl http://localhost:8080/api/v1/agent/health

Architecture

Agent Client (Claude, LangChain, Google A2A, MCP)
       │
        ├── MCP  ───── http://localhost:8080/mcp        (19 tools)
       ├── A2A  ───── http://localhost:8080/api/v1/a2a/rpc
       ├── SSE  ───── http://localhost:8080/api/v1/a2a/rpc/stream
       ├── REST ───── http://localhost:8080/api/v1/...
       └── Agent Card ── http://localhost:8080/.well-known/agent.json
                              │
 ┌─────────────────────────────────────────────────────┐
 │                  HashA2A Core                        │
 │                                                      │
 │  OracleHub  ─── Pyth · CoinGecko · DeFiLlama        │
 │                 Binance · ForexAPI (36 assets)       │
 │  Arbitrage  ─── Spread detection + ranking           │
 │  QualityEval ── Latency · completeness · accuracy    │
 │  Research   ─── Web + News + AI Analysis             │
 │  TaskManager ── A2A lifecycle + artifacts            │
 │  ContextManager ── Context IDs + summaries           │
 │  PaymentEngine ── HIP-991 + x402 + AP2               │
 │  AuthService ── JWT + Mandates                       │
 │  AuctionEngine ── Reverse auctions for best price    │
 │  StakingManager ── Provider stake + slashing         │
 │  ConsensusLogger ── HCS audit trail                  │
 │  x402Handler  ── 6-rule verification                 │
 └─────────────────────────────────────────────────────┘
       │
 ┌──────┴──────┐
 │  Plugin      │
 │  Bridge      │
 │  (isolated   │
 │   venv for   │
 │agent-kit)    │
 └──────────────┘

MCP — Model Context Protocol

Installation

npm (recommended) — auto-detects Claude Desktop, Cursor, Windsurf:

npx hasha2a-mcp-client add
# Or with a remote server URL
npx hasha2a-mcp-client add --url https://hasha2a.com/mcp

Shell script — no Node.js needed:

curl -fsSL https://raw.githubusercontent.com/ymiydev-prog/HashA2A/main/scripts/install-mcp.sh | bash

via Smithery: Published at smithery.ai — search "HashA2A".

Manual — add to your MCP client config:

{
  "mcpServers": {
    "hasha2a": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://hasha2a.com/mcp"]
    }
  }
}
Tools (19)
Oracle & Data
ToolDescription
get_priceMulti-oracle price (Pyth+CoinGecko+Binance+DeFiLlama)
list_assetsList all 36 supported assets with metadata
get_asset_profileDetailed info per asset — sources, change_24h, volume
scan_arbitrageCross-oracle arbitrage opportunities across all assets
verified_feedCross-validated price feed with confidence intervals
Prediction Markets & Research
ToolDescription
list_providersList prediction market providers
get_market_dataRequest data from a provider
check_requestPoll request result
get_agent_profileView agent identity
aggregate_market_dataMulti-provider intelligence
analyze_marketAI analysis of market data
deep_researchFull web+news+AI research
Enterprise Plugin (Hedera Agent Kit)
ToolDescription
kit_setupSetup isolated hedera-agent-kit environment
kit_account_balanceGet HBAR balance of any account
kit_transfer_hbarTransfer HBAR to another account
kit_create_topicCreate an HCS topic
kit_submit_messageSubmit message to HCS topic
kit_topic_messagesGet messages from HCS topic (Mirror Node)
kit_get_account_infoGet detailed account information

AI Agent SKILL

HashA2A provides a universal SKILL file that teaches any AI agent how to use the platform — endpoints, tools, pricing, payment rails, and workflows — without pasting documentation.

Installation

Via skills.sh (any agent — Claude Code, Gemini CLI, Codex CLI):

npx skills add ymiydev-prog/HashA2A --skill hasha2a -g -y

Via GitHub (manual):

git clone https://github.com/ymiydev-prog/HashA2A.git ~/.claude/skills/hasha2a

Source: skills/hasha2a/SKILL.md + skills/hasha2a/references/core.md

AI Prompts

Copy-paste ready prompts at docs/ai-prompts.md — 15 prompts covering all 19 MCP tools, REST API, payment flows, and Hedera operations.

IDE Setup

ChatGPT (Developer Mode)
  1. Open Developer Mode in ChatGPT
  2. Go to Custom MCP Connector
  3. Add the HashA2A MCP URL: http://localhost:8080/mcp
  4. Or use GPT Actions: add OpenAPI spec at /openapi.json
Claude.ai (claude.ai Pro/Team)
  1. Go to Settings → Capabilities → Add Connector
  2. Set URL to http://localhost:8080/mcp
  3. Alternatively, upload the SKILL at claude.ai/customize/skills:
    • Download: skills.zip
    • Upload the zip at claude.ai/customize/skills
    • Add localhost:8080 to domain allowlist at claude.ai/settings/capabilities
Claude Code (Terminal)
# Via npm package (auto-detects Claude Code)
npx hasha2a-mcp-client add

# Via SKILL
npx skills add ymiydev-prog/HashA2A --skill hasha2a -g -y
Cursor
npx hasha2a-mcp-client add
# Or manually add to .cursor/mcp.json:
# { "mcpServers": { "hasha2a": { "command": "npx", "args": ["-y", "mcp-remote", "https://hasha2a.com/mcp"] } } }
Windsurf
npx hasha2a-mcp-client add
# Or manually add to .windsurf/mcp_config.json
Gemini CLI
npx skills add ymiydev-prog/HashA2A --skill hasha2a -g -y
Codex CLI
npx skills add ymiydev-prog/HashA2A --skill hasha2a -g -y
# Or clone to ~/.claude/skills/hasha2a (Codex shares the Claude skills directory)
Visual Studio Code (VS Code)

Add to .vscode/mcp.json or VS Code MCP settings:

{ "servers": { "hasha2a": { "command": "npx", "args": ["-y", "mcp-remote", "https://hasha2a.com/mcp"] } } }

Pricing

USDC prices are fixed. HBAR prices update in real-time from Binance + CoinGecko fallback.

ProductUSDCHBAR (live)
Price Feed (single asset, multi-oracle)$0.25≈ 2.76 HBAR
Arbitrage Scan (all 36 assets)$0.50≈ 5.52 HBAR
Arbitrage Verify (single pair)$0.10≈ 1.10 HBAR
Deep Research (web + news + AI)$0.50≈ 5.52 HBAR
Prediction Market (per provider)$0.15≈ 1.66 HBAR
Aggregate Intelligence (all sources)$1.00≈ 11.05 HBAR

All transactions use HIP-1261 Simple Fees: transaction_fee is a MAX cap (0.05 HBAR basic, 0.1 HBAR for HIP-991). See docs/hip-1261-simple-fees.md.

Oracle Sources — 36 Assets, 5 Sources

SourceAssetsCostType
Pyth HermesBTC, ETH, SOL, XAU, XAG, USD/JPY + equities (7)FreeFirst-party institutions
CoinGecko17 crypto assetsFreeCEX/DEX aggregation
DeFiLlamaBTC, ETH, SOL (Chainlink via DeFiLlama)FreeChainlink data feed
BinanceBTC, ETH, SOL, BNB, XRP, ADA + moreFreeCentralized exchange
ForexAPIEUR/USD, GBP/USD, AUD/USD, CAD/USD, CHF/USD, CNH/USDFreeOpen exchange rates
Asset Coverage
CategoryCountExamples
Crypto21BTC, ETH, SOL, HBAR, BNB, XRP, ADA, DOGE, AVAX, DOT, LINK, UNI, MATIC, LTC, AAVE, ATOM, ARB, APT, OP, SUI, PEPE
Equities7AAPL, MSFT, NVDA, GOOGL, AMZN, TSLA, META
Commodities2XAU (Gold), XAG (Silver)
Forex6EUR/USD, GBP/USD, AUD/USD, CAD/USD, CHF/USD, CNH/USD

x402 Hedera Rail — 6-Rule Verification

HashA2A implements the exact scheme for Hedera native payments (HIP-1261 compliant):

#RuleWhat it checks
1Transaction layoutfeePayer matches transactionID.accountID
2Amount exactnessNet amount to payTo matches expected
3Fee payer safetyFee payer is not a net sender
4Signature validityEd25519 signatures in sigMap verify bodyBytes (via pynacl)
5Nonce (replay)accountID:transactionValidStart cache (1h TTL)
6Asset/tokentokenTransfers validation for HTS tokens

Replayable fixture (no secrets): python scripts/x402_flow_fixture.py Full docs: docs/hiero-sdk-compatibility.md

A2A Protocol Compliance

HashA2A implements the Agent-to-Agent (A2A) protocol governed by the Linux Foundation:

Agent Card

Served at /.well-known/agent.json:

  • 5 skills with formal JSON Schema input/output definitions
  • JSON-RPC 2.0 + SSE streaming interfaces
  • JWT + no-auth authentication schemes
  • AP2 mandate support
  • Context passing and artifact storage
JSON-RPC 2.0 Methods
MethodRPC EndpointDescription
message/send/api/v1/a2a/rpcCreate and process a task
message/stream/api/v1/a2a/rpc/streamCreate task with SSE real-time updates
tasks/get/api/v1/a2a/rpcGet task state and result
tasks/list/api/v1/a2a/rpcList tasks with filter
tasks/cancel/api/v1/a2a/rpcCancel a running task
Task Lifecycle
submitted → working → input-required → completed
                     → failed / canceled / rejected
Context Passing
  • contextId groups multiple interactions under the same workflow
  • ContextSummary passes antecedents without sharing full memory
  • fork_context() creates branching conversations with inherited history

Testing

# All tests (115 passing)
PYTHONPATH=src python -m pytest tests/ -v

# Smoke tests only (no credentials needed)
PYTHONPATH=src python -m pytest tests/ -m smoke -v

# E2E tests (requires .env)
PYTHONPATH=src python -m pytest tests/ -m e2e -v

API Endpoints

Feeds & Data
MethodPathDescription
POST/api/v1/feeds/pricesMulti-oracle price feed
POST/api/v1/feeds/arbitrageCross-oracle arbitrage scan
GET/api/v1/feeds/pricingReal-time pricing (USDC + HBAR)
GET/api/v1/feeds/x402/manifestx402 payment manifest
POST/api/v1/feeds/x402/hedera/verifyVerify HBAR/HTS payment
A2A Tasks
MethodPathDescription
POST/api/v1/a2a/rpcJSON-RPC 2.0 (message/send, tasks/get, etc.)
POST/api/v1/a2a/rpc/streamSSE streaming RPC
POST/api/v1/tasksCreate task (REST)
GET/api/v1/tasks/{id}Get task
GET/api/v1/tasksList tasks
POST/api/v1/tasks/{id}/completeComplete task with artifact
POST/api/v1/tasks/{id}/artifactsUpload artifact
GET/api/v1/tasks/{id}/artifactsList artifacts
POST/api/v1/tasks/contextCreate context
GET/api/v1/tasks/context/{id}/summaryContext summary
POST/api/v1/tasks/context/{id}/forkFork context
Auth
MethodPathDescription
POST/api/v1/auth/tokenRequest ephemeral JWT
POST/api/v1/auth/verifyVerify Bearer token
POST/api/v1/auth/mandatesCreate AP2 mandate
POST/api/v1/auth/mandates/{id}/authorizeAuthorize spending
Prediction Markets
MethodPathDescription
POST/api/v1/requestsBuy prediction data
POST/api/v1/requests/aggregateMulti-provider aggregation
POST/api/v1/researchDeep research
Agent Discovery
PathDescription
/.well-known/agent.jsonA2A Agent Card
/.well-known/x402.jsonx402 payment manifest
/llms.txtLLM-readable docs
/mcp/MCP server info (GET) + Streamable HTTP (POST)
Dashboards
PathDescription
/Landing page with live BTC price
/dashboardMain admin dashboard — provider cards, wallet, health status
/dashboard/oraclesOracle prices + spread history charts
/dashboard/tasksA2A task management dashboard
/dashboard/walletWallet balance, USD equivalent, transactions
/dashboard/healthProvider health check API (JSON)

Quick Start (Local Dev)

# Docker (recommended)
docker compose up -d
curl http://localhost:8080/api/v1/agent/health

# Or Python directly
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env  # configure your credentials
python runner.py

# Or with custom port
PORT=8082 python runner.py

Tech Stack

  • Python 3.12 + FastAPI + Uvicorn
  • Hiero SDK 0.2.6 (Hedera HCS + HIP-991 + HIP-1261)
  • MCP (Model Context Protocol, 19 tools)
  • A2A (Google Agent-to-Agent protocol)
  • LangChain + OpenAI (GPT-5-nano)
  • x402 (Base USDC + Hedera HBAR/HTS, 6-rule verification)
  • Hedera Agent Kit (isolated plugin bridge)
  • pynacl (ed25519 signature verification)
  • Docker + Docker Compose
  • Chart.js (dashboards)
  • HyperFrames (promo video)
  • tweepy (Twitter/X auto-promotion @hasha2a)

Deployment

HashA2A runs on Hedera mainnet via Docker. The MCP server is discoverable through:

  • Smithery: smithery.ai — search "HashA2A"
  • mcp.so: Public MCP directory listing
  • Install script: curl -fsSL https://raw.githubusercontent.com/ymiydev-prog/HashA2A/main/scripts/install-mcp.sh | bash

Documentation

DocDescription
skills/hasha2a/SKILL.mdUniversal SKILL for AI agents (Claude Code, Gemini, Codex, etc.)
skills/hasha2a/references/core.mdTools, endpoints, pricing, assets, payment rails reference
docs/ai-prompts.md15 copy-paste prompts for agents
docs/hip-1261-simple-fees.mdHIP-1261 transaction_fee max-cap explained
docs/hiero-sdk-compatibility.mdhiero-sdk-python 0.2.0 vs 0.2.6 migration
docs/client-examples.mdIntegration examples (cURL, Python, LangChain)
scripts/x402_flow_fixture.pyReplayable x402 flow demonstration

License

MIT — Use it, fork it, sell data with it.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.