MAILGENT
MCP Server Monetization

Charge per tool callon your MCP server.

Drop a one-line middleware onto any MCP tool registration. Agents pay before the call returns. USDC settled on Base in about two seconds, with a signed receipt every time. The MCP catalog turns into a market.

The Model Context Protocol gave agents a clean way to call tools. What it didn't ship is a way for tool authors to get paid — MCP monetization is that missing payment layer. Most MCP servers are free because there was no payment primitive to wrap a tool registration. Mailgent puts a one-line paywall in front of any MCP tool — same idea as the REST middleware, same project wallet, same audit trail. The agent's first call returns a payment requirement, the agent's wallet signs and retries, your tool runs and returns. The whole exchange happens before the LLM sees the result.

How it works

Four steps. Most fire in under a second.

01

Install the middleware

Install @mailgent/sdk and import the paywall middleware for MCP. Bind it to your project's API key at server startup. One factory call.

02

Wrap each paid tool

Add requirePayment({ amount: '0.01' }) to any tool registration. Different tools can have different prices. The wrapper composes with whatever logic you had — it only adds the payment gate in front.

03

Agent pays before the tool runs

Buyer agent calls the tool with no payment. Mailgent returns the payment requirement. The agent's wallet signs and retries. Mailgent verifies, settles USDC on Base, then your handler runs.

04

Receipt + log

Your tool returns; the response includes a signed receipt. The activity log records the call with the agent identity, tool name, amount, and chain link. Webhooks fire if the project has one configured.

What you get

Built for developers who already shipped.

One line per tool

Wrap any tool registration with requirePayment(). Different tools can have different prices. Same pattern as the REST middleware — share the same project wallet, scopes, and activity timeline.

Settles before the response

Agent calls the tool, Mailgent verifies the signed payment, settles USDC on Base, then your handler runs. Failed payments never reach your business logic.

Listed in the Mailgent Index

Opt your MCP into the Mailgent Index. Buyer agents query paid tools, price-compare, and start paying immediately. Distribution included with the paywall.

Streamable HTTP + stdio

Works with both transports the MCP spec defines today. No protocol changes — the paywall is purely additive and invisible to MCP clients that already speak the spec.

Signed receipts on every call

Every paid tool call returns an Ed25519-signed receipt with the tool name, arguments hash, amount, and on-chain transaction. Auditors get a chain of evidence; consumers can verify a tool actually ran.

Refund + dispute primitives

If a tool errors, return the standard MCP error and Mailgent automatically refunds the buyer (the settle had not happened yet, so it's instant). Failed calls never charge.

What people build

Real-world mcp server monetization flows shipping today.

$0.01 / call

Search MCP

Wrap a web-search or vector-search tool. Charge per query. Agents that hammer free-tier endpoints become real revenue.

$0.05 / doc

Extraction MCP

PDF parsing, OCR, structured-data extraction. Per-document pricing matches actual cost — no monthly tier nobody fits.

Per-token

Inference MCP

Wrap a model inference tool. Charge per token, per generation, or per call. Pass-through model cost plus a margin.

$0.10 / lookup

Premium data MCP

Financial quotes, on-chain analytics, weather, satellite imagery. Per-lookup pricing turns expensive upstream feeds into sustainable resale.

Free MCP server vs MCP + Mailgent paywall

What the difference looks like.

FeatureFree MCP serverMCP + Mailgent paywall
Revenue modelDonations, ads, or a separate API gatePer-call USDC, settled before the tool runs
IntegrationRoll your own API key + invoicingOne line per tool registration
SettlementPer-month invoice, dispute windowPer-call USDC on Base, ~2 second settle, no chargebacks
DiscoveryYour own catalog and outreachListed in the Mailgent Index, ranked by reputation
ReceiptsStripe invoice or noneEd25519 signed per call, with chain link

FAQ

Things builders ask.

Does MCP monetization require forking the MCP spec?
No. The paywall is implemented as a server-side wrapper around tool handlers. MCP clients that already speak the spec see no protocol change. The payment exchange happens via standard MCP error responses (custom error codes) and follow-up calls with payment headers.
What happens if an MCP client doesn't support payments?
They receive a standard MCP error with the payment requirement attached. Up-to-date MCP clients (Claude, Cursor, Goose, and others integrating with @mailgent/sdk on the buyer side) handle the negotiation automatically. Clients without payment support see a friendly error explaining they need a wallet.
How do I set pricing for MCP server monetization?
Per-tool pricing is the default — set requirePayment per registration. For shared pricing across a category (e.g., 'all read tools cost $0.01'), pass a function that returns the price based on tool name and arguments.
Do failed MCP tool calls charge the buyer?
No. If the tool throws or returns an error, the payment never settles (verify happens before the call, settle happens after). The buyer is never charged for failed calls. For post-success disputes, issue a refund through the standard Mailgent refund API.
Does Mailgent host my MCP server?
No, you host your MCP server. Mailgent provides the paywall middleware and the payment rail. You keep full control of the tool implementation, the data, and the runtime. If you want a hosted option, deploy your MCP on Cloud Run or Fly behind the Mailgent middleware.
How do I list my paid MCP server in the Mailgent Index?
Opt-in. Pass listed: true to the middleware factory and your paid tools appear in the Mailgent Index at mailgent.dev/idx. Buyer agents query, price-compare, and start paying immediately.
Which MCP transports does Mailgent monetization support?
Streamable HTTP (the modern transport) and stdio (the legacy one). Both work the same way — the paywall is server-side and transport-agnostic.
How much does MCP server monetization with Mailgent cost?
5% on settled mainnet payments — waived for now. The fee is on the settled USDC, so it scales with usage. No monthly fee, no per-seat.

Built with MCP Server Monetization

Real things developers build
on top of MCP Server Monetization.

Ready to ship mcp server monetization?

Sign up for free. No card required. Read the docs while you wait.