AT

aslan11/temporal-invoice-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

21 stars 5 forks 品質 52 トレンド 0

このリポジトリの目的は、Temporalを活用してMCPサーバー用の「Human-In-The-Loop」耐久性ツールを作成することです

概要

- Python3+ - uv (curl -LsSf [https://astral.sh/uv/install.sh]] sh) - 一時的なローカル設定ガイド - デスクトップ用クロード サーバとワーカーを手動で起動する代わりに、boot-demo.shヘルパースクリプトを使用してtmuxセッションで起動できます。 - 成功すると、'Search & Tools' の下の invoice processor が表示されます。 MCP クライアント (たとえば、Claude デスクトップ) を使用して、トリガー、承認、拒否、ステータス ツールを呼び出します。 トリガーツールは、起動ワークフローの Workflow id と run id の両方を返します。 これらの値を承認、拒否、ステータスツールに渡します。 サンプルインボイスはsample/invoice acme.json で動作します。 [[T1]でテンポラルWebを調べる] 決定的な再生を観察するために、いつでも労働者を殺し、再起動します。 Claude + MCP は、承認などのプロセスワークフローに入力と更新を送信したり、アクションのコンビネーションを実行したりできます。 人体的、人体的なアナログで説明したり、次の手順に尋ねるかどうかを説明します。 1.

概要(AI 翻訳)

###ビデオ:

前提条件:

1. クローン & インストール

##2. ローカルでテンポラルを起動する

#3. ワーカーを起動する

クイックデモブート

サーバとワーカーを手動で起動する代わりに、 [tmux] ヘルパースクリプトを使用してセッション:

デスクトップの指示のためのクロード (Sonnet 4)

1. 手順に従って 1-3 上記

#2. Claude Config (Claude > Settings > Developer > Edit Config) の編集

#3。 設定を編集した後、デスクトップ用のClaudeを再起動します

  • 成功した場合は、[invoice_processorを参照してください ‘検索&ツール’

#4. モックインボイスの処理をキックオフするには、次のコマンドを実行します。

MCP クライアント (例、Claude デスクトップ) を使用して、[trigger]、[approve] を呼び出します。 reject, [status]] ツール. [trigger] ツールが両方を返すようになりました [workflow_id および run_id の開始ワークフロー。 これらの値を渡す [approve, [reject], [status]]] ツール。 サンプルインボイスは、 [samples/invoice_acme.json]。 [http://localhost:8233でテンポラルWebを調べます。 決定的な再生を観察するために、いつでも労働者を殺し、再起動します。

#5. 結果

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

Invoice Demo with Temporal + MCP

Video:

Prerequisites:

1. Clone & install

 git clone https://github.com/your-org/temporal-mcp-invoice-demo.git
 cd temporal-mcp-invoice-demo
 uv venv
 source .venv/bin/activate
 uv pip install temporalio fastmcp

2. Launch Temporal locally

 temporal server start-dev

3. Start the worker

 python worker.py [--fail-validate] [--fail-payment]

Quick demo boot

Instead of starting the server and worker manually you can launch them in a tmux session using the boot-demo.sh helper script:

 ./boot-demo.sh

Claude for Desktop Instructions (Sonnet 4)

1. Follow steps 1-3 above

2. Edit your Claude Config (Claude > Settings > Developer > Edit Config)

{
  "mcpServers": {
    "invoice_processor": {
      "command": "/Path/To/Your/Install/Of/uv",
      "args": [
        "--directory",
        "/Path/To/temporal-invoice-mcp",
        "run",
        "server.py"
      ]
    }
  }
}

3. Restart Claude for Desktop after editing your config

  • If successful you’ll see invoice_processor under ‘Search & Tools’

4. To kick off processing the mock invoice, run:

trigger 

Use your MCP client (e.g., Claude Desktop) to call the trigger, approve, reject, and status tools. The trigger tool now returns both the workflow_id and run_id of the started workflow. Pass these values to the approve, reject, and status tools. The sample invoice lives at samples/invoice_acme.json. Inspect Temporal Web at http://localhost:8233. Kill and restart the worker at any time to observe deterministic replay.

5. Results

Claude submits the invoice workflow:

It can get status:

Claude + MCP can send inputs and updates to the process workflow such as approvals, or even do a combination of actions - all agentically, explaining in human analogies what’s going on if you ask it to:

What’s Cool About This:

  1. Agents and applications connected by MCP can provide a powerful way for humans to interact with processes and applications
GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "invoice_processor": { "command": "/Path/To/Your/Install/Of/uv", "args": [ "--directory", "/Path/To/temporal-invoice-mcp", "run", "server.py" ] } } }