Go Promptpay Mcp
@naruebaet
A Model Context Protocol (MCP) server implementation for generating PromptPay QR codes payload in Go.
Overview
What is Go Promptpay Mcp?
Go Promptpay Mcp is a Model Context Protocol (MCP) server implementation written in Go that generates PromptPay QR code payloads following the EMVCo standard. It is designed for developers who want to integrate PromptPay payment code generation into MCP-compatible AI assistants or tools.
How to use Go Promptpay Mcp?
Install the server with go install github.com/naruebaet/go-promptpay-mcp (requires Go 1.16+). Then configure it in a VS Code workspace by creating .vscode/mcp.json with "command": "go-promptpay-mcp" using the stdio transport. The server exposes the generate_promptpay_code tool, which requires accountType ("phone" or "id") and accountNumber, and accepts an optional amount in THB.
Key features of Go Promptpay Mcp
- Generates PromptPay QR codes using EMVCo standard
- Supports phone numbers with proper formatting
- Supports Thai national ID numbers
- Optional amount specification with decimal support
- MCP compliant server implementation
- Input validation and error handling
Use cases of Go Promptpay Mcp
- Generate PromptPay QR code payload for merchant payments
- Enable AI assistants to create payment QR codes on demand
- Automate QR code generation in CI/CD workflows
- Support both fixed and variable amount payments
- Validate account numbers before producing QR payloads
FAQ from Go Promptpay Mcp
What dependencies does Go Promptpay Mcp require?
It requires Go 1.16 or higher and uses the github.com/mark3labs/mcp-go and github.com/naruebaet/go-promptpay libraries.
How do I set up the server in VS Code?
Create a .vscode/mcp.json file with "type": "stdio" and "command": "go-promptpay-mcp" with no arguments, then start the server from that workspace.
What account types are supported?
The server supports two account types: "phone" (phone numbers) and "id" (Thai national ID numbers).
Can I include an amount in the QR code?
Yes, you can optionally specify an amount in THB using the amount parameter, which supports decimal values.
What transport does the server use?
The server communicates over the standard input/output (stdio) transport, as configured for MCP servers in VS Code and similar environments.