Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Omise MCP Servercreate a charge for 5000 THB with description 'Monthly subscription'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Omise MCP Server
Omise MCP Server is a comprehensive server for integrating with Omise payment APIs using Model Context Protocol (MCP). Implemented in TypeScript with full support for Omise API v2017-11-02.
๐ Key Features
๐ณ Payment Processing
Charge Management: Create, retrieve, update, capture, and reverse payments
Tokenization: Secure card information tokenization
Source Management: Support for various payment methods
Refunds: Partial and full refund processing
๐ฅ Customer Management
Customer Information: Create, retrieve, update, and delete customers
Card Management: Manage customer card information
Metadata: Store custom information
๐ Transfers & Recipients
Transfer Processing: Send money to recipients
Recipient Management: Create, verify, and manage recipients
Bank Accounts: Manage bank account information
๐ Schedules & Recurring Payments
Recurring Payments: Automatic payments based on schedules
Occurrence Management: Manage schedule execution
Flexible Configuration: Daily, weekly, and monthly schedules
๐ Monitoring & Analytics
Event Management: Track system events
Dispute Management: Handle chargebacks
Webhooks: Real-time notifications
๐ Links & Chains
Payment Links: Shareable payment links
Chain Management: Multi-tenant support
Capability Check: API functionality verification
๐ Supported APIs
Category | Features | Tool Count | Documentation |
Payment | Charges, Tokens, Sources | 8 | |
Customer | Customer & Card Management | 7 | |
Transfer | Transfer & Recipient Management | 6 | |
Refund | Refund Processing | 3 | |
Dispute | Chargeback Processing | 7 | |
Schedule | Recurring Payments | 5 | |
Event | Event Management | 2 | |
Webhook | Notification Management | 5 | |
Link | Payment Links | 3 | |
Chain | Multi-tenant | 4 | |
Capability | Feature Verification | 1 |
Total: 51 tools covering all Omise API functionality
๐ ๏ธ Technology Stack
Runtime: Node.js 20+
Language: TypeScript 5.2+
Framework: Model Context Protocol (MCP)
HTTP Client: Axios
Logging: Winston
Testing: Jest + MSW
Containerization: Docker + Docker Compose
Monitoring: Prometheus + Grafana
Caching: Redis
Log Aggregation: Loki
๐ Quick Start
Prerequisites
Node.js 20+
npm or yarn
Omise Account and API keys
1. Installation
# Clone the repository
git clone https://github.com/your-org/omise-mcp-server.git
cd omise-mcp-server
# Install dependencies
npm install2. Environment Setup
# Copy environment configuration file
cp config/development.env .env
# Set environment variables
export OMISE_PUBLIC_KEY=pkey_test_xxxxxxxxxxxxxxxx
export OMISE_SECRET_KEY=skey_test_xxxxxxxxxxxxxxxx
export OMISE_ENVIRONMENT=test3. Start Development Server
# Start in development mode
npm run dev
# Or start in production mode
npm run build
npm start4. Verify Installation
# Health check
curl http://localhost:3000/health
# Check available tools
curl http://localhost:3000/tools๐ Usage
Basic Payment Processing
// Create a charge
const charge = await mcpClient.callTool('create_charge', {
amount: 10000, // 100.00 THB (smallest currency unit)
currency: 'THB',
description: 'Test payment',
capture: true
});
// Create a customer
const customer = await mcpClient.callTool('create_customer', {
email: 'customer@example.com',
description: 'Test customer'
});
// Create a card token
const token = await mcpClient.callTool('create_token', {
card: {
name: 'John Doe',
number: '4242424242424242',
expiration_month: 12,
expiration_year: 2025,
security_code: '123'
}
});Recurring Payment Setup
// Create a schedule
const schedule = await mcpClient.callTool('create_schedule', {
every: 1,
period: 'month',
start_date: '2024-01-01',
charge: {
customer: 'cust_123',
amount: 5000,
currency: 'THB',
description: 'Monthly subscription'
}
});Transfer Processing
// Create a recipient
const recipient = await mcpClient.callTool('create_recipient', {
name: 'John Doe',
email: 'john@example.com',
type: 'individual',
bank_account: {
brand: 'bbl',
number: '1234567890',
name: 'John Doe'
}
});
// Execute transfer
const transfer = await mcpClient.callTool('create_transfer', {
amount: 10000,
recipient: recipient.id
});๐ง Configuration
Environment Variables
Variable | Description | Required | Default |
| Omise public key | โ | - |
| Omise secret key | โ | - |
| Environment (test/production) | โ | - |
| Server port | - | 3000 |
| Server host | - | localhost |
| Log level | - | info |
| Log format | - | simple |
| Enable rate limiting | - | true |
| Maximum requests | - | 100 |
| Time window (ms) | - | 60000 |
Obtaining Omise API Keys
Access Omise Dashboard
Create an account or log in
Get keys from the API Keys section
Test Environment: Use keys starting with
pkey_test_andskey_test_Production Environment: Use keys starting with
pkey_live_andskey_live_
Important: Always use live keys in production and test keys in test environment.
๐๏ธ Project Structure
omise-mcp-server/
โโโ src/ # Source code
โ โโโ index.ts # Main server file
โ โโโ types/ # Type definitions
โ โ โโโ omise.ts # Omise API type definitions
โ โ โโโ mcp.ts # MCP type definitions
โ โ โโโ index.ts # Type definition exports
โ โโโ tools/ # Tool implementations
โ โ โโโ payment-tools.ts # Payment-related tools
โ โ โโโ customer-tools.ts # Customer-related tools
โ โ โโโ token-tools.ts # Token-related tools
โ โ โโโ source-tools.ts # Source-related tools
โ โ โโโ transfer-tools.ts # Transfer-related tools
โ โ โโโ recipient-tools.ts # Recipient-related tools
โ โ โโโ refund-tools.ts # Refund-related tools
โ โ โโโ dispute-tools.ts # Dispute-related tools
โ โ โโโ schedule-tools.ts # Schedule-related tools
โ โ โโโ event-tools.ts # Event-related tools
โ โ โโโ webhook-tools.ts # Webhook-related tools
โ โ โโโ link-tools.ts # Link-related tools
โ โ โโโ chain-tools.ts # Chain-related tools
โ โ โโโ capability-tools.ts # Capability verification tools
โ โ โโโ index.ts # Tool exports
โ โโโ utils/ # Utilities
โ โโโ config.ts # Configuration management
โ โโโ logger.ts # Logging functionality
โ โโโ omise-client.ts # Omise API client
โ โโโ health-check.ts # Health check
โ โโโ index.ts # Utility exports
โโโ tests/ # Tests
โ โโโ unit/ # Unit tests
โ โโโ integration/ # Integration tests
โ โโโ auth/ # Authentication tests
โ โโโ error/ # Error handling tests
โ โโโ rate-limit/ # Rate limiting tests
โ โโโ mocks/ # Mocks
โ โโโ factories/ # Test factories
โโโ config/ # Configuration files
โ โโโ development.env # Development environment
โ โโโ staging.env # Staging environment
โ โโโ production.env # Production environment
โโโ monitoring/ # Monitoring configuration
โ โโโ prometheus.yml # Prometheus configuration
โ โโโ loki-config.yml # Loki configuration
โ โโโ grafana/ # Grafana configuration
โโโ nginx/ # Nginx configuration
โโโ docker-compose.yml # Docker Compose configuration
โโโ Dockerfile # Docker configuration
โโโ package.json # Dependencies
โโโ tsconfig.json # TypeScript configuration
โโโ README.md # This file๐งช Development
Development Environment Setup
# Install development dependencies
npm install
# Start development server
npm run dev
# Watch mode
npm run watchTesting
# Run all tests
npm test
# Watch mode
npm run test:watch
# Coverage report
npm run test:coverage
# Specific test categories
npm run test:unit
npm run test:integration
npm run test:auth
npm run test:error
npm run test:rate-limitLinting
# Run linting
npm run lint
# Auto-fix
npm run lint:fixBuild
# Compile TypeScript
npm run build
# Production build
npm run build:production๐ณ Docker Deployment
Development Environment
# Start development environment
docker-compose --env-file config/development.env up -d
# Check logs
docker-compose logs -f omise-mcp-serverProduction Environment
# Start production environment
docker-compose --env-file config/production.env up -d
# Health check
curl http://localhost:3000/health
curl http://localhost:3000/ready
curl http://localhost:3000/liveAutomated Deployment
# Run deployment script
./deploy.sh latest production๐ Monitoring & Logs
Prometheus Metrics
Metrics: CPU, memory, request count, response time
Alerts: High load, error rate monitoring
Grafana Dashboard
Login: admin / admin (default)
Dashboards: System monitoring, application monitoring
Log Management
# Application logs
docker-compose logs -f omise-mcp-server
# Nginx logs
docker-compose logs -f nginx
# All service logs
docker-compose logs -f๐ Security
Security Features
Non-root user: Run containers as non-root user
Security headers: Proper HTTP header configuration
Rate limiting: API call restrictions
Sensitive data masking: Hide sensitive information in logs
Environment isolation: Complete separation of test and production environments
SSL/TLS Configuration
# Place SSL certificates
mkdir -p nginx/ssl
cp your-cert.pem nginx/ssl/cert.pem
cp your-key.pem nginx/ssl/key.pemSecurity Scanning
# Container security scan
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock \
aquasec/trivy image omise-mcp-server:latest๐จ Troubleshooting
Common Issues
1. Service Won't Start
# Check logs
docker-compose logs omise-mcp-server
# Check environment variables
docker-compose config2. Health Check Fails
# Check health check endpoint directly
curl -v http://localhost:3000/health
# Check service connectivity
docker-compose exec omise-mcp-server ping redis3. Memory Issues
# Check memory usage
docker stats
# Remove unnecessary containers
docker system prune -aLog Analysis
# Check error logs
docker-compose logs omise-mcp-server | grep ERROR
# Analyze access logs
docker-compose logs nginx | grep "GET /"๐ API Reference
Payment Tools
create_charge
Create a new charge.
Parameters:
amount(required): Amount in smallest currency unitcurrency(required): Currency code (THB, USD, JPY, etc.)description(optional): Charge descriptioncustomer(optional): Customer IDcard(optional): Card IDsource(optional): Source IDcapture(optional): Capture immediately (default: true)return_uri(optional): Redirect URImetadata(optional): Metadata
retrieve_charge
Retrieve charge information.
Parameters:
charge_id(required): Charge ID to retrieve
list_charges
List charges.
Parameters:
limit(optional): Number of items to retrieve (default: 20)offset(optional): Offset (default: 0)order(optional): Sort order (chronological/reverse_chronological)status(optional): Status filtercustomer(optional): Customer ID filter
Customer Tools
create_customer
Create a new customer.
Parameters:
email(optional): Customer email addressdescription(optional): Customer descriptioncard(optional): Card IDmetadata(optional): Metadata
retrieve_customer
Retrieve customer information.
Parameters:
customer_id(required): Customer ID to retrieve
Token Tools
create_token
Create a secure card token for payment processing.
Parameters:
card(required): Card informationname(required): Cardholder namenumber(required): Card numberexpiration_month(required): Expiration month (1-12)expiration_year(required): Expiration year (4 digits)city(optional): Billing address citypostal_code(optional): Billing address postal codesecurity_code(optional): Security code (CVV/CVC)
๐ External Links
Omise Official Documentation
Technical Documentation
Support
GitHub Issues: Bug reports and feature requests
Omise Support: Omise official support
Community: Developer community
๐ License
This project is licensed under the MIT License.
๐ค Contributing
Contributions to the project are welcome! Please follow these steps:
Fork this repository
Create a feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add some amazing feature')Push to the branch (
git push origin feature/amazing-feature)Create a Pull Request
Development Guidelines
Write code in TypeScript
Maintain test coverage
Follow ESLint rules
Write clear commit messages
๐ Roadmap
v1.1.0 (Planned)
Additional payment method support
Advanced reporting features
Performance optimizations
v1.2.0 (Planned)
Enhanced multi-tenant support
Advanced monitoring features
Enhanced security features
๐ Statistics
Total Tools: 51
Supported APIs: 11 categories
Test Coverage: 95%+
TypeScript: 100%
Docker Support: โ
Monitoring Support: โ
Omise MCP Server - Achieve secure and efficient payment processing! ๐
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.