cashfree-mcp — Claude Code MCP server: setup
Connects AI agents to Cashfree APIs for payments, payouts, and SecureID. Use it to work with orders, payment links, payment details, and refunds.
claude mcp add cashfree-mcp -e PAYMENTS_APP_ID=<PAYMENTS_APP_ID> -e PAYMENTS_APP_SECRET=<PAYMENTS_APP_SECRET> -e PAYOUTS_APP_ID=<PAYOUTS_APP_ID> -e PAYOUTS_APP_SECRET=<PAYOUTS_APP_SECRET> -e SECUREID_APP_ID=<SECUREID_APP_ID> -e SECUREID_APP_SECRET=<SECUREID_APP_SECRET> -e TOOLS=<TOOLS> -e ENV=<ENV> -- npx -y @cashfreepayments/cashfree-mcpWhat cashfree-mcp does
cashfree-mcp exposes Cashfree services to AI clients through MCP. Its documented scope covers Payment Gateway, Payouts, and SecureID, with tools for searching developer documentation, creating payment links and orders, reading payment data, and starting refunds.
Choose enabled modules with TOOLS: pg, payouts, or secureid. Set ENV to sandbox or production; ELICITATION_ENABLED can make the server ask for required values that were left out of a request. The npx setup uses Cashfree credentials and requires Node.js v14.x or later.
A public-key path in TWO_FA_PUBLIC_KEY_PEM_PATH is required for Payouts and SecureID when 2FA is enabled. Node.js >=18 can lead to dependency conflicts, and the setup notes recommend moving to >=20.18.1 or changing the package version.
What it helps with
- search Cashfree developer documentation
- create payment links
- place orders through Payment Gateway
- inspect payment and order details
- start a refund
Example prompts for the agent
- Search Cashfree documentation for the required fields to create a payment link.
- Create a Cashfree order for this amount and return its payment session identifier.
- Fetch the payment details for this ID and prepare a refund.
How to install cashfree-mcp
Platform CLI
claude mcp add cashfree-mcp -e PAYMENTS_APP_ID=<PAYMENTS_APP_ID> -e PAYMENTS_APP_SECRET=<PAYMENTS_APP_SECRET> -e PAYOUTS_APP_ID=<PAYOUTS_APP_ID> -e PAYOUTS_APP_SECRET=<PAYOUTS_APP_SECRET> -e SECUREID_APP_ID=<SECUREID_APP_ID> -e SECUREID_APP_SECRET=<SECUREID_APP_SECRET> -e TOOLS=<TOOLS> -e ENV=<ENV> -- npx -y @cashfreepayments/cashfree-mcpReplace <…> with your own values. 4 more environment variables are in the server README
Platform CLI
codex mcp add cashfree-mcp --env PAYMENTS_APP_ID=<PAYMENTS_APP_ID> --env PAYMENTS_APP_SECRET=<PAYMENTS_APP_SECRET> --env PAYOUTS_APP_ID=<PAYOUTS_APP_ID> --env PAYOUTS_APP_SECRET=<PAYOUTS_APP_SECRET> --env TWO_FA_PUBLIC_KEY_PEM_PATH=<TWO_FA_PUBLIC_KEY_PEM_PATH> -- npx -y @cashfreepayments/cashfree-mcpReplace <…> with your own values. 4 more environment variables are in the server README
Config file
{
"mcpServers": {
"cashfree-mcp": {
"command": "npx",
"args": [
"-y",
"@cashfreepayments/cashfree-mcp"
],
"env": {
"PAYMENTS_APP_ID": "<PAYMENTS_APP_ID>",
"PAYMENTS_APP_SECRET": "<PAYMENTS_APP_SECRET>",
"PAYOUTS_APP_ID": "<PAYOUTS_APP_ID>",
"PAYOUTS_APP_SECRET": "<PAYOUTS_APP_SECRET>",
"TWO_FA_PUBLIC_KEY_PEM_PATH": "<TWO_FA_PUBLIC_KEY_PEM_PATH>"
}
}
}
}Replace <…> with your own values. 4 more environment variables are in the server README
Config file
{
"servers": {
"cashfree-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@cashfreepayments/cashfree-mcp"
],
"env": {
"PAYMENTS_APP_ID": "<PAYMENTS_APP_ID>",
"PAYMENTS_APP_SECRET": "<PAYMENTS_APP_SECRET>",
"PAYOUTS_APP_ID": "<PAYOUTS_APP_ID>",
"PAYOUTS_APP_SECRET": "<PAYOUTS_APP_SECRET>",
"TWO_FA_PUBLIC_KEY_PEM_PATH": "<TWO_FA_PUBLIC_KEY_PEM_PATH>"
}
}
}
}Replace <…> with your own values. 4 more environment variables are in the server README
Platform CLI
gemini mcp add -e PAYMENTS_APP_ID=<PAYMENTS_APP_ID> -e PAYMENTS_APP_SECRET=<PAYMENTS_APP_SECRET> -e PAYOUTS_APP_ID=<PAYOUTS_APP_ID> -e PAYOUTS_APP_SECRET=<PAYOUTS_APP_SECRET> -e TWO_FA_PUBLIC_KEY_PEM_PATH=<TWO_FA_PUBLIC_KEY_PEM_PATH> cashfree-mcp npx -y @cashfreepayments/cashfree-mcpReplace <…> with your own values. 4 more environment variables are in the server README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about cashfree-mcp
How do I install cashfree-mcp in Claude Code?
Run: `claude mcp add cashfree-mcp -e PAYMENTS_APP_ID=<PAYMENTS_APP_ID> -e PAYMENTS_APP_SECRET=<PAYMENTS_APP_SECRET> -e PAYOUTS_APP_ID=<PAYOUTS_APP_ID> -e PAYOUTS_APP_SECRET=<PAYOUTS_APP_SECRET> -e SECUREID_APP_ID=<SECUREID_APP_ID> -e SECUREID_APP_SECRET=<SECUREID_APP_SECRET> -e TOOLS=<TOOLS> -e ENV=<ENV> -- npx -y @cashfreepayments/cashfree-mcp`
What does cashfree-mcp do?
It connects an AI client to Cashfree through MCP and exposes operations for Payment Gateway, Payouts, and SecureID.
When is TWO_FA_PUBLIC_KEY_PEM_PATH needed?
Payouts and SecureID use this public-key path when 2FA is enabled.