Go Promptpay Mcp
About
A Model Context Protocol (MCP) server implementation for generating PromptPay QR codes payload in Go.
Details
- Author
- naruebaet
- Downloads
- 289
- Categories
- Other
Jump to
- 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
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Go Promptpay McpCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
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.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"go promptpay mcp": {
"go-promptpay-mcp": {
"type": "stdio",
"command": "go-promptpay-mcp",
"args": []
}
}
}
}
McpServers
{
"go-promptpay-mcp": {
"type": "stdio",
"command": "go-promptpay-mcp",
"args": []
}
}
Go 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 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
- github.com/mark3labs/mcp-go
- github.com/naruebaet/go-promptpay
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
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



