Twilio Agent Payments
About
Enables secure, PCI-compliant payment processing during voice calls by bridging Twilio's payment API with tokenized card information collection workflows while maintaining state through asynchronous callbacks.
Details
- Author
- deshartman
- Repository
- deshartman/twilio-agent-payments-mcp-server
- GitHub stars
- 2
- License
- MIT License
- Categories
- Productivity, Design, Developer Tools, AI, Security, Frontend, API
- Tags
- #integration
Jump to
- 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
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
Twilio Agent PaymentsCommand (node, npx, python, etc.)nodeArguments-
Argument 1
/PATHTONODE/twilio-agent-payments-mcp-server/build/index.js -
Argument 2
your_account_sid_here -
Argument 3
your_api_key_here -
Argument 4
your_api_secret_here
Environment-
CURRENCY
USD -
TOKEN_TYPE
reusable -
NGROK_AUTH_TOKEN
your_ngrok_auth_token_here -
PAYMENT_CONNECTOR
your_connector_name -
NGROK_CUSTOM_DOMAIN
your_custom_domain_here
Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
-
Argument 1
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
The server requires the following parameters:
- accountSid: Your Twilio Account SID (must start with 'AC', will be validated)
- apiKey: Your Twilio API Key (starts with 'SK')
- apiSecret: Your Twilio API Secret
When installing the server, you need to provide the following parameters:
1. Command-line arguments (required):
- accountSid: Your Twilio Account SID
- apiKey: Your Twilio API Key
- apiSecret: Your Twilio API Secret
2. Environment variables (set before running the server):
- TOKEN_TYPE: Type of token to use for payments (e.g., 'reusable', 'one-time')
- CURRENCY: Currency for payments (e.g., 'USD', 'EUR')
- PAYMENT_CONNECTOR: Payment connector to use with Twilio
- NGROK_AUTH_TOKEN: Your Ngrok authentication token (required for callback handling)
- NGROK_CUSTOM_DOMAIN: Optional custom domain for Ngrok
Example with environment variables:
TOKEN_TYPE=reusable CURRENCY=USD PAYMENT_CONNECTOR=your_connector NGROK_AUTH_TOKEN=your_token npx twilio-agent-payments-mcp-server <accountSid> <apiKey> <apiSecret>
See the Configuration section below for more details on these parameters.
The following environment variables are used for configuration:
- TOKEN_TYPE: Type of token to use for payments (e.g., 'reusable', 'one-time')
- CURRENCY: Currency for payments (e.g., 'USD', 'EUR')
- PAYMENT_CONNECTOR: Payment connector to use with Twilio
- NGROK_AUTH_TOKEN: Your Ngrok authentication token (required for callback handling)
- NGROK_CUSTOM_DOMAIN: Optional custom domain for Ngrok
startPaymentCapture
Initiates a payment capture process for an active call. Parameters: callSid (string)
captureCardNumber
Starts the capture of the payment card number. Parameters: callSid (string), paymentSid (string), captureType (string, set to 'payment-card-number')
captureSecurityCode
Starts the capture of the card security code. Parameters: callSid (string), paymentSid (string), captureType (string, set to 'security-code')
captureExpirationDate
Starts the capture of the card expiration date. Parameters: callSid (string), paymentSid (string), captureType (string, set to 'expiration-date')
completePaymentCapture
Completes a payment capture session. Parameters: callSid (string), paymentSid (string)
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"twilio agent payments": {
"env": {
"CURRENCY": "USD",
"TOKEN_TYPE": "reusable",
"NGROK_AUTH_TOKEN": "your_ngrok_auth_token_here",
"PAYMENT_CONNECTOR": "your_connector_name",
"NGROK_CUSTOM_DOMAIN": "your_custom_domain_here"
},
"args": [
"/PATHTONODE/twilio-agent-payments-mcp-server/build/index.js",
"your_account_sid_here",
"your_api_key_here",
"your_api_secret_here"
],
"command": "node"
}
}
}
Linux
{
"env": {
"CURRENCY": "USD",
"TOKEN_TYPE": "reusable",
"NGROK_AUTH_TOKEN": "your_ngrok_auth_token_here",
"PAYMENT_CONNECTOR": "your_connector_name",
"NGROK_CUSTOM_DOMAIN": "your_custom_domain_here"
},
"args": [
"/PATHTONODE/twilio-agent-payments-mcp-server/build/index.js",
"your_account_sid_here",
"your_api_key_here",
"your_api_secret_here"
],
"command": "node"
}
Macos
{
"env": {
"CURRENCY": "USD",
"TOKEN_TYPE": "reusable",
"NGROK_AUTH_TOKEN": "your_ngrok_auth_token_here",
"PAYMENT_CONNECTOR": "your_connector_name",
"NGROK_CUSTOM_DOMAIN": "your_custom_domain_here"
},
"args": [
"/PATHTONODE/twilio-agent-payments-mcp-server/build/index.js",
"your_account_sid_here",
"your_api_key_here",
"your_api_secret_here"
],
"command": "node"
}
Windows
{
"env": {
"CURRENCY": "USD",
"TOKEN_TYPE": "reusable",
"NGROK_AUTH_TOKEN": "your_ngrok_auth_token_here",
"PAYMENT_CONNECTOR": "your_connector_name",
"NGROK_CUSTOM_DOMAIN": "your_custom_domain_here"
},
"args": [
"/PATHTONODE/twilio-agent-payments-mcp-server/build/index.js",
"your_account_sid_here",
"your_api_key_here",
"your_api_secret_here"
],
"command": "node"
}
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:
npx twilio-agent-payments-mcp-server <accountSid> <apiKey> <apiSecret>
Or install it globally:
npm install -g twilio-agent-payments-mcp-server
twilio-agent-payments-mcp-server <accountSid> <apiKey> <apiSecret>
Environmental Parameters
When installing the server, you need to provide the following parameters:
1. Command-line arguments (required):
- accountSid: Your Twilio Account SID
- apiKey: Your Twilio API Key
- apiSecret: Your Twilio API Secret
2. Environment variables (set before running the server):
- TOKEN_TYPE: Type of token to use for payments (e.g., 'reusable', 'one-time')
- CURRENCY: Currency for payments (e.g., 'USD', 'EUR')
- PAYMENT_CONNECTOR: Payment connector to use with Twilio
- NGROK_AUTH_TOKEN: Your Ngrok authentication token (required for callback handling)
- NGROK_CUSTOM_DOMAIN: Optional custom domain for Ngrok
Example with environment variables:
TOKEN_TYPE=reusable CURRENCY=USD PAYMENT_CONNECTOR=your_connector NGROK_AUTH_TOKEN=your_token npx twilio-agent-payments-mcp-server <accountSid> <apiKey> <apiSecret>
See the Configuration section below for more details on these parameters.
Configuration
The server requires the following parameters:
- accountSid: Your Twilio Account SID (must start with 'AC', will be validated)
- apiKey: Your Twilio API Key (starts with 'SK')
- apiSecret: Your Twilio API Secret
Environment Variables
The following environment variables are used for configuration:
- TOKEN_TYPE: Type of token to use for payments (e.g., 'reusable', 'one-time')
- CURRENCY: Currency for payments (e.g., 'USD', 'EUR')
- PAYMENT_CONNECTOR: Payment connector to use with Twilio
- NGROK_AUTH_TOKEN: Your Ngrok authentication token (required for callback handling)
- NGROK_CUSTOM_DOMAIN: Optional custom domain for Ngrok
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





