DOKU MCP Server

Set up DOKU MCP server to integrate DOKU APIs with your AI tools

Learn more about what Model Context Protocol is here

This page provides comprehensive guidance for integrating with DOKU MCP Server, covering system requirements, a step-by-step integration process, and detailed documentation of all available tools. Each tool is defined by its functionality, recommended usage, and applicability to common payment scenarios (e.g. payments with QRIS and Virtual Account).

Requirements

Before you start, make sure you fulfill the following requirements:

  1. Become a DOKU Merchant (follow the guide here)

  2. Prepare an AI assistant (e.g. Visual Studio Code, Claude, or any AI assistant of your choice)


Integration Guide

This section guides you through connecting with our MCP Server: authenticating requests, discovering tools, making JSON-RPC calls, handling responses and webhooks, and testing in sandbox before going live.

Step 1: Generate API Keys

Please contact our team to retrieve your credentials by filling the form here. Please be sure to select "Payment Integration via MCP Server (AI Agents)".

Step 2: Encode API Keys

Once you have received the API keys, you will need to encode them by running the following command:

base64 <<< api_key_xxxxxxxxxx:

Important Note: Do not remove the : separator. Save the encoded string as you’ll use it in the next step.

Step 3: Configure Your AI Assistant

Now that you have your AI assistant prepared and base64 encoded token, connect your assistant AI assistant with your choice of application. Below is a guide on how you can configure with Visual Studio Code and n8n.

Visual Studio Code

  1. Open Visual Studio Code

  2. Open Command Palette and type MCP: Open User Configuration

  3. Paste the following configuration:

{
    "servers": {
        "doku-mcp-server": {
            "type": "http",
            "url": "https://mcp.doku.com/sse",
            "headers": {
                "Client-Id": "{doku-client-id}",
                "Authorization": "Basic {base64.encode(doku_api_key:)}"
            }
        }
    }
}
  1. Replace {doku-client-id} and {base64-encoded-token} with your values.

  2. Verify by opening Command Palette → MCP: Show Installed Servers → select doku-mcp-server. If successful, you’ll see logs confirming the connection and available tools.

n8n

  1. Go to n8n Settings and click Community Nodes (Admin role required).

  2. Click Install, enter n8n-nodes-doku-mcp-client in the NPM Package Name field, agree to the terms and conditions, and then click Install.

  3. Check that n8n-nodes-doku-mcp-client has been successfully installed.

  4. Create your workflow using a Chat Trigger, AI Agent, and an LLM already integrated with n8n.

  5. Open the Tools panel and select DOKU MCP Client Tool.

  6. Fill in all the required form fields.

    1. Server Transport: Server Sent Events (Deprecated)

    2. Client ID: Your DOKU Client ID (BRN-xxxxx)

    3. API Key: Your DOKU API Key (api_key_xxxx)

    4. Tools to Include: Default is All, or you also specify which DOKU tools you needed

  7. n8n is now successfully integrated with the DOKU MCP Server.

Step 4: Restart Your AI Assistant Application

Restart your AI assistant app. In the chat window, switch to Agent Mode, then ask:

Show me the available DOKU tools

If connected, the server will list all MCP tools (e.g., checkout, payment link, QRIS). You can then try calling a tool such as checkout to confirm everything works.


Tools

DOKU MCP server comes equipped with over 15 powerful tools, designed to handle every stage of the payment process:

No.
Tool Name
Description
Use Case

1

create_payment_link

Generate a payment link that can be used to accept payments without determining customer data

Customer inputting data (e.g. name, email, etc.) before proceeding to check out and selecting payment methods

2

checkout

Generate a checkout link that can be used to accept payments with customer data specified

Customer selecting payment methods and checking out immediately

3

find_report_by_invoice_number

Retrieve the transaction details such as status, amount, and payment method used based on the invoice number

Tracking if an order has been paid

4

find_report_by_customer_name

Retrieve the transaction details such as status, amount, and payment method used based on the customer name

Viewing all orders from a particular customer

5

find_report_by_date_range

Retrieve the transaction details such as status, amount, and payment method used within a specified start and end date

Monthly reconciliation for accounting

6

get_merchant_payment_channels

Retrieve a list of all payment methods activated for your merchant account.

Checking which banks, cards, or wallets are active

7

create_virtual_account

Generate a Virtual Account number for bank transfer.

Allowing customer to pay via BCA VA

8

update_virtual_acccount

Modify details of an existing Virtual Account

Extending deadline for an unpaid VA

9

delete_virtual_account

Close or disable payment of an existing VA

Cancelling an unused VA number

10

generate_qris

Generate a QRIS code for direct payments

Customer scans QR to pay for an order in IDR

11

add_customer

Create a new customer with details like name, email, and phone

Registering a new buyer before issuing an invoice

12

update_customer

Update existing customer details (e.g., phone, email)

Correcting customer contact info

13

delete_customer

Remove a customer from your records.

Cleaning inactive or duplicate customer data

14

find_customer_by_id

Retrieve customer details using their unique customer ID

Checking details of a returning customer

15

find_customer_by_name

Retrieve customer details using the customer’s full name or partial name

Finding a repeat customer without knowing their ID

16

find_customer_by_email

Retrieve customer details using the customer’s registered email address

Identifying a customer using their email contact

17

find_all_customers

Retrieve all customers linked to your merchant account.

Viewing your full customer base


Use Cases

With DOKU MCP, an AI chatbot can generate a QRIS payment request when a user wants to buy something, send the QR code, poll or receive webhook updates about payment status, and notify the user once paid; similarly, a virtual account flow can be generated, monitored, and confirmed via the agent. Visit DOKU Docs to learn how these tools may be used in practice.

Explore Use Cases

Last updated

Was this helpful?