Mercado Pago MCP Tool

Exposes Mercado Pago operations as AI tools via MCP

Overview

This node integrates Mercado Pago operations as AI tools accessible via an MCP (Mercado Pago Connector Platform) interface. It allows users to perform a variety of payment, customer, order, webhook, and documentation-related actions programmatically within n8n workflows. The node is particularly useful for automating e-commerce payment processing, customer management, order handling, webhook setup, and searching Mercado Pago's documentation.

Common scenarios include:

  • Creating and managing payments and orders automatically after receiving customer input.
  • Searching and retrieving detailed information about payments, customers, or orders.
  • Managing customer data by creating, updating, or searching customers.
  • Setting up and listing webhooks to automate event-driven workflows.
  • Querying Mercado Pago documentation to assist in development or troubleshooting.

For example, an online store could use this node to create payments when customers check out, update customer records, and set up webhooks to listen for payment status changes.

Properties

Name Meaning
Tool Selection Select one or more Mercado Pago tools to expose to the AI agent. Options include:
- Payment - Create: Create a new payment
- Payment - Get: Get payment information
- Payment - Cancel: Cancel a payment
- Payment - Search: Search payments
- Customer - Create: Create a new customer
- Customer - Get: Get customer information
- Customer - Update: Update customer information
- Customer - Search: Search customers
- Order - Create: Create a new order
- Order - Get: Get order information
- Documentation - Search: Search Mercado Pago documentation
- Webhook - Create: Create a webhook
- Webhook - List: List webhooks

Output

The node outputs an array of objects, each containing a json field with a single property tool. This tool property holds an object representing the selected Mercado Pago tool instance configured with its schema and execution function.

Each tool exposes a structured interface with defined input parameters and returns JSON strings representing the API response from Mercado Pago. The output JSON corresponds directly to the Mercado Pago API responses for the respective operation, such as payment details, customer info, order data, webhook info, or documentation search results.

No binary data output is produced by this node.

Dependencies

  • Requires an API authentication token credential for Mercado Pago to authorize requests.
  • Uses the Axios HTTP client library to make REST API calls to Mercado Pago endpoints.
  • Relies on the MCP platform endpoint for documentation search if configured; otherwise defaults to localhost.
  • Requires proper configuration of the API access token and environment (production or sandbox).

Troubleshooting

  • Common issues:

    • Invalid or missing API credentials will cause authorization failures.
    • Incorrect input parameters (e.g., invalid payment IDs or malformed emails) may result in API errors.
    • Network connectivity problems can prevent successful API calls.
    • Using unsupported or misspelled tool names in the selection will result in no tools being created.
  • Error messages:

    • Errors are thrown with messages like "Payment creation failed: ..." or "Customer retrieval failed: ...", including the underlying API error message if available.
    • To resolve, verify the input parameters, ensure valid API credentials, and check network connectivity.
    • For webhook creation errors, confirm the URL is valid and events are correctly specified.
    • For documentation search failures, ensure the MCP endpoint is reachable and properly configured.

Links and References

Discussion