PayHere MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PAYHERE_MODE | Yes | sandbox or live | |
| PAYHERE_APP_ID | Yes | From Settings → Business Apps | |
| PAYHERE_APP_SECRET | Yes | App secret paired with PAYHERE_APP_ID | |
| PAYHERE_MERCHANT_ID | Yes | From PayHere dashboard → Settings → Integrations | |
| PAYHERE_MERCHANT_SECRET | Yes | Domain-specific secret |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| create_checkout_payloadA | Generates the form data needed to POST a checkout request to PayHere, including the MD5 hash. Returns action URL, form fields, and an HTML snippet. |
| get_paymentA | Returns all payment attempts (success, refunded, chargedback) associated with the given order_id. PayHere does not support listing by date range or status — only by order_id. |
| issue_refundA | Refunds a payment by payment_id. Omit |
| generate_signatureA | Computes a PayHere MD5 hash for either checkout submission (mode='checkout') or notify URL validation (mode='notify'). For notify mode, pass |
| verify_credentialsA | Health check that confirms env vars are loaded and (once implemented) that the App credentials can fetch an OAuth token. Useful first call when setting up an integration. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 5 tools
Each tool serves a distinct purpose: creating checkout payloads, generating signatures, retrieving payments by order ID, issuing refunds, and verifying credentials. No overlapping responsibilities.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., create_checkout_payload, issue_refund), making the API predictable and easy to navigate.
With 5 tools covering checkout creation, signature generation, payment retrieval, refunds, and credential verification, the number is well-scoped for a payment gateway integration without unnecessary clutter.
Covers essential payment operations: creating checkouts, refunding, retrieving payment status by order ID, and signature validation. Missing list payments endpoint aligns with PayHere's API limitations, but a tool for direct payment retrieval by payment_id would enhance completeness.