Back to Browse

Razorpay MCP Server

Developer ToolsUse Caution4.8MCP RegistryLocal
Free

Server data from the Official MCP Registry

MCP server for Razorpay API.

About

MCP server for Razorpay API.

Security Report

4.8
Use Caution4.8High Risk

This is a well-structured MCP server with solid security fundamentals. Authentication is properly implemented via environment variables (no hardcoded credentials), all operations are read-only, and input validation is enforced throughout. Permissions align appropriately with the server's purpose as a Razorpay payment data integration tool. Minor code quality improvements around error handling could be made, but no significant security vulnerabilities were identified. Supply chain analysis found 9 known vulnerabilities in dependencies (1 critical, 2 high severity). Package verification found 1 issue.

7 files analyzed · 14 issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

env_vars

Check that this permission is expected for this type of plugin.

HTTP Network Access

Connects to external APIs or services over the internet.

What You'll Need

Set these up before or after installing:

Your Razorpay Key ID from dashboard.razorpay.com/app/keysOptional

Environment variable: RAZORPAY_KEY_ID

Your Razorpay Key Secret from dashboard.razorpay.com/app/keysRequired

Environment variable: RAZORPAY_KEY_SECRET

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "io-github-indiamcp-razorpay": {
      "env": {
        "RAZORPAY_KEY_ID": "your-razorpay-key-id-here",
        "RAZORPAY_KEY_SECRET": "your-razorpay-key-secret-here"
      },
      "args": [
        "-y",
        "@indiamcp/razorpay-mcp"
      ],
      "command": "npx"
    }
  }
}

Documentation

View on GitHub

From the project's GitHub README.

razorpay-mcp

An MCP (Model Context Protocol) server that connects AI assistants like Claude directly to your Razorpay account. Once configured, you can ask your AI to fetch payments, analyze revenue trends, inspect failed transactions, monitor subscriptions, and get a real-time business dashboard — all in natural language, with no code required.

Quick Start

# Clone
git clone https://github.com/indiamcp/razorpay-mcp

# Install
cd razorpay-mcp
npm install

# Configure
cp .env.example .env
# Add your Razorpay API keys to .env

# Build
npm run build

# Run
npm start

Claude Desktop Setup

Add this to your claude_desktop_config.json (usually at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%\Claude\claude_desktop_config.json on Windows):

{
  "mcpServers": {
    "razorpay": {
      "command": "node",
      "args": ["/path/to/razorpay-mcp/dist/index.js"],
      "env": {
        "RAZORPAY_KEY_ID": "rzp_test_xxxxxxxxxxxx",
        "RAZORPAY_KEY_SECRET": "your_secret_here"
      }
    }
  }
}

Or use npx (once published):

{
  "mcpServers": {
    "razorpay": {
      "command": "npx",
      "args": ["-y", "@indiamcp/razorpay-mcp"],
      "env": {
        "RAZORPAY_KEY_ID": "rzp_test_xxxxxxxxxxxx",
        "RAZORPAY_KEY_SECRET": "your_secret_here"
      }
    }
  }
}

Available Tools

ToolDescriptionKey Parameters
get_paymentFetch a specific payment by IDpayment_id
list_paymentsList payments with filtersfrom, to, count, status
get_payment_analyticsRevenue, success rate, method breakdownfrom, to
get_orderFetch a specific order by IDorder_id
list_ordersList orders with filtersfrom, to, count, status, receipt
get_customerFetch a specific customer by IDcustomer_id
list_customersList customerscount, skip
get_subscriptionFetch a specific subscription by IDsubscription_id
list_subscriptionsList subscriptions with filtersfrom, to, count, status
get_subscription_analyticsActive count, churn rate, upcoming renewalsfrom, to
get_refundFetch a specific refundpayment_id, refund_id
list_refundsList refunds for a paymentpayment_id, count
get_dashboard_summaryBusiness health check — revenue today/week/month(none)
get_failed_payment_analysisFailure reasons, by method and bankfrom, to

Example Prompts

Once connected, try asking Claude:

  • "Show me all failed payments in the last 7 days and why they failed"
  • "What's my total revenue this month?"
  • "List all active subscriptions"
  • "Which payment method do my customers prefer?"
  • "Show me customers who signed up this week"
  • "What's my subscription churn rate this month?"
  • "Find payment pay_xxxxx"
  • "How many refunds are pending?"
  • "Give me a dashboard summary of my business today"
  • "Analyze payment failures for the last 30 days"

Security Note

  • Environment variables only — API keys are read from env vars and never hardcoded or logged
  • Read-only in v1 — this server only fetches data; it cannot create payments, issue refunds, or modify any records
  • No data storage — payment data is never persisted or cached by this server
  • Use test keys during development — Razorpay test keys (rzp_test_*) are safe and make no real charges

Development

# Run in dev mode (no build needed)
npm run dev

# Type check
npm run lint

# Run tests
npm test

Part of IndiaMCP

This server is part of IndiaMCP — a suite of open-source MCP servers for the Indian API stack.

github.com/indiamcp

Reviews

No reviews yet

Be the first to review this server!