🔍mp-review
- プラグイン
- mercadopago
- ライセンス
- Apache-2.0
- ソース
- GitHub で見る ↗
説明
Mercado Pago インテグレーションを、公式品質チェックリストおよび固定のセキュリティ横断チェックリストに照らしてレビューします。 Mercado Pago MCP 上の `quality_checklist`(および該当する場合は `quality_evaluation`)を呼び出します。 次のような場合に使用: インテグレーションが完了した後、または `/mp-review` が実行されたとき。
原文を表示
Review a Mercado Pago integration against the official quality checklist and a fixed cross-cutting security checklist. Calls quality_checklist (and quality_evaluation when applicable) on the Mercado Pago MCP. Use after the integration is in place, or when /mp-review is invoked.
ユースケース
- ✓インテグレーション完了後にレビューするとき
- ✓mp-reviewコマンド実行後のチェック
本文(日本語訳)
mp-review
このskillはMercado Pago integrationの監査を行います。公式品質基準を複製するのではなく、MCPから直接取得し、コードベースに対して各項目を検証します。
Step 0 — MCPが実際に認証されているか確認
このMCPでは ListMcpResourcesTool が信頼できません(常に「No resources found」を返す)。ブートストラップツール authenticate / complete_authentication は常に存在しており、何も証明しません。
mcp__plugin_mercadopago_mcp__quality_checklist が呼び出し可能で、かつ実際のペイロードを返すかチェックしてください。返さない場合は、直ちに mcp__plugin_mercadopago_mcp__authenticate を呼び出し、以下を表示してください:
続行するには、あなたのMercado Pagoアカウントへのアクセスが必要です。このリンクを開いて接続してください: Mercado Pagoを接続 ブラウザに「Authentication Successful」と表示されたら、戻ってきて何か入力してください。
ユーザーが戻ってきたら、application_list を直接呼び出してください — complete_authentication を先に呼び出さないでください。コールバックURLを貼り付けるようユーザーに求めないでください。
Step 1 — integrationの検出
Grep/Glob を使用して以下を検出:
mercadopagoをインポートしているファイル(任意のSDK)MP_ACCESS_TOKENへの参照、またはAPP_USR-/TEST-の文字列- エンドポイントパターン:
/v1/payments,/v1/checkout/preferences,/v1/orders,payment.create,preference.create,order.create,preapproval.create,disbursement - webhook ハンドラー(
webhook,notification,ipnにマッチするパス)
以下を判定:
- 使用中のAPI: Payments API (
/v1/payments) vs Orders API (/v1/orders)。両者は共存可能です。- integrationがPayments APIを使用している場合、レガシーパスを使用しています。Payments APIは廃止予定であり、Mercado Pagoはすべてのintegrationを Orders API に移行させようとしています。実装レポートに「Needs attention」項目として、
/v1/paymentsが呼び出されているfile:lineを記載し、移行を推奨してください。Blocker として扱わない(既存コードは機能する)が、前向きな技術負債としてフラグしてください。 - 例外: Checkout Proはpreferences上にとどまります(Orders APIはCheckout Proに存在しない)。
/v1/checkout/preferencesをレガシーとしてフラグしないでください。
- integrationがPayments APIを使用している場合、レガシーパスを使用しています。Payments APIは廃止予定であり、Mercado Pagoはすべてのintegrationを Orders API に移行させようとしています。実装レポートに「Needs attention」項目として、
- 使用中のProducts: Checkout Pro/API、Bricks、Subscriptions、Marketplace など — エンドポイントパターンとリクエストペイロードから判定
Step 2 — 公式品質チェックリストを実行
mcp__plugin_mercadopago_mcp__quality_checklist を呼び出します。レスポンスは以下を定義:
- Required fields — Mercado Pagoの品質基準を満たすために実装が必須
- Best practices — 推奨される改善
返されたすべての項目について(要約しない、スキップしない):
Grep/Readでコードベースを検索し、その項目の証拠を探します(フィールド、ヘッダー、動作)- 各項目を Implemented、Missing、Partial でマークし、1行の正当化(判定を証明するfile:line)を付記します
Step 3 — 横断的セキュリティチェックリスト
これらの項目は常に quality_checklist に含まれるわけではありませんが、本番integrationでは必須です。常に評価してください:
| # | チェック | 検証方法 |
|---|---|---|
| 1 | Access tokenは process.env / 同等のもので管理 — ハードコード禁止 |
.env* および test fixtures の外側で APP_USR- / TEST- をgrepする |
| 2 | .env が .gitignore に含まれている、.env.example は 含まれていない |
.gitignore を読む |
| 3 | webhook ハンドラーが x-signature (HMAC-SHA256) を検証 |
mp-webhooks skillを参照 — x-signature, x-request-id, createHmac をgrepする |
| 4 | HTTPS が back_url と notification_url に強制 |
URL 構築内の http:// をgrepする |
| 5 | リダイレクト後、支払いステータスはサーバー側で検証 | /v1/payments/{id} または /v1/orders/{id} への back_url 後のサーバー側フェッチを探す |
| 6 | 支払い/注文作成時にIdempotency keyを送信 | 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には sandbox が存在せず、そのURLはすべての環境で無効です |
Step 4 — quality_evaluation を実行(互換性がある場合)
mcp__plugin_mercadopago_mcp__quality_evaluation は実際の payment_id が必要です。integrationがPayments APIを使用し、payment IDが生成された場合に実行してください。
| Integration が使用するもの | アクション |
|---|---|
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>"
)
開発者が payment ID を持っていない場合は、スキップしてレポートに記載: "quality_evaluation: skipped — no payment_id provided."
Step 4.5 — Homologation フォーム(本番化前の最終ステップ)
quality_evaluation 後(またはスキップされた場合)、開発者に homologation フォームを提供:
"本番認証情報に切り替える前に、公式 homologation チェックリストを完了してください。これにより、あなたのintegrationが認証され、本番化が有効になります。"
mcp__plugin_mercadopago_mcp__form_homologationをaction="get_form",product_id(検出されたproduct)、site_id(検出された国)、lang,is_ca(Checkout API / Bricksの場合は true)で呼び出します。- 各ステップ/質問を
AskUserQuestion経由で開発者に提示します。回答を収集します。 - すべての質問に回答されたら、
action="submit"と収集したform_valuesで呼び出します。 - 成功時: 開発者を祝福し、integrationが認証されたことを確認します。
開発者がスキップした場合: 実装レポートの「Needs attention」に記載: "Homologation form not submitted — required before production deployment."
Step 5 — 実装レポートをレンダリング(必須最終ステップ)
Step 1〜4が完了した後、常に実装レポートを出力の最後のブロックとしてレンダリングしてください。これは開発者が保持する納品物で、完了したこと、保留中のこと、次にすることをまとめています。スキップしない、散文で要約しない。下記のstructured blockをそのままレンダリングしてください。
このレポートは開発者の次のセッションにおける信頼できる情報源です。何が検証され、何がフラグされたか、次の具体的なアクションを正確に伝えます。なければ、レビューは未完結に見え、開発者はリリース可能かどうかわかりません。
出力フォーマット
## 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
- {本番化をブロックするか、認証情報を公開する問題}
### WARNINGS
- {インシデントを引き起こす可能性があるが、リリースをブロックしない問題}
### PASS
- {正しく実装されている項目}
### Quality Standards (MCP `quality_checklist` から)
#### 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 (横断的)
| # | Check | Status | Evidence |
|---|-------|--------|----------|
### Recommendations
- {実行可能で、インパクト順に並んだ項目}
**Summary**: X/Y required fields implemented, Z/W best practices adopted, S/9 security checks pass.
> より詳しいスコアが必要ですか?最近のテスト payment ID(または order ID)を提供いただければ、`quality_evaluation` を実行します。
---
## Implementation Report
### Verified
- [x] {合格した項目 — 例: "Webhook ハンドラーが HMAC-SHA256 で x-signature を検証"}
- [x] {次の合格項目}
### Needs attention
- [ ] {file:line付きの実行可能な項目 — 例: "Idempotency key を POST /v1/orders に追加 (api/orders.js:42)"}
- [ ] {次の保留項目}
- [ ] {レガシー `/v1/payments` が検出された場合 — 例: "POST /v1/payments を Orders API (POST /v1/orders) に移行 (api/payments.js:42)。Payments API は廃止予定です。"}
### Blockers (本番化前に必ず修正)
- [ ] {重大な項目 — 例: "config/mp.js:8 にハードコードされた APP_USR- token — env に移動"}
### Next steps
1. {開発者が次に実行すべき最もインパクトのあるアクション}
2. {優先順に実施すべきフォローアップアクション}
3. 修正後に `/mp-review` を再実行してレポートを確認
### Resources used
- MCP: `quality_checklist` ({呼び出し日時})
- MCP: `quality_evaluation` (実行された場合、使用された payment_id/order_id)
- Skill: `mp-review` v4.2.0
**Scores**: {X}/{Y} required, {Z}/{W} best practices, {S}/9 security. **Verdict**: {Ready for production | Needs fixes | Blocked}.
このskillが行わないこと
- コードの生成やscaffoldingは行いません。
mp-integrateを使用してください。 - 状態を変更するAPIの呼び出しは行いません。
quality_evaluationは読み取り専用で、提案のみです。 - 「レビューに何が含まれるべきか」のオフラインナレッジに依存しません — 公式チェックリストは毎回直接取得します。
原文(English)を表示
mp-review
This skill audits a Mercado Pago integration. It does not duplicate the official quality criteria — it pulls them live from the MCP and verifies each one against the codebase.
Step 0 — Verify MCP is actually authenticated
ListMcpResourcesTool is unreliable for this MCP (always returns "No resources found"). The bootstrap tools authenticate / complete_authentication are always present and prove nothing.
Check whether mcp__plugin_mercadopago_mcp__quality_checklist is callable AND returns a real payload. If not, call mcp__plugin_mercadopago_mcp__authenticate immediately and show:
To continue I need access to your Mercado Pago account. Open this link to connect: Connect Mercado Pago When you see "Authentication Successful" in the browser, come back and say anything.
When the user returns, call application_list directly — do NOT call complete_authentication first. Never ask the user to paste the callback URL.
Step 1 — Discover the integration
Use Grep/Glob to find:
- Files importing
mercadopago(any SDK). - References to
MP_ACCESS_TOKENor hardcodedAPP_USR-/TEST-strings. - Endpoint patterns:
/v1/payments,/v1/checkout/preferences,/v1/orders,payment.create,preference.create,order.create,preapproval.create,disbursement. - Webhook handlers (paths matching
webhook,notification,ipn).
Determine:
- API in use: Payments API (
/v1/payments) vs Orders API (/v1/orders). Both can coexist.- If the integration uses the Payments API, it is on the legacy path. The Payments API is being deprecated; Mercado Pago is pushing all integrations toward the Orders API. Always include a
Needs attentionitem in the Implementation Report recommending the migration, with the file:line where/v1/paymentsis called. Do not treat it as a Blocker (existing code still works), but flag it as forward-looking technical debt. - Exception: Checkout Pro stays on preferences (the Orders API does not exist for Checkout Pro). Do not flag
/v1/checkout/preferencesas legacy.
- If the integration uses the Payments API, it is on the legacy path. The Payments API is being deprecated; Mercado Pago is pushing all integrations toward the Orders API. Always include a
- Products in use: Checkout Pro/API, Bricks, Subscriptions, Marketplace, etc. — derive from endpoint patterns and request payloads.
Step 2 — Run the official quality checklist
Call mcp__plugin_mercadopago_mcp__quality_checklist. The response defines:
- Required fields — must be implemented to meet Mercado Pago's quality bar.
- Best practices — recommended improvements.
For every item returned (do not summarize, do not skip):
- Search the codebase with
Grep/Readfor evidence of the item (a field, a header, a behavior). - Mark each item Implemented, Missing, or Partial with a one-line justification (the file/line that proves the verdict).
Step 3 — Cross-cutting security checklist
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 |
Step 4 — Run 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.
| 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."
Step 4.5 — Homologation form (final step before production)
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."
- Call
mcp__plugin_mercadopago_mcp__form_homologationwithaction="get_form",product_id(from detected product),site_id(from detected country),lang,is_ca(true for Checkout API / Bricks). - Present each step/question to the developer via
AskUserQuestion. Collect answers. - When all questions are answered, call with
action="submit"and the collectedform_values. - On success: congratulate the developer and confirm the integration is certified.
If the developer skips: note it in the Implementation Report under "Needs attention": "Homologation form not submitted — required before production deployment.".
Step 5 — Render the Implementation Report (MANDATORY final step)
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.
Output format
## 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 (from MCP `quality_checklist`)
#### 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, Z/W best practices adopted, S/9 security checks pass.
> Want a deeper score? Provide a recent test payment ID (or order ID) and I'll run `quality_evaluation`.
---
## 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
- MCP: `quality_checklist` ({date/time of call})
- MCP: `quality_evaluation` (if it was run, with the payment_id/order_id used)
- Skill: `mp-review` v4.2.0
**Scores**: {X}/{Y} required, {Z}/{W} best practices, {S}/9 security. **Verdict**: {Ready for production | Needs fixes | Blocked}.
What this skill does NOT do
- It does not generate or scaffold code. Use
mp-integrate. - It does not call APIs that mutate state.
quality_evaluationis read-only and only suggested. - It does not rely on offline knowledge of "what should be in a review" — the official checklist is fetched live every time.
原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。