esewa-mcp
v1.0.1
Published
MCP server for eSewa payment gateway (Nepal)
Maintainers
Readme
eSewa MCP Server
MCP server for integrating eSewa payment gateway with Claude.
Overview
This MCP server enables Claude to interact with the eSewa payment gateway, Nepal's largest digital wallet and payment service. It provides tools to initiate payments, verify payment completion, and check transaction status.
What It Does
The eSewa MCP server exposes three tools:
- esewa_initiate_payment - Generate a signed payment form for eSewa transactions
- esewa_verify_payment - Verify if an eSewa payment was completed successfully
- esewa_get_transaction_status - Check the status of an eSewa transaction
Installation
Using npx (Recommended)
npx -y esewa-mcpManual Installation
npm install esewa-mcpConfiguration
Claude Desktop
Add to your ~/.config/Claude/claude_desktop_config.json:
{
"mcpServers": {
"esewa-mcp": {
"command": "npx",
"args": ["-y", "esewa-mcp"],
"env": {
"ESEWA_SECRET_KEY": "your-esewa-secret-key",
"ESEWA_PRODUCT_CODE": "your-esewa-product-code",
"ESEWA_ENVIRONMENT": "sandbox"
}
}
}
}Claude Code
claude mcp add esewa-mcp -- npx -y esewa-mcpEnvironment Variables
| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| ESEWA_SECRET_KEY | Yes | - | Your eSewa merchant secret key |
| ESEWA_PRODUCT_CODE | Yes | - | Your eSewa product code |
| ESEWA_ENVIRONMENT | No | sandbox | sandbox or production |
Usage Examples
Try these prompts with Claude:
Generate payment form:
"Generate an eSewa payment form for NPR 1500 with transaction ID order-001"
Verify payment:
"Verify the eSewa payment with UUID txn-abc-123 for amount 2000"
Check transaction status:
"Check the status of eSewa transaction txn-abc-123"
Important Notes
- eSewa uses a form-based redirect model. The
esewa_initiate_paymenttool returns a signed payload (not a URL) that must be embedded in an HTML form. - Amounts are in NPR (Nepalese Rupees).
- Always validate transactions on the server side using the verification tool.
License
MIT
