Zen7-Payment-Agentのロゴ

Zen7-Payment-Agent

組織
Zen7-Labs

Zen7 Payment Agent is the first implementation project of DePA (Decentralized Payment Agent), pioneers next-generation intelligent payment infrastructure.

公開者Zen7-Labs
リポジトリZen7-Payment-Agent
言語Python
フォーク
13
スター
179
利用可能なツール
0
通信方式stdio
カテゴリ
ライセンスApache-2.0
リンク
  • ツールをAIワークフローに接続

    Zen7-Payment-Agentは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 0個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには179件のスターと13件のフォークがあります。

Zen7 Payment Agent

License Python Built with uv 中文版本

Real-time progress updates can be viewed on page Real-time progress For support on the x402 protocol, please click here

Zen7 Payment Agent is the first practical implementation of DePA (Decentralized Payment Agent), pioneering the next generation of intelligent payment infrastructure. It not only fully implements the core functionalities of DePA but also successfully deploys innovative application cases in the agentic commerce domain.

As the first practical project in the DePA ecosystem, Zen7 implements several key features: automated encrypted payments between agents, a "permissionless authorization" mechanism, and LLM-driven intent recognition and interaction.

Zen7 Payment Agent adopts a multi-agent collaborative architecture, supporting both A2A and MCP protocols, as well as custodial and non-custodial payment models. It provides a comprehensive payment solution for AI Agents and native Dapp applications with multi-chain, multi-currency, multi-wallet support, high-frequency transactions, gasless operations, and passwordless authentication.

Navigating the Repository

This repository contains the complete implementation of Zen7 Payment Agent, showcasing the core components and architectural design based on the Zen7 Payment Agent (Decentralized Payment Agent) protocol.

Core Directory Structure

The core implementation of the project is located in the following key directories:

host_agent - The core implementation of the multi-agent collaborative architecture. The host agent uses the gemini-2.0-flash-lite model as the core coordinator, responsible for query understanding, state management, and response coordination. The sub-agent system (sub_agents/) contains five specialized agents: payer_agent handles order creation for the payer, EIP-712 signature generation, and wallet balance verification; settlement_agent focuses on the settlement process, confirming payment details, executing on-chain transactions, and monitoring transaction status; payee_agent handles payee-related operations, receiving settlement notifications, confirming order creation, and notifying payment completion; order_agent manages order processing and intent recognition, automatically routing to different agents; allowance_agent provides authorization quota query functionality, supporting multi-chain token authorization queries.

a2a_server & mcp_server - Protocol adaptation layer implementation, providing diverse integration methods. a2a_server implements Google's Agent-to-Agent protocol using the A2AStarletteApplication framework, exposing agent capabilities through AgentCard, supporting inter-agent collaborative communication, and running on port 10000 by default. mcp_server implements Model Context Protocol integration based on the FastMCP framework, encapsulating payment functionality as tool APIs, providing the core proceed_payment_and_settlement_detail_info tool, supporting SSE (Server-Sent Events) transport, and running on port 8015 by default.

dao - Data access layer implementation, integrating PostgreSQL + SQLModel for data persistence. Includes database model definitions (model.py), database connection management (database.py), and data access interfaces (app.py), supporting complete business data management for orders, payments, settlements, intents, and audit events.

task_manager - Task management layer implementation with factory pattern design. payment_service.py provides a unified interface for payment services, task_scoped_manager.py implements task scope management, ensuring isolation and lifecycle management for different payment tasks.

services - Complete blockchain service implementation. Signature services support both EVM chains (execute_sign.py) and Solana chain (execute_sign_solana.py), with EVM providing EIP-712 typed data signing and supporting permit signatures for USDC and DAI; transfer handlers adopt base class abstraction design (base_handler.py), divided into custodial/ mode (backend manages wallets to simplify user experience) and non_custodial/ mode (users control private keys for enhanced security), supporting both EVM (evm_transfer_handler.py) and Solana (solana_transfer_handler.py) blockchains; data service layer includes intent recording (intent.py), audit events (audit_event.py), settlement batches (settlement_batch.py), and settlement details (settlement_detail.py), enabling full transaction lifecycle tracking; constant configuration (constants.py) centrally manages blockchain network configurations, contract addresses, and chain IDs; permit execution (execute_permit.py) handles ERC-20 token authorization and permit execution.

Companion Console Demo Application

The companion console demo application is located in a separate Zen7-Console-Demo repository, providing users with a complete interactive interface and payment flow demonstration, allowing developers to intuitively experience the workflow of the entire payment system. It includes complete payment flows for both A2A and MCP clients in e-commerce scenarios.

  • Shopping Agent Client demonstrates how to use payment agent services in e-commerce scenarios, implementing features such as product browsing, ordering, and payment.

Technology Stack and Compatibility

Supported Blockchain Networks:

  • EVM Compatible Chains: Ethereum Sepolia, Base Sepolia, Polygon Amoy, BNB Chain Testnet
  • Solana: Devnet, Testnet

Compatible Token Standards:

  • EVM: USDC (Version 2), DAI (Version 1)
  • Solana: SPL Token

Signature Standards:

  • EVM: EIP-712 Typed Data Signing
  • Solana: Ed25519 Signature

Wallet Integration: MetaMask, Coinbase Wallet, Phantom Wallet

Data Persistence: PostgreSQL + SQLModel ORM

This design provides developers with a flexible testing environment, supporting a complete payment solution with multi-chain and multi-currency capabilities, while ensuring good compatibility with mainstream wallets and blockchain networks.

Quick Start

Environment Setup

Development Guide

Security Considerations

  • Private Key Security: Private keys in the test environment are only for development; use secure key management solutions in production
  • Network Environment: Currently supports testnets; production environments require corresponding mainnet configurations
  • Token Management: Ensure test wallets have sufficient test tokens for transactions
  • API Security: Configure appropriate authentication and authorization mechanisms in production environments

Support

If you encounter issues or need help, please:

  • Check the relevant guides in the documentation directory
  • Submit issues on GitHub Issues
  • Contact the development team

About Zen7 Labs

Zen7 Labs is dedicated to building the next generation of decentralized payment infrastructure, focusing on providing innovative payment solutions for Agentic Commerce. By simplifying blockchain payment experiences through AI agent technology, we are pioneering a new paradigm of payments in the agent economy era, making commercial interactions between agents more efficient, secure, and intelligent.


Citation

If you find Zen7 Payment Agent helpful in your research or project, please cite it as:

bibtex
@misc{zen7paymentagent,
  author = {Zen7 Labs},
  title = {Zen7 Payment Agent: A Dedicated Payment Network for Every Intelligent Agent.},
  year = {2025},
  publisher = {GitHub},
  url = {https://github.com/Zen7-Labs/Zen7-Payment-Agent}
}

License

Apache License Version 2.0

Zen7-Payment-AgentのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度Zen7-Payment-Agentに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、デバイス上のTypingMind MCPコネクタを通じてローカルで動作します。

ローカルコネクタのセットアップガイド

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」、「詳細設定」、「MCP」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「MCP」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

Zen7-Payment-Agentをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. Zen7-Payment-AgentのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタが引き続き使用可能か確認するには、更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "zen7-payment-agent": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてZen7-Payment-AgentのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. Zen7-Payment-AgentのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
Zen7-Payment-Agentを使ってこのタスクを手伝ってもらえますか?
Zen7-Payment-Agent
はい、読みました。
Zen7-Payment-Agentで調べた結果をお伝えします。

よくある質問

Zen7-Payment-Agent MCPサーバーは何に使いますか?

Zen7-Payment-Agentは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでZen7-Payment-Agent MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでZen7-Payment-Agentを利用できます。

TypingMindでZen7-Payment-Agent MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。Zen7-Payment-Agentを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

Zen7-Payment-Agent MCPをTypingMindに接続するにはどうすればよいですか?

Zen7-Payment-AgentはTypingMindのローカルMCPコネクタ経由で動作します。MCPサーバーがコンピューター上のローカルファイル、デスクトップアプリ、コマンドラインツール、プライベートリソースにアクセスする必要がある場合に最適です。

TypingMindでZen7-Payment-Agent MCPのどのようなツールを利用できますか?

Zen7-Payment-AgentはMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

Zen7-Payment-Agent MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。Zen7-Payment-Agentで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇