{
  "markdown": "# ar-agents\n\n> **Open infrastructure for Argentina's _sociedades de IA_ (AI corporations).** 37 npm packages · 243 typed tools · 6 RFCs · a forensic audit log. Built in Argentina.\n\n[![CI](https://github.com/ar-agents/ar-agents/actions/workflows/ci.yml/badge.svg)](https://github.com/ar-agents/ar-agents/actions/workflows/ci.yml)\n[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/ar-agents/ar-agents/badge)](https://scorecard.dev/viewer/?uri=github.com/ar-agents/ar-agents)\n[![Socket Security](https://socket.dev/api/badge/npm/package/@ar-agents/mercadopago)](https://socket.dev/npm/package/@ar-agents/mercadopago)\n[![license](https://img.shields.io/github/license/ar-agents/ar-agents.svg)](./LICENSE)\n[![npm](https://img.shields.io/npm/v/@ar-agents/mercadopago?label=%40ar-agents%2Fmercadopago)](https://www.npmjs.com/package/@ar-agents/mercadopago)\n[![npm downloads](https://img.shields.io/npm/dm/@ar-agents/mercadopago.svg?label=npm%20downloads)](https://www.npmjs.com/package/@ar-agents/mercadopago)\n[![bundle size](https://img.shields.io/bundlephobia/minzip/@ar-agents/mercadopago.svg?label=bundle)](https://bundlephobia.com/package/@ar-agents/mercadopago)\n[![types](https://img.shields.io/npm/types/@ar-agents/mercadopago.svg)](https://arethetypeswrong.github.io/?p=@ar-agents/mercadopago)\n[![npm provenance](https://img.shields.io/badge/npm%20provenance-SLSA%20v1-7C3AED?logo=npm)](https://docs.npmjs.com/generating-provenance-statements)\n[![ar-agents on Glama](https://glama.ai/mcp/servers/ar-agents/ar-agents/badges/score.svg)](https://glama.ai/mcp/servers/ar-agents/ar-agents)\n\nThe stack covers what an AI-operated Argentine company needs to exist and\noperate: identity (AFIP/ARCA), payments, invoicing, banking, government\nfilings, communications, and a forensic audit log. The deepest package,\n[`@ar-agents/mercadopago`](./packages/mercadopago), exposes 89 typed tools\nacross the agent-relevant Mercado Pago API surface for the\n[Vercel AI SDK](https://ai-sdk.dev) 6 `Experimental_Agent`, one of the 33\npackages in the `@ar-agents/*` stack:\n\n> Payments · Subscriptions · Checkout Pro · Marketplace OAuth · Order Management ·\n> Customers · Cards · Cuotas · QR · 3DS · Point devices · Stores+POS ·\n> Account/Balance/Settlements · Webhooks · Disputes · Lookups · Bank Accounts\n\nEdge Runtime. Vercel KV adapters for state, OAuth, idempotency, and audit.\nOpenTelemetry instrumentation. Deterministic idempotency by default.\nProgrammatic HITL on irreversible operations.\n\n```bash\npnpm add @ar-agents/mercadopago ai zod\n```\n\n[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Far-agents%2Far-agents&root-directory=apps%2Fmp-hello&env=MP_ACCESS_TOKEN%2CANTHROPIC_API_KEY%2CUPSTASH_REDIS_REST_URL%2CUPSTASH_REDIS_REST_TOKEN&envDescription=Mercado%20Pago%20access%20token%2C%20Anthropic%20API%20key%2C%20and%20Upstash%20Redis%20credentials%20for%20subscription%20state.&envLink=https%3A%2F%2Fgithub.com%2Far-agents%2Far-agents%2Ftree%2Fmain%2Fapps%2Fmp-hello%23setup&project-name=mp-hello&repository-name=mp-hello)\n\nDeploys [`apps/mp-hello`](./apps/mp-hello), a runnable agent on Vercel with\nEdge Runtime API routes, MP webhook handler, and Upstash-backed subscription\nstate. Around 2 minutes from click to live.\n\n## Governance layer for AR sociedades-IA\n\nSince Argentina announced a sociedad-IA regime (Sturzenegger,\n28-abr-2026), this repo additionally hosts a complete open-source\ngovernance scaffolding for AI-only Argentine corporations:\n\n- **6 RFCs (001–006)** — civil liability (3-layer) / discovery / cross-\n  jurisdictional reciprocity / operational-log wire format / Ed25519\n  asymmetric extension / hash-chained ledger + external anchoring. All\n  CC-BY-4.0. Documents the legislation can cite by reference.\n- **2 frozen test-vectors files** — 7 RFC-004 HMAC vectors + 3 RFC-005\n  Ed25519 vectors. Byte-exact deterministic signatures. Reference impl\n  passes all 10 (103 vitest tests in 6 files).\n- **Public certifier** at [`ar-agents.ar/certifier`](https://ar-agents.ar/certifier) —\n  paste any URL, score 0-100 against RFC-002 + RFC-004 + RFC-005 in\n  seconds. Programmatic API at `/api/certifier?url=...`. Reference impl\n  self-scores 100/100 Rating A. Cookbook recipes 26 (single-shot) +\n  27 (monitoring) + 28 (operator readiness).\n- **Live time-series** at `/api/conformance-history` — 365-entry capped\n  KV-backed history per URL, daily Vercel cron auto-population.\n- **Public well-known endpoints** — `/.well-known/agents.json` (RFC-002),\n  `/.well-known/sociedad-ia/verify-key?challenge=` (RFC-004 § 5\n  challenge-response), `/.well-known/sociedad-ia/keys` (RFC-005 § 4\n  Ed25519 public key publication).\n- **Bilingual narrative pages** — [`/legislacion`](https://ar-agents.ar/legislacion)\n  (Spanish for AR legislators) + [`/en/legislation`](https://ar-agents.ar/en/legislation)\n  (English for international press / comparative-law scholars).\n- **One-page regulator brief** at [`/auditor`](https://ar-agents.ar/auditor) —\n  print-friendly, 7-minute read, every claim links to evidence.\n- **Public registry** at [`/registro`](https://ar-agents.ar/registro) —\n  self-listed implementations with live cert-badges per entry.\n- **Glossary, outreach templates, BibTeX refs, visual timeline** —\n  see `/glossary`, `/share`, `/refs`, `/timeline`.\n\nFor an outsider arriving cold: start at the [auditor's brief](https://ar-agents.ar/auditor)\nor the [legislative synthesis](https://ar-agents.ar/legislacion).\nCitation file: [`CITATION.cff`](./CITATION.cff).\n\n```ts\nimport { Experimental_Agent as Agent, stepCountIs } from \"ai\";\nimport {\n  MercadoPagoClient,\n  mercadoPagoTools,\n  InMemoryStateAdapter,\n} from \"@ar-agents/mercadopago\";\n\nconst mp = new MercadoPagoClient({\n  accessToken: process.env.MP_ACCESS_TOKEN!, // TEST- for sandbox, APP_USR- for prod\n});\n\nconst agent = new Agent({\n  model: \"anthropic/claude-sonnet-4-6\",\n  tools: mercadoPagoTools(mp, {\n    state: new InMemoryStateAdapter(), // swap for VercelKVStateAdapter in prod\n    backUrl: \"https://yoursite.com/subscription/done\",\n  }),\n  stopWhen: stepCountIs(8),\n});\n\nconst { text } = await agent.generate({\n  prompt: \"Creá una subscription mensual de $1000 ARS para customer@example.com.\",\n});\n```\n\nFull reference, cookbook (9 recipes including OpenTelemetry wiring), and\nmigration guide vs the official `mercadopago` SDK live in\n[`packages/mercadopago/`](./packages/mercadopago).\n\n## How it compares\n\n|                                                | `@ar-agents/mercadopago` | `mercadopago` (official) | Stripe Agent Toolkit |\n| ---------------------------------------------- | :----------------------: | :----------------------: | :------------------: |\n| Vercel AI SDK 6 tool schemas                   | ✓                        | no                       | ✓ (Stripe)           |\n| Argentine-specific (cuotas, ARCA, AR phone)    | ✓                        | partial                  | no                   |\n| Tool count                                     | 89                       | thin REST client         | 26 (Stripe)          |\n| Webhooks: HMAC + dedup + replay window         | ✓                        | client only              | ✓                    |\n| Edge Runtime + Vercel KV adapters              | ✓                        | Node-only                | optional             |\n| OpenTelemetry instrumentation                  | ✓                        | no                       | no                   |\n| Deterministic idempotency by default           | ✓                        | no                       | no                   |\n| Programmatic HITL on irreversible ops          | ✓                        | no                       | no                   |\n| MercadoPago coverage                           | full                     | full                     | n/a                  |\n\nBoth official SDKs are excellent at what they do (generic REST clients for\ntheir respective APIs). `@ar-agents/mercadopago` is opinionated for the\nagent-operating-an-Argentine-business case, and composes with `mercadopago`\nunder the hood when needed. See [`MIGRATION.md`](./packages/mercadopago/MIGRATION.md).\n\n## Architecture\n\n```mermaid\nflowchart LR\n  subgraph user_app[\"Your Next.js / Edge / Workers app\"]\n    direction TB\n    agent[\"Vercel AI SDK 6<br/>Experimental_Agent\"]\n  end\n\n  subgraph ar_agents[\"@ar-agents/* (this monorepo)\"]\n    direction TB\n    mp[\"mercadopago<br/>89 tools\"]\n    id[\"identity<br/>CUIT + AFIP padrón\"]\n    fac[\"facturacion<br/>factura electrónica\"]\n    wa[\"whatsapp<br/>Business Cloud\"]\n    bk[\"banking<br/>CBU + BCRA\"]\n    sh[\"shipping<br/>Andreani / OCA / Correo\"]\n    att[\"identity-attest<br/>HMAC-signed orchestrator\"]\n    mcp[\"mcp<br/>bundles all 7 over MCP\"]\n  end\n\n  subgraph adapters[\"Pluggable state (subpath)\"]\n    direction TB\n    kv[\"@ar-agents/mercadopago/vercel-kv<br/>state · OAuth · idempotency · audit · ratelimit\"]\n    otel[\"@ar-agents/mercadopago/otel<br/>OpenTelemetry instrumentation\"]\n  end\n\n  subgraph external[\"External APIs\"]\n    direction TB\n    mpapi[\"api.mercadopago.com\"]\n    afip[\"AFIP/ARCA WSAA + WSFE\"]\n    meta[\"Meta WhatsApp Cloud API\"]\n    bcra[\"BCRA Central de Deudores\"]\n    carriers[\"Andreani · OCA · Correo Argentino\"]\n  end\n\n  agent -- tool calls --> mp & id & fac & wa & bk & sh & att\n  mp -.subpath.-> kv & otel\n  mp --> mpapi\n  id --> afip\n  fac --> afip\n  wa --> meta\n  bk --> bcra\n  sh --> carriers\n  mcp -.bundles.-> mp & id & fac & wa & bk & sh & att\n```\n\nThe agent picks tools from natural-language prompts. Each package is an\nindependent npm release; there are no cross-package runtime dependencies\nbeyond the optional adapter subpaths, so you only ship the surface you use.\n\n## Other AR primitives in this monorepo\n\nSame approach, applied to the rest of the stack an Argentine business needs:\n\n| Package | Tools | What it does |\n| --- | :---: | --- |\n| [`@ar-agents/identity`](./packages/identity) | 2 | CUIT/CUIL validation + AFIP/ARCA padrón lookup (constancia con monotributo + condición IVA). WSAA SOAP via subpath. |\n| [`@ar-agents/identity-attest`](./packages/identity-attest) | 5 | Verification orchestrator (WhatsApp OTP, email magic-link, Auth0, Magic.link, MP Identity), returns HMAC-signed attestation with `trustLevel`. |\n| [`@ar-agents/whatsapp`](./packages/whatsapp) | 6 | WhatsApp Business Cloud API. Webhook + HMAC. AR phone normalizer. `scopedTo` mode binds outbound tools to a single sender. |\n| [`@ar-agents/facturacion`](./packages/facturacion) | 10 | AFIP/ARCA factura electrónica (WSFE). Factura A/B/C, NC/ND, FCE MiPyMEs. Local pre-flight validator. |\n| [`@ar-agents/banking`](./packages/banking) | 5 | CBU/CVU validation + bank/PSP lookup + BCRA Central de Deudores. |\n| [`@ar-agents/shipping`](./packages/shipping) | 6 | Andreani (full) + OCA + Correo Argentino. Provincia + CPA helpers. |\n| [`@ar-agents/mcp`](./packages/mcp) | wraps all | Model Context Protocol server. Drop the toolkit into Claude Desktop, Cursor, any MCP host. |\n\nEach package ships a `README.md` for humans and an `AGENTS.md` for LLMs reading\nthe docs at runtime, following the [agents.md](https://agents.md/) format\n(tool-selection rules, result schemas, error patterns).\n\n## Live demos\n\n| App | URL | Shows |\n| --- | --- | --- |\n| Landing | <https://ar-agents.ar> | Toolkit overview |\n| `cuit-hello` | <https://cuit-hello.ar-agents.ar> | CUIT validation + ARCA padrón (real AFIP cert) |\n| `whatsapp-hello` | <https://whatsapp-hello.ar-agents.ar> | Billing assistant: MP composed with identity, identity-attest, whatsapp |\n| `mp-hello` | dev-only | MP Subscriptions full flow (`pnpm dev`, port 3013) |\n\n## Develop\n\n```bash\npnpm install\npnpm test         # 719 tests across 8 packages\npnpm typecheck\npnpm build\npnpm dev          # mp-hello on http://localhost:3013\n```\n\nRequires Node 20+ and pnpm 10+. CI runs build, typecheck, coverage,\nmanifest-drift, publint, arethetypeswrong, and size-limit on every push.\n\n## Repo layout\n\n```\nar-agents/\n├── apps/\n│   ├── landing/                 # ar-agents.ar\n│   ├── cuit-hello/              # cuit-hello.ar-agents.ar (port 3014)\n│   ├── whatsapp-hello/          # whatsapp-hello.ar-agents.ar\n│   └── mp-hello/                # dev-only (port 3013)\n├── packages/\n│   ├── mercadopago/             # 89 tools: subscriptions, payments, OAuth, QR, 3DS, point, ...\n│   ├── identity/                # CUIT validate + ARCA padrón\n│   ├── identity-attest/         # verification orchestrator\n│   ├── whatsapp/                # WhatsApp Cloud\n│   ├── facturacion/             # AFIP factura electrónica\n│   ├── banking/                 # CBU/CVU + BCRA\n│   ├── shipping/                # Andreani / OCA / Correo\n│   └── mcp/                     # MCP server wrapping all\n├── .github/workflows/           # ci.yml, release.yml\n├── package.json                 # workspace root\n└── pnpm-workspace.yaml\n```\n\n## Stability\n\nAll packages are pre-1.0. Public API may evolve in 0.x; we follow semver, so\nminor bumps may include breaking changes and patch bumps never do. Pinning a\nminor in production is safe.\n\n## License\n\nMIT. Built by [Nazareno Clemente](https://github.com/naza00000).\n",
  "bytes": 13164,
  "sha": "1b877964c2b18daea0893d41cd467c264b40fb99e9f91a4568c52f9983d36f43",
  "repo_slug": "ar-agents/ar-agents",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_ar_agents_mcp_7b13c6e1/readme"
}