Mercado Pago(決済サービス)の統合内容を、地域別の包括的なセキュリティ確認表と公式のMCP品質ツールを使ってレビュー(検証・審査)します。統合の実装後、または /mp-review コマンドが実行されたときに使用できます。
Review a Mercado Pago integration with a local cross-cutting security checklist and official MCP quality tools on demand. Use after the integration is in place, or when /mp-review is invoked.
このスキルはMercado Pagoの統合(システムやサービスを一つに結合すること)を検証します。セキュリティの最低基準はローカルで評価され、MCP(AI用のプロトコル標準)が必要な段階に到達した場合のみ、公式な品質基準を取得します。
レビュー開始時にMCPの状態を確認してください。最初に統合を発見し、リクエストされたすべてのローカル検査を実行してください。
| 検証項目 | MCPが必要? | ツール |
|---|---|---|
セキュリティ最低基準(scope=security) |
いいえ | — |
| コード検出と旧式検出 | いいえ | — |
| 公式品質チェックリスト | はい | quality_checklist |
| 支払いレベルの品質評価 | はい | quality_evaluation |
| ホモロゲーション(公式認可)フォームの取得または提出 | はい | form_homologation |
MCP対応の操作直前に:
application_listを呼び出さないでください。mcp__plugin_mercadopago_mcp__authenticateを呼び出し、開発者の言語でOAuth(認可リンク)を表示してください。Grep/Glob(テキスト検索)で以下を探してください:
mercadopago(任意のSDK)をインポートするファイル。MP_ACCESS_TOKENへの参照またはハードコードされたAPP_USR- / TEST-文字列。/v1/payments、/checkout/preferences、/v1/orders、payment.create、preference.create、order.create、preapproval.create、disbursement。webhook、notification、ipnに一致するパス)。以下を判定してください:
/v1/payments)vs Orders API(/v1/orders)。両者は共存可能。
/mp-integrate migrateを実行してOrders APIへの移行を自動化してください。」 ブロッカー(制限要因)として扱わないでください(既存コードは機能します)。今後の技術的負債としてフラグしてください。フラグ対象の旧式Instoreパターン:
/mpmobile/instore/qr(QR店頭)/instore/qr/seller/collectors(QR店頭 V2)/instore/orders/qr/seller/collectors(QR動的)/point/integration-api/devices/{id}/payment-intents(店頭端末)/v1/payments(オンライン)を使用している場合: サーバーサイドのカード支払い(Checkout API / マーケットプレイス)の場合は技術的負債としてフラグしてください。オンラインについては/mp-integrate migrateを提案しないでください — これらの製品の移行はこのスキルの対象外です。/checkout/preferencesを旧式としてフラグしないでください。/v1/paymentsを正しく使用します(CardPaymentトークン化後のサーバーサイド)。CardPaymentまたはonSubmitも含むファイル内の/v1/payments呼び出しを旧式としてフラグしないでください。scope=securityの場合はこのステップをスキップしてください。公式品質基準を含む他のスコープについては、以下を呼び出す直前にステップ0を適用してください。
mcp__plugin_mercadopago_mcp__quality_checklistを呼び出してください。レスポンスは以下を定義します:
返されたすべての項目について(要約しない、スキップしない):
Grep/Readでコードベースの項目の証拠を検索してください(フィールド、ヘッダー、動作)。これらの項目は常にquality_checklistの一部ではありませんが、本番環境の統合には必須です。常に評価してください:
| # | チェック項目 | 確認方法 |
|---|---|---|
| 1 | アクセストークンがprocess.env/相当の環境変数に格納 — ハードコード不可 |
.env*とテストフィクスチャ外のAPP_USR- / TEST-をGrepする |
| 2 | .envが.gitignoreに含まれている、.env.exampleは含まれていない |
.gitignoreを確認 |
| 3 | Webhookハンドラーがx-signature(HMAC-SHA256)を検証 |
mp-webhooksスキルを参照 — x-signature、x-request-id、createHmacをGrepする |
| 4 | back_urlとnotification_urlでHTTPSが強制 |
URL構築時のhttp://をGrepする |
| 5 | リダイレクト後、支払いステータスをサーバーサイドで検証 | リダイレクトback_url後の/v1/payments/{id}または/v1/orders/{id}のサーバーサイドフェッチを探す |
| 6 | 支払い/注文作成時にベタ性キー(一意の識別子)を送信 | X-Idempotency-KeyまたはSDK相当をGrepする |
| 7 | external_referenceをすべてのpreference/orderで設定 |
external_referenceをGrepする |
| 8 | テストユーザー認証情報が本番デプロイにコミットされていない | テスト認証情報が別のenv ファイルまたはVault(認証情報管理システム)から読み込まれることを確認 |
| 9 | sandbox_init_pointが使用されていない |
sandbox_init_pointをGrepする — マッチを見つけた場合はバグとしてフラグ。Mercado Pagoにはサンドボックスはなく、URLはすべての環境で無効 |
quality_evaluationを実行(互換性がある場合)mcp__plugin_mercadopago_mcp__quality_evaluationには実際のpayment_id(支払いID)が必要です。統合がPayments APIを使用し、支払いIDを生成した場合に実行してください。
開発者がIDを提供してから、この呼び出しの直前にステップ0を適用してください。
| 統合が使用する | アクション |
|---|---|
Payments API(/v1/payments) |
開発者に最近のテストpayment_idを求め、mcp__plugin_mercadopago_mcp__quality_evaluationでそれを呼び出す。 |
| Orders API のみ | スキップ — 互換性がない。レポートに記載。 |
mcp__plugin_mercadopago_mcp__quality_evaluation(
payment_id="<recent_test_payment_id>"
)
開発者が支払いIDを持っていない場合は、スキップしてレポートに記載してください: 「quality_evaluation: スキップ — payment_idが提供されていません。」
quality_evaluation実行後(またはスキップされた場合)、開発者にホモロゲーションフォームを提案してください:
「本番認証情報に切り替える前に、公式ホモロゲーションチェックリストを完了してください。これにより統合が認証され、本番環境で有効になります。」
action="get_form"、product_id(検出された製品)、site_id(検出された国)、lang(言語)、is_ca(Checkout API / Bricksは true)でmcp__plugin_mercadopago_mcp__form_homologationを呼び出してください。AskUserQuestion経由で開発者に提示してください。回答を収集してください。action="submit"と収集したform_valuesで呼び出してください。開発者がスキップした場合: 実装レポートの「要注意」に記載してください: 「ホモロゲーションフォームが提出されていません — 本番環境への導入前に必須。」
ステップ1~4が完了したら、常に出力の最後のブロックとして実装レポートをレンダリングしてください。これは開発者が保持する成果物です — 完了した内容、保留中の内容、次のステップを要約します。スキップしない、散文で要約しない。以下の構造化ブロックをそのまま使用してください。
レポートは開発者の次回セッション向けの情報源です: 何が検証され、何がフラグされ、次の具体的なアクションが何かを正確に伝えます。このレポートなしでは、レビューが終わりなく感じられ、開発者は出荷できるかどうかが不明確になります。
## Mercado Pago統合検証
**スコープ**: {full | security | webhooks | checkout | qr | subscriptions | marketplace | quality}
**検出されたAPI**: {Payments API | Orders API | 両方}
**検出された製品**: {リスト}
**分析されたファイル**: {リスト}
### 重大
- {本番導入をブロックまたは認証情報を露出させる問題}
### 警告
- {インシデントを引き起こす可能性があるが、リリースをブロックしない問題}
### 合格
- {正しく実装されている項目}
### 品質基準
{`quality_checklist`が実行された場合: 以下にすべての公式項目をレンダリングしてください。リクエストされなかった場合は「このスコープではリクエストされていません。」と書いてください。認証に失敗した場合は「未検証 — MCP接続が利用不可。」と書いてください。行を作成したり、スコアを作成したりしないでください。}
#### 必須フィールド
| # | フィールド | 説明 | ステータス | 証拠 |
|---|---------|------|---------|------|
| 1 | … | … | 実装済み / 未実装 / 部分的 | path:line |
#### ベストプラクティス
| # | プラクティス | 説明 | ステータス | 証拠 |
|---|----------|------|---------|------|
| 1 | … | … | 実装済み / 未実装 / 部分的 | path:line |
### セキュリティチェックリスト(横断的)
| # | チェック項目 | ステータス | 証拠 |
|---|-----------|---------|------|
### 推奨事項
- {実行可能、インパクト順 }
**要約**: 検証済みの場合は「必須フィールドX/Y実装済み、ベストプラクティスZ/W採用済み」。そうでない場合は「公式品質: リクエストなし/未検証」。セキュリティチェック合格 S/9。
{Payments API互換の検証で開発者がM
This skill audits a Mercado Pago integration. The security floor is evaluated locally. Official quality criteria are pulled live only when an MCP-backed scope reaches that step.
Do not inspect MCP state when the review starts. Discover the integration and run all requested local checks first.
| Review operation | MCP required? | Tool |
|---|---|---|
Security floor (scope=security) |
No | — |
| Code discovery and legacy detection | No | — |
| Official quality checklist | Yes | quality_checklist |
| Payment-level quality evaluation | Yes | quality_evaluation |
| Get or submit homologation form | Yes | form_homologation |
Immediately before an MCP-backed operation:
application_list merely to test the connection.mcp__plugin_mercadopago_mcp__authenticate and show the OAuth link in the developer's language.Use Grep/Glob to find:
mercadopago (any SDK).MP_ACCESS_TOKEN or hardcoded APP_USR- / TEST- strings./v1/payments, /checkout/preferences, /v1/orders, payment.create, preference.create, order.create, preapproval.create, disbursement.webhook, notification, ipn).Determine:
/v1/payments) vs Orders API (/v1/orders). Both can coexist.
Needs attention item in the Implementation Report with the file:line, and suggest the migration command: "Run /mp-integrate migrate to automate the migration to the Orders API." Do not treat it as a Blocker (existing code still works), but flag it as forward-looking technical debt. Legacy Instore patterns to flag:
/mpmobile/instore/qr (QR Instore)/instore/qr/seller/collectors (QR Instore V2)/instore/orders/qr/seller/collectors (QR Dinámico)/point/integration-api/devices/{id}/payment-intents (Point)/v1/payments (Online): flag as technical debt if it is a server-side card payment (Checkout API / Marketplace). Do not suggest /mp-integrate migrate for Online — migration for those products is out of scope for this plugin./checkout/preferences as legacy./v1/payments correctly (server-side after CardPayment tokenization). Do not flag /v1/payments calls in files that also contain CardPayment or onSubmit as legacy.Skip this step for scope=security. For every other scope that includes official quality criteria, apply Step 0 immediately before the following call.
Call mcp__plugin_mercadopago_mcp__quality_checklist. The response defines:
For every item returned (do not summarize, do not skip):
Grep/Read for evidence of the item (a field, a header, a behavior).These items are not always part of quality_checklist but are mandatory for any production integration. Always evaluate them:
| # | Check | How to verify |
|---|---|---|
| 1 | Access token in process.env / equivalent — never hardcoded |
Grep for APP_USR- / TEST- outside .env* and test fixtures |
| 2 | .env is in .gitignore, .env.example is not |
Read .gitignore |
| 3 | Webhook handler validates x-signature (HMAC-SHA256) |
See mp-webhooks skill — Grep for x-signature, x-request-id, createHmac |
| 4 | HTTPS enforced for back_url and notification_url |
Grep for http:// in URL building |
| 5 | Payment status verified server-side after redirect | Look for a server-side fetch of /v1/payments/{id} or /v1/orders/{id} after back_url |
| 6 | Idempotency key sent on payment/order creation | Grep for X-Idempotency-Key or SDK equivalent |
| 7 | external_reference set on every preference/order |
Grep for external_reference |
| 8 | Test user credentials not committed to production deploy | Confirm test credentials are loaded from a separate env file or vault |
| 9 | sandbox_init_point not used anywhere |
Grep for sandbox_init_point — flag any match as a bug; Mercado Pago has no sandbox, the URL is invalid in all environments |
quality_evaluation (when compatible)mcp__plugin_mercadopago_mcp__quality_evaluation requires a real payment_id. Run it when the integration used the Payments API and produced a payment ID.
Only after the developer provides the ID, apply Step 0 immediately before this call.
| Integration uses | Action |
|---|---|
Payments API (/v1/payments) |
Ask the developer for a recent test payment_id, then call mcp__plugin_mercadopago_mcp__quality_evaluation with it. |
| Orders API only | Skip — incompatible. Mention in the report. |
mcp__plugin_mercadopago_mcp__quality_evaluation(
payment_id="<recent_test_payment_id>"
)
If the developer doesn't have a payment ID, skip and note in the report: "quality_evaluation: skipped — no payment_id provided."
After quality_evaluation (or if it was skipped), offer the homologation form to the developer:
"Before switching to production credentials, complete the official homologation checklist. This certifies your integration and activates it for production."
mcp__plugin_mercadopago_mcp__form_homologation with action="get_form", product_id (from detected product), site_id (from detected country), lang, is_ca (true for Checkout API / Bricks).AskUserQuestion. Collect answers.action="submit" and the collected form_values.If the developer skips: note it in the Implementation Report under "Needs attention": "Homologation form not submitted — required before production deployment.".
After Steps 1–4 are complete, always render an Implementation Report as the last block of the output. This is the deliverable the developer keeps — it summarizes what's done, what's pending, and what to do next. Do not skip it, do not summarize it in prose; render the structured block below verbatim.
The report is the source of truth for the developer's next session: it tells them exactly what was verified, what was flagged, and the next concrete action. Without it, the review feels open-ended and the developer doesn't know if they can ship.
## Mercado Pago Integration Review
**Scope**: {full | security | webhooks | checkout | qr | subscriptions | marketplace | quality}
**API detected**: {Payments API | Orders API | both}
**Products detected**: {list}
**Files analyzed**: {list}
### CRITICAL
- {issues that block production or expose credentials}
### WARNINGS
- {issues that may cause incidents but do not block release}
### PASS
- {items correctly implemented}
### Quality Standards
{If `quality_checklist` ran: render every official item below. If it was not requested, write `Not requested for this scope.` If authentication failed, write `Not verified — MCP connection was unavailable.` Do not fabricate rows or scores.}
#### Required fields
| # | Field | Description | Status | Evidence |
|---|-------|-------------|--------|----------|
| 1 | … | … | Implemented / Missing / Partial | path:line |
#### Best practices
| # | Practice | Description | Status | Evidence |
|---|----------|-------------|--------|----------|
| 1 | … | … | Implemented / Missing / Partial | path:line |
### Security checklist (cross-cutting)
| # | Check | Status | Evidence |
|---|-------|--------|----------|
### Recommendations
- {actionable, ordered by impact}
**Summary**: {X/Y required fields implemented and Z/W best practices adopted, if verified; otherwise `Official quality: not requested/not verified`}. {S}/9 security checks pass.
{Offer `quality_evaluation` only for a compatible Payments API review where the developer requested MCP-backed quality analysis.}
---
## Implementation Report
### Verified
- [x] {item that passed — e.g., "Webhook handler validates x-signature with HMAC-SHA256"}
- [x] {next passing item}
### Needs attention
- [ ] {actionable item with file:line — e.g., "Add idempotency key to POST /v1/orders at api/orders.js:42"}
- [ ] {next pending item}
- [ ] {if legacy `/v1/payments` is detected — e.g., "Migrate POST /v1/payments to the Orders API (POST /v1/orders) at api/payments.js:42. The Payments API is being deprecated."}
### Blockers (must fix before production)
- [ ] {critical item — e.g., "Hardcoded APP_USR- token in config/mp.js:8 — move to env"}
### Next steps
1. {The single most impactful action the developer should take next}
2. {Follow-up actions in priority order}
3. Re-run `/mp-review` after fixes to confirm the report.
### Resources used
- Local: codebase inspection + cross-cutting security floor
- MCP: `quality_checklist` (include only if called, with date/time)
- MCP: `quality_evaluation` (include only if called, with the payment_id used)
- MCP: `form_homologation` (include only if called)
- Skill: `mp-review` v4.3.1
**Scores**: {X/Y required and Z/W best practices if verified; otherwise `official quality: N/A`}, {S}/9 security. **Verdict**: {Ready for production | Needs fixes | Blocked | Partial — MCP checks not verified}.
mp-integrate.quality_evaluation is read-only and only suggested.原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。