twilio-agent-payments-mcp-server
The Twilio Agent Payments MCP Server facilitates secure agent-assisted payment processing using Twilio's API, with enhanced features like asynchronous callbacks and guided workflows. It is integrated with MCP clients for smooth interaction, ensuring PCI compliance and secure payment tokenization.
Twilio Agent Payments MCP Server
An MCP (Model Context Protocol) server that enables handling agent-assisted payments via the Twilio API, with enhanced features for asynchronous callbacks and guided workflow through contextual prompts.
Features
- Process secure payments during voice calls via Twilio
- Capture payment information (card number, security code, expiration date)
- Tokenize payment information for PCI compliance
- Asynchronous callbacks via MCP Resources
- Guided workflow with MCP Prompts for each step of the payment process
- Support for re-entry of payment information
- Integrates with MCP clients like Claude Desktop
- Secure credential handling
- Uses Twilio API Keys for improved security
- Event-based logging architecture
Installation
You can use this server directly via npx or install it globally. You need to provide the following parameters during installation: accountSid
, apiKey
, and apiSecret
as command-line arguments.
Configuration
The server requires parameters for configuration, such as accountSid
, apiKey
, and apiSecret
. Environment variables such as TOKEN_TYPE
, CURRENCY
, PAYMENT_CONNECTOR
, and Ngrok related tokens are also used.
Usage with Claude Desktop
The server can be configured to work with Claude Desktop, either for local development or after publishing. It integrates with MCP clients for handling payments seamlessly.
Integration with Host Applications
Integrate this MCP server into host applications by implementing an MCP Client and connecting to the server to manage tools and resources autonomously.
Architecture
The server follows an event-based architecture with a Singleton pattern for state management and implements factory functions for tools, prompts, and resources. It manages asynchronous callbacks from Twilio and maintains state using Map-based stores.