Mercado Pago MCP icon

Mercado Pago MCP

Integração com MCP Server do Mercado Pago

Actions26

Overview

This node integrates with the Mercado Pago MCP API to manage and search payments. Specifically, the Payment - Search operation allows users to either:

  • Retrieve a specific payment by its unique ID.
  • Search for multiple payments using various filters such as date ranges, status, external references, and sorting criteria.

This functionality is useful in scenarios where you need to audit transactions, reconcile payments, or generate reports based on payment data from Mercado Pago.

Practical examples:

  • Fetching details of a single payment by its ID to verify its status or amount.
  • Searching all payments made within the last 30 days that are approved, sorted by approval date descending.
  • Filtering payments by an external reference (e.g., order number) to link payments to your internal system.

Properties

Name Meaning
Tipo de Busca Choose how to search payments:
- Buscar Todos os Pagamentos: Search all payments with optional filters.
- Buscar por ID Específico: Search a specific payment by its ID.
ID do Pagamento The specific payment ID to search for (required if "Buscar por ID Específico" is selected).
Ordenar Por Parameter used to sort the list of payments:
- Data de Criação (Creation Date)
- Data de Aprovação (Approval Date)
- Data da Última Atualização (Last Update Date)
- ID
- Data de Liberação do Dinheiro (Money Release Date)
Critério de Ordenação Sorting order criteria:
- Crescente (Ascending)
- Decrescente (Descending)
Referência Externa External reference string to filter payments (e.g., an order number).
Data de Início Start date for the search interval. Supports relative dates like "NOW-30DAYS" or ISO date strings.
Data de Fim End date for the search interval. Supports "NOW" or ISO date strings.
Intervalo Parameter defining which date field to use for the search interval:
- Data de Criação
- Data de Aprovação
- Data da Última Atualização
- Data de Liberação do Dinheiro
Status do Pagamento Filter payments by one or more statuses:
- Pendente (Pending)
- Aprovado (Approved)
- Autorizado (Authorized)
- Em Processo (In Process)
- Em Mediação (In Mediation)
- Rejeitado (Rejected)
- Cancelado (Cancelled)
- Reembolsado (Refunded)
- Estornado (Charged Back)

Output

The output JSON structure varies depending on the search type:

  • Search by ID (by_id):

    {
      "type": "payment_by_id",
      "payment": { /* full payment object returned by Mercado Pago API */ },
      "search_type": "by_id",
      "payment_id": "1234567890"
    }
    

    Contains detailed information about the specific payment requested.

  • Search all payments (all):

    {
      "type": "payments_search",
      "payments": { /* paginated list of payments matching filters */ },
      "search_type": "all",
      "query_params": {
        "sort": "date_created",
        "criteria": "desc",
        "external_reference": "PEDIDO_123",
        "range": "date_created",
        "begin_date": "NOW-30DAYS",
        "end_date": "NOW"
      }
    }
    

    Returns a collection of payments filtered and sorted according to the input parameters.

Each output also includes metadata fields:

  • success: boolean indicating if the request was successful.
  • timestamp: ISO timestamp of when the response was generated.

No binary data is output by this operation.

Dependencies

  • Requires an API authentication token credential for Mercado Pago MCP API.
  • Uses the Axios HTTP client library to make REST API calls.
  • The node expects the Mercado Pago API endpoint and access token to be configured via credentials.
  • No additional environment variables are required beyond the API credentials.

Troubleshooting

  • Missing or invalid payment ID: When searching by ID, if the payment ID is missing or incorrect, the API will return an error. Ensure the payment ID is correctly provided.
  • Invalid date formats: The date filters accept ISO 8601 strings or relative date expressions like "NOW-30DAYS". Incorrect formats may cause the API to reject the request.
  • Empty results: If no payments match the filters, the returned payments list will be empty. Verify filter criteria and date ranges.
  • API authentication errors: If the API token is invalid or expired, requests will fail with authorization errors. Refresh or reconfigure the API credentials.
  • Rate limiting: Excessive requests may trigger rate limits from Mercado Pago. Implement retries or backoff strategies if needed.

Links and References

Discussion