Gatherings MCP Server

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.

Integrations

  • Serves as the runtime environment for the MCP server, enabling the creation and management of shared expenses for social events through Python-based implementations.

  • Provides an ORM interface for storing gathering data, expenses, and payment records in a SQL database, allowing for persistence of user expense-sharing information.

ギャザリングMCPサーバー

Gatherings 経費共有アプリケーション用の Machine Conversation Protocol (MCP) サーバー インターフェイス。

概要

Gatherings MCPサーバーは、AIアシスタントがMachine Conversation Protocolを介してGatheringsアプリケーションと対話するためのAPIを提供します。これにより、AIシステムは、社交イベント、外出、または参加者間で費用を分担するあらゆる集まりにおける共同費用の管理をユーザーを支援することができます。

特徴

  • 複数のメンバーとの集まりを作成および管理する
  • 特定のメンバーの経費を追加する
  • 公正な払い戻し額を計算する
  • 支払いと払い戻しを記録する
  • 詳細な支払い概要を生成する
  • 集まりにメンバーを追加/削除する
  • 必要に応じてメンバーの名前を変更する

インストール

前提条件

  • Python 3.8以上
  • SQLアルケミー
  • MCP SDK

設定

  1. このリポジトリをクローンします:
    git clone https://your-repository.git cd accel
  2. 必要な依存関係をインストールします。
    pip install -r requirements.txt
  3. 環境変数を設定します(オプション):
    # Custom database location export GATHERINGS_DB_PATH=path/to/database.db # Custom script location export GATHERINGS_SCRIPT=path/to/gatherings.py

使用法

MCP サーバーを起動します。

python gatherings_mcp_server.py

サーバーは stdio 上で実行されるため、MCP プロトコル クライアントと互換性があります。

APIリファレンス

MCP サーバーは次のツールを公開します。

create_gathering(gathering_id: str, members: int)

指定された数のメンバーで新しい集まりを作成します。

add_expense(gathering_id: str, member_name: str, amount: float)

集まりのメンバーの経費を追加します。

calculate_reimbursements(gathering_id: str)

集まりで誰が誰にいくら借りているかを計算します。

record_payment(gathering_id: str, member_name: str, amount: float)

メンバーによる支払い (正の値) またはメンバーへの払い戻し (負の値) を記録します。

rename_member(gathering_id: str, old_name: str, new_name: str)

集まりのメンバーの名前を変更します。

show_gathering(gathering_id: str)

経費や支払い状況など、集まりの詳細を表示します。

list_gatherings()

データベース内のすべての集まりを一覧表示します。

close_gathering(gathering_id: str)

集会を終了としてマークします。

delete_gathering(gathering_id: str, force: bool = False)

集会とそれに関連するすべてのデータを削除します。終了した集会を削除するには、 force=Trueを設定します。

add_member(gathering_id: str, member_name: str)

既存の集まりに新しいメンバーを追加します。

remove_member(gathering_id: str, member_name: str)

集まりからメンバーを削除します (経費がない場合のみ)。

フロー例

  1. 5 人の友人との夕食会の集まりを作成します。
    create_gathering("2023-10-15-dinner", 5)
  2. 人々が支払う費用を追加します。
    add_expense("2023-10-15-dinner", "Alice", 120.50) add_expense("2023-10-15-dinner", "Bob", 35.00)
  3. 払い戻し額を計算します:
    calculate_reimbursements("2023-10-15-dinner")
  4. 決済が完了したら支払いを記録します。
    record_payment("2023-10-15-dinner", "Charlie", 31.10)
  5. すべての支払いが完了したら集会を終了します。
    close_gathering("2023-10-15-dinner")

建築

Gatherings MCP サーバーは、次の 3 つの主要コンポーネントで構成されています。

  1. MCP サーバー インターフェイス( gatherings_mcp_server.py ): AI ツールが対話できる MCP プロトコル インターフェイスを提供します。
  2. サービス レイヤー( services.py ): 集まり、経費、支払いを管理するためのビジネス ロジックが含まれています。
  3. データ レイヤー( models.py ): SQLAlchemy ORM を使用してデータベース スキーマを定義し、データの永続性を処理します。

データモデル

  • 集まり:費用を分担する社交行事を表す
  • メンバー: 集まりの参加者
  • 経費:メンバーが集会のために支出したお金
  • 支払い:残高を決済するために会員が支払うお金

貢献

貢献を歓迎します!お気軽にプルリクエストを送信してください。

ID: 69btvo84i5