Razorpay MCP Server
Official Razorpay MCP server providing 50+ tools for payments, orders, refunds, payment links, QR codes, settlements, and payouts.
The Razorpay MCP Server is the official Model Context Protocol implementation maintained by Razorpay. It exposes 50+ tools that map to Razorpay's REST APIs, enabling AI agents and developer tools to programmatically manage payments, orders, refunds, payment links, QR codes, settlements, payouts, tokens, and merchant integrations.
The server is available in two deployment modes. The remote, Razorpay-hosted server at https://mcp.razorpay.com/mcp requires no infrastructure setup and is accessed via mcp-remote with a Basic Auth token derived from your Razorpay API key and secret. A self-hosted option is also available as a Docker image (razorpay/mcp) or Go binary, useful when running the server inside your own environment.
It is licensed MIT and supports configuration options such as READ_ONLY mode for safer agent operations and TOOLSETS for restricting the active tool categories. Documentation and per-tool references are published at razorpay.com/docs/mcp-server/.
Tools
| Tool | Description |
|---|---|
create_payment_link |
Create a standard Razorpay payment link to collect money from customers. |
create_payment_link_upi |
Create a UPI-specific payment link. |
fetch_all_payment_links |
List payment links with optional filters. |
send_payment_link |
Send a payment link to a customer via SMS or email. |
capture_payment |
Capture an authorized payment for a given amount. |
fetch_payment |
Retrieve details of a payment by ID. |
fetch_all_payments |
List payments with filters such as date range and count. |
fetch_payment_card_details |
Get card details for a card payment. |
update_payment |
Update notes or other mutable fields on a payment. |
initiate_payment |
Initiate a payment for S2S flows. |
resend_otp |
Resend OTP for an in-progress payment. |
submit_otp |
Submit OTP to complete a payment. |
create_order |
Create a Razorpay order. |
fetch_order |
Retrieve an order by ID. |
fetch_all_orders |
List orders with filters. |
update_order |
Update notes on an order. |
fetch_order_payments |
Fetch all payments made for an order. |
create_refund |
Create a full or partial refund for a payment. |
fetch_refund |
Fetch details of a refund by ID. |
fetch_all_refunds |
List refunds with optional filters. |
update_refund |
Update notes on a refund. |
fetch_multiple_refunds_for_payment |
List all refunds associated with a payment. |
fetch_specific_refund_for_payment |
Fetch a specific refund tied to a payment. |
create_qr_code |
Create a QR code for accepting payments. |
fetch_qr_code |
Retrieve a QR code by ID. |
fetch_all_qr_codes |
List all QR codes. |
fetch_qr_codes_by_customer_id |
List QR codes associated with a customer. |
fetch_qr_codes_by_payment_id |
Find QR codes tied to a specific payment. |
fetch_payments_for_qr_code |
List payments collected via a given QR code. |
close_qr_code |
Close a QR code so it can no longer accept payments. |
fetch_all_settlements |
List settlements credited to the merchant bank account. |
fetch_settlement_with_id |
Fetch a settlement by ID. |
fetch_settlement_recon_details |
Get reconciliation details for a settlement. |
create_instant_settlement |
Initiate an instant settlement. |
fetch_all_instant_settlements |
List instant settlements. |
fetch_all_payouts |
List payouts from a RazorpayX account. |
fetch_payout_by_id |
Fetch a specific payout by ID. |
fetch_tokens |
Fetch saved tokens for a customer. |
revoke_token |
Revoke a saved token. |
create_registration_link |
Create a registration link for recurring payments / subscriptions. |
detect_stack |
Detect the developer's project stack to recommend an integration path. |
integrate_razorpay_checkout |
Generate Razorpay Checkout integration code for the detected stack. |
Prerequisites
- A Razorpay account with API credentials (Dashboard > Settings > API Keys)
- For the remote server: Node.js (provides
npx) - For the local server: Docker (or Go and Git to build from source)
Generate the merchant token
The remote server uses HTTP Basic Auth. Encode your API key and secret:
echo -n "<RAZORPAY_API_KEY>:<RAZORPAY_API_SECRET>" | base64
Remote server (recommended)
Claude Desktop
{
"mcpServers": {
"rzp-mcp-server": {
"command": "npx",
"args": [
"mcp-remote",
"https://mcp.razorpay.com/mcp",
"--header",
"Authorization: Basic <Merchant Token>"
]
}
}
}
Cursor
{
"mcpServers": {
"rzp-mcp-server": {
"command": "npx",
"args": [
"mcp-remote",
"https://mcp.razorpay.com/mcp",
"--header",
"Authorization:${AUTH_HEADER}"
],
"env": {
"AUTH_HEADER": "Basic <Base64(key:secret)>"
}
}
}
}
Local server (Docker)
{
"mcpServers": {
"razorpay-mcp-server": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e",
"RAZORPAY_KEY_ID",
"-e",
"RAZORPAY_KEY_SECRET",
"razorpay/mcp"
],
"env": {
"RAZORPAY_KEY_ID": "your_razorpay_key_id",
"RAZORPAY_KEY_SECRET": "your_razorpay_key_secret"
}
}
}
}
Environment variables (local server)
RAZORPAY_KEY_ID: API key identifierRAZORPAY_KEY_SECRET: API key secretLOG_FILE(optional): path for server logsTOOLSETS(optional): comma-separated list of enabled toolsets, defaults to allREAD_ONLY(optional): restrict to read-only tools, defaults to false
- Let support agents look up a customer's recent payments and orders, then issue partial or full refunds from chat
- Automate generation and delivery of payment links over email or SMS for invoices and one-off charges
- Reconcile bookkeeping by pulling settlements and settlement recon details into a spreadsheet or finance tool
- Operate a UPI QR code workflow: create QR codes per customer, monitor payments, and close codes when done
- Bootstrap a Razorpay Checkout integration by detecting the project stack and generating boilerplate code
- "Create a payment link for INR 2,500 for customer ravi@example.com and send it over email."
- "List all payments captured in the last 7 days greater than INR 10,000 and summarize them by method."
- "Refund payment pay_ABC123 partially for INR 500 and add a note explaining the reason."
- "Pull the most recent settlement and break down its reconciliation details by payment."
- "Create a UPI QR code for customer cust_XYZ that accepts any amount and share the image URL."
- Official, maintained by Razorpay with an MIT license
- Broad coverage: 50+ tools across payments, orders, refunds, links, QR, settlements, payouts, tokens
- Offers both a zero-setup hosted remote server and a self-hostable Docker image
- Supports
READ_ONLYmode andTOOLSETSfiltering for safer agent deployments
- Primarily focused on Razorpay merchants in India, less useful for businesses on Stripe or other global processors
- Write operations like creating refunds or instant settlements can move real money, so guardrails are essential
- Remote server uses Basic Auth with a Base64 key:secret token, so credential handling must be careful
- Stripe MCP server for Stripe payments and billing
- PayPal MCP server for PayPal merchant operations
- Razorpay Node SDK invoked directly from a custom MCP wrapper for more granular control