> For the complete documentation index, see [llms.txt](https://docs.flowcp.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flowcp.ai/guides/monetize-your-mcp-server.md).

# Monetize your MCP server

Turn a published MCP server into a revenue source: charge the AI agent that calls your tools, **per call**, and get paid automatically. Agents pay **agentically** — autonomously, with no human checkout — using the [x402](https://x402.org) payment protocol. Each payment **settles directly to your payout address** — FlowCP never holds your funds. FlowCP's small marketplace platform fee is billed separately, onto your FlowCP subscription invoice.

> Monetization is a premium feature, available on the **Team** plan and above. Find it in the dashboard sidebar under **Monetization** (with **Pricing** and **Transactions** pages). If your plan doesn't include it, the Pricing page shows an upgrade prompt.

## How it works

1. You set a **per-call price** on the tools you want to charge for, and a **payout address** for your server.
2. When an agent calls a paid tool **without payment**, the tool returns a payment-required response carrying the price and payment details (the x402 requirements).
3. The agent's wallet constructs a signed payment and **calls the tool again** with the proof attached.
4. FlowCP verifies and settles the payment to your wallet, runs the tool, and records it under **Monetization → Transactions**. Each payment shows your share and the platform fee; the fee is billed to your subscription, not taken from the settlement.

Free tools are never charged, and a tool stays free until you give it a price.

## Enable monetization

Open **Monetization → Pricing** in the sidebar and, under **Payout configuration**:

* Toggle **Enable monetization** on.
* Enter your **Payout address** (the wallet that receives settled funds). This is required to enable a server, and must be a valid **EVM address** (`0x` followed by 40 hex characters) — the page flags a malformed address inline and keeps **Save settings** disabled until it's valid.
* Pick the settlement **Network** and the default **asset** (token) you charge in. Selecting a testnet such as **base-sepolia** shows a **"Testnet — no real funds"** badge so you don't mistake test settlements for real revenue.

The platform fee FlowCP keeps on each payment is shown here. Click **Save settings**.

## Price your tools

Under **Tool pricing**, set each tool to **Free** or **Per call**. For a paid tool, enter the **price in atomic token units** — the smallest unit of the token. For example, USDC has 6 decimals, so `10000` = 0.01 USDC. Click **Save** on the row.

Prices take effect immediately. The price is also advertised to agents in the tool's metadata, so a well-behaved agent knows the cost before it calls.

### How agents see your prices

As soon as at least one tool has a price, your server gains a built-in **`get_pricing`** tool that returns your whole price list in one call — the tool name, price, and asset for each paid tool, plus a count of the free ones. An agent can read it before planning work instead of discovering each price from a payment-required error. It costs nothing to call, and it does not appear at all while every tool is free.

Prices also show up in `search_tools` results (for servers large enough to use dynamic tool exposure), and the server's connection instructions tell the model how many tools charge and to check `get_pricing` first.

> If your own API already exposes a tool named `get_pricing`, yours wins and the built-in is skipped — agents then read prices from each tool's metadata instead. Rename yours if you'd rather have the catalog.

> If your app has more than one environment (server), use the **Environment** selector at the top of the page — payout config and prices are per server.

## Track earnings and transactions

The **Monetization → Transactions** page opens with an **earnings summary** — stat cards for **Gross earned** (everything agents paid), **Your share** (settled to your wallet), **Platform fee** (FlowCP's marketplace cut), and **Fees pending** (fee that has settled but not yet been billed to your subscription). Amounts are shown in human units (e.g. `0.01 USDC`) rather than raw atomic units.

Below the summary, the table lists every settled payment: the tool, the amount the agent paid, your share, the platform fee, the network, the status, and a **Fee billed** indicator (**Billed** once the platform fee for that payment has been charged to your subscription, **Pending** until the hourly reconciliation runs). This is your record of what each paid tool has earned.

## Test it in the Playground

You don't need a real wallet or an external agent to see the paid flow end to end. Open the **Playground** for the server and, in the config rail under **Test payments**, set a **Test wallet** (click **Generate** for a throwaway `0x…` address) and optionally turn on **Auto-pay test payments**.

Now ask the model to call a paid tool:

* With **auto-pay on**, the Playground pays the tool with a mock x402 payment from your test wallet and retries automatically; the tool call shows a **paid** receipt badge with the amount, payer, and network.
* With **auto-pay off**, the turn pauses and a **Payment required** card shows the price and asks for a test wallet — fill it in and click **Pay & retry**.

These are **mock payments** (no real funds) and only settle against the built-in mock facilitator used in development and self-host runtimes. They still produce a real **receipt**, so you can watch it appear under **Monetization → Transactions**. See [Chat-test in the Playground](/guides/chat-test-your-mcp-server.md) for the full Playground guide.

## Notes

* **Payment is required before the tool runs.** A paid tool never executes without a verified, settled payment — there is no "call now, pay later".
* **A payment is single-use.** Each payment proof settles once; an agent must present a fresh payment for each call.
* **Pricing is per server.** The payout address, network, and fee apply to the whole server; prices are per tool.

For the agent-developer side of this flow (the exact request/response shape), see [Agentic payments (x402)](/reference/agentic-payments.md).
