Логотип 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
Ссылки
  • Подключайте инструменты к рабочим процессам с ИИ

    Zen7-Payment-Agent предоставляет возможности 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

Используйте MCP Zen7-Payment-Agent с разными ИИ-моделями

TypingMind подключает инструменты MCP на уровне рабочего пространства, поэтому после подключения Zen7-Payment-Agent вы можете использовать их с разными моделями ИИ в TypingMind, не настраивая подключение отдельно для каждой модели. Эта интеграция MCP работает локально на вашем устройстве через коннектор MCP TypingMind.

Руководство по настройке локального коннектора

Выберите этот способ, если серверу MCP нужен доступ к локальным файлам, приложениям или закрытым ресурсам на вашем компьютере.

1

Откройте настройки MCP

В TypingMind откройте «Настройки», затем «Расширенные настройки», перейдите в раздел «Протокол контекста модели» и выберите «Настроить коннектор».

  1. Откройте TypingMind в браузере.
  2. Нажмите значок настроек.
  3. Перейдите в «Расширенные настройки».
  4. Откройте раздел «Протокол контекста модели».
  5. Нажмите «Настроить коннектор» и выберите «Это устройство».
Экран настройки коннектора MCP в TypingMind с выбранным вариантом «Это устройство»
2

Выполните команду коннектора

Выберите «Это устройство», скопируйте команду из TypingMind и выполните её в терминале. Не останавливайте процесс, пока используете MCP.

  1. Скопируйте команду настройки, показанную в TypingMind.
  2. Откройте «Терминал» в macOS или Windows Terminal в Windows.
  3. Вставьте и выполните команду.
  4. Подтвердите установку пакета, если терминал запросит разрешение продолжить.
  5. Не закрывайте окно терминала и не останавливайте процесс, пока используете инструменты MCP.
3

Добавьте Zen7-Payment-Agent как сервер

Когда статус коннектора сменится на «Готов», нажмите «Изменить серверы» и вставьте конфигурацию сервера MCP.

  1. Дождитесь, пока статус коннектора сменится на «Готов».
  2. Нажмите «Изменить серверы».
  3. Вставьте конфигурацию сервера MCP для Zen7-Payment-Agent.
  4. Сохраните список серверов.
  5. Обновите статус, если хотите убедиться, что коннектор по-прежнему готов к работе.
Настройки MCP в TypingMind с активным сервером и кнопкой «Изменить серверы»
{
  "mcpServers": {
    "zen7-payment-agent": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Используйте подключение с разными моделями

Сохраните список серверов, откройте раздел «Плагины», включите инструменты MCP для Zen7-Payment-Agent, затем выберите любую поддерживаемую модель ИИ в TypingMind и используйте инструменты в чате или назначьте их ИИ-агенту.

  1. Откройте страницу «Плагины» в TypingMind.
  2. Включите инструменты MCP для Zen7-Payment-Agent.
  3. Начните чат и выберите модель ИИ, которую хотите использовать.
  4. Используйте инструменты MCP в чате или назначьте их ИИ-агенту.
  5. При необходимости переключайтесь на другую модель ИИ без повторного подключения MCP.
Чат TypingMind с включёнными инструментами MCP и выбранной ИИ-моделью
Можете помочь мне с этой задачей с помощью Zen7-Payment-Agent?
Zen7-Payment-Agent
Конечно. Я всё прочитал.
Вот что я нашёл с помощью Zen7-Payment-Agent.

Часто задаваемые вопросы

Для чего используется сервер MCP Zen7-Payment-Agent?

Zen7-Payment-Agent — это сервер MCP, который позволяет совместимым ИИ-клиентам подключаться к внешним инструментам и получать контекст. В TypingMind достаточно один раз добавить этот сервер MCP, чтобы его инструменты стали доступны в вашем рабочем пространстве с ИИ.

Можно ли использовать сервер MCP Zen7-Payment-Agent с несколькими ИИ-моделями в TypingMind?

Да. TypingMind подключает инструменты MCP на уровне рабочего пространства, поэтому вы можете использовать Zen7-Payment-Agent с разными ИИ-моделями, например Claude, ChatGPT, Gemini или другими моделями, настроенными в TypingMind, без отдельной настройки сервера MCP для каждой модели.

Зачем использовать MCP Zen7-Payment-Agent с TypingMind?

TypingMind — один из лучших интерфейсов для чата с LLM: он объединяет разные ИИ-модели, промпты, плагины, ИИ-агентов, ключи API и инструменты MCP в одном рабочем пространстве. Подключив Zen7-Payment-Agent, вы сможете использовать его инструменты MCP с предпочитаемыми моделями, сохраняя удобную организацию работы с чатами в TypingMind.

Как подключить сервер MCP Zen7-Payment-Agent к TypingMind?

Zen7-Payment-Agent работает через локальный коннектор MCP TypingMind. Этот вариант лучше всего подходит, когда серверу MCP нужен доступ к локальным файлам, настольным приложениям, инструментам командной строки или закрытым ресурсам на вашем компьютере.

Какие инструменты предоставляет сервер MCP Zen7-Payment-Agent в TypingMind?

Zen7-Payment-Agent предоставляет возможности MCP, которые можно включить на странице «Плагины» в TypingMind и использовать в чате или назначить ИИ-агентам.

Нужно ли передавать TypingMind свои ключи API для использования сервера MCP Zen7-Payment-Agent?

Нет. TypingMind ориентирован прежде всего на локальную работу и позволяет вам контролировать выбор провайдеров моделей, ключи API, промпты и конфигурацию MCP. Если Zen7-Payment-Agent требует аутентификации, при создании подключения добавьте необходимые заголовки, настройки OAuth или локальную конфигурацию для этого сервера MCP.

Похожие серверы MCP

Все

Создайте свою рабочую ИИ-среду сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇