MAILGENT
Mailgent Index

How Mailgent Index works
integrate once, get paid per call.

Mailgent Index is the agent-queryable MCP registry. Every server listed is x402-ready and priced per call — discovered, called, and paid by agents in one transaction, with no human in the loop. Here's the whole flow, from integration to your first paid call.

Most MCP directories are built for humans to browse. Mailgent Index is built for agents to query. When an agent needs a capability — say web search, PDF extraction, or an on-chain lookup — it asks the index what's available and what each option costs, gets back structured metadata and a payment endpoint, and calls the best match. No browsing, no signup, no human approving a charge.

What makes that possible is that every server in the index has the Mailgent SDK integrated, so payment infrastructure is already live on it. Listing and integrating are the same action: the moment your server is in the index, it can issue an HTTP 402, accept a signed USDC payment, and settle on Base. Your price is just a number you set and can change whenever you want.

This page walks through exactly how a server gets listed, how an agent discovers and pays for it, and what you get out of the box — so you can decide whether to wrap your own server today.

An index, not a directory

A directory is a list of links a person clicks. An index is a structured surface a machine queries. That distinction drives everything about how Mailgent works.

When an agent queries Mailgent Index, each result carries a machine-readable capability description, a per-call price, an x402 payment endpoint, and a signed-receipt scheme. The agent can filter by category, by framework compatibility, and by price, then select and call a tool entirely in code. A human directory can't answer 'what does this cost and how do I pay for it' — there's no price and no payment endpoint in the listing. Mailgent answers both, programmatically.

That's why catalog size isn't the metric that matters here. An agent doesn't need the longest list of servers; it needs a list where every entry is callable and payable right now. A smaller index of payment-ready tools beats a giant directory of links the agent can't transact against.

Step 1 — Integrate the SDK

Install @mailgent/sdk and wrap each tool you want to monetize with requirePayment. The wrapper sits in front of your existing handler — your tool logic doesn't change. It's the same function you already wrote, now with a price attached.

The SDK handles the entire payment handshake for you: issuing the 402 challenge, verifying the agent's signed payment, settling on Base, and emitting the receipt. You don't touch any of that plumbing.

server.ts
import { requirePayment } from "@mailgent/sdk";

// Your existing tool, now priced. Minimum $0.01 per call.
server.tool(
  "web_search",
  requirePayment({ amount: "0.01" }, async (input) => {
    return await search(input.query); // unchanged handler
  }),
);

Step 2 — List it

Submit your server to the index with its capability metadata: name, category, the tools it exposes, and the endpoint. It goes live as Mailgent-powered and x402-ready, and agents can discover and call it immediately.

If your server is already public on GitHub, npm, or the official MCP registry, there may already be an unclaimed stub for it in the index that Mailgent's crawler created — in which case you claim it instead of starting from scratch.

Step 3 — Set and change your price in one field

The price lives in a single field. The floor is $0.01 per call; there's no ceiling. A common pattern is to start near the floor to attract your first callers, then raise the price as you prove the tool's value — every change is a one-line edit, with no new integration, no migration, the same URL, and the same audience.

Agents that were already calling keep calling and keep paying, because the price change is invisible to them: they just pay whatever the 402 challenge asks. Repricing is reversible, so if you raise too far and volume drops, you lower the number and volume recovers.

server.ts
// Reprice anytime — change the number, ship. That's the whole diff.
requirePayment({ amount: "0.05" }, async (input) => {
  return await search(input.query);
});

What's live the moment you list

Because the SDK is integrated, a full payment stack is active from the first call — you don't build any of it. Every paid call settles instantly in USDC on Base and produces an Ed25519-signed receipt linked to the on-chain transaction, giving you an audit trail without lifting a finger.

On the buyer side, agents pay from a wallet rather than an API key, so you never issue, store, or rotate credentials for your callers. There are no accounts to provision and no keys to leak — the payment itself is the authorization.

What Mailgent handles, and what you keep

Mailgent runs the 402 handshake, payment verification, on-chain settlement, and receipt generation. You keep the revenue from each call minus Mailgent's per-call fee, and you cash out to any wallet you control — or use the smart wallet Mailgent provisions for your project at signup.

There's no monthly platform fee for listing and no minimum volume commitment. You earn when agents call your tools, and the economics scale directly with usage.

FAQ

What's the minimum I can charge per call?

$0.01. There's no maximum — price to the value your tool delivers. You can change the price as often as you like; each change is a one-field edit.

Do I have to reintegrate to change my price?

No. The price is a single field in requirePayment. Changing it is a one-line edit on the same listing — same URL, same audience, no migration.

What does 'x402-ready' actually mean?

The server can respond to a request with an HTTP 402 Payment Required challenge, verify a signed USDC payment from the calling agent, and settle it on Base — automatically. The Mailgent SDK implements all of that; you just set the price.

Do I need to host anything new?

No. You wrap your existing MCP server wherever it already runs and point the listing at its endpoint. Mailgent adds the discovery and payment layer; it doesn't replace your hosting.

How do agents actually find my server?

They query the index programmatically and filter by capability, category, framework, and price. Your listing is returned with its metadata and payment endpoint, so the agent can select and call it without a human in the loop.

What does Mailgent take?

A per-call fee on paid calls — there's no monthly platform fee for listing and no minimum. You keep the rest and cash out to any wallet you control.

List your MCP server.

Integrate once, set a price from $0.01, and get paid per call.

Last updated: 2026-05-27