One integration for the agentic economy
AMI Gateway lets an agent discover, compare and call services indexed here — through MCP, a TypeScript SDK or a CLI. Discovery is free and read-only by default. A payment happens only when the operator enabled spending and the live 402 challenge passes a local policy. The gateway holds no funds and takes no cut.
Install
npm install -g @ami-gateway/cli npx -y @ami-gateway/mcp-server
MCP client configuration (Claude Code, Claude Desktop, Cursor, OpenClaw):
{
"mcpServers": {
"ami-gateway": {
"command": "npx",
"args": ["-y", "@ami-gateway/mcp-server"],
"env": { "AMI_GATEWAY_CATALOG_URL": "https://agentmarketindex.com" }
}
}
}
Streamable HTTP is available with --http. A non-loopback bind requires AMI_GATEWAY_HTTP_TOKEN; the server refuses to start without it.
What it does
| Step | What happens | What is measured |
|---|---|---|
| discover | Search 213,838 services by task, category, protocol or price. | Catalogue facts; missing prices stay null, never 0. |
| compare | Rank candidates on price, reliability, latency, availability and adoption. | Reliability is computed from endpoint checks, not from claims. |
| execute | Call the chosen endpoint; read the real 402 challenge; check the local spend policy; sign only if allowed. | Amount and recipient come from the challenge, never from the listing. |
| receipt | Store an append-only receipt with idempotency key and settlement status. | Retry with the same key returns the receipt instead of paying twice. |
MCP tools
| Tool | Purpose |
|---|---|
| ami_search_services | Find providers by task, category, protocol, price. |
| ami_compare_providers | Ranked list with factors and reasons. |
| ami_rank_providers | Best provider plus alternatives. |
| ami_execute | Call a provider; pay only if policy allows. Supports dry-run. |
| ami_spending_status | Limits, wallet adapter, spend today/month, pending approvals. |
| ami_spending_history | Ledger events. |
| ami_receipt | Receipt by idempotency key, without a new request. |
| ami_approve_payment | Disabled unless the operator explicitly allows agent approval. |
| ami_catalog_stats | Catalogue headline counts. |
Payments without a blank cheque
- x402 (exact EVM) — reads PAYMENT-REQUIRED, signs an EIP-712 transfer with the local wallet adapter, returns PAYMENT-RESPONSE as the receipt.
- MPP — parses WWW-Authenticate: Payment challenges, values the amount in USD, and fails closed when it cannot.
- Spend policy — per-call, per-day and per-month limits, recipient allowlist, approval threshold. Empty allowlist means no payments.
- No double payment — after a paid attempt the gateway stops, even when fallback is enabled, unless settlement explicitly failed.
- No custody — no seed phrase, no funds held, no fee on top of the provider's price.
Provider responses are treated as untrusted data: fenced, control characters stripped, injection patterns flagged, never executed and never followed as instructions.
Catalogue snapshot
| Measure | Value | Meaning |
|---|---|---|
| Published services | 213,838 | Visible in the catalogue right now. |
| Providers | 70,373 | Distinct providers behind those services. |
| x402 services | 135,822 | Declare the x402 protocol. |
| Payable rails | 135,733 | Publish at least one exact-scheme payment rail. |
| Published prices | 126,327 | Carry a price. The rest are unknown, not free. |
Snapshot taken 2026-12-04T21:56:32+00:00. Cached for ten minutes.
Discovery endpoint for the client
GET https://agentmarketindex.com/api/v1/gateway/discover?task=token%20verdict&max_price_usd=0.05&limit=10
Additive and read-only. Returns payment rails, endpoint-check reliability and usage in one response, so the gateway does not need a detail call per candidate. The existing /api/v1/services endpoints are unchanged.
Source and skills
MIT licensed. The repository contains the SDK, MCP server, CLI, two native skills (Hermes and OpenClaw), protocol notes for x402 v2 and MPP, and a security threat model.