convez.ai
MCP ServerIntegração & APIsIntermediário
petteri74dev

AsterPay MCP Server

petteri74dev/asterpay-mcp-server

Comércio de IA para Europa com x402 e liquidação EUR

Ver no GitHub
InicialPluginScore · de 0 a 100

Servidor MCP que capacita agentes de IA a descobrir e comprar de comerciantes europeus através do protocolo x402 com liquidação em EUR via SEPA Instant. Funciona em modo vendedor (expor produtos) ou modo comprador (descobrir e adquirir de um catálogo de comerciantes).

Instalação

$npx convez-ai petteri74dev/asterpay-mcp-server

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
0
Forks
0
Acompanhando
0
Saúde
42%
Último commit
há 5 meses
Versão
—
Issues abertas
1
Contribuidores
0

Casos de uso

  • Agentes de IA autônomos realizando compras em catálogos europeus
  • Integrar lojas em plataformas de automação com liquidação EUR nativa
  • Teste de fluxos de comercio eletrônico com dados simulados (modo demo)

Veredito

Caso de uso bem definido e nicho (commerce B2B com agentes de IA na Europa), mas limitado a contextos que usam x402 e SEPA. Implementação técnica sólida com modos flexíveis (demo, seller, buyer), porém requer infraestrutura específica e não resolve problemas de comercio amplo.

README

A tradução para o português deste README ainda está na fila.

@asterpay/mcp-server

EUR settlement MCP server for AI agent commerce.

The first MCP server that lets AI agents discover and buy from European merchants using the x402 protocol with EUR settlement via SEPA Instant.

Quick Start

Demo Mode (no API key needed)

Try it out immediately with built-in mock data:

{
  "mcpServers": {
    "asterpay-demo": {
      "command": "npx",
      "args": ["@asterpay/mcp-server", "--mock"]
    }
  }
}

Seller Mode

Expose your products to AI agents:

{
  "mcpServers": {
    "my-shop": {
      "command": "npx",
      "args": ["@asterpay/mcp-server", "--mode", "seller"],
      "env": {
        "ASTERPAY_API_KEY": "ap_write_xxxxxxxxxxxx",
        "MERCHANT_SLUG": "your-shop-slug"
      }
    }
  }
}

Buyer Mode

Let your agent discover and purchase from merchants:

{
  "mcpServers": {
    "asterpay-buyer": {
      "command": "npx",
      "args": ["@asterpay/mcp-server", "--mode", "buyer"],
      "env": {
        "ASTERPAY_API_KEY": "ap_buyer_xxxxxxxxxxxx",
        "SPENDING_LIMIT_DAILY_EUR": "50",
        "SPENDING_LIMIT_WEEKLY_EUR": "200"
      }
    }
  }
}

Configuration

VariableRequiredDefaultDescription
MODENosellerServer mode: seller or buyer
ASTERPAY_API_KEYYes*—Your API key. *Not needed with --mock
ASTERPAY_API_URLNohttps://api.asterpay.ioAPI endpoint
MERCHANT_SLUGNo—Your merchant identifier (seller mode)
SPENDING_LIMIT_DAILY_EURNo**—Daily spending cap. **Required for buyer mode (non-mock)
SPENDING_LIMIT_WEEKLY_EURNo**—Weekly spending cap. **At least one limit required for buyer mode
DEBUGNofalseEnable verbose logging to stderr

CLI Flags

asterpay-mcp --mode seller|buyer   # Set mode
asterpay-mcp --mock                # Use demo data, no API key needed
asterpay-mcp --smoke-test          # Run diagnostic check and exit
asterpay-mcp --help                # Show help

Tools

Seller Mode (7 tools)

ToolDescription
list_productsList all products with prices in EUR, descriptions, availability
get_productGet details for a specific product by ID
check_availabilityCheck stock status and current price
get_business_infoOperating hours, contact, delivery zones, return policy
place_orderPlace an order — returns x402 payment details
get_order_statusCheck order status (pending/confirmed/rejected/expired)
get_x402_payment_detailsGet x402 facilitator endpoint, USDC amount, network

Buyer Mode (10 tools)

All seller tools plus:

ToolDescription
discover_merchantsFind merchants by category, city, country, or trust score
set_spending_limitSet soft spending limits within your hard caps
get_spending_summaryView spending today/this week and remaining budget

Resources

Loaded automatically when the server starts:

URIContent
asterpay://merchant/infoBusiness name, hours, contact, delivery, returns
asterpay://settlementCurrency (EUR), SEPA Instant, facilitator details
asterpay://trustProbe KYA trust score (0-100), attestation count
asterpay://agents-txtAuto-generated agents.txt for discovery

How It Works

AI Agent  →  MCP Server  →  AsterPay API  →  Merchant
   │              │               │              │
   │  list_products               │              │
   │  ──────────────►             │              │
   │              │  GET /products│              │
   │              │  ────────────►│              │
   │              │               │              │
   │  place_order │               │              │
   │  ──────────────►             │              │
   │              │  POST /orders │              │
   │              │  ────────────►│              │
   │              │               │  SEPA EUR    │
   │              │  x402 header  │  ────────────►
   │  ◄──────────────             │              │
   │              │               │              │
   │  Agent pays USDC via x402    │              │
   │  ────────────────────────────►              │
   │              │  AsterPay converts USDC→EUR  │
   │              │               │  ────────────►

x402 Payment

place_order returns an x402 payment header. The actual USDC payment must be executed by your agent's x402 client.

Environments with full x402 support:

  • Custom agents with @x402/axios or similar
  • Hermes agents
  • Any MCP client with x402 integration

Claude Desktop limitation: Claude Desktop does not include an x402 client. Use --mock mode for testing and demos. For production, use a custom agent with x402 support.

Spending Limits

Spending limits are tracked in-memory for the lifetime of the server process:

  • ENV hard cap: Set via SPENDING_LIMIT_DAILY_EUR / SPENDING_LIMIT_WEEKLY_EUR. Cannot be exceeded.
  • Soft limits: Set at runtime via set_spending_limit. Must be within the hard cap.
  • Reset: Limits reset when the server restarts. Each npx invocation starts fresh.

Spending limits are best-effort and not a security boundary. For production enforcement, backend-side limits will be available in a future release.

Security

  • Scoped API keys: Use the narrowest scope for your use case (ap_read_*, ap_write_*, ap_buyer_*)
  • No secrets in logs: API keys are never logged, even in debug mode
  • x402 keys: The MCP server never handles private keys — that's your agent's responsibility
  • Prompt injection: ENV hard caps limit damage from prompt injection attacks

Development

git clone https://github.com/asterpay/mcp-server.git
cd mcp-server
npm install
npm run build
npm test

Run locally in mock mode:

MOCK=true npx tsx src/index.ts

License

Apache-2.0 — see LICENSE for details.

Built by AELIRA LTD for the x402 ecosystem.

Ver o original no GitHub

Bom para

Relacionados