KosmoKrator

data

Mercado Pago CLI for AI Agents

Use the Mercado Pago CLI from KosmoKrator to call Mercado Pago tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

Mercado Pago CLI Setup

Mercado Pago can be configured headlessly with `kosmokrator integrations:configure mercado-pago`.

Install, configure, and verify
# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure mercado-pago --set access_token="$MERCADO_PAGO_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor mercado-pago --json
kosmokrator integrations:status --json

Credentials

Authentication type: Bearer token bearer_token. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.

KeyEnv varTypeRequiredLabel
access_token MERCADO_PAGO_ACCESS_TOKEN Secret secret yes Access Token

Command Patterns

The generic command is stable across every integration. The provider shortcut is shorter for humans.

Generic CLI call
kosmo integrations:call mercado-pago.mercado_pago_list_payments '{"limit":1,"offset":1,"external_reference":"example_external_reference","status":"example_status","date_created_from":"example_date_created_from","date_created_to":"example_date_created_to","sort":"example_sort","criteria":"example_criteria"}' --json
Provider shortcut
kosmo integrations:mercado-pago mercado_pago_list_payments '{"limit":1,"offset":1,"external_reference":"example_external_reference","status":"example_status","date_created_from":"example_date_created_from","date_created_to":"example_date_created_to","sort":"example_sort","criteria":"example_criteria"}' --json

Discovery

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

Discovery commands
kosmo integrations:docs mercado-pago --json
kosmo integrations:docs mercado-pago.mercado_pago_list_payments --json
kosmo integrations:schema mercado-pago.mercado_pago_list_payments --json
kosmo integrations:search "Mercado Pago" --json
kosmo integrations:list --json

Automation Contexts

The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.

CLI Functions

Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.

mercado-pago.mercado_pago_list_payments

Search and list payments from Mercado Pago. Supports filtering by status, external reference, and date range. Returns a paginated list of payment records.

Read read
Parameters
limit, offset, external_reference, status, date_created_from, date_created_to, sort, criteria
Generic call
kosmo integrations:call mercado-pago.mercado_pago_list_payments '{"limit":1,"offset":1,"external_reference":"example_external_reference","status":"example_status","date_created_from":"example_date_created_from","date_created_to":"example_date_created_to","sort":"example_sort","criteria":"example_criteria"}' --json
Shortcut
kosmo integrations:mercado-pago mercado_pago_list_payments '{"limit":1,"offset":1,"external_reference":"example_external_reference","status":"example_status","date_created_from":"example_date_created_from","date_created_to":"example_date_created_to","sort":"example_sort","criteria":"example_criteria"}' --json

mercado-pago.mercado_pago_get_payment

Retrieve full details of a specific Mercado Pago payment by its ID. Returns payment status, amount, payer information, and more.

Read read
Parameters
id
Generic call
kosmo integrations:call mercado-pago.mercado_pago_get_payment '{"id":"example_id"}' --json
Shortcut
kosmo integrations:mercado-pago mercado_pago_get_payment '{"id":"example_id"}' --json

mercado-pago.mercado_pago_create_payment

Create a new payment in Mercado Pago. Requires the transaction amount, payment method ID, and payer email. Optionally specify the number of installments.

Write write
Parameters
transaction_amount, payment_method_id, payer_email, token, installments, description, external_reference
Generic call
kosmo integrations:call mercado-pago.mercado_pago_create_payment '{"transaction_amount":1,"payment_method_id":"example_payment_method_id","payer_email":"example_payer_email","token":"example_token","installments":1,"description":"example_description","external_reference":"example_external_reference"}' --json
Shortcut
kosmo integrations:mercado-pago mercado_pago_create_payment '{"transaction_amount":1,"payment_method_id":"example_payment_method_id","payer_email":"example_payer_email","token":"example_token","installments":1,"description":"example_description","external_reference":"example_external_reference"}' --json

mercado-pago.mercado_pago_list_customers

Search and list customers in Mercado Pago. Optionally filter by email. Returns a paginated list of customer records.

Read read
Parameters
email, limit, offset
Generic call
kosmo integrations:call mercado-pago.mercado_pago_list_customers '{"email":"example_email","limit":1,"offset":1}' --json
Shortcut
kosmo integrations:mercado-pago mercado_pago_list_customers '{"email":"example_email","limit":1,"offset":1}' --json

mercado-pago.mercado_pago_get_customer

Retrieve full details of a specific Mercado Pago customer by their ID. Returns customer name, email, default card, and more.

Read read
Parameters
id
Generic call
kosmo integrations:call mercado-pago.mercado_pago_get_customer '{"id":"example_id"}' --json
Shortcut
kosmo integrations:mercado-pago mercado_pago_get_customer '{"id":"example_id"}' --json

mercado-pago.mercado_pago_list_preferences

List checkout preferences from Mercado Pago. Returns a paginated list of checkout preference objects that define items, payer details, and payment settings.

Read read
Parameters
limit, offset, sponsor_id
Generic call
kosmo integrations:call mercado-pago.mercado_pago_list_preferences '{"limit":1,"offset":1,"sponsor_id":"example_sponsor_id"}' --json
Shortcut
kosmo integrations:mercado-pago mercado_pago_list_preferences '{"limit":1,"offset":1,"sponsor_id":"example_sponsor_id"}' --json

mercado-pago.mercado_pago_get_current_user

Get the authenticated Mercado Pago user's account information, including name, email, and user ID.

Read read
Parameters
none
Generic call
kosmo integrations:call mercado-pago.mercado_pago_get_current_user '{}' --json
Shortcut
kosmo integrations:mercado-pago mercado_pago_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

mercado-pago.mercado_pago_list_payments 8 parameters
Schema command
kosmo integrations:schema mercado-pago.mercado_pago_list_payments --json
ParameterTypeRequiredDescription
limit integer no Maximum number of results to return (default: 30, max: 1000).
offset integer no Number of results to skip for pagination (default: 0).
external_reference string no Filter by the external reference you set when creating the payment.
status string no Filter by payment status: pending, approved, authorized, in_process, in_mediation, rejected, cancelled, refunded, charged_back.
date_created_from string no Filter payments created after this date (ISO 8601, e.g., "2025-01-01T00:00:00.000-00:00").
date_created_to string no Filter payments created before this date (ISO 8601, e.g., "2025-12-31T23:59:59.999-00:00").
sort string no Sort field such as date_created, date_approved, date_last_updated, id, or money_release_date.
criteria string no Sort direction: asc or desc.
mercado-pago.mercado_pago_get_payment 1 parameters
Schema command
kosmo integrations:schema mercado-pago.mercado_pago_get_payment --json
ParameterTypeRequiredDescription
id string yes The Mercado Pago payment ID.
mercado-pago.mercado_pago_create_payment 7 parameters
Schema command
kosmo integrations:schema mercado-pago.mercado_pago_create_payment --json
ParameterTypeRequiredDescription
transaction_amount number yes The amount to charge (positive number, e.g., 100.50).
payment_method_id string yes The payment method ID (e.g., "visa", "master", "pix", "boleto", "amex").
payer_email string yes The payer's email address.
token string no Card token generated by Mercado Pago client-side SDK. Required for card payments.
installments integer no Number of installments for credit card payments (default: 1).
description string no Payment description shown in Mercado Pago records.
external_reference string no Merchant-side order or payment reference.
mercado-pago.mercado_pago_list_customers 3 parameters
Schema command
kosmo integrations:schema mercado-pago.mercado_pago_list_customers --json
ParameterTypeRequiredDescription
email string no Filter customers by email address.
limit integer no Maximum number of results to return (default: 30).
offset integer no Number of results to skip for pagination (default: 0).
mercado-pago.mercado_pago_get_customer 1 parameters
Schema command
kosmo integrations:schema mercado-pago.mercado_pago_get_customer --json
ParameterTypeRequiredDescription
id string yes The Mercado Pago customer ID.
mercado-pago.mercado_pago_list_preferences 3 parameters
Schema command
kosmo integrations:schema mercado-pago.mercado_pago_list_preferences --json
ParameterTypeRequiredDescription
limit integer no Maximum number of results to return (default: 30).
offset integer no Number of results to skip for pagination (default: 0).
sponsor_id string no Filter preferences by the sponsor user ID.
mercado-pago.mercado_pago_get_current_user 0 parameters
Schema command
kosmo integrations:schema mercado-pago.mercado_pago_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.