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 - Update operation, it allows users to update an existing webhook's configuration by specifying its ID, a new URL endpoint, and the events it should listen for.

Common scenarios where this node is beneficial include:

  • Updating webhook URLs when migrating services or changing endpoints.
  • Modifying which events a webhook listens to without recreating it.
  • Managing webhook configurations programmatically as part of automated workflows.

Practical example:

  • You have a webhook that listens to payment events but want to add subscription and invoice events. Using this node, you can update the webhook to listen to these additional events while also changing the URL if needed.

Properties

Name Meaning
Webhook ID The unique identifier of the webhook to update.
URL The new webhook URL endpoint where notifications will be sent.
Events The list of event types the webhook should listen for. Options: Payment, Plan, Subscription, Invoice

Output

The node outputs a JSON object containing the updated webhook details returned from the Mercado Pago API. The output includes:

  • type: A string indicating the operation type, here "webhook_updated".
  • webhook: An object representing the updated webhook resource with its properties such as ID, URL, and subscribed events.
  • success: A boolean flag indicating the operation was successful (true).
  • timestamp: ISO timestamp of when the operation was performed.

Example output structure (simplified):

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

No binary data output is produced by this operation.

Dependencies

  • Requires an API key credential for authenticating with the Mercado Pago MCP API.
  • Uses the Mercado Pago REST API endpoint https://api.mercadopago.com/v1/webhooks/{webhookId} with HTTP PUT method.
  • Requires proper network connectivity to Mercado Pago servers.
  • The node expects the credential to provide an access token and the base API endpoint.

Troubleshooting

  • Missing or invalid Webhook ID: If the webhook ID is not provided or incorrect, the API call will fail. Ensure the correct webhook ID is used.
  • Invalid URL format: The URL must be a valid endpoint accessible by Mercado Pago. Invalid URLs may cause errors or failed webhook delivery.
  • Insufficient permissions: The API key used must have permission to update webhooks. Otherwise, authorization errors will occur.
  • Network issues: Connectivity problems can cause timeouts or failures in reaching the Mercado Pago API.
  • API rate limits: Frequent updates might hit rate limits imposed by Mercado Pago, resulting in temporary blocking.

Common error messages:

  • "401 Unauthorized": Check API credentials and permissions.
  • "404 Not Found": Verify the webhook ID exists.
  • "400 Bad Request": Validate input parameters, especially URL and events array.

To resolve errors, verify all inputs, ensure credentials are valid, and check network connectivity.

Links and References

Discussion