ar-agents
Agent Toolkit for Mercado Pago
README
ar-agents
Mercado Pago Agent Toolkit. Built on Vercel.
@ar-agents/mercadopago is a Mercado Pago Agent
Toolkit for the Vercel AI SDK 6 Experimental_Agent.
89 typed tools across the agent-relevant Mercado Pago API surface:
Payments · Subscriptions · Checkout Pro · Marketplace OAuth · Order Management · Customers · Cards · Cuotas · QR · 3DS · Point devices · Stores+POS · Account/Balance/Settlements · Webhooks · Disputes · Lookups · Bank Accounts
Edge Runtime. Vercel KV adapters for state, OAuth, idempotency, and audit. OpenTelemetry instrumentation. Deterministic idempotency by default. Programmatic HITL on irreversible operations.
pnpm add @ar-agents/mercadopago ai zod
Deploys apps/mp-hello, a runnable agent on Vercel with
Edge Runtime API routes, MP webhook handler, and Upstash-backed subscription
state. Around 2 minutes from click to live.
import { Experimental_Agent as Agent, stepCountIs } from "ai";
import {
MercadoPagoClient,
mercadoPagoTools,
InMemoryStateAdapter,
} from "@ar-agents/mercadopago";
const mp = new MercadoPagoClient({
accessToken: process.env.MP_ACCESS_TOKEN!, // TEST- for sandbox, APP_USR- for prod
});
const agent = new Agent({
model: "anthropic/claude-sonnet-4-6",
tools: mercadoPagoTools(mp, {
state: new InMemoryStateAdapter(), // swap for VercelKVStateAdapter in prod
backUrl: "https://yoursite.com/subscription/done",
}),
stopWhen: stepCountIs(8),
});
const { text } = await agent.generate({
prompt: "Creá una subscription mensual de $1000 ARS para customer@example.com.",
});
Full reference, cookbook (9 recipes including OpenTelemetry wiring), and
migration guide vs the official mercadopago SDK live in
packages/mercadopago/.
How it compares
@ar-agents/mercadopago |
mercadopago (official) |
Stripe Agent Toolkit | |
|---|---|---|---|
| Vercel AI SDK 6 tool schemas | ✓ | no | ✓ (Stripe) |
| Argentine-specific (cuotas, ARCA, AR phone) | ✓ | partial | no |
| Tool count | 89 | thin REST client | 26 (Stripe) |
| Webhooks: HMAC + dedup + replay window | ✓ | client only | ✓ |
| Edge Runtime + Vercel KV adapters | ✓ | Node-only | optional |
| OpenTelemetry instrumentation | ✓ | no | no |
| Deterministic idempotency by default | ✓ | no | no |
| Programmatic HITL on irreversible ops | ✓ | no | no |
| MercadoPago coverage | full | full | n/a |
Both official SDKs are excellent at what they do (generic REST clients for
their respective APIs). @ar-agents/mercadopago is opinionated for the
agent-operating-an-Argentine-business case, and composes with mercadopago
under the hood when needed. See MIGRATION.md.
Other AR primitives in this monorepo
Same approach, applied to the rest of the stack an Argentine business needs:
| Package | Tools | What it does |
|---|---|---|
@ar-agents/identity |
2 | CUIT/CUIL validation + AFIP/ARCA padrón lookup (constancia con monotributo + condición IVA). WSAA SOAP via subpath. |
@ar-agents/identity-attest |
5 | Verification orchestrator (WhatsApp OTP, email magic-link, Auth0, Magic.link, MP Identity), returns HMAC-signed attestation with trustLevel. |
@ar-agents/whatsapp |
6 | WhatsApp Business Cloud API. Webhook + HMAC. AR phone normalizer. scopedTo mode binds outbound tools to a single sender. |
@ar-agents/facturacion |
10 | AFIP/ARCA factura electrónica (WSFE). Factura A/B/C, NC/ND, FCE MiPyMEs. Local pre-flight validator. |
@ar-agents/banking |
5 | CBU/CVU validation + bank/PSP lookup + BCRA Central de Deudores. |
@ar-agents/shipping |
6 | Andreani (full) + OCA + Correo Argentino. Provincia + CPA helpers. |
@ar-agents/mcp |
wraps all | Model Context Protocol server. Drop the toolkit into Claude Desktop, Cursor, any MCP host. |
Each package ships a README.md for humans and an AGENTS.md for LLMs reading
the docs at runtime, following the agents.md format
(tool-selection rules, result schemas, error patterns).
Live demos
| App | URL | Shows |
|---|---|---|
| Landing | https://ar-agents.vercel.app | Toolkit overview |
cuit-hello |
https://ar-agents-cuit-hello.vercel.app | CUIT validation + ARCA padrón (real AFIP cert) |
whatsapp-hello |
https://ar-agents-whatsapp-hello.vercel.app | Billing assistant: MP composed with identity, identity-attest, whatsapp |
mp-hello |
dev-only | MP Subscriptions full flow (pnpm dev, port 3013) |
Develop
pnpm install
pnpm test # 719 tests across 8 packages
pnpm typecheck
pnpm build
pnpm dev # mp-hello on http://localhost:3013
Requires Node 20+ and pnpm 10+. CI runs build, typecheck, coverage, manifest-drift, publint, arethetypeswrong, and size-limit on every push.
Repo layout
ar-agents/
├── apps/
│ ├── landing/ # ar-agents.vercel.app
│ ├── cuit-hello/ # ar-agents-cuit-hello.vercel.app (port 3014)
│ ├── whatsapp-hello/ # ar-agents-whatsapp-hello.vercel.app
│ └── mp-hello/ # dev-only (port 3013)
├── packages/
│ ├── mercadopago/ # 89 tools: subscriptions, payments, OAuth, QR, 3DS, point, ...
│ ├── identity/ # CUIT validate + ARCA padrón
│ ├── identity-attest/ # verification orchestrator
│ ├── whatsapp/ # WhatsApp Cloud
│ ├── facturacion/ # AFIP factura electrónica
│ ├── banking/ # CBU/CVU + BCRA
│ ├── shipping/ # Andreani / OCA / Correo
│ └── mcp/ # MCP server wrapping all
├── .github/workflows/ # ci.yml, release.yml
├── package.json # workspace root
└── pnpm-workspace.yaml
Stability
All packages are pre-1.0. Public API may evolve in 0.x; we follow semver, so minor bumps may include breaking changes and patch bumps never do. Pinning a minor in production is safe.
License
MIT. Built by Nazareno Clemente.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。