1. Install and Set Up

a. Install Meshagent

pip install "meshagent[all]"

b. Authenticate

Sign up and authenticate to Meshagent CLI:
https://docs.meshagent.com/cli/getting_started


2. Environment Variables

Set these environment variables with your Razorpay API credentials:

  • RAZORPAY_KEY_ID - Your Razorpay Key ID
  • RAZORPAY_KEY_SECRET - Your Razorpay Key Secret

3. Run Razorpay MCP Server in a Meshagent Room

meshagent service test \
  --room=test \
  --role=agent \
  --image=meshagent/mcp-razorpay:latest \
  --env MESHAGENT_PORT=8001 \
  --env RAZORPAY_KEY_ID=your_razorpay_key_id \
  --env RAZORPAY_KEY_SECRET=your_razorpay_key_secret \
  --port="num=8001 path=/webhook liveness=/ type=meshagent.callable" \
  --name=mcp-razorpay-service
  • This starts a Meshagent Room (test) with the MCP Razorpay server running as an agent.
  • Rooms will close if inactive.

4. Join with a Chatbot Agent

meshagent chatbot join \
  --room=test \
  --agent-name=sample \
  --name=sample \
  --toolkit=mcp-razorpay
  • This command will launch a chatbot inside the same Room using the Razorpay toolkit.
  • Multiple toolkits and services can be coordinated in one Room.
  • After joining, the CLI will output a link to access and interact with the Room and its tools.

Tools Available

The following tools from the Razorpay MCP server are available in your Meshagent Room:

ToolShort Description
capture_paymentUse this tool to capture a previously authorized payment.
close_qr_codeClose a QR Code that’s no longer needed
create_instant_settlementCreate an instant settlement to get funds transferred to your bank account
create_orderCreate a new order in Razorpay
create_payment_linkCreate a new standard payment link in Razorpay with a specified amount
create_qr_codeCreate a new QR code in Razorpay that can be used to accept UPI payments
create_refundUse this tool to create a normal refund for a payment.
fetch_all_instant_settlementsFetch all instant settlements with optional filtering, pagination, and payout details
fetch_all_ordersFetch all orders with optional filtering and pagination
fetch_all_payment_linksFetch all payment links with optional filtering by payment ID or reference ID.
fetch_all_paymentsFetch all payments with optional filtering and pagination
fetch_all_payoutsFetch all payouts for a bank account number
fetch_all_qr_codesFetch all QR codes with optional filtering and pagination
fetch_all_refundsUse this tool to retrieve details of all refunds.
fetch_all_settlementsFetch all settlements with optional filtering and pagination
fetch_instant_settlement_with_idFetch details of a specific instant settlement using its ID
fetch_multiple_refunds_for_paymentUse this tool to retrieve multiple refunds for a payment.
fetch_orderFetch an order’s details using its ID
fetch_order_paymentsFetch all payments made for a specific order in Razorpay
fetch_paymentUse this tool to retrieve the details of a specific payment using its id.
fetch_payment_card_detailsUse this tool to retrieve the details of the card used to make a payment.
fetch_payment_linkFetch payment link details using it’s ID.
fetch_payments_for_qr_codeFetch all payments made on a QR code
fetch_payout_with_idFetch a payout’s details using its ID
fetch_qr_codeFetch a QR code’s details using it’s ID
fetch_qr_codes_by_customer_idFetch all QR codes for a specific customer
fetch_qr_codes_by_payment_idFetch all QR codes for a specific payment
fetch_refundUse this tool to retrieve the details of a specific refund using its id.
fetch_settlement_recon_detailsFetch settlement reconciliation report for a specific time period
fetch_settlement_with_idFetch details of a specific settlement using its ID
fetch_specific_refund_for_paymentUse this tool to retrieve details of a specific refund made for a payment.
payment_link_notifySend or resend notification for a payment link via SMS or email.
payment_link_upi.createCreate a new UPI payment link in Razorpay with a specified amount and additional options.
update_orderUse this tool to update the notes for a specific order.
update_paymentUse this tool to update the notes field of a payment.
update_payment_linkUpdate any existing standard or UPI payment link with new details such as reference ID, expiry date, or notes.
update_refundUse this tool to update the notes for a specific refund.

Tool Parameters & Details

capture_payment

Capture a previously authorized payment. Only payments with ‘authorized’ status can be captured.

  • amount: number (In paisa, equal to authorized amount)
  • currency: string (e.g., INR)
  • payment_id: string (starts with ‘pay_‘)

close_qr_code

Close a QR Code that’s no longer needed.

  • qr_code_id: string (starts with ‘qr_‘)

create_instant_settlement

Create an instant settlement.

  • amount: number (smallest currency sub-unit)
  • description: string (optional)
  • notes: object (optional)
  • settle_full_balance: boolean (optional)

… (see the “full_description.md” for all detailed tool parameters) …


Meshagent Resources


Run Razorpay MCP in Meshagent Rooms to securely connect, automate, and collaborate with your payment tools!