midtrans-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MIDTRANS_READ_ONLY | No | Set to `true` to expose only `get_transaction_status`. Create/cancel/refund tools are not registered at all. Default is `false`. | false |
| MIDTRANS_SERVER_KEY | Yes | Your Midtrans Server Key. Required. Sandbox keys start with `SB-`. | |
| MIDTRANS_IS_PRODUCTION | No | Set to `true` to hit the production API. Anything else means Sandbox. Default is `false`. | false |
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 |
|---|---|
| get_transaction_statusA | Check the current status of a Midtrans transaction by its order_id. Returns the full status object from Midtrans (transaction_status, fraud_status, payment_type, gross_amount, status_code, and more). Read-only. |
| create_snap_transactionB | Create a Midtrans Snap transaction and get back a token and redirect_url for the Snap payment page. gross_amount is in IDR (integer). |
| create_payment_linkA | Create a reusable Midtrans Payment Link and return its URL. The customer opens the URL to pay. Amount is in IDR (integer). |
| cancel_transactionA | Cancel a Midtrans transaction by order_id. Only works for transactions that can still be cancelled (e.g. pending payments). This changes real state in the merchant account — use deliberately. |
| refund_transactionA | Refund a settled Midtrans transaction by order_id. Omit amount for a full refund. This moves real money back to the customer — use deliberately. |
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
Four tools map cleanly to distinct lifecycle actions (get status, cancel, refund) keyed by order_id, leaving little ambiguity. The one risk is between create_snap_transaction and create_payment_link, which both create a payable resource and return a URL/token, though the descriptions distinguish a one-time Snap token from a reusable link.
Names are all snake_case verb_first patterns (get_, create_, cancel_, refund_) with the resource qualifier, so the pattern is predictable. Minor deviation: get_transaction_status is verb_noun_noun while the creates embed the provider name (snap/payment) rather than the resource, but this remains readable.
Five tools is tightly scoped and each one maps to a real payment operation with no filler. It is slightly thin for a payment-gateway surface but proportionate to a focused Midtrans integration.
Core create/status/cancel/refund flows are covered, but there are notable gaps: no expire_transaction for pending payments, no capture/approve for card pre-authorization, and no transaction listing or payment-link lookup. Agents can work around some of this (cancel instead of expire), but the surface is not full lifecycle coverage.