Skip to main content
Glama

Edge AI x402 MCP

nohumans status

Ultra-low-cost pay-per-call AI inference, embeddings, FLUX image generation, and public URL-to-Markdown web extraction on Cloudflare Workers, settled on Solana Mainnet via x402 v2 (USDC & USDT via PayAI and Dexter facilitators) or prepaid credit key packs.

  • Production Base URL: https://edge-ai-x402.nguyenthanhnam-pye.workers.dev

  • Remote MCP Endpoint (Streamable HTTP): https://edge-ai-x402.nguyenthanhnam-pye.workers.dev/mcp

  • OpenAPI 3.1 Spec: https://edge-ai-x402.nguyenthanhnam-pye.workers.dev/openapi.json

  • x402 Manifest: https://edge-ai-x402.nguyenthanhnam-pye.workers.dev/.well-known/x402.json

  • MCP Server Card: https://edge-ai-x402.nguyenthanhnam-pye.workers.dev/.well-known/mcp/server-card.json

  • Dexter / x402gle Skills: https://x402gle.com/servers/edge-ai-x402.nguyenthanhnam-pye.workers.dev/skills.json

  • Settlement Network: Solana Mainnet (solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp)

  • Accepted Assets: USDC (EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v), USDT (Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB)

  • Facilitators: PayAI (https://facilitator.payai.network) & Dexter (https://x402.dexter.cash)

Pricing & Endpoints

Route

MCP Tool

Models / Behavior

Price (USD)

GET /v1/models

list_ai_models

List available chat, embedding & image models

Free

GET /v1/web/extract/sample

—

Static web extraction response example

Free

POST /v1/chat/completions

ai_chat_completion

llama-3.3-70b, gpt-oss-20b, gemma-4-26b, qwen-coder-32b

$0.001

POST /v1/embeddings

ai_embeddings

bge-m3, bge-small, bge-large

$0.001

POST /v1/web/extract (GET also supported)

web_extract_markdown

SSRF-guarded public URL HTML -> clean Markdown + headings/links

$0.002

POST /v1/images/generate

ai_generate_image

flux-1-schnell (1-4 steps, JPEG base64)

$0.005

POST /v1/keys/redeem

—

Redeem prepaid credit packs (starter_1 $1 / 1,200 cr, builder_5 $5 / 6,500 cr, pro_15 $15 / 25,000 cr)

On-chain

Related MCP server: farebox-mcp

Quick Start

1. Discover x402 v2 payment terms (HTTP 402)

curl -i -X POST https://edge-ai-x402.nguyenthanhnam-pye.workers.dev/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"llama-3.3-70b","messages":[{"role":"user","content":"Hello"}]}'

Decode the base64 PAYMENT-REQUIRED response header, sign the Solana Mainnet USDC or USDT transaction with an x402 v2 client, and retry with PAYMENT-SIGNATURE.

2. Connect via Remote MCP (Streamable HTTP)

{
  "mcpServers": {
    "edge-ai-x402": {
      "url": "https://edge-ai-x402.nguyenthanhnam-pye.workers.dev/mcp"
    }
  }
}

Security & Accounting

  • Strict x402 v2 Exact Settlement: Verifies facilitator proof and settles before running inference; atomic SQLite-backed Durable Object (EdgeLedger) prevents concurrent replay and enforces the daily neuron budget.

  • SSRF-Protected Web Extraction: Accepts public HTTP/HTTPS domains only; rejects IP literals, credentials, non-standard ports, loopback/private/internal/metadata hosts, and re-validates every redirect hop.

Local Development & Tests

node --test test/*.test.js

Copy wrangler.example.toml to wrangler.toml, provision your own KV namespaces and Solana wallet variables, and deploy with npx wrangler deploy.

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Crypto-native LLM gateway with OpenAI-compatible API and per-token USDC payments on Solana via the x402 protocol.
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI agents to access Solana wallet analytics, token data, and DeFi tools via pay-per-request USDC micropayments using the x402 protocol, without API keys or subscriptions.
      13
      58 npm
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to call pay-per-request AI and web tools—including web-to-Markdown reading, PDF extraction, translation, compliance lookups, domain/email/Solana data, and prediction-market intelligence—without accounts or API keys, settling each call in USDC via x402 on Base, Solana, or Arc.
      MIT