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
- 01Generate EMVCo-compliant payloads
- 02Support phone numbers and Thai national IDs
- 03Optionally specify a THB amount
- 04Validate inputs and handle errors
Use cases
- 01Create a PromptPay payload for a phone number
- 02Create a payment payload for a Thai national ID
- 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.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEGo PromptPay MCP
A Model Context Protocol (MCP) server implementation for generating PromptPay QR codes payload in Go.
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 IDamount(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
- Clone the repository
- Install dependencies:
go mod download - Run the server:
go run main.go
Dependencies
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -am 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Create a new Pull Request
License
MIT License
Comments
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.