Cashfree MCP server

Integrates with Cashfree's payment processing APIs to enable creating payment links, managing orders, processing refunds, initiating transfers, and verifying identity information
Back to servers
Setup instructions
Provider
Cashfree
Release date
May 17, 2025
Language
JavaScript
Stats
12 stars

Cashfree MCP server enables AI tools and agents to integrate with Cashfree APIs (Payment Gateway, Payouts, and SecureID) using the Model Context Protocol (MCP). This server acts as a bridge between your AI applications and Cashfree's financial services infrastructure.

Installation

Prerequisites

Before installing, ensure you have Node.js v14.x or higher installed on your system:

node -v
# Should output v14.x or higher

Getting Started

Clone the repository and install dependencies:

git clone https://github.com/cashfree/cashfree-mcp.git
cd cashfree-mcp
npm install

Build the project:

npm run build

This compiles the source files to the dist/ directory, which is required to run the MCP server.

Configuration

You'll need a Cashfree account with API credentials to use the MCP server. Both sandbox and production environments are supported.

Environment Variables

Configure the following environment variables:

Payment Gateway:

  • PAYMENTS_APP_ID: Your Payment Gateway client ID
  • PAYMENTS_APP_SECRET: Your Payment Gateway client secret

Payouts:

  • PAYOUTS_APP_ID: Your Payouts client ID
  • PAYOUTS_APP_SECRET: Your Payouts client secret
  • TWO_FA_PUBLIC_KEY_PEM_PATH: Path to your 2FA public key (required only if 2FA is enabled)

SecureID:

  • SECUREID_APP_ID: Your SecureID client ID
  • SECUREID_APP_SECRET: Your SecureID client secret

General Configuration:

  • ENV: Set to production for production environment, sandbox for sandbox (default: sandbox)
  • TOOLS: Comma-separated list of modules to enable (pg,payouts,secureid)
  • ELICITATION_ENABLED: Set to true to enable interactive parameter elicitation (default: false)

Client Configuration Examples

Claude

Add this configuration to your claude_desktop_config.json:

{
  "mcpServers": {
    "cashfree": {
      "command": "node",
      "args": ["/path/to/cashfree-mcp/dist/index.js"],
      "env": {
        "PAYMENTS_APP_ID": "YOUR_PG_CLIENT_ID",
        "PAYMENTS_APP_SECRET": "YOUR_PG_CLIENT_SECRET",
        "PAYOUTS_APP_ID": "YOUR_PAYOUTS_CLIENT_ID",
        "PAYOUTS_APP_SECRET": "YOUR_PAYOUTS_CLIENT_SECRET",
        "TWO_FA_PUBLIC_KEY_PEM_PATH": "/path/to/public_key.pem",
        "SECUREID_APP_ID": "YOUR_SECUREID_CLIENT_ID",
        "SECUREID_APP_SECRET": "YOUR_SECUREID_CLIENT_SECRET",
        "TOOLS": "pg,payouts,secureid",
        "ENV": "sandbox",
        "ELICITATION_ENABLED": "true"
      }
    }
  }
}

VS Code

Add this configuration to your VS Code settings:

{
  "mcp": {
    "inputs": [],
    "servers": {
      "cashfree": {
        "command": "node",
        "args": ["/path/to/cashfree-mcp/dist/index.js"],
        "env": {
          "PAYMENTS_APP_ID": "YOUR_PG_CLIENT_ID",
          "PAYMENTS_APP_SECRET": "YOUR_PG_CLIENT_SECRET",
          "PAYOUTS_APP_ID": "YOUR_PAYOUTS_CLIENT_ID",
          "PAYOUTS_APP_SECRET": "YOUR_PAYOUTS_CLIENT_SECRET",
          "TWO_FA_PUBLIC_KEY_PEM_PATH": "/path/to/public_key.pem",
          "SECUREID_APP_ID": "YOUR_SECUREID_CLIENT_ID",
          "SECUREID_APP_SECRET": "YOUR_SECUREID_CLIENT_SECRET",
          "TOOLS": "pg,payouts,secureid",
          "ENV": "sandbox",
          "ELICITATION_ENABLED": "true"
        }
      }
    }
  }
}

Available Tools

Payment Gateway (PG) Tools

  • search: Search across the Cashfree Payments Developer Documentation
  • create-payment-link: Create a new payment link
  • fetch-payment-link-details: View all details and status of a payment link
  • cancel-payment-link: Cancel an active payment link
  • get-orders-for-a-payment-link: View all order details for a payment link
  • create-order: Create orders to get a payment_sessions_id for transactions
  • get-order: Fetch order details using order_id
  • get-order-extended: Get extended order data
  • get-eligible-payment-methods: Get eligible payment methods for an order
  • get-payments-for-an-order: View all payment details for an order
  • get-payment-by-id: View payment details for a Payment ID
  • create-refund: Initiate refunds
  • get-all-refunds-for-an-order: Fetch all refunds for an order
  • get-refund: Fetch a specific refund
  • get-all-settlements: Get settlement details
  • get-settlements-by-order-id: View settlements of a particular order
  • get-disputes-by-order-id: Get dispute details by Order ID
  • get-disputes-by-payment-id: Get dispute details by Payment ID
  • get-disputes-by-dispute-id: Get dispute details by Dispute ID
  • accept-dispute-by-dispute-id: Accept a dispute
  • submit-evidence-to-contest-the-dispute-by-dispute-id: Contest a dispute
  • simulate-payment: Simulate payment for testing
  • fetch-simulation: Fetch simulated payment details

Payouts Tools

  • standard-transfer-v2: Initiate an amount transfer
  • get-transfer-status-v2: Get transfer status
  • batch-transfer-v2: Initiate a batch transfer request
  • get-batch-transfer-status-v2: Get batch transfer status
  • authorize: Authenticate with the Cashfree system
  • create-cashgram: Create a Cashgram
  • deactivate-cashgram: Deactivate a Cashgram
  • get-cashgram-status: Get Cashgram status

SecureID Tools

  • verify-name-match: Verify names with variations
  • generate-kyc-link: Generate a verification form for KYC
  • get-kyc-link-status: Get KYC verification form status
  • generate-static-kyc-link: Generate a static KYC link
  • deactivate-static-kyc-link: Deactivate a static KYC link

For detailed API documentation, visit the Cashfree API Documentation.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "cashfree" '{"command":"node","args":["/path/to/cashfree-mcp/src/index.js"],"env":{"PAYMENTS_APP_ID":"YOUR_PG_CLIENT_ID","PAYMENTS_APP_SECRET":"YOUR_PG_CLIENT_SECRET","PAYOUTS_APP_ID":"YOUR_PAYOUTS_CLIENT_ID","PAYOUTS_APP_SECRET":"YOUR_PAYOUTS_CLIENT_SECRET","TWO_FA_PUBLIC_KEY_PEM_PATH":"/path/to/public_key.pem","SECUREID_APP_ID":"YOUR_SECUREID_CLIENT_ID","SECUREID_APP_SECRET":"YOUR_SECUREID_CLIENT_SECRET","TOOLS":"pg,payouts,secureid","ENV":"sandbox"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cashfree": {
            "command": "node",
            "args": [
                "/path/to/cashfree-mcp/src/index.js"
            ],
            "env": {
                "PAYMENTS_APP_ID": "YOUR_PG_CLIENT_ID",
                "PAYMENTS_APP_SECRET": "YOUR_PG_CLIENT_SECRET",
                "PAYOUTS_APP_ID": "YOUR_PAYOUTS_CLIENT_ID",
                "PAYOUTS_APP_SECRET": "YOUR_PAYOUTS_CLIENT_SECRET",
                "TWO_FA_PUBLIC_KEY_PEM_PATH": "/path/to/public_key.pem",
                "SECUREID_APP_ID": "YOUR_SECUREID_CLIENT_ID",
                "SECUREID_APP_SECRET": "YOUR_SECUREID_CLIENT_SECRET",
                "TOOLS": "pg,payouts,secureid",
                "ENV": "sandbox"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "cashfree": {
            "command": "node",
            "args": [
                "/path/to/cashfree-mcp/src/index.js"
            ],
            "env": {
                "PAYMENTS_APP_ID": "YOUR_PG_CLIENT_ID",
                "PAYMENTS_APP_SECRET": "YOUR_PG_CLIENT_SECRET",
                "PAYOUTS_APP_ID": "YOUR_PAYOUTS_CLIENT_ID",
                "PAYOUTS_APP_SECRET": "YOUR_PAYOUTS_CLIENT_SECRET",
                "TWO_FA_PUBLIC_KEY_PEM_PATH": "/path/to/public_key.pem",
                "SECUREID_APP_ID": "YOUR_SECUREID_CLIENT_ID",
                "SECUREID_APP_SECRET": "YOUR_SECUREID_CLIENT_SECRET",
                "TOOLS": "pg,payouts,secureid",
                "ENV": "sandbox"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later