Twilio 代理支付 MCP 服务器
基于 Twilio API 的 MCP 服务器,用于处理代理辅助支付,支持异步回调和上下文引导。
快速入门
-
安装 Node.js 18+。
-
使用以下命令运行服务器:
npx twilio-agent-payments-mcp-server <accountSid> <apiKey> <apiSecret>
或全局安装后运行:
npm install -g twilio-agent-payments-mcp-server twilio-agent-payments-mcp-server <accountSid> <apiKey> <apiSecret>
-
配置环境变量:
TOKEN_TYPE
: 支付令牌类型(如 reusable, one-time)CURRENCY
: 货币代码(如 USD, EUR)PAYMENT_CONNECTOR
: Twilio 支付连接器名称NGROK_AUTH_TOKEN
: Ngrok 认证令牌NGROK_CUSTOM_DOMAIN
(可选): 自定义域名
-
在 Claude Desktop 中配置服务器: 编辑配置文件
~/Library/Application Support/Claude/claude_desktop_config.json
或%APPDATA%\Claude\claude_desktop_config.json
,添加如下内容:{ "mcpServers": { "twilio-agent-payments": { "command": "npx", "args": [ "-y", "twilio-agent-payments-mcp-server", "your_account_sid_here", "your_api_key_here", "your_api_secret_here" ], "env": { "TOKEN_TYPE": "reusable", "CURRENCY": "USD", "PAYMENT_CONNECTOR": "your_connector_name", "NGROK_AUTH_TOKEN": "your_ngrok_auth_token_here" } } } }
-
启动服务器并开始使用工具和资源。