Razorpay MCP Server
Set up and use the Razorpay Model Context Protocol (MCP) server to integrate Razorpay APIs with AI tools.
The Razorpay MCP Server implements the
to provide seamless integration between Razorpay payment APIs and AI tools. This server enables AI assistants to execute Razorpay API operations, empowering developers to build AI-powered payment applications.- Workflow Automation: Streamline your payment processing workflows by connecting AI assistants to your Razorpay account.
- Agentic Applications: Build AI-powered tools that can interact with Razorpay's payment ecosystem.
The Razorpay MCP Server provides the following tools for integration:
Refer to the Prerequisites section and then choose a setup method to proceed. You can use
or .Before setting up the Razorpay MCP Server, ensure you have:
- Docker installed on your system
- .
- Git (for cloning the repository)
- Clone the repository:
git clone https://github.com/razorpay/razorpay-mcp-server.gitcd razorpay-mcp-server
- Build the Docker image:
docker build -t razorpay-mcp-server:latest .
The resulting image razorpay-mcp-server:latest
will be available in your local Docker registry.
Follow the integration steps given below:
To use the Razorpay MCP Server with Claude Desktop:
- Install
- Add the following configuration to your
claude_desktop_config.json
:
{"mcpServers": {"razorpay-mcp-server": {"command": "docker","args": ["run","--rm","-i","-e","RAZORPAY_KEY_ID","-e","RAZORPAY_KEY_SECRET","razorpay-mcp-server:latest"],"env": {"RAZORPAY_KEY_ID": "your_razorpay_key_id","RAZORPAY_KEY_SECRET": "your_razorpay_key_secret"}}}}
Watch Out!
Remember to replace your_razorpay_key_id
and your_razorpay_key_secret
with your actual Razorpay API credentials.
Handy Tips
Learn how to
.To integrate the Razorpay MCP Server with VS Code, add the following to your VS Code settings (JSON):
{"mcp": {"inputs": [{"type": "promptString","id": "razorpay_key_id","description": "Razorpay Key ID","password": false},{"type": "promptString","id": "razorpay_key_secret","description": "Razorpay Key Secret","password": true}],"servers": {"razorpay": {"command": "docker","args": ["run","-i","--rm","-e","RAZORPAY_KEY_ID","-e","RAZORPAY_KEY_SECRET","razorpay-mcp-server:latest"],"env": {"RAZORPAY_KEY_ID": "${input:razorpay_key_id}","RAZORPAY_KEY_SECRET": "${input:razorpay_key_secret}"}}}}}
Know more about MCP servers in
.The Razorpay MCP Server requires the following configurations:
RAZORPAY_KEY_ID
mandatory
string
Your Razorpay API key ID.
RAZORPAY_KEY_SECRET
mandatory
string
Your Razorpay API key secret.
LOG_FILE
optional
string
Path to log file for server logs.
TOOLSETS
optional
string
Comma-separated list of toolsets to enable. By default, it is all
.
READ_ONLY
optional
boolean
Run server in read-only mode. By default, it is false
.
The server supports the following command line flags:
--key
or-k
: Your Razorpay API key ID--secret
or-s
: Your Razorpay API key secret--log-file
or-l
: Path to log file--toolsets
or-t
: Comma-separated list of toolsets to enable--read-only
: Run server in read-only mode
Below are some examples of how to use the Razorpay MCP Server with Claude:
When using Claude with the Razorpay MCP Server configured, you can create a Payment Link with a natural language command:
"Create a payment link for ₹500 with the description 'Website Development Services' that expires in 7 days"
Claude will use the payment_link.create
tool to generate the Payment Link and provide you with the details.
Handy Tips
You can use standard Go debugging tools to troubleshoot issues with the server.
To debug the Razorpay MCP Server:
- Enable verbose logging by setting the
LOG_FILE
environment variable or using the--log-file
flag - Check the log files for error messages and troubleshooting information
- For Docker-related issues, use
docker logs
to view container output
The Model Context Protocol (MCP) is a standard that allows AI models to interact with external tools and services. It enables AI assistants like Claude to execute operations on platforms like Razorpay through a standardised interface.
Yes, the Razorpay MCP Server is an official integration designed for production use. Make sure to use appropriate API keys based on your environment (test or live).
Use the corresponding Razorpay API keys for the environment you want to use:
- For test mode, use your test environment API keys.
- For live mode, use your production API keys.
Know more about
.Was this page helpful?