About Khalti Mcp
Khalti Mcp is a TypeScript monorepo with MCP servers for Nepal’s Khalti and eSewa payment gateways. It lets Claude initiate and manage payments in conversations, with HMAC-SHA256 signing for eSewa requests.
Key features
- 01Khalti payment gateway integration
- 02eSewa payment gateway integration
- 03HMAC-SHA256 signed eSewa requests
- 04Payment actions in conversations
Use cases
- 01Initiating Khalti payments through Claude
- 02Managing eSewa payments through Claude
MCP support
The two MCP servers expose Khalti and eSewa payment gateway capabilities to MCP clients such as Claude. Credentials are configured in the local environment.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
3Saved tool list · updated 2w ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| amount | integer | Yes | Amount in PAISA (NOT rupees). Minimum 1000 paisa (~10 NPR). Convert from rupees: amount_rupees * 100 |
| return_url | string | Yes | Full URL to redirect to after payment completion. Must be publicly accessible. |
| website_url | string | Yes | Your website URL (used for verification and branding) |
| customer_info | object | No | Optional customer information |
| customer_info.name | string | No | Customer name |
| customer_info.email | string | No | Customer email |
| customer_info.phone | string | No | Customer phone number |
| product_details | array | No | Optional list of products being purchased |
| amount_breakdown | array | No | Optional breakdown of the total amount into line items |
| purchase_order_id | string | Yes | Unique order ID (must be unique across all transactions) |
| purchase_order_name | string | Yes | Human-readable description of the purchase (e.g., 'Order #12345') |
Details
From the project READMEeSewa & Khalti MCP Servers
Nepal's first MCP servers for eSewa and Khalti — the two dominant payment gateways in Nepal (eSewa alone serves 15M+ users). This monorepo lets Claude initiate and manage payments directly in conversation, with HMAC-SHA256 request signing so credentials never leave your own environment.
What is MCP?
The Model Context Protocol (MCP) is an open standard that enables Claude and other AI models to safely interact with tools, APIs, and data sources. MCP servers allow you to extend Claude's capabilities by exposing custom functionality through a standardized interface.
What's Included
This monorepo contains two MCP servers for Nepali payment gateways:
- Khalti MCP Server — Integrate Khalti payment gateway with Claude
- eSewa MCP Server — Integrate eSewa payment gateway with Claude, with HMAC-SHA256 signed requests
Quick Start
Using with Claude Desktop
- Install all packages:
npm install npm run build - Configure in
~/.config/Claude/claude_desktop_config.json:{ "mcpServers": { "khalti-mcp": { "command": "npx", "args": ["-y", "khalti-mcp"], "env": { "KHALTI_SECRET_KEY": "your-khalti-secret-key", "KHALTI_GATEWAY_URL": "https://a.khalti.com/api/v2" } }, "esewa-mcp": { "command": "npx", "args": ["-y", "esewa-mcp"], "env": { "ESEWA_SECRET_KEY": "your-esewa-secret-key", "ESEWA_PRODUCT_CODE": "your-esewa-product-code", "ESEWA_GATEWAY_URL": "https://uat.esewa.com.np/api/epay/main/v2/form" } } } } - Restart Claude Desktop and start using payment tools in conversations.
Using with Claude Code
claude mcp add khalti-mcp -- npx -y khalti-mcp
claude mcp add esewa-mcp -- npx -y esewa-mcp
Development
# Install dependencies
npm install
# Build all packages
npm run build
# Development mode (watch)
npm run dev
Packages
See individual package READMEs for detailed documentation:
License
MIT
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.