KosmoKrator

finance

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.

7 functions 6 read 1 write Bearer token auth

Mercado Pago CLI Setup

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

# 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 use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
access_token MERCADO_PAGO_ACCESS_TOKEN Secret secret yes Access Token

Call Mercado Pago Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

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"
}' --json

Use the provider shortcut form for shorter human-facing commands.

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"
}' --json

Agent Discovery Commands

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

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

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Mercado Pago.

mercado-pago.mercado_pago_list_payments

Read read

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

Parameters
limit, offset, external_reference, status, date_created_from, date_created_to

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"}' --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"}' --json

mercado-pago.mercado_pago_get_payment

Read read

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

Parameters
id

Generic CLI call

kosmo integrations:call mercado-pago.mercado_pago_get_payment '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:mercado-pago mercado_pago_get_payment '{"id":"example_id"}' --json

mercado-pago.mercado_pago_create_payment

Write write

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

Parameters
transaction_amount, payment_method_id, payer_email, installments

Generic CLI 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","installments":1}' --json

Provider shortcut

kosmo integrations:mercado-pago mercado_pago_create_payment '{"transaction_amount":1,"payment_method_id":"example_payment_method_id","payer_email":"example_payer_email","installments":1}' --json

mercado-pago.mercado_pago_list_customers

Read read

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

Parameters
email, limit, offset

Generic CLI call

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

Provider shortcut

kosmo integrations:mercado-pago mercado_pago_list_customers '{"email":"example_email","limit":1,"offset":1}' --json

mercado-pago.mercado_pago_get_customer

Read read

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

Parameters
id

Generic CLI call

kosmo integrations:call mercado-pago.mercado_pago_get_customer '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:mercado-pago mercado_pago_get_customer '{"id":"example_id"}' --json

mercado-pago.mercado_pago_list_preferences

Read read

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

Parameters
limit, offset, sponsor_id

Generic CLI call

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

Provider 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

Read read

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

Parameters
none

Generic CLI call

kosmo integrations:call mercado-pago.mercado_pago_get_current_user '{}' --json

Provider 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

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

Operation
Read read
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").

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.

Operation
Read read
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

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

Operation
Write write
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.
installments integer no Number of installments for credit card payments (default: 1).

mercado-pago.mercado_pago_list_customers

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

Operation
Read read
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

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

Operation
Read read
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

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

Operation
Read read
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

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

Operation
Read read
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.