Skip to content
MCP server
Registry

midtrans-mcp MCP Server

MCP server for Midtrans (Indonesian payment gateway): status, Snap, payment links, cancel, refund.

midtrans-mcp scores 66 (Good), licensed MIT and written in TypeScript. It installs as a local process. It declares 5 tools. Filed under Finance. GitHub shows 0 stars. Package registries report about 468 downloads a week. Install configs are generated for 10 clients. Being listed in the registry is not the same as being vendor-official.

by ryoangriawan96MITTypeScript0 stars
Trust score
66Good
Trust score 66 of 100, Good

Good trust

66 of 100 from six public signals. Nobody can buy a point.

  • Listed in the official MCP registry.
  • OSI-style license: mit.
How we score trust
Scorecard

License, quality and maintenance

How grades work
Trust breakdown

Where the 66 comes from

22 + 20 + 0 + 10 + 4 + 10 = 66. Each factor is capped, so no single signal can carry a listing.

Registry22 / 30

Active in the official MCP registry, plus a known vendor namespace.

Registry: 22 of 30 points.
Maintenance20 / 20

How recently the repository saw a commit or release.

Maintenance: 20 of 20 points.
Popularity0 / 20

GitHub stars and weekly downloads, on a log scale.

Popularity: 0 of 20 points.
License10 / 10

A clear, OSI-style open-source license.

License: 10 of 10 points.
Security4 / 10

Not archived, a secure install path, a pinned version.

Security: 4 of 10 points.
Docs10 / 10

A real summary, a README with depth, listed tools.

Docs: 10 of 10 points.

Install

Pick your client, copy the config, paste it in.

Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.

~/Library/Application Support/Claude/claude_desktop_config.json
{  "mcpServers": {    "ryoangriawan96-midtrans-mcp": {      "command": "npx",      "args": [        "-y",        "midtrans-mcp@0.1.1"      ],      "env": {        "MIDTRANS_SERVER_KEY": "YOUR_MIDTRANS_SERVER_KEY",        "MIDTRANS_IS_PRODUCTION": "",        "MIDTRANS_READ_ONLY": ""      }    }  }}

Environment variables

NameRequiredNotes
MIDTRANS_SERVER_KEYSecretRequiredYour Midtrans Server Key (use a Sandbox key for testing).
MIDTRANS_IS_PRODUCTIONOptionalSet to true for the production API; anything else means Sandbox.
MIDTRANS_READ_ONLYOptionalSet to true to expose only the read-only transaction-status tool.

Tools5Tool docs quality grade D

All capabilities

About

midtrans-mcp

midtrans-mcp MCP server

An MCP server for Midtrans, Indonesia's payment gateway. Let your AI coding client or assistant check transactions, create Snap checkouts and payment links, cancel, and refund — without leaving your editor.

Unofficial community project. Not affiliated with Midtrans / GoTo Financial. Midtrans has no official MCP server; this fills the gap.

Tools

ToolWhat it doesChanges state
get_transaction_statusFull status of a transaction by order_idNo
create_snap_transactionCreate a Snap transaction, returns token + redirect_urlYes
create_payment_linkCreate a Payment Link and return its URLYes
cancel_transactionCancel a cancellable transactionYes
refund_transactionRefund a settled transaction (full or partial)Yes — moves money

Quick start

You need a Midtrans Server Key (dashboard → Settings → Access Keys). Start with a Sandbox key while testing.

Claude Code

claude mcp add midtrans \
  -e MIDTRANS_SERVER_KEY=SB-Mid-server-xxxxxxxx \
  -- npx -y midtrans-mcp

Cursor / other MCP clients (mcp.json)

{
  "mcpServers": {
    "midtrans": {
      "command": "npx",
      "args": ["-y", "midtrans-mcp"],
      "env": {
        "MIDTRANS_SERVER_KEY": "SB-Mid-server-xxxxxxxx"
      }
    }
  }
}

Run from source

git clone https://github.com/ryoangriawan96/midtrans-mcp.git
cd midtrans-mcp
npm install
npm run build
MIDTRANS_SERVER_KEY=SB-Mid-server-xxxxxxxx node dist/index.js

Configuration

VariableRequiredDefaultMeaning
MIDTRANS_SERVER_KEYYes—Your Midtrans Server Key. Sandbox keys start with SB-.
MIDTRANS_IS_PRODUCTIONNofalseSet to true to hit the production API. Anything else means Sandbox.
MIDTRANS_READ_ONLYNofalseSet to true to expose only get_transaction_status. Create/cancel/refund tools are not registered at all. Recommended whenever the assistant only needs to look things up — and strongly recommended with a production key.

Example prompts

  • “Check the status of order ORDER-123.”
  • “Create a Snap transaction for order ORDER-124, Rp150.000, GoPay and BCA VA only.”
  • “Make a payment link titled ‘Kelas Online — November’ for Rp299.000, valid 3 days.”
  • “Refund order ORDER-100 in full, reason: customer cancelled.”

Security

  • The Server Key is read only from the environment and is sent only to Midtrans over HTTPS. It is never logged, and error messages never contain the key or request headers.
  • Read-only mode: set MIDTRANS_READ_ONLY=true and only the status-check tool exists — the AI physically cannot create, cancel, or refund anything.
  • Refund and cancel are separate, explicit tools. Nothing calls them implicitly, and your MCP client will ask for approval before running them if you keep tool approvals on (recommended for production keys).
  • All inputs are validated before any request is made: order_id is limited to Midtrans's character set and length, IDR amounts must be positive integers under a sane ceiling, and free-text fields are length-capped.
  • Every API call has a 30-second timeout, redirects are refused, and responses are size-capped before being handed to the model.
  • Use a Sandbox key while developing. Treat a production Server Key like a password: anyone holding it can refund your customers.

Development

npm install
npm run build   # type-check + compile to dist/
npm test        # smoke test: starts the server, lists tools, checks auth header

License

MIT © Ryo Angriawan

Frequently asked questions

What is midtrans-mcp MCP Server?

MCP server for Midtrans (Indonesian payment gateway): status, Snap, payment links, cancel, refund.

How do I install midtrans-mcp MCP Server in Claude Desktop, Cursor, or VS Code?

Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. midtrans-mcp MCP Server runs locally from the npm package midtrans-mcp with the command npx -y midtrans-mcp@0.1.1.

Is midtrans-mcp MCP Server free and open source?

Yes. midtrans-mcp MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.

Does midtrans-mcp MCP Server support remote (HTTP) connections?

No remote endpoint is listed for midtrans-mcp MCP Server. It runs locally on your machine over stdio, started by your MCP client.

What tools does midtrans-mcp MCP Server provide?

midtrans-mcp MCP Server provides 5 tools, including cancel_transaction, create_payment_link, create_snap_transaction, and get_transaction_status. See the full tool list for descriptions and parameters.

How is midtrans-mcp MCP Server's trust score calculated?

midtrans-mcp MCP Server scores 66 out of 100 (Good). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.

Reviews

No reviews yet

—Be the first to review

5 star0 reviews at 5 stars
4 star0 reviews at 4 stars
3 star0 reviews at 3 stars
2 star0 reviews at 2 stars
1 star0 reviews at 1 stars

No published reviews yet. Used it? Tell the next person how it went.

Add badge to your README

Paste either snippet into the repository README. The image links to this listing.

Listed on MCPpedia

Top 5 MCP servers

Daily or weekly. Confirm by email, unsubscribe any time.

How often

Manage this listing

Claim this server