khalti-mcp
v1.0.1
Published
MCP server for Khalti payment gateway (Nepal)
Maintainers
Readme
Khalti MCP Server
MCP server for integrating Khalti payment gateway with Claude.
Overview
This MCP server enables Claude to interact with the Khalti payment gateway, one of Nepal's leading digital payment platforms. It provides tools to initiate payments, verify payment status, and look up transaction details.
What It Does
The Khalti MCP server exposes three tools:
- khalti_initiate_payment - Initiate a new payment request with Khalti
- khalti_lookup_payment - Look up the status of a payment by its pidx
- khalti_verify_payment - Verify if a payment was completed successfully
Installation
Using npx (Recommended)
npx -y khalti-mcpManual Installation
npm install khalti-mcpConfiguration
Claude Desktop
Add to your ~/.config/Claude/claude_desktop_config.json:
{
"mcpServers": {
"khalti-mcp": {
"command": "npx",
"args": ["-y", "khalti-mcp"],
"env": {
"KHALTI_SECRET_KEY": "your-khalti-secret-key",
"KHALTI_ENVIRONMENT": "sandbox"
}
}
}
}Claude Code
claude mcp add khalti-mcp -- npx -y khalti-mcpEnvironment Variables
| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| KHALTI_SECRET_KEY | Yes | - | Your Khalti merchant secret key |
| KHALTI_ENVIRONMENT | No | sandbox | sandbox or production |
Usage Examples
Try these prompts with Claude:
Initiate a payment:
"Initiate a Khalti payment of NPR 500 for order #12345"
Look up payment status:
"Look up the status of Khalti payment with pidx abc123"
Verify payment completion:
"Verify if Khalti payment abc123 was completed successfully"
Important Notes
- Amounts are in PAISA (1 NPR = 100 paisa). Minimum 1000 paisa (NPR 10).
- Always verify payments server-side before fulfilling orders.
- The sandbox environment is used by default for testing.
License
MIT
