Twilio Agent Payments

Provides an MCP server to securely capture and tokenize payments via Twilio with guided prompts and asynchronous callbacks.
  • typescript

5

GitHub Stars

typescript

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "deshartman-twilio-agent-payments-mcp-server": {
      "command": "npx",
      "args": [
        "twilio-agent-payments-mcp-server",
        "<accountSid>",
        "<apiKey>",
        "<apiSecret>"
      ],
      "env": {
        "CURRENCY": "USD",
        "TOKEN_TYPE": "reusable",
        "NGROK_AUTH_TOKEN": "your_token",
        "PAYMENT_CONNECTOR": "your_connector_name",
        "NGROK_CUSTOM_DOMAIN": "your_custom_domain_here"
      }
    }
  }
}

You learn how to run and use a Model Context Protocol (MCP) server that handles agent-assisted payments via Twilio, with guided prompts and secure, tokenized card handling designed for PCI compliance.

How to use

Connect your MCP client to the Twilio Agent Payments MCP server to start processing secure payments during voice calls. The server exposes tools to start a payment capture, capture card details in steps, and finish the capture, while providing contextual prompts to guide the conversation with the customer. You can also query the current status of a payment session via a dedicated resource.

How to install

Prerequisites: Node.js 18+ and an environment that can run npm and npx commands.

Install the server directly with npx and run it using your credentials.

npx twilio-agent-payments-mcp-server <accountSid> <apiKey> <apiSecret>

Alternatively, install globally and start the server with the global command.

npm install -g twilio-agent-payments-mcp-server
twilio-agent-payments-mcp-server <accountSid> <apiKey> <apiSecret>

You may also run the server locally via a Node build entry if you prefer a local build path.

node build/index.js "your_account_sid_here" "your_api_key_here" "your_api_secret_here"

Or use the development flow to run via npm in dev mode.

npm run dev -- "your_account_sid_here" "your_api_key_here" "your_api_secret_here"

Configuration and notes

Environment variables you can set to customize behavior are applied before starting the server.

TOKEN_TYPE defines the token model for payments (for example, reusable or one-time).

CURRENCY sets the currency for payments (e.g., USD, EUR).

PAYMENT_CONNECTOR selects the payment connector to use with Twilio.

NGROK_AUTH_TOKEN provides authentication for Ngrok, enabling secure callback handling.

NGROK_CUSTOM_DOMAIN allows using a custom domain for Ngrok callbacks (optional).

Available tools

startPaymentCapture

Initiates a payment capture session for an active call using the startPaymentCapture tool.

captureCardNumber

Starts the capture of the payment card number for the current payment session.

captureSecurityCode

Starts the capture of the card security code for the current payment session.

captureExpirationDate

Starts the capture of the card expiration date for the current payment session.

completePaymentCapture

Completes a payment capture session after all required data has been collected.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
Twilio Agent Payments MCP Server - deshartman/twilio-agent-payments-mcp-server | VeilStrat