Get the FREE Ultimate OpenClaw Setup Guide →

razorpay

Razorpay's Official MCP Server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio razorpay-razorpay-mcp-server npx -y razorpay-mcp-server \
  --env RAZORPAY_API_KEY="your_razorpay_api_key" \
  --env RAZORPAY_API_SECRET="your_razorpay_api_secret" \
  --env Razorpay_MCP_SERVER_ENV="production|staging|development"

How to use

The Razorpay MCP Server provides a suite of tools that integrate with Razorpay APIs to enable advanced payment processing directly from your AI tools and workflows. Once the remote server is configured or you run it locally, you can invoke tools such as capture_payment to move a payment from authorized to captured, fetch_payment to retrieve details for a specific payment, and fetch_all_payments to list payments with filtering and pagination. The toolset also includes fetch_payment_card_details for card-level information, update_payment for annotating payments with notes, and initiate_payment to start a payment using a saved method along with customer data. For payment links, you can create and manage links through create_payment_link, fetch_all_payment_links, fetch_payment_link, send_payment_link, and update_payment_link. The server also covers orders, refunds, QR codes, settlements, instant settlements, payouts, and related operations with corresponding fetch, create, update, and list actions. Remote server support is enabled for all listed tools, enabling you to perform these actions from your AI agents or automation pipelines.

How to install

Prerequisites:

  • Node.js and npm installed on your machine (or access to a remote environment with npx).
  • Basic familiarity with API concepts and Razorpay credentials (API key and secret).

Local setup (recommended for experimentation):

  1. Ensure Node.js and npm are installed. Verify with: node -v npm -v
  2. Install or run the MCP server using npx (no global install required): npx -y razorpay-mcp-server
  3. Set required environment variables (example): export RAZORPAY_API_KEY=your_key export RAZORPAY_API_SECRET=your_secret export Razorpay_MCP_SERVER_ENV=development
  4. Start the server (if the script requires manual start) and note the listening address/port from the output.

Alternative (Docker) – if you prefer containerized execution:

  1. Pull and run the official Razorpay MCP Server image: docker run -e RAZORPAY_API_KEY=your_key
    -e RAZORPAY_API_SECRET=your_secret
    -p 8080:8080
    razorpay/mcp-server:latest
  2. Ensure the container exposes the MCP API endpoint you will query from your tools.

Additional notes

Tips and considerations:

  • Always keep your Razorpay API credentials secure; avoid hard-coding them in prompts or logs.
  • If you switch between remote and local setups, ensure the MCP server URL in your tools or agents points to the correct endpoint.
  • The tools listed cover a comprehensive range of payment operations; use fetch_all_* endpoints with caution to avoid excessive data fetch.
  • For sensitive actions (capture_payment, update_payment, refunds, payouts), ensure proper authorization and auditing in your automation environment.
  • If you encounter rate limits or API errors from Razorpay, enable verbose logging on the MCP server to diagnose payloads and responses.
  • When using create_qr_code and related QR code endpoints, verify that the QR code content aligns with your payment flows and merchant configurations.

Related MCP Servers

Sponsor this space

Reach thousands of developers