MCP Midtrans Documentation Server
Provides Django-specific integration code including models, views, service layers, and Django REST Framework examples for implementing Midtrans payment gateway functionality, Snap integration, and webhook notification handlers.
Provides Express.js-specific code examples and implementation guides for handling Midtrans webhooks, payment notifications, and integrating payment processing flows in Express applications.
Provides FastAPI-specific integration examples and implementation guides for integrating Midtrans Snap checkout, charge requests, and payment processing into FastAPI applications.
Provides Node.js integration code and examples for implementing Midtrans payment gateway functionality, including charge requests, Snap integration, and webhook notification handlers.
Provides PHP integration code and examples for implementing Midtrans payment gateway functionality, including charge request generation, Snap integration, and notification handling.
Provides Python integration code and examples for implementing Midtrans payment gateway functionality, including API integration, charge request generation, and webhook signature verification.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Midtrans Documentation Serverhow do I integrate GoPay payments in Django?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
š¦ 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 --> KBHow 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...You ask your AI agent to integrate Midtrans into your app.
The agent calls MCP tools to retrieve relevant documentation.
MCP server returns structured Midtrans documentation, code examples, and schemas.
The agent generates accurate integration code based on official docs.
Available MCP Tools
Tool | Description | Key Inputs |
| Complete documentation index ā start here | ā |
| Detailed docs for a specific topic |
|
| Integration guide per payment method |
|
| JSON object field-level schema |
|
| HTTP status code reference |
|
| Full implementation examples |
|
| Full-text search across all docs |
|
| Generate charge request JSON |
|
| Webhook handler code |
|
| Complete Snap backend + frontend guide |
|
Getting Started
Prerequisites
Installation
git clone https://github.com/your-org/mcp-midtrans.git
cd mcp-midtransRunning with uvx
The fastest way ā no install needed:
# Run directly from PyPI
uvx mcp-midtransOr install as a global tool:
uv tool install mcp-midtrans
mcp-midtransRunning with Docker
# Build the image
docker build -t mcp-midtrans .
# Run with stdio transport
docker run -i --rm mcp-midtransOr with Docker Compose:
docker compose up --buildRunning with pip
pip install mcp-midtrans
mcp-midtransEditor & 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:
Open VS Code with the workspace containing
.vscode/mcp.json.Open Copilot Chat (
Ctrl+Shift+I/Cmd+Shift+I).Switch to Agent mode (not Chat or Edit mode).
The MCP tools appear automatically ā ask about Midtrans and Copilot calls the tools.
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:
Start Claude Code:
claudeThe MCP server connects automatically on startup.
Verify with:
/mcpā you should seemidtranslisted with 10 tools.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.jsonWindows:
%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 fileKey Files
File | Purpose |
| FastMCP server initialization, 10 tool handlers, Pydantic input models, enums |
| Complete embedded Midtrans docs ā all API refs, 15 payment methods, 5 language examples, 14 JSON schemas |
| Project metadata, deps ( |
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-midtransMCP 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
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")Add documentation to
knowledge_base.py:
MY_NEW_GUIDE = """
# My New Documentation Section
...
"""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_GUIDEImport 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 |
|
| Products, environments, auth intro |
|
| Auth setup with code examples |
|
| Complete endpoint reference table |
|
| 15 payment method guides (key = method name) |
|
| 14 JSON schema references (key = object type) |
|
| 5 language examples (keys: python, django, nodejs, go, php) |
|
| 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-midtransProduction 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:latestThen 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-midtransCI/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:
System Architecture ā How AI clients connect to the MCP server
Tool Request Flow ā Sequence diagram of a typical interaction
Payment Integration Flow ā What the MCP teaches about Midtrans Snap integration
Knowledge Base Structure ā Mind map of all documentation content
Deployment Options ā Docker and uvx deployment flows
Tool Coverage Map ā How the 10 tools map to documentation areas
License
MIT
Available Tools
9 toolsmidtrans_get_charge_exampleARead-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.
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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_exampleARead-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.
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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_documentationARead-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.
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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_mapARead-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.
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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_schemaBRead-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.
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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_handlerARead-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.
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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_guideARead-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.
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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_codesARead-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.
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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_documentationARead-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.
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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.
9 tool updates
v2.0.0- First observed
midtrans_get_charge_example - First observed
midtrans_get_code_example - First observed
midtrans_get_documentation - First observed
midtrans_get_documentation_map - First observed
midtrans_get_json_object_schema - First observed
midtrans_get_notification_handler - First observed
midtrans_get_payment_method_guide - First observed
midtrans_get_status_codes - First observed
midtrans_search_documentation
TDQS
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).
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.
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.
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
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
Indonesia payments for AI agents ā GoPay, QRIS, Alfamart, bank VA via Midtrans. Never holds funds.
Vietnam payments for AI agents ā MoMo wallet QR, ATM, cards. Zero-setup sandbox. Never holds funds.
The documentation, as a tool your agent can call: 950+ AI-dev guides. Search + fetch tools.
Malaysia payments for AI agents ā FPX banking, DuitNow QR, cards via Billplz. Never holds funds.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides 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.15MIT
- FlicenseNot gradedqualityCmaintenanceEnables 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-
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to accept Indonesian payments including GoPay, QRIS, ShopeePay, DANA, bank transfers, and convenience store payments via Midtrans Snap's hosted checkout.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to accept Malaysian payments (FPX, DuitNow) through Billplz, providing tools to create payment links and check payment status.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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