> ## Documentation Index
> Fetch the complete documentation index at: https://www.cashfree.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# AgentPay MCP

> See how AgentPay MCP lets your AI agent pay customers' BBPS bills from their Cashfree wallet after a one-time consent, and the concepts behind it.

AgentPay lets your AI agent pay your customers' everyday bills, such as electricity, water, mobile and broadband, directly from their Cashfree AgentPay wallet. Your customer asks in plain language, for example "pay my electricity bill". They approve your agent once, and from then on the agent finds the bill, pays it and returns a receipt.

AgentPay pays bills through the Bharat Bill Payment System (BBPS), the bill payment network that connects most Indian billers. Your agent talks to AgentPay through an MCP (Model Context Protocol) server. Any MCP-compatible agent, such as Claude, Cursor or your own, can use it without calling Cashfree APIs directly.

## What your customer experiences

From the customer's side, paying a bill is a short chat. The following example shows a customer paying their BESCOM electricity bill for the first time:

| Speaker | Message |
| - | - |
| **Customer** | Help me pay my electricity bill for BESCOM. |
| **Agent** | I found BESCOM. To fetch your bill, I need your Customer ID (the 7-digit or 10-digit number on your bill) and your mobile number. |
| **Customer** | 1234567890, 9999999999 |
| **Agent** | Here's your bill. Name: Rahul Sharma. Amount due: ₹350.00. Due date: 25 Oct 2026. Do you want to pay it from your Cashfree wallet? If so, open this link, log in with the OTP and approve wallet payments: \<link>. Tell me when you're done. |
| **Customer** | Yes, pay it. Done, approved. |
| **Agent** | Paid ₹350.00 to BESCOM. Your unique transaction reference (UTR) is 309012345678. |

The next time this customer pays a bill, there's no link to open. The agent shows the bill, the customer says yes, and it's paid.

The following sections explain what your agent does behind the scenes to make that happen.

## How it works

Your agent never talks to Cashfree or the biller directly. It calls tools on the AgentPay MCP server, and the server handles everything else:

```mermaid theme={"dark"}
flowchart LR
    C([Customer]) <-->|chat| A[Your AI agent]
    A -->|MCP tool calls| M[AgentPay MCP server]
    M -->|API calls| CF[Cashfree AgentPay]
    CF -->|pays the bill| B[BBPS and the biller]
    C -.->|approves once| CF
```

Each participant has a distinct role:

* **Your agent** chats with the customer and calls MCP tools.
* **The AgentPay MCP server** turns each tool call into a Cashfree API call and returns the result. It fills in all the BBPS technical details for you and stores nothing, so it never keeps your keys, tokens or bill data.
* **Cashfree AgentPay** fetches bills, manages the customer's wallet, and settles payments with BBPS.
* **The customer** gives the bill details and approves your agent once on a secure Cashfree consent page.

## Key concepts

Most of the integration follows from these four concepts. Keep them in mind as you build your integration:

* **The customer approves once.** The first time, the customer opens a consent link, logs in with a one-time password (OTP) and approves a mandate: a standing permission for your agent to pay bills from their wallet, up to a monthly limit. You get tokens back and reuse them for every future bill.
* **Paying a bill has two parts.** First, money comes out of the customer's wallet (the debit). Then Cashfree tells the biller the bill is paid (the settlement). The debit gives you a `transaction_id`, which you pass to the settlement to connect the two.
* **Pass IDs back exactly.** Tools hand you IDs, such as the bill's `ref_id` and the debit's `transaction_id`, that later tools need. Store them and pass them back unchanged.
* **Rupees and strings.** All amounts are in rupees, not paise. Treat all IDs as strings, so long numbers are never rounded.

## Next steps

Use the following pages to build your integration:

> [card] [Integration Guide](https://www.cashfree.com/docs/tools-ai/agentpay-mcp/integration-guide.md)
>
> Connect your agent, pay a bill step by step, test in sandbox and go live.

> [card] [Tool Reference](https://www.cashfree.com/docs/tools-ai/agentpay-mcp/tool-reference.md)
>
> Look up the arguments and example responses for all 17 tools.

Related topics

<ul>
  <li>[Cashfree MCP Server](https://www.cashfree.com/docs/tools-ai/mcp-server.md)</li>
  <li>[Cashfree Agent Toolkit](https://www.cashfree.com/docs/tools-ai/cashfree-agent-toolkit.md)</li>
</ul>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.