@ar-agents/mcp 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,42 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - MP v0.5: production hardening + marketplace flows. **+9 tools (50 total)**.
8
+
9
+ **Webhook handler combo (1 tool)**:
10
+
11
+ - `handle_webhook` — verifies HMAC-SHA256 signature, parses the event, and (optionally) auto-fetches the underlying resource (Payment, Subscription) in ONE call. Replaces the manual chain of verify_webhook_signature + parse_webhook_event + get_payment.
12
+ - `mercadoPagoTools({ webhookSecret })` to enable.
13
+ - Returns `{ verified, event, resource, resource_error }`. Reject with HTTP 401 when `verified: false`.
14
+
15
+ **OAuth Marketplace flow (3 tools + 5 helper functions)**:
16
+
17
+ - `oauth_authorize_url` — pure function, builds the URL the seller visits to authorize your marketplace app.
18
+ - `oauth_exchange_code` — server-side exchange of the OAuth code for an `OAuthToken` (`access_token` + `refresh_token` + `user_id` + `expires_in`).
19
+ - `oauth_refresh_token` — refresh a per-seller token before it expires (~6h).
20
+ - Helper functions exported: `buildAuthorizeUrl`, `exchangeCodeForToken`, `refreshAccessToken`, `expirationTimeMs`, `isExpiringSoon`.
21
+ - `mercadoPagoTools({ oauth: { clientId, clientSecret } })` to enable.
22
+
23
+ **Order Management API (5 tools)**:
24
+
25
+ - `create_order`, `get_order`, `update_order`, `capture_order`, `cancel_order` — MP's modern Order API. Distinct from Preference: explicit lifecycle, manual-capture support (auth-only flows for ride-share, hotels, marketplaces), multi-payment-per-order semantics.
26
+ - `capture_mode: "manual"` enables the auth-only flow → `capture_order(id, amount?)` later.
27
+
28
+ **Marketplace split payments**:
29
+
30
+ - `marketplace`, `marketplace_fee` (in ARS), `collector_id` (seller MP user_id) supported on BOTH `create_order` AND `create_payment_preference`.
31
+ - Funds route to the seller; `marketplace_fee` is split off to the marketplace's MP account.
32
+
33
+ 117 tests pass. publint clean. attw all green. 21.6 KB brotli'd (within 32 KB budget).
34
+
35
+ The MCP wrapper auto-picks up the new tools — `@ar-agents/mcp` patch bump.
36
+
37
+ - Updated dependencies []:
38
+ - @ar-agents/mercadopago@0.5.0
39
+
3
40
  ## 0.3.0
4
41
 
5
42
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ar-agents/mcp",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "MCP (Model Context Protocol) server that exposes the entire @ar-agents/* toolkit (identity, identity-attest, mercadopago, whatsapp, banking, facturacion) to any MCP host (Claude Desktop, Cursor, Codeium, etc.). One install, one config, all AR integrations.",
5
5
  "keywords": [
6
6
  "mcp",