Logo de Zen7-Payment-Agent

Zen7-Payment-Agent

Organização
Zen7-Labs

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

Publicado porZen7-Labs
RepositórioZen7-Payment-Agent
IdiomaPython
Forks
13
Estrelas
179
Ferramentas disponíveis
0
Tipo de transportestdio
Categorias
LicençaApache-2.0
Links
  • Conecte ferramentas a fluxos de trabalho de IA

    Zen7-Payment-Agent disponibiliza recursos MCP que podem ser usados por clientes e agentes de IA compatíveis.

  • 0 ferramentas disponíveis

    Confira abaixo as ações que podem ser chamadas, incluindo nomes e descrições quando fornecidos pelo servidor.

  • Configuração pronta para copiar

    Use os exemplos de instalação para configurar este servidor no seu cliente MCP preferido.

  • Indicadores da comunidade de código aberto

    179 estrelas e 13 forks no repositório vinculado.

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

Use o MCP de Zen7-Payment-Agent com vários modelos de IA

O TypingMind conecta as ferramentas MCP no nível do espaço de trabalho. Assim, após conectar Zen7-Payment-Agent, é possível usá-lo com diferentes modelos de IA no TypingMind, em vez de configurá-lo separadamente para cada modelo. Este MCP é executado localmente no seu dispositivo por meio do conector MCP do TypingMind.

Guia de configuração para usar o conector local

Use esta opção quando o servidor MCP precisar acessar arquivos locais, aplicativos ou recursos privados no seu computador.

1

Abra as configurações de MCP

No TypingMind, vá até Configurações, Configurações avançadas e depois Model Context Protocol e selecione Configurar conector.

  1. Abra o TypingMind no navegador.
  2. Clique no ícone de Ajustes.
  3. Acesse Configurações avançadas.
  4. Abra a seção Model Context Protocol.
  5. Clique em Configurar conector e selecione Este dispositivo.
Tela de configuração do conector MCP do TypingMind com a opção Este dispositivo selecionada
2

Execute o comando do conector

Selecione Este dispositivo, copie o comando do TypingMind e execute-o no Terminal. Mantenha o processo em execução enquanto usa o MCP.

  1. Copie o comando de configuração exibido pelo TypingMind.
  2. Abra o Terminal no macOS ou o Windows Terminal no Windows.
  3. Cole e execute o comando.
  4. Autorize a instalação do pacote se o Terminal pedir confirmação para continuar.
  5. Mantenha o processo em execução na janela do Terminal enquanto usa as ferramentas MCP.
3

Adicione Zen7-Payment-Agent como servidor

Quando o status do conector for Pronto, clique em Editar e cole a configuração do servidor MCP.

  1. Aguarde até que o status do conector mostre Pronto.
  2. Clique em Editar.
  3. Cole a configuração do servidor MCP de Zen7-Payment-Agent.
  4. Salve a lista de servidores.
  5. Atualize para confirmar se o conector ainda está pronto para uso.
Configurações de MCP do TypingMind mostrando um servidor ativo e o botão Editar
{
  "mcpServers": {
    "zen7-payment-agent": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use a conexão com diferentes modelos

Salve a lista de servidores, abra Plugins, ative as ferramentas MCP de Zen7-Payment-Agent, selecione qualquer modelo de IA compatível no TypingMind e use as ferramentas no chat ou atribua-as a um agente de IA.

  1. Abra a página Plugins no TypingMind.
  2. Ative as ferramentas MCP de Zen7-Payment-Agent.
  3. Inicie um chat e escolha o modelo de IA que deseja usar.
  4. Use as ferramentas MCP no chat ou atribua-as a um agente de IA.
  5. Mude para outro modelo de IA sempre que necessário, sem reconectar o MCP.
Chat do TypingMind usando ferramentas MCP ativadas com um modelo de IA selecionado
Pode usar Zen7-Payment-Agent para me ajudar nesta tarefa?
Zen7-Payment-Agent
Claro. Já li.
Veja o que encontrei usando Zen7-Payment-Agent.

Perguntas frequentes

Para que serve o servidor MCP Zen7-Payment-Agent?

Zen7-Payment-Agent é um servidor MCP que permite que aplicativos de IA compatíveis se conectem a ferramentas externas e informações de contexto. No TypingMind, basta adicionar esse servidor MCP uma vez para disponibilizar suas ferramentas no seu espaço de trabalho com IA.

Posso usar o MCP Zen7-Payment-Agent com vários modelos de IA no TypingMind?

Sim. O TypingMind conecta as ferramentas MCP no nível do espaço de trabalho, permitindo usar Zen7-Payment-Agent com diferentes modelos de IA, como Claude, ChatGPT, Gemini ou outros modelos configurados no TypingMind, sem configurar o servidor MCP separadamente para cada modelo.

Por que usar o MCP Zen7-Payment-Agent com o TypingMind?

O TypingMind é uma das melhores interfaces de chat com LLMs porque reúne vários modelos de IA, prompts, plugins, agentes de IA, chaves de API e ferramentas MCP em um só espaço de trabalho. Com Zen7-Payment-Agent conectado, é possível usar suas ferramentas MCP nos seus modelos preferidos e manter seu fluxo de trabalho de chat organizado no TypingMind.

Como conecto o MCP Zen7-Payment-Agent ao TypingMind?

Zen7-Payment-Agent funciona por meio do conector MCP local do TypingMind. Essa é a melhor opção quando o servidor MCP precisa acessar arquivos locais, apps de desktop, ferramentas de linha de comando ou recursos privados no seu computador.

Quais ferramentas o MCP Zen7-Payment-Agent oferece no TypingMind?

Zen7-Payment-Agent disponibiliza recursos MCP que podem ser ativados na página Plugins do TypingMind e usados no chat ou atribuídos a agentes de IA.

Preciso compartilhar minhas chaves de API com o TypingMind para usar o MCP Zen7-Payment-Agent?

Não. O TypingMind prioriza o uso local e permite manter seus provedores de modelos, chaves de API, prompts e configuração MCP sob seu controle. Se Zen7-Payment-Agent exigir autenticação, adicione os cabeçalhos, as configurações OAuth ou a configuração local exigidos por esse servidor MCP ao criar a conexão.

Servidores MCP relacionados

Ver todos

Crie seu próprio espaço de IA agora

Inscreva-se na nossa newsletter para receber novidades sobre recursos e futuros sorteios 👇