Skip to main content
Glama
rissets

MCP Midtrans Documentation Server

by rissets

šŸ¦ MCP Midtrans Documentation Server

A comprehensive Model Context Protocol (MCP) server that gives AI agents complete knowledge of the Midtrans payment gateway — APIs, payment methods, integration guides, code examples, and best practices.


Table of Contents


Related MCP server: Bootpay Developer Docs MCP Server

Overview

MCP Midtrans is an MCP server that embeds the entire Midtrans payment gateway documentation as structured, searchable tools. When connected to an AI agent (Copilot, Claude, Cursor, etc.), the agent can:

  • Look up any Midtrans API endpoint, request format, or response schema

  • Get complete integration code for 15+ payment methods in 5 programming languages (Python, Django, Node.js, Go, PHP)

  • Generate ready-to-use charge request JSON for any payment type

  • Get webhook/notification handler code with signature verification

  • Search across all documentation to find exactly what's needed

No API keys required — this server provides documentation only; it does not call the Midtrans API.


Architecture

%%{init: {'theme': 'dark', 'themeVariables': {'primaryColor': '#1a1a2e', 'primaryTextColor': '#e0e0e0', 'primaryBorderColor': '#6c63ff', 'lineColor': '#6c63ff', 'secondaryColor': '#16213e', 'tertiaryColor': '#0f3460', 'fontSize': '14px'}}}%%
graph TB
    subgraph CLIENT["šŸ–„ļø AI Client"]
        style CLIENT fill:#1a1a2e,stroke:#6c63ff,stroke-width:2px,color:#e0e0e0
        VSCODE["VS Code + Copilot"]
        CLAUDE_CODE["Claude Code"]
        CLAUDE_DESKTOP["Claude Desktop"]
        CURSOR["Cursor"]
    end

    subgraph MCP_SERVER["⚔ MCP Midtrans Server"]
        style MCP_SERVER fill:#0f3460,stroke:#6c63ff,stroke-width:2px,color:#e0e0e0
        FASTMCP["FastMCP Runtime<br/>(stdio transport)"]

        subgraph TOOLS["šŸ”§ MCP Tools (10)"]
            style TOOLS fill:#16213e,stroke:#00d2ff,stroke-width:1px,color:#e0e0e0
            T1["get_documentation_map"]
            T2["get_documentation"]
            T3["get_payment_method_guide"]
            T4["get_json_object_schema"]
            T5["get_status_codes"]
            T6["get_code_example"]
            T7["search_documentation"]
            T8["get_charge_example"]
            T9["get_notification_handler"]
            T10["get_snap_integration"]
        end

        subgraph KB["šŸ“š Knowledge Base"]
            style KB fill:#16213e,stroke:#ff6b6b,stroke-width:1px,color:#e0e0e0
            D1["API Reference"]
            D2["Payment Methods 15+"]
            D3["Code Examples 5 langs"]
            D4["JSON Schemas 14"]
            D5["Webhook Guides"]
            D6["Status Codes"]
        end
    end

    VSCODE -->|"stdio"| FASTMCP
    CLAUDE_CODE -->|"stdio"| FASTMCP
    CLAUDE_DESKTOP -->|"stdio"| FASTMCP
    CURSOR -->|"stdio"| FASTMCP
    FASTMCP --> TOOLS
    TOOLS --> KB

How It Works

%%{init: {'theme': 'dark', 'themeVariables': {'primaryColor': '#1a1a2e', 'primaryTextColor': '#e0e0e0', 'primaryBorderColor': '#6c63ff', 'lineColor': '#00d2ff', 'secondaryColor': '#16213e', 'tertiaryColor': '#0f3460', 'fontSize': '14px'}}}%%
sequenceDiagram
    box rgb(26,26,46) AI Client
        participant User
        participant Agent as AI Agent
    end
    box rgb(15,52,96) MCP Server
        participant MCP as FastMCP Server
        participant Tool as MCP Tool
        participant KB as Knowledge Base
    end

    User->>Agent: "How do I integrate GoPay in Django?"
    Agent->>MCP: tools/call midtrans_get_payment_method_guide<br/>payment_method = gopay
    MCP->>Tool: Route to handler
    Tool->>KB: PAYMENT_METHOD_DETAILS gopay
    KB-->>Tool: Complete GoPay guide
    Tool-->>MCP: Formatted response
    MCP-->>Agent: GoPay charge example, response format, flow
    Agent->>MCP: tools/call midtrans_get_code_example<br/>language = django
    MCP->>Tool: Route to handler
    Tool->>KB: IMPLEMENTATION_EXAMPLES django
    KB-->>Tool: Django integration code
    Tool-->>MCP: Models, views, service layer, DRF code
    MCP-->>Agent: Complete Django implementation
    Agent-->>User: Here is how to integrate GoPay in Django...
  1. You ask your AI agent to integrate Midtrans into your app.

  2. The agent calls MCP tools to retrieve relevant documentation.

  3. MCP server returns structured Midtrans documentation, code examples, and schemas.

  4. The agent generates accurate integration code based on official docs.


Available MCP Tools

Tool

Description

Key Inputs

midtrans_get_documentation_map

Complete documentation index — start here

—

midtrans_get_documentation

Detailed docs for a specific topic

topic: overview, authorization, snap, charge, notification, etc. (15 topics)

midtrans_get_payment_method_guide

Integration guide per payment method

payment_method: credit_card, gopay, qris, bca_va, etc. (15 methods)

midtrans_get_json_object_schema

JSON object field-level schema

object_type: transaction_details, customer_details, etc. (14 types)

midtrans_get_status_codes

HTTP status code reference

code_range: 2xx, 3xx, 4xx, 5xx

midtrans_get_code_example

Full implementation examples

language: python, django, nodejs, go, php

midtrans_search_documentation

Full-text search across all docs

query: any search term

midtrans_get_charge_example

Generate charge request JSON

payment_method + optional flags

midtrans_get_notification_handler

Webhook handler code

language: python, nodejs, go, php

midtrans_get_snap_integration

Complete Snap backend + frontend guide

language: python, django, nodejs, go, php


Getting Started

Prerequisites

  • Python 3.11+

  • One of: uv (recommended), Docker, or pip

Installation

git clone https://github.com/your-org/mcp-midtrans.git
cd mcp-midtrans

Running with uvx

The fastest way — no install needed:

# Run directly from PyPI
uvx mcp-midtrans

Or install as a global tool:

uv tool install mcp-midtrans
mcp-midtrans

Running with Docker

# Build the image
docker build -t mcp-midtrans .

# Run with stdio transport
docker run -i --rm mcp-midtrans

Or with Docker Compose:

docker compose up --build

Running with pip

pip install mcp-midtrans
mcp-midtrans

Editor & Agent Setup

VS Code + GitHub Copilot

Create or update .vscode/mcp.json in your workspace root:

Using uvx (recommended):

{
  "servers": {
    "midtrans": {
      "type": "stdio",
      "command": "uvx",
      "args": ["mcp-midtrans"]
    }
  }
}

Using Docker:

{
  "servers": {
    "midtrans": {
      "type": "stdio",
      "command": "docker",
      "args": ["run", "-i", "--rm", "mcp-midtrans"]
    }
  }
}

How to use:

  1. Open VS Code with the workspace containing .vscode/mcp.json.

  2. Open Copilot Chat (Ctrl+Shift+I / Cmd+Shift+I).

  3. Switch to Agent mode (not Chat or Edit mode).

  4. The MCP tools appear automatically — ask about Midtrans and Copilot calls the tools.

  5. Example prompts:

    • "Help me integrate GoPay payment in my Django app"

    • "Show me how to handle Midtrans webhooks in Express"

    • "What's the charge request format for BCA Virtual Account?"

Claude Code (CLI)

Add to your project's .mcp.json (project root) or ~/.claude/mcp.json (global):

Using uvx:

{
  "mcpServers": {
    "midtrans": {
      "command": "uvx",
      "args": ["mcp-midtrans"]
    }
  }
}

Using Docker:

{
  "mcpServers": {
    "midtrans": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "mcp-midtrans"]
    }
  }
}

How to use:

  1. Start Claude Code: claude

  2. The MCP server connects automatically on startup.

  3. Verify with: /mcp — you should see midtrans listed with 10 tools.

  4. Ask about Midtrans — Claude will use the tools automatically:

    • "Integrate Midtrans Snap checkout into my FastAPI app"

    • "Generate a BNI VA charge request with customer details"

    • "How do I verify Midtrans webhook signatures in Go?"

Claude Desktop

Edit the config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "midtrans": {
      "command": "uvx",
      "args": ["mcp-midtrans"]
    }
  }
}

Restart Claude Desktop after saving. The šŸ”§ icon should show the Midtrans tools.

Cursor

Create .cursor/mcp.json in your workspace root:

{
  "mcpServers": {
    "midtrans": {
      "command": "uvx",
      "args": ["mcp-midtrans"]
    }
  }
}

Open Cursor Settings → Features → MCP to verify the server is active.


Development Guide

Project Structure

mcp-midtrans/
ā”œā”€ā”€ src/
│   └── mcp_midtrans/
│       ā”œā”€ā”€ __init__.py               # Package version
│       ā”œā”€ā”€ server.py                 # MCP server, tool definitions, input models
│       ā”œā”€ā”€ knowledge_base.py         # All Midtrans documentation (~3500 lines)
│       └── tools/
│           └── __init__.py
ā”œā”€ā”€ docs/
│   └── DIAGRAMS.md                   # Mermaid architecture & workflow diagrams
ā”œā”€ā”€ pyproject.toml                    # Build config, dependencies, entry point
ā”œā”€ā”€ Dockerfile                        # Docker image (Python 3.12 + uv)
ā”œā”€ā”€ docker-compose.yml                # Docker Compose config
ā”œā”€ā”€ .vscode/
│   └── mcp.json                      # VS Code MCP config (local dev)
ā”œā”€ā”€ .gitignore
└── README.md                         # This file

Key Files

File

Purpose

server.py

FastMCP server initialization, 10 tool handlers, Pydantic input models, enums

knowledge_base.py

Complete embedded Midtrans docs — all API refs, 15 payment methods, 5 language examples, 14 JSON schemas

pyproject.toml

Project metadata, deps (mcp[cli]>=1.2.0, pydantic>=2.0.0), hatchling build, entry point

Local Development

# Clone and set up
git clone https://github.com/your-org/mcp-midtrans.git
cd mcp-midtrans

# Create virtual environment with uv
uv venv
source .venv/bin/activate

# Install in editable mode
uv pip install -e .

# Run the server
mcp-midtrans

# Test with MCP Inspector (interactive tool testing)
npx @modelcontextprotocol/inspector mcp-midtrans

MCP Inspector opens a web UI where you can:

  • See all registered tools and their input schemas

  • Send test requests with custom parameters

  • View formatted responses in real-time

Adding New Tools

  1. Define input model in server.py:

class GetMyNewGuideInput(BaseModel):
    model_config = ConfigDict(str_strip_whitespace=True, extra="forbid")
    topic: str = Field(..., description="The topic to look up")
  1. Add documentation to knowledge_base.py:

MY_NEW_GUIDE = """
# My New Documentation Section
...
"""
  1. Register the tool in server.py:

@mcp.tool(
    name="midtrans_get_my_new_guide",
    annotations={"readOnlyHint": True, "destructiveHint": False, "idempotentHint": True},
)
async def midtrans_get_my_new_guide(params: GetMyNewGuideInput) -> str:
    """Description of what this tool returns."""
    return MY_NEW_GUIDE
  1. Import the new constant in the server's import block.

Adding Documentation Content

All documentation lives in knowledge_base.py as Python string constants and dicts:

Variable

Type

Content

MIDTRANS_OVERVIEW

str

Products, environments, auth intro

AUTHORIZATION_GUIDE

str

Auth setup with code examples

API_ENDPOINTS

str

Complete endpoint reference table

PAYMENT_METHOD_DETAILS

dict

15 payment method guides (key = method name)

JSON_OBJECT_SCHEMAS

dict

14 JSON schema references (key = object type)

IMPLEMENTATION_EXAMPLES

dict

5 language examples (keys: python, django, nodejs, go, php)

STATUS_CODES

dict

Status code tables (key = range like "2xx")

To add content, append to the relevant constant or add a new entry to the dict.

Testing

# Syntax check
python -m py_compile src/mcp_midtrans/server.py
python -m py_compile src/mcp_midtrans/knowledge_base.py

# Verify tools register correctly
python -c "
from mcp_midtrans.server import mcp
tools = [t.name for t in mcp._tool_manager._tools.values()]
print(f'{len(tools)} tools registered:')
for t in tools:
    print(f'  - {t}')
"

# Verify languages
python -c "
from mcp_midtrans.knowledge_base import IMPLEMENTATION_EXAMPLES
print('Languages:', list(IMPLEMENTATION_EXAMPLES.keys()))
"

# Interactive testing
npx @modelcontextprotocol/inspector mcp-midtrans

Production Deployment

Docker Production Build

# Build with tag
docker build -t mcp-midtrans:latest .

# Tag for registry
docker tag mcp-midtrans:latest ghcr.io/your-org/mcp-midtrans:latest

# Push to container registry
docker push ghcr.io/your-org/mcp-midtrans:latest

Then users configure their MCP clients with Docker:

{
  "mcpServers": {
    "midtrans": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "ghcr.io/your-org/mcp-midtrans:latest"]
    }
  }
}

Publishing to PyPI

# Build distribution
uv build

# Upload to PyPI
uv publish
# or: twine upload dist/*

After publishing, users can run directly without cloning:

uvx mcp-midtrans

CI/CD

Example GitHub Actions workflow (.github/workflows/ci.yml):

name: Build & Test

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: astral-sh/setup-uv@v4
      - run: uv venv && source .venv/bin/activate && uv pip install -e .
      - run: |
          source .venv/bin/activate
          python -m py_compile src/mcp_midtrans/server.py
          python -m py_compile src/mcp_midtrans/knowledge_base.py
          python -c "from mcp_midtrans.server import mcp; assert len(list(mcp._tool_manager._tools)) == 10"

  docker:
    runs-on: ubuntu-latest
    needs: test
    steps:
      - uses: actions/checkout@v4
      - run: docker build -t mcp-midtrans .

Coverage & Content

Documentation Topics (15)

Topic

Covers

Overview

Products, environments, auth, key concepts

Authorization

API keys, Basic Auth, code in 5 languages

HTTP Request

Base URLs, headers, idempotency

API Endpoints

Full endpoint table (Payment, Card, GoPay, Subscription, Snap, PayLink, Invoice)

Snap

Backend + frontend integration, Snap.js, redirect flow

Charge

Core API charge with all features

Payment Methods

Complete list with types and categories

Notification

Webhooks, signature verification, status mapping

Transaction Mgmt

Get status, cancel, expire, refund, capture

Subscription

Create / get / update / enable / disable / cancel

Payment Link

Create / get / delete

Invoicing

Create / get / void

Merchant Balance

Balance mutation API

Testing

Sandbox credentials, test cards, simulation

Status Codes

2xx, 3xx, 4xx, 5xx with troubleshooting

Payment Methods (15)

Credit Card Ā· GoPay Ā· QRIS Ā· ShopeePay Ā· OVO Ā· BCA VA Ā· BNI VA Ā· BRI VA Ā· Permata VA Ā· CIMB VA Ā· Mandiri Bill Ā· Indomaret Ā· Alfamart Ā· Akulaku Ā· Kredivo

Code Examples (5 Languages)

Language

Includes

Python

Flask, FastAPI, midtransclient library, manual HTTP client

Django

Models, views (FBV), DRF serializers + ViewSets, service layer, Snap template, management commands

Node.js

Express, midtrans-client library

Go

net/http, manual integration

PHP

Native, midtrans-php library

JSON Object Schemas (14)

transaction_details Ā· customer_details Ā· item_details Ā· seller_details Ā· custom_expiry Ā· credit_card Ā· gopay Ā· shopeepay Ā· bank_transfer Ā· echannel Ā· qris Ā· ovo Ā· convenience_store Ā· action


Diagrams

Full architecture and workflow diagrams with dark theme styling are in docs/DIAGRAMS.md:

  1. System Architecture — How AI clients connect to the MCP server

  2. Tool Request Flow — Sequence diagram of a typical interaction

  3. Payment Integration Flow — What the MCP teaches about Midtrans Snap integration

  4. Knowledge Base Structure — Mind map of all documentation content

  5. Deployment Options — Docker and uvx deployment flows

  6. Tool Coverage Map — How the 10 tools map to documentation areas


License

MIT

Available Tools

9 tools
midtrans_get_charge_exampleA
Read-onlyIdempotent

Generate a complete charge request JSON example for a specific payment method.

Creates a ready-to-use charge request body with all required fields and optionally includes customer_details and item_details.

Args: params: Contains payment method, and flags for optional sections.

Returns: str: Complete charge request JSON example with curl command and response format.

ParametersJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

While annotations declare readOnlyHint=true and idempotentHint=true, the description adds valuable behavioral context: it returns a string containing not just JSON but also a curl command and response format. It clarifies that optional sections can be included/excluded via flags, adding nuance beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The docstring format (Args/Returns) is appropriate for a utility function. The first sentence front-loads the purpose effectively. The Returns section is slightly verbose ('Complete charge request JSON example with curl command and response format') but generally efficient with no redundant sentences.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the presence of comprehensive annotations (readOnly, idempotent, destructive flags) and the output schema being a simple string, the description appropriately explains the return value contents (JSON + curl). It adequately covers the single-parameter input structure, though mentioning the available payment method enum values could improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The root 'params' parameter has no schema description (0% coverage per context signals), and the description compensates minimally by noting it 'Contains payment method, and flags for optional sections.' The schema adequately describes the nested properties (include_customer_details, include_item_details), so the description meets baseline expectations without adding significant semantic value beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool 'Generate[s] a complete charge request JSON example' with specific mention of ready-to-use bodies and optional sections. It effectively identifies the resource (charge request) and action (generate example), though it could more explicitly differentiate from sibling tool midtrans_get_code_example.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this versus alternatives like midtrans_get_code_example or midtrans_get_payment_method_guide. The description implies use cases through content (needing charge request examples) but lacks explicit when-to-use or when-not-to-use directives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

midtrans_get_code_exampleA
Read-onlyIdempotent

Get complete implementation code examples for Midtrans Core API integration in a specific programming language.

Includes: charge transactions, transaction status checks, cancellation, refunds, notification/webhook handlers with signature verification, and subscription management.

Available languages: python (requests/Flask/FastAPI), javascript (fetch/Express with TypeScript types), go (net/http), rust (reqwest/actix-web/axum).

Args: params: Contains the programming language.

Returns: str: Complete code examples including imports, configuration, API calls, and webhook handlers.

ParametersJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations establish read-only/idempotent safety. The description adds valuable behavioral context beyond annotations: it specifies that returned code includes imports, configuration, API calls, and webhook handlers, and details framework-specific variants (Flask/FastAPI, Express with TypeScript, actix-web/axum).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with clear sections (purpose, includes, languages, args, returns). Front-loaded with the specific action. Every line provides distinct value: the 'Includes' list defines scope, 'Available languages' provides implementation details, and 'Returns' clarifies output format.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Fully complete for a single-parameter retrieval tool. The description adequately covers the input (with framework specifics) and the output (complete code examples structure) without needing to repeat what a structured output schema would provide.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Despite 0% schema coverage noted in context signals, the description compensates by specifying the nested 'language' parameter and—crucially—enumerating available languages with their specific framework implementations (e.g., 'python (requests/Flask/FastAPI)') which is semantic detail absent from the raw enum.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Excellent specificity: states the exact action ('Get'), resource ('implementation code examples'), domain ('Midtrans Core API integration'), and constraint ('specific programming language'). The comprehensive list of included examples (charge, refunds, webhooks, subscriptions) clearly distinguishes this from siblings like midtrans_get_charge_example.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides clear context on scope by enumerating exactly which implementations are included (charge, cancellation, refunds, webhooks with signature verification, etc.) and which languages/frameworks are supported. Lacks explicit 'when to use vs midtrans_get_charge_example' guidance, but the scope description enables inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

midtrans_get_documentationA
Read-onlyIdempotent

Get detailed documentation for a specific Midtrans Core API topic.

Covers: overview, authorization, HTTP requests, API endpoints, charge transactions, payment methods list, notifications, transaction management, transaction status guide, channel response codes, subscriptions, payment links, invoicing, merchant balance, testing credentials, and status codes.

Args: params: Contains the topic to retrieve documentation for.

Returns: str: Detailed documentation for the requested topic including explanations, code examples, request/response formats, and best practices.

ParametersJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations confirm readOnly/idempotent/safe operation, so the bar is lower. The description adds valuable context about what gets returned: 'explanations, code examples, request/response formats, and best practices'—detail not present in annotations. No contradictions with safety hints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with clear Purpose → Coverage → Args → Returns sections. Front-loaded with the core action. Slightly redundant in listing all enum values which are also in the schema, but this aids readability. Zero fluff sentences.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Appropriately complete for a read-only documentation tool. Since output schema exists (Returns section), the description doesn't need to exhaustively explain return values, but commendably describes the content types (examples, formats) anyway. Given single-parameter simplicity and strong annotations, coverage is sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema coverage per context signals, the description partially compensates by listing all 16 valid topic values in the prose. However, the 'Args' section merely states params 'contains the topic' without explaining semantics, formats, or validation rules, leaving gaps given the schema's lack of descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it retrieves 'detailed documentation for a specific Midtrans Core API topic' with a specific verb+resource. It distinguishes scope implicitly by listing 16 covered topics (overview, authorization, charge, etc.), though it doesn't explicitly differentiate from sibling `midtrans_search_documentation` or `midtrans_get_documentation_map`.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit when-to-use or when-not-to-use guidance is provided. While it lists topics covered, it doesn't clarify whether to use this vs `search_documentation` for keyword searches, or vs `get_code_example` for implementation snippets. Users must infer usage from the topic list alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

midtrans_get_documentation_mapA
Read-onlyIdempotent

Get the complete Midtrans Core API documentation map showing all available topics, APIs, payment methods, and guides. Use this as your starting point to understand what documentation is available and navigate to specific topics.

Returns: str: Complete documentation map with categorized links to all Midtrans Core API documentation topics including APIs, payment methods, and guides.

ParametersJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With annotations declaring readOnlyHint=true and idempotentHint=true, safety traits are covered. The description adds value by specifying the return format (str with categorized links) and completeness ('complete map'), though it omits details like potential rate limits or freshness of documentation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with clear front-loading: purpose first, usage guidance second, then return details. The Returns block is slightly verbose but appropriately descriptive. No wasted sentences.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple documentation retrieval tool with minimal inputs and annotations covering safety hints, the description is sufficiently complete. It explains what the map contains (topics, APIs, payment methods) fulfilling informational needs without requiring output schema duplication.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% (GetDocumentationMapInput has no properties), and while the description doesn't explicitly describe the empty 'params' wrapper object, the lack of input requirements is somewhat self-evident from the schema structure. It neither compensates for nor contradicts the sparse schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Get') and resource ('Midtrans Core API documentation map'), clearly defining the scope as an index of all topics, APIs, and guides. It effectively distinguishes from siblings like midtrans_get_documentation or midtrans_search_documentation by positioning itself as the entry point/navigation aid.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides clear context with 'Use this as your starting point to understand what documentation is available,' establishing when to invoke it (for discovery/overview). While it doesn't explicitly name sibling alternatives, it clearly defines the tool's position in the workflow hierarchy.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

midtrans_get_json_object_schemaB
Read-onlyIdempotent

Get the detailed JSON object schema for Midtrans API request/response objects.

Includes field definitions, types, required status, descriptions, and example JSON for each object type.

Available objects: transaction_details, customer_details, item_details, seller_details, custom_expiry, credit_card_object, gopay_object, shopeepay_object, bank_transfer_object, echannel_object, qris_object, ovo_object, convenience_store_object, action_object, payment_amount_object, dana_object, google_pay_object.

Args: params: Contains the object type to get schema for.

Returns: str: Detailed schema with field table, example JSON, and usage notes.

ParametersJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations indicate readOnlyHint=true and idempotentHint=true. The description adds value by specifying the return format ('field table, example JSON, and usage notes') and listing all available object types, which helps the agent understand the scope of valid inputs. However, it does not mention caching behavior or whether this retrieves static reference data versus dynamic schemas.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with purpose but spends significant space listing 17 object types that are already defined in the schema enum. The Args/Returns structure is clear but somewhat formal. The object list, while helpful for LLM context window visibility, creates redundancy that could be trimmed to improve conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the presence of annotations (covering safety/idempotency) and the context signal indicating an output schema exists, the description adequately covers what the tool returns (detailed schema with field tables and examples) and what inputs it accepts. For a documentation reference tool of moderate complexity, this is sufficient without over-specifying.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage at the root properties level (per context signal), though the $ref target (object_type) is well-documented in the schema itself. The description compensates by documenting the 'params' wrapper as 'Contains the object type to get schema for' and enumerating all 17 valid object_type values, though it adds no semantic detail beyond the names.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool 'Get[s] the detailed JSON object schema for Midtrans API request/response objects' with specific details about what it includes (field definitions, types, examples). It distinguishes itself from siblings like midtrans_get_code_example or midtrans_get_charge_example by focusing specifically on 'schema' and 'field definitions' rather than examples or general documentation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

While the description lists the 17 available object types that can be queried, it provides no explicit guidance on when to use this tool versus siblings like midtrans_get_charge_example (full request examples) or midtrans_search_documentation (general doc search). It should explicitly state this is for understanding object structure when constructing API requests.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

midtrans_get_notification_handlerA
Read-onlyIdempotent

Get a complete notification/webhook handler implementation for a specific programming language.

Includes: signature verification, transaction status handling, idempotent processing, and error handling.

Available languages: python, javascript, go, rust.

Args: params: Contains the programming language.

Returns: str: Complete webhook handler code with signature verification and all transaction status cases.

ParametersJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare idempotentHint=true and readOnlyHint=true; the description adds valuable context that the returned code includes idempotent processing logic, signature verification, and transaction status handling—disclosing what the generated code actually does beyond the tool's execution safety.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Appropriately sized with clear information hierarchy: purpose statement, feature list, language enumeration, Args/Returns sections. Every sentence conveys distinct information (capabilities, constraints, return format) with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Thoroughly covers the tool's purpose and return value (complete webhook handler code with specific features). Given annotations cover safety profile and the description explains the code contents, it provides sufficient context for invocation, though it could briefly mention error handling behavior of the tool itself.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Despite nested schema structure, the description explicitly lists available enum values (python, javascript, go, rust) and clarifies that params contains the language, adding practical guidance beyond the schema references.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses specific verb 'Get' with resource 'notification/webhook handler implementation' and clearly distinguishes from siblings like get_code_example and get_charge_example by specifying this is for webhook endpoints with signature verification and transaction status handling.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides clear contextual clues through domain-specific terminology (webhook handler, signature verification) that implicitly signal when to use this (implementing payment notification endpoints), though it lacks explicit 'when not to use' or named alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

midtrans_get_payment_method_guideA
Read-onlyIdempotent

Get a complete integration guide for a specific Midtrans payment method.

Includes charge request format, response format, integration flow, special features, and sandbox testing information.

Supported: credit_card, gopay, qris, shopeepay, ovo, dana, google_pay, bca_va, bni_va, bri_va, permata_va, mandiri_bill, cimb_va, indomaret, alfamart, akulaku, kredivo.

Args: params: Contains the payment method to get the guide for.

Returns: str: Complete integration guide with request/response examples, flow descriptions, and payment-method-specific notes.

ParametersJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare readOnlyHint=true, destructiveHint=false, and idempotentHint=true. The description adds valuable behavioral context beyond these annotations by specifying exactly what constitutes the 'guide' (request/response examples, sandbox testing info, flow descriptions), helping the agent understand the richness of the return value without contradicting the safe, read-only nature of the operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description uses a structured docstring format (Args/Returns) that efficiently packs information. The enumeration of 18 supported payment methods, while lengthy, is necessary for correct usage. The first sentence front-loads the core purpose. Only minor redundancy exists between the Args description and the inline list of methods.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that an output schema exists (per context signals), the Returns section appropriately summarizes the output format without needing exhaustive detail. The description adequately covers the scope of integration information provided for a documentation retrieval tool, though explicit sibling differentiation would strengthen completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Context signals indicate 0% schema description coverage at the root level. The description compensates by using an Args section to explain that 'params' contains the payment method to query, but offers minimal detail on the nested structure or validation requirements. Given the single parameter and the enum values listed elsewhere in the description, this is minimally sufficient.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool 'Get[s] a complete integration guide for a specific Midtrans payment method' and enumerates the specific contents included (charge format, response format, flow, etc.). It distinguishes this as a comprehensive guide resource versus siblings like 'get_charge_example' by detailing the broad scope of information returned.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description helpfully lists all 18 supported payment methods explicitly, which prevents invalid invocations. However, it lacks explicit guidance on when to use this versus siblings like 'midtrans_get_charge_example' or 'midtrans_get_documentation'—it doesn't clarify that this retrieves method-specific integration details while others might retrieve generic examples or full API docs.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

midtrans_get_status_codesA
Read-onlyIdempotent

Get Midtrans HTTP status code reference for a specific range.

Includes status code numbers, descriptions, common scenarios, and troubleshooting tips.

Args: params: Contains the status code range (2xx, 3xx, 4xx, or 5xx).

Returns: str: Status code reference table with descriptions and handling guidance.

ParametersJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and idempotentHint=true, covering the safety profile. The description adds value by disclosing content richness ('troubleshooting tips', 'common scenarios', 'handling guidance') which describes what kind of practical information is returned beyond raw status codes. However, it omits details about caching, rate limits, or why Midtrans-specific codes differ from standard HTTP specs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Uses structured docstring format (Args/Returns) with zero wasted words. Every sentence earns its place: first line establishes purpose, second describes content richness, Args clarifies the single parameter, and Returns describes output format. Appropriate length for a single-parameter lookup tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple lookup tool with one parameter and read-only annotations, the description is complete. It compensates for the lack of visible output schema by describing the return value (string table with handling guidance). Could improve by noting this is for debugging/integration help versus runtime transaction monitoring.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With schema description coverage at 0% per context signals, the description compensates adequately by explicitly listing the valid status code ranges (2xx, 3xx, 4xx, or 5xx) in the Args section. It clarifies the parameter structure (params contains the range), though it could enhance further by explaining the semantic meaning of each range (success, redirect, client/server errors).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it retrieves 'Midtrans HTTP status code reference' for a specific range, with specific verb (Get) and resource. It distinguishes from sibling documentation tools by focusing specifically on HTTP status codes rather than general documentation or code examples, though it could further clarify 'reference' means lookup documentation versus checking a transaction status.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage through its scope (HTTP status codes, troubleshooting tips), but provides no explicit guidance on when to use this versus siblings like `midtrans_get_documentation` or `midtrans_get_code_example`. No 'when-not-to-use' or alternative suggestions are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

midtrans_search_documentationA
Read-onlyIdempotent

Search across all Midtrans Core API documentation for relevant information.

Searches through all documentation topics, payment method guides, JSON schemas, code examples, and reference materials.

Use this when you need to find specific information across multiple documentation sections or when unsure which topic contains the answer.

Args: params: Contains the search query string.

Returns: str: Matching documentation sections with relevant content.

ParametersJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare readOnlyHint=true and idempotentHint=true. The description adds valuable behavioral context by detailing exactly what corpora are searched (topics, guides, schemas, examples), which helps the agent understand result breadth. It also describes the return value as 'Matching documentation sections with relevant content', complementing the existing output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Follows a clean docstring structure with summary, scope, usage guidelines, Args, and Returns. Every sentence earns its place: the first sentence defines purpose, the second expands scope, the third gives usage guidance, and the Args/Returns sections are terse. No redundancy or fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter search tool with complete annotations (safety hints) and an existing output schema, the description covers all necessary ground: it explains the search scope, return format, and selection criteria. The Returns section acknowledges the string output type without needing to replicate full schema details.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The Args section states params 'Contains the search query string', which provides minimal semantic meaning beyond the schema. While the schema (via $ref) actually contains rich descriptions and examples for the query parameter, the context signals indicate 0% schema description coverage, suggesting the description should compensate more for parameter structure and constraints (e.g., minLength/maxLength). The description meets baseline but does not richly elaborate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with the specific action 'Search' and resource 'Midtrans Core API documentation', then clarifies the scope spanning 'documentation topics, payment method guides, JSON schemas, code examples, and reference materials'. It distinguishes from siblings like midtrans_get_documentation by specifying 'when unsure which topic contains the answer', making it clear this is a broad search vs. specific retrieval.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit context for when to use the tool: 'when you need to find specific information across multiple documentation sections or when unsure which topic contains the answer'. This effectively guides selection against more specific retrieval tools. However, it does not explicitly name sibling alternatives (e.g., midtrans_get_documentation) that should be used when the topic is known.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 9 tool updatesv2.0.0
    • First observedmidtrans_get_charge_example
    • First observedmidtrans_get_code_example
    • First observedmidtrans_get_documentation
    • First observedmidtrans_get_documentation_map
    • First observedmidtrans_get_json_object_schema
    • First observedmidtrans_get_notification_handler
    • First observedmidtrans_get_payment_method_guide
    • First observedmidtrans_get_status_codes
    • First observedmidtrans_search_documentation

TDQS

A3.8/5.0
Disambiguation4/5

Tools are mostly distinct in purpose, though slight overlap exists between midtrans_get_code_example (which includes webhook handlers among broader integration code) and midtrans_get_notification_handler (focused specifically on webhooks). The charge example and payment method guide tools also share related content but serve different use cases (JSON generation vs. comprehensive guides).

Naming Consistency4/5

Eight tools follow the consistent pattern midtrans_get_<resource>, while midtrans_search_documentation uses a different verb (search instead of get). Otherwise, all use lowercase snake_case consistently and include the midtrans prefix, making the deviation minor and the overall pattern predictable.

Tool Count5/5

Nine tools is well-suited for a documentation server, covering code examples, JSON schemas, payment method guides, status references, search capability, documentation navigation, and specialized handlers without being excessive or sparse.

Completeness4/5

The surface covers documentation retrieval comprehensively with topics, schemas, examples, guides, and search. Minor gaps might include specialized resources like SDK-specific documentation or changelogs, though these may be accessible via the general documentation topic parameter.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides AI assistants with access to comprehensive Safaricom Daraja API documentation for all 22 M-Pesa APIs through searchable tools, enabling developers to query payment processing, transaction management, and business operations documentation.
    15
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables AI coding tools to search and retrieve Bootpay payment and commerce developer documentation, including integration guides and customer service manuals. It facilitates tasks such as payment linking, billing key issuance, and webhook configuration through natural language queries.
    2
    -
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables AI agents to accept Indonesian payments including GoPay, QRIS, ShopeePay, DANA, bank transfers, and convenience store payments via Midtrans Snap's hosted checkout.
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rissets/mcp-midtrans'

If you have feedback or need assistance with the MCP directory API, please join our Discord server