Skip to main content
Glama
MCP Stripe Server

MCP Stripe Server

MCP ストライプサーバー

鍛冶屋のバッジ

Stripeと統合し、支払い、顧客管理、返金処理を可能にするModel Context Protocol(MCP)サーバー実装。このサーバーは、金融取引を安全に管理するための構造化APIを提供します。

デモ

ストライプデモ

要件

  • Python 3.8以上

  • MCP SDK 0.1.0+

  • ストライプ Python SDK

  • ドテンヴ

Related MCP server: Stripe MCP Server

コンポーネント

リソース

サーバーは、すべての 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: ~/Library/Application Support/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ファイルを参照してください。

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      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.
      31,367 npm
      2,068
      -
    • A
      license
      C
      quality
      D
      maintenance
      A Model Context Protocol server that enables interaction with the Ryft API to manage financial resources such as payment sessions, customers, and subscriptions. It supports comprehensive operations including payouts, disputes, and account-scoped requests through a secure stdio interface.
      69
      MIT