MCP server for Razorpay API.
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.
# 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
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"
}
}
}
}
| Tool | Description | Key Parameters |
|---|---|---|
get_payment | Fetch a specific payment by ID | payment_id |
list_payments | List payments with filters | from, to, count, status |
get_payment_analytics | Revenue, success rate, method breakdown | from, to |
get_order | Fetch a specific order by ID | order_id |
list_orders | List orders with filters | from, to, count, status, receipt |
get_customer | Fetch a specific customer by ID | customer_id |
list_customers | List customers | count, skip |
get_subscription | Fetch a specific subscription by ID | subscription_id |
list_subscriptions | List subscriptions with filters | from, to, count, status |
get_subscription_analytics | Active count, churn rate, upcoming renewals | from, to |
get_refund | Fetch a specific refund | payment_id, refund_id |
list_refunds | List refunds for a payment | payment_id, count |
get_dashboard_summary | Business health check — revenue today/week/month | (none) |
get_failed_payment_analysis | Failure reasons, by method and bank | from, to |
Once connected, try asking Claude:
rzp_test_*) are safe and make no real charges# Run in dev mode (no build needed)
npm run dev
# Type check
npm run lint
# Run tests
npm test
This server is part of IndiaMCP — a suite of open-source MCP servers for the Indian API stack.
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
npx -y @indiamcp/razorpay-mcpMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-indiamcp-razorpay": {
"command": "npx",
"args": [
"-y",
"@indiamcp/razorpay-mcp"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup reference@indiamcp/razorpay-mcpnpmio.github.indiamcp/razorpay works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.