ecpay-mcp-server
v1.0.8
Published
ECPay MCP Server for Claude Desktop - AI-powered payment link generation
Downloads
32
Maintainers
Readme
ECPay MCP Server
A Model Context Protocol (MCP) server that enables AI assistants to create ECPay payment links through natural language processing.
Features
- 🤖 AI-Powered: Convert natural language orders into structured payment links
- 💳 Multi-Payment: Support for credit cards, ATM, UnionPay, convenience stores, Apple Pay, and LINE Pay
- 🔗 Easy Integration: Simple MCP protocol for Claude Desktop and other AI assistants
- 🌐 Web Interface: Complete payment simulation interface
- 📱 Mobile Friendly: Responsive design for all devices
🎉 版本 1.0.2 更新
成功修正了 Claude Desktop 中 "0 tools enabled" 的問題!
- ✅ 修正了 MCP 工具註冊問題
- ✅ 移除了阻止正常初始化的條件檢查
- ✅ 現在可以完美運作於 Claude Desktop 和 Cursor
- ✅ 經過用戶測試和驗證
Quick Start
For Claude Desktop
Add to your Claude Desktop configuration:
{
"mcpServers": {
"ecpay-payment": {
"command": "npx",
"args": ["-y", "[email protected]"]
}
}
}That's it! No additional setup required.
Configuration with Azure OpenAI
⚠️ 重要:使用者必須手動輸入實際的 Azure OpenAI 憑證
For enhanced AI processing, add your Azure OpenAI credentials:
{
"mcpServers": {
"ecpay-payment": {
"command": "npx",
"args": ["-y", "[email protected]"],
"env": {
"AZURE_OPENAI_API_KEY": "請輸入您的 Azure API 金鑰",
"AZURE_OPENAI_ENDPOINT": "請輸入您的 Azure 端點 (https://your-name.openai.azure.com)",
"AZURE_OPENAI_DEPLOYMENT_NAME": "請輸入您的部署名稱"
}
}
}
}Users must manually configure:
AZURE_OPENAI_API_KEY: Your Azure OpenAI API keyAZURE_OPENAI_ENDPOINT: Your Azure OpenAI endpoint URLAZURE_OPENAI_DEPLOYMENT_NAME: Your GPT model deployment name
Usage
Once configured, you can create payment links by talking to Claude naturally:
"I want to buy a MacBook Pro for $2000 using credit card, my phone is 0912-345-678"The server will:
- Parse your request
- Extract order details (amount, payment method, contact info)
- Generate a payment link
- Return a formatted response with order details
Available Tools
create_payment_link
Creates an ECPay payment link from natural language input.
Input:
input(string): Natural language description of the order
Output:
- Order number
- Amount
- Payment method
- Contact information
- Payment link
Payment Methods
- Credit Card (信用卡)
- ATM Transfer (ATM轉帳)
- UnionPay (銀聯卡)
- Convenience Store (超商繳費)
- Apple Pay
- LINE Pay
Environment Variables
| Variable | Description | Required |
|----------|-------------|----------|
| ECPAY_MCP_BASE_URL | Base URL for payment links | No (defaults to demo) |
| AZURE_OPENAI_API_KEY | Azure OpenAI API key | No (fallback to pattern matching) |
| AZURE_OPENAI_ENDPOINT | Azure OpenAI endpoint | No |
| AZURE_OPENAI_DEPLOYMENT_NAME | Azure OpenAI deployment | No |
Development
Local Development
# Clone the repository
git clone https://github.com/your-repo/ecpay-mcp-server.git
cd ecpay-mcp-server
# Install dependencies
npm install
# Run in development mode
npm run dev
# Build for production
npm run build
# Run built version
npm startTesting
Test the MCP server directly:
# Install globally
npm install -g ecpay-mcp-server
# Run the server
ecpay-mcpArchitecture
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Claude AI │───▶│ MCP Server │───▶│ ECPay Web │
│ Assistant │ │ (This pkg) │ │ Interface │
└─────────────────┘ └─────────────────┘ └─────────────────┘- Claude AI sends natural language requests via MCP protocol
- MCP Server processes the request and extracts order details
- ECPay Web Interface handles the actual payment simulation
License
MIT License - see LICENSE file for details
Support
- 📧 Issues: GitHub Issues
- 🌐 Demo: https://ecpay-mcp-payment.replit.app
- 📖 Documentation: Project Wiki
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
Made with ❤️ for the MCP community
