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 (Mercado Pago Checkout Pro) API to manage checkout preferences among other resources. Specifically, for the Preference - Update operation, it updates an existing checkout preference by sending new item details to Mercado Pago's API.

Use cases include updating the items in a checkout preference when product details or quantities change before the payment process is completed. For example, if a customer modifies their shopping cart, you can update the corresponding Mercado Pago preference to reflect the new items and prices.

Properties

Name Meaning
ID da Preferência The unique identifier of the checkout preference to update (e.g., "PREF123456789").
Items JSON array representing the items in the preference. Each item includes fields like title, quantity, unit price, and currency. Example: [{"title": "Product", "quantity": 1, "unit_price": 100, "currency_id": "BRL"}]

Output

The node outputs a JSON object containing:

  • type: A string indicating the type of response, here "preference_updated".
  • preference: The updated preference object returned from Mercado Pago API, reflecting the new items and any other updated data.
  • success: Boolean true indicating the operation succeeded.
  • timestamp: ISO timestamp of when the operation was performed.

If the operation fails and "Continue On Fail" is enabled, the output will contain an error message with success: false.

Dependencies

  • Requires an API key credential for Mercado Pago MCP with appropriate permissions.
  • Uses the Mercado Pago MCP API endpoint https://api.mercadopago.com/checkout/preferences/{preferenceId} with HTTP PUT method.
  • Requires network access to Mercado Pago API.
  • The node expects the items property as a valid JSON string that can be parsed into an array.

Troubleshooting

  • Invalid JSON in Items: If the items JSON is malformed, the node will throw a parsing error. Ensure the JSON format is correct.
  • Invalid Preference ID: Providing a non-existent or incorrect preference ID will cause the API to return an error. Verify the preference ID is correct.
  • Authentication Errors: Missing or invalid API credentials will result in authorization errors. Confirm the API key is set up correctly in n8n credentials.
  • Network Issues: Connectivity problems to Mercado Pago API will cause request failures. Check your network and firewall settings.
  • API Rate Limits: Frequent updates may hit rate limits imposed by Mercado Pago. Implement retries or backoff strategies if needed.

Links and References

Discussion