# Mercado Pago MCP

> Mercado Pago connects your AI agent directly to Brazil’s top payment gateway. You can generate instant Pix QR codes, securely charge credit cards (Visa, Mastercard), handle customer records, and issue full or partial refunds—all from a natural conversation with zero manual dashboard clicks.

## Overview
- **Category:** money-moves
- **Price:** Free
- **Tags:** pix-payments, qr-code-payments, credit-card-processing, refund-management, checkout-api

## Description

Need to manage sales in Brazil? This MCP connects your AI agent to Mercado Pago, letting you run the entire financial workflow through simple chat commands. You can create instant Pix payments by generating scannable QR codes for the customer, or process traditional charges using credit cards like Visa and Mastercard.

It handles more than just charging: you can register new customers and save their card details for one-click reorders. Need to fix an order? Simply trigger a refund, partial or full. Furthermore, if a transaction fails or you need reporting, you don't have to guess; the MCP allows you to search for specific payments using filters like email address or status.

By connecting this capability through Vinkius, your AI client gets immediate access to Brazil’s leading payment tools. This means e-commerce managers and small business owners can run their entire finance stack—from capturing customer data to issuing refunds—without ever touching a developer console.

## Tools

### create_card
Saves a customer's payment details so the card can be used for future payments.

### create_customer
Registers an entirely new user account within the Mercado Pago system.

### create_payment
Processes a payment using card details or other methods for immediate charges.

### create_preference
Generates a secure, temporary link that customers can use to complete an online purchase checkout.

### get_customer
Retrieves specific details about an existing customer account.

### get_payment
Fetches all detailed information for a single payment using its unique ID.

### get_preference
Retrieves the current details of a generated checkout link or preference.

### get_identification_types
Lists all valid identification formats used in Brazil, such as CPF and CNPJ.

### list_payment_methods
Shows every payment method currently accepted by the gateway in Brazil.

### create_pix_payment
Generates a unique QR code and associated data for an instant Pix payment request.

### refund_payment
Initiates a refund, allowing you to partially or fully return funds on a completed payment.

### search_payments
Searches across all transactions using filters like email address, status, or ID for reconciliation.

## Prompt Examples

**Prompt:** 
```
Create a Pix payment for R$150 for a customer.
```

**Response:** 
```
Pix payment created! Status: pending. QR Code generated for customer to scan and pay instantly.
```

**Prompt:** 
```
Refund payment 12345678 fully.
```

**Response:** 
```
Full refund processed successfully! Status: refunded.
```

**Prompt:** 
```
Show me all approved payments for user@email.com.
```

**Response:** 
```
Found 3 approved payments: 1. R$ 50.00 (Visa). 2. R$ 120.00 (Pix). 3. R$ 85.50 (Mastercard).
```

## Capabilities

### Generate Instant Pix Payments
Creates the necessary QR code data for customers to pay immediately using Brazil's popular Pix system.

### Process Credit Card Transactions
Charges various cards (Visa, Mastercard, Elo) securely, handling payment details and generating checkout links.

### Manage Customer Data
Registers new users and saves their card information to facilitate quick, repeat payments.

### Issue Refunds
Processes full or partial refunds on any completed payment using the transaction ID.

### Track Payments
Searches and retrieves detailed records of past payments using criteria like customer email or status.

## Use Cases

### Handling a Failed Payment
A customer calls because their card was declined. Instead of making them manually repeat all details, you ask your agent to search_payments using their email address to find the last successful transaction and then use create_card to save their billing info for a quick retry.

### Processing Bulk Returns
Your warehouse manager needs to issue refunds for 10 items sold yesterday. You tell your agent, which uses refund_payment, to process the full or partial returns across multiple payment IDs without needing to open ten different screens.

### Setting up a New Sales Channel
A small business owner needs to accept payments from an online partner. They ask their agent to use create_preference, which generates the necessary secure checkout link for immediate deployment across the web.

### Reconciling Daily Sales
It's end of day and you need a report on all successful transactions from the last 24 hours. You instruct your agent to search_payments, filtering by status 'approved', pulling together all necessary payment IDs.

## Benefits

- Start checking payment status right away. Instead of navigating multiple screens to reconcile sales, you can use the search_payments tool to find all transactions by email or ID in one prompt.
- Handle cash-flow issues without delay. If a customer needs a partial credit, simply calling refund_payment lets your agent issue it instantly, logging the transaction details for accounting.
- Speed up checkouts dramatically. You can use create_pix_payment to generate QR codes on demand, enabling instant payments that don't rely on card processing.
- Improve customer data integrity. When a user signs up or makes an order, you can use create_customer and create_card to save their details securely for future one-click purchases.
- Build checkout flows easily. Instead of hardcoding payment logic, you can use create_preference to generate dynamic links that redirect customers to the correct payment portal.

## How It Works

The bottom line is that your AI client acts as a direct financial worker, handling payment logic without you writing any boilerplate code.

1. First, subscribe to this MCP and provide your unique Mercado Pago Access Token.
2. Next, tell your AI client exactly what payment action you need—for example, 'Generate a Pix QR code for R$150.'
3. Finally, the agent executes the request using the integrated tools and returns confirmation details or data.

## Frequently Asked Questions

**How do I use Mercado Pago with Pix payments?**
You initiate a Pix transaction using create_pix_payment. The MCP returns QR code data that you can give to the customer, enabling instant payment without relying on credit cards.

**Can I refund payments if they were made with Pix?**
Yes. You use the refund_payment tool and provide the original payment ID. The MCP handles the refund process regardless of whether the initial payment method was a card or Pix.

**Do I need to know the customer's email when searching payments?**
No, but it helps. You can use search_payments with various filters, including ID, status (like 'pending'), or even just a date range, so you don't have to guess what information you have.

**What is the difference between create_payment and create_preference?**
create_payment charges a card immediately. create_preference generates a secure link that directs the user to an external page where they can complete the payment themselves.

**How do I save customer cards using Mercado Pago MCP?**
You use the create_customer tool first, then use create_card. This saves their details securely within the system for future one-click transactions.