MCP Stripe Server

MIT License
13
  • Apple

Integrations

  • Allows to manage Stripe payment operations including customer management, payment intents, charges, and refunds through a structured API

MCP 条纹服务器

一个模型上下文协议 (MCP) 服务器实现,与 Stripe 集成,用于处理付款、客户和退款。该服务器提供结构化的 API,用于安全地管理金融交易。

演示

要求

  • Python 3.8+
  • MCP SDK 0.1.0+
  • Stripe Python SDK
  • dotenv

成分

资源

该服务器提供所有 Stripe 操作的审计日志:

  • 存储客户、付款和退款操作的审计日志
  • 支持结构化日志记录,以实现更好的可追溯性
  • 使用 MCP 资源端点检索审计数据

工具

服务器实现 Stripe API 操作,包括:

客户管理
  • customer_create :创建新客户
  • customer_retrieve :检索客户的详细信息
  • customer_update :更新客户信息
付款操作
  • payment_intent_create :创建用于处理付款的付款意向
  • charge_list :列出最近的费用
退款操作
  • refund_create :创建费用退款

特征

  • 安全支付:与 Stripe 集成,实现强大的支付处理
  • 审计日志:跟踪所有 Stripe 交易
  • 错误处理:全面的错误处理,清晰的消息
  • MCP 集成:支持 MCP 兼容工具和资源列表

安装

通过 Smithery 安装

要通过Smithery自动为 Claude Desktop 安装 Stripe Server:

npx -y @smithery/cli install @atharvagupta2003/mcp-stripe --client claude

安装依赖项

python -m venv venv source venv/bin/activate # On macOS/Linux venv\Scripts\activate # On Windows pip install -e .

配置

.env文件中设置环境变量:

STRIPE_API_KEY=your_stripe_secret_key
克劳德桌面

将服务器配置添加到您的 Claude Desktop 配置中:

Windows:C:\Users<用户名>\AppData\Roaming\Claude\claude_desktop_config.json

MacOS:〜/资源库/应用程序支持/Claude/claude_desktop_config.json

{ "mcpServers": { "stripe": { "command": "uv", "args": [ "--directory", "/ABSOLUTE/PATH/TO/PARENT/FOLDER/src", "run", "server.py" ] } } }

用法

启动服务器

uv run src/server.py

MCP 命令示例

创建客户
{ "tool": "customer_create", "arguments": { "email": "customer@example.com", "name": "John Doe" } }
检索客户
{ "tool": "customer_retrieve", "arguments": { "customer_id": "cus_123456" } }
创建付款意向
{ "tool": "payment_intent_create", "arguments": { "amount": 5000, "currency": "usd", "customer": "cus_123456" } }
创建退款
{ "tool": "refund_create", "arguments": { "charge_id": "ch_abc123" } }

错误处理

服务器针对常见场景提供了清晰的错误消息:

  • 缺少 API 密钥:需要 STRIPE_API_KEY
  • 无效的 API 密钥:身份验证错误
  • 未找到客户:无效的客户 ID
  • 无效输入:参数缺失或不正确

发展

测试

运行 MCP Inspector 进行交互式测试:

npx @modelcontextprotocol/inspector uv --directory /ABSOLUTE/PATH/TO/PARENT/FOLDER/src run server.py

建筑

  1. 更新依赖项:
uv compile pyproject.toml
  1. 构建包:
uv build

贡献

欢迎大家投稿!详情请参阅我们的投稿指南

执照

该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。

-
security - not tested
A
license - permissive license
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

与 Stripe 集成的服务器,通过模型上下文协议处理付款、客户和退款,提供安全的 API 来管理金融交易。

  1. 演示
    1. 要求
    2. 成分
    3. 特征
    4. 安装
    5. 用法
    6. 错误处理
    7. 发展
    8. 执照

Related MCP Servers

  • stripeofficial

    -
    security
    A
    license
    -
    quality
    The Stripe Model Context Protocol server allows you to integrate with Stripe APIs through function calling. This protocol supports various tools to interact with different Stripe services.
    Last updated -
    4,622
    717
    TypeScript
    MIT License
  • -
    security
    F
    license
    -
    quality
    A server implementing the Model Context Protocol to make and query payments through Worldpay APIs, enabling payment processing, payment queries, and checkout form generation.
    Last updated -
    TypeScript
  • -
    security
    A
    license
    -
    quality
    A Model Context Protocol server that provides comprehensive integration with PayPal's APIs, enabling seamless interaction with payment processing, invoicing, subscription management, and business operations through a standardized interface.
    Last updated -
    TypeScript
    Apache 2.0
  • -
    security
    A
    license
    -
    quality
    A server that provides integration with PayPal's APIs, enabling seamless interaction with payment processing, invoicing, subscription management, and business operations through a standardized interface.
    Last updated -
    TypeScript
    MIT License

View all related MCP servers

ID: wiypoirrk3