mcpField
G
Go Promptpay Mcp

Go Promptpay Mcp

Local
github.com/naruebaetFinance1Updated 72w ago

About Go Promptpay Mcp

Go Promptpay Mcp is a Go MCP server that generates PromptPay payment QR payloads for clients integrating Thai payments.

Key features

  1. 01Generate EMVCo-compliant payloads
  2. 02Support phone numbers and Thai national IDs
  3. 03Optionally specify a THB amount
  4. 04Validate inputs and handle errors

Use cases

  1. 01Create a PromptPay payload for a phone number
  2. 02Create a payment payload for a Thai national ID
  3. 03Include a specified amount in a payment payload

MCP support

The MCP server exposes the generate_promptpay_code tool, which accepts an account type, account number, and optional amount, then returns a PromptPay QR payload.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

Go PromptPay MCP

A Model Context Protocol (MCP) server implementation for generating PromptPay QR codes payload in Go.

License: MIT Go Reference

Features

  • 🔄 Generate PromptPay QR codes with EMVCo standard
  • 📱 Support for phone numbers (with proper formatting)
  • 🆔 Support for Thai national ID numbers
  • 💰 Optional amount specification with decimal support
  • 🚀 MCP compliant server implementation
  • ✅ Input validation and error handling

Prerequisites

  • Go 1.16 or higher
  • Basic understanding of MCP (Model Context Protocol)

Installation

go install github.com/naruebaet/go-promptpay-mcp

Use in vscode workspace

  • Setup in your workspace
    mkdir .vscode
    touch mcp.json
    
  • Insert this value to mcp.json and start server from here.
    {
        "servers": {
            "go-promptpay-mcp": {
                "type": "stdio",
                "command": "go-promptpay-mcp",
                "args": []
            }
        }
    }
    

Usage

The server implements one tool:

generate_promptpay_code

Generates a PromptPay QR code payload.

Parameters:

  • accountType (required): Type of account ("phone" or "id")
  • accountNumber (required): Phone number or Thai ID
  • amount (optional): Payment amount in THB

Example request:

{
    "tool": "generate_promptpay_code",
    "arguments": {
        "accountType": "phone",
        "accountNumber": "0812345678",
        "amount": 100.50
    }
}

Example success response:

{
    "success": true,
    "data": {
        "payload": "00020101021229370016A000000677010111011300668123456785802TH53037645406100.506304A14F"
    }
}

Example error response:

{
    "success": false,
    "error": {
        "message": "Invalid account number format"
    }
}

Development

  1. Clone the repository
  2. Install dependencies: go mod download
  3. Run the server: go run main.go

Dependencies

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -am 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Create a new Pull Request

License

MIT License

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.