Agent-First

Built for AI Agents

Anchor data to public blockchains from Claude, GPT, or any AI agent — pay only for what you use. MCP server, TypeScript SDK, and REST API — all designed for programmatic access.

MCP Server Setup

Add HashAnchor to Claude Desktop, Claude Code, or any MCP-compatible agent. The MCP server provides 9 tools for provisioning, anchoring, verifying, and querying hashes.

Claude Desktop / Claude Code

Add to your claude_desktop_config.json or .claude/settings.json:

Use your API key for subscription-based access with monthly quota.

{
  "mcpServers": {
    "hashanchor": {
      "command": "npx",
      "args": ["-y", "hashanchor-mcp"],
      "env": {
        "HASHANCHOR_API_KEY": "ha_your_api_key_here"
      }
    }
  }
}

Available Tools

  • provision — Register and get API key
  • anchor_text — Anchor text content
  • anchor_hash — Anchor pre-computed hash
  • verify — Public on-chain verification
  • check_status — Query hash status

More Tools

  • batch_status — Check multiple hashes
  • get_receipt — Get Merkle proof receipt
  • get_usage — Check quota and usage
  • list_chains — List supported blockchains

SDK Quick Start

Zero-dependency TypeScript SDK. Works in Node.js 18+ and browsers.

npm install @hashanchor/sdk
import HashAnchor from "@hashanchor/sdk";

const ha = new HashAnchor({
  apiKey: "ha_your_api_key_here",
  baseUrl: "",
});

// Anchor text content (auto-hashes with SHA-256)
const result = await ha.anchor("Important document content", {
  metadata: { type: "report", version: "1.0" },
});
console.log(result);
// { status: "accepted", id: "123", hash: "0xabc..." }

// Check quota
const quota = await ha.getQuota();
console.log(`${quota.monthly.remaining} hashes remaining`);

// Verify on-chain
const verification = await ha.verify(result.hash);
console.log(verification.verified); // true once anchored

All SDK Methods

ha.anchor(content, opts?)Anchor text/base64 content
ha.submitHash(hash, opts?)Submit pre-computed hash
ha.submitBatch(hashes)Submit up to 100 hashes
ha.getStatus(hash)Get hash status (authed)
ha.batchStatus(hashes)Bulk status query
ha.getQuota()Check plan and usage
ha.verify(hash)Public on-chain verify
ha.getReceipt(hash)Get Merkle proof receipt
ha.getChains()List supported chains

REST API

Use the API directly with curl or any HTTP client. No SDK required.

Anchor Content

curl -X POST /v1/hashes/anchor \
  -H "Authorization: Bearer ha_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Hello, blockchain!",
    "metadata": { "source": "agent" }
  }'

Verify (no auth required)

curl /v1/verify/0xYOUR_HASH

One-Step Provisioning

Agents can self-provision with a single API call. No registration form, no password, no email verification. Get an API key instantly.

curl -X POST /auth/provision \
  -H "Content-Type: application/json" \
  -d '{"name": "My Agent"}'

# Response:
# {
#   "tenantId": "uuid",
#   "apiKey": "ha_abc123...",
#   "plan": "free",
#   "quota": { "limit": 100, "remaining": 100 }
# }

No Auth Required

Provision endpoint is public. Agents can create accounts autonomously.

Instant API Key

Returns a ready-to-use ha_ API key with submit and query scopes.

Free Tier Included

100 hashes/month on the free plan. Enough for testing and light workloads.

Pay-per-Use with x402

No registration, no subscription. Your wallet is your identity.

Subscription

  • Register + API Key
  • Monthly quota (100–10K)
  • Best for predictable usage

Pay-per-Use
New

  • Wallet address only
  • Unlimited, $0.0001/hash
  • Best for variable/low usage

Hybrid

  • API Key + Wallet
  • Free quota + overflow pay
  • Best of both worlds

How x402 Works

1

Request

POST /v1/hashes/anchor — no auth header needed

2

402 Response

Server returns payment requirements and price

3

Auto-Sign

Wallet signs EIP-712 authorization automatically

4

Anchored

Hash accepted, USDC payment settled on-chain

# 1. Request without auth — server returns 402
curl -s -o /dev/null -w "%{http_code}" \
  -X POST /v1/hashes/anchor \
  -H "Content-Type: application/json" \
  -d '{"content": "Hello, blockchain!"}'
# → 402

# 2. With MCP, this is automatic:
#    Agent sends request → gets 402 → wallet signs EIP-712
#    → retries with payment header → 202 Accepted
#    No code changes needed — just configure HASHANCHOR_WALLET_KEY

Pricing Calculator

Slide to see which plan is cheapest for your usage.

010K25K50K

Free

$0

100 hashes/month

Not enough for your usage

Starter

$29/mo

1,000 hashes/month

$0.029/hash

Pay-per-Use
Best Value

$0.10/mo

$0.0001/hash, no limit

No registration required

At 1,000 hashes/month, pay-per-use saves you $28.90 compared to Starter.

Ready to Integrate?

Get your API key or start paying per hash — your choice.