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 server to manage webhooks among other resources. Specifically, for the Webhook - Create operation, it allows users to create a new webhook endpoint on Mercado Pago's platform. This webhook will listen for specified event types such as payments, plans, subscriptions, or invoices.

Common scenarios where this node is beneficial include:

  • Automatically triggering workflows in n8n when certain events happen in Mercado Pago (e.g., a payment is made or a subscription is updated).
  • Keeping external systems synchronized by receiving real-time notifications from Mercado Pago.
  • Building custom notification or alerting systems based on Mercado Pago events.

Practical example:

  • A user wants to automate order fulfillment whenever a payment is approved. They can create a webhook listening to "payment" events and trigger downstream processes in n8n upon receiving those events.

Properties

Name Meaning
URL The webhook URL endpoint where Mercado Pago will send event notifications.
Events The list of event types to listen for. Options: Payment, Plan, Subscription, Invoice.

Output

The node outputs a JSON object containing details about the created webhook. The structure includes:

  • type: A string indicating the operation type, here "webhook_created".
  • webhook: An object with the Mercado Pago response data about the newly created webhook, including its ID, URL, subscribed events, and other metadata.
  • success: Boolean indicating if the operation was successful (true).
  • timestamp: ISO string timestamp of when the operation was performed.

No binary data output is produced by this operation.

Example output snippet:

{
  "type": "webhook_created",
  "webhook": {
    "id": "123456",
    "url": "https://example.com/webhook",
    "events": [
      { "topic": "payment" },
      { "topic": "plan" }
    ],
    ...
  },
  "success": true,
  "timestamp": "2024-06-01T12:00:00.000Z"
}

Dependencies

  • Requires an API key credential for authenticating with Mercado Pago MCP API.
  • Uses Axios HTTP client internally to make REST API calls to Mercado Pago endpoints.
  • The node expects the Mercado Pago API access token and endpoint to be configured in the credentials.
  • No additional environment variables are explicitly required beyond the credential setup.

Troubleshooting

  • Missing or invalid API credentials: The node requires a valid Mercado Pago API access token. Ensure the credential is correctly configured and has necessary permissions.
  • Invalid webhook URL: The URL must be reachable and accept incoming POST requests from Mercado Pago. Test the endpoint separately to confirm.
  • Empty or invalid events array: At least one valid event type must be selected; otherwise, the API call may fail.
  • API rate limits or network errors: If Mercado Pago API returns errors due to rate limiting or connectivity issues, retry after some time or check network/firewall settings.
  • Error messages from the node: Errors thrown during execution will include the message from the underlying API or validation error. Review the error message for clues and verify input parameters.

Links and References


This summary covers the static analysis of the node’s execute method focusing on the Webhook resource and Create operation as requested.

Discussion