Mercado Pagoのテスト用にテストユーザーを作成し、資金を追加します。MCPの create_test_user および add_money_test_user をラップ(統合)したものです。 認証情報(アカウント確認用の証明)には APP_USR-(注文API、チェックアウトPro、Point、QR対応)と TEST-(チェックアウトAPI、Bricks、決済API対応)の2つの形式があり、どちらも有効で現在発行されていることを明確にします。
Create test users and add funds to them for Mercado Pago testing. Wraps create_test_user and add_money_test_user from the MCP. Clarifies that credentials come in APP_USR- (Orders API, Checkout Pro, Point, QR) and TEST- (Checkout API, Bricks, Payments API) formats — both are valid and actively issued.
このスキルは、テストユーザーを作成できる唯一の場所です。テスティングモデルが混乱しやすいため存在しており、異なるプレフィックス(接頭辞)を持つ2つの異なるタイプのテスト認証情報が存在します。
統合プロセスの ステップ4(全7段階) にいます:
1. アプリを作成 · 2. TESTの認証情報を取得 · 3. スキャフォルド · 4. テストユーザー作成 ← ここ · 5. E2Eテスト · 6. /mp-review · 7. 本番環境
テストユーザーを作成する前に、AskUserQuestion(最大3つの質問、.mp-integrate-progress.mdに既に記載されているものはスキップ)で基本事項を確認してください:
.mp-integrate-progress.mdで既に確認済みならスキップ。そうでなければ:「Mercado Pago開発者アカウントはお持ちですか?」 → はい / いいえAPP_USR-で始まるアクセストークンをお持ちですか?」 → はい / いいえはい、TEST認証情報です / いいえ、本番環境認証情報です / わかりませんアカウントがない → 該当国のダッシュボードを案内します(チリ:https://www.mercadopago.cl/developers(.comなし)、その他:https://www.mercadopago.com.{cc}/developers)。
認証情報がない → 開発者が認証情報をインポート希望の場合、ステップ0の要求に応じた手順をapplication_listの直前に適用し、AskUserQuestionで「どのアプリを使用したいですか?」と質問してから、選択したapplication_idでmcp__plugin_mercadopago_mcp__get_credentialsを呼び出し、認証情報をインラインで表示します。ファイルに書き込んだりコミットしてはいけません。 ダッシュボードの手動ガイダンスではMCPは不要です。
認証情報の種類 — いいえ、本番環境認証情報です または わかりません → 以下のブロッキング警告を表示し、テストユーザーを作成しないでください:
⛔ 警告 — 本番環境認証情報が検出されました 本番環境に対してテストすると、実際のカード決済が発生する可能性があります。開発者ダッシュボードの**{test_tab}**タブに切り替えてください。 👉
https://{DOMAIN}/developers/panel/app→ 認証情報 → **{test_tab}**タブ
質問3を開発者が「はい、TEST認証情報です」と確認するまで再表示してください。このゲートはスキップオプションなし — それ以外は進まないでください。
テストユーザーの作成または資金追加にはMCPが必要ですが、準備ガイダンスとバンドルされたテストカードは不要です。開発者がMCP対応アクションに進む場合のみ接続してください。
APP_USR- → create_test_userから作成されるテストユーザー認証情報、本番環境認証情報、Orders API、Checkout Pro、Point、QRTEST- → {test_tab}タブの静的テスト認証情報、Checkout API/Bricks/Payments API
どちらも有効です。get_credentialsは正しい形式を自動的に返します。開発者にプレフィックスを変更するよう指示しないでください。APP_USR-プレフィックスを使用し、本番環境APIに対して実行されます。テストユーザーは独自の残高を持ち(このスキルで読み込まれます)、実際のアカウントのように動作します。このスキルの起動時にMCPを検査しないでください。application_list、get_credentials、create_test_user、add_money_test_user、またはsearch_documentationフォールバックの直前に以下の手順を使用してください:
application_listを汎用接続確認として使用しないでください。mcp__plugin_mercadopago_mcp__authenticateを呼び出し、開発者の言語でOAuthリンクを表示します。application_listを呼び出してください。site_idを事前に解決MCPは現在site_idを返していません(application_listはAppID/AppName/AppDescriptionのみ返し、プラグインクライアントには/users/meを呼び出す許可を与えるOAuthアクセストークンが公開されていません)。以下の順序で解決してください:
country=として渡すと、エージェントが既に解決済み(永続状態またはウィザード)です。.mp-integrate-progress.mdを読む - プロジェクトルートで、前回の実行で国が保存されていれば再利用してください。AskUserQuestionで質問します(ピッカー、番号付きテキストブロックではなく)。答えを.mp-integrate-progress.mdに保存してください。currency_id/site_idのリテラルやロケール文字列をgrepしないでください — きれいなリポジトリでは信頼性が低く、トークンの無駄です。
以下のMCP呼び出しの直前にステップ0を適用してください。
mcp__plugin_mercadopago_mcp__create_test_userを以下の値で呼び出してください:
| パラメータ | 必須 | 値 |
|---|---|---|
site_id |
はい | MLA(アルゼンチン)、MLB(ブラジル)、MLM(メキシコ)、MLC(チリ)、MCO(コロンビア)、MPE(ペルー)、MLU(ウルグアイ) |
description |
はい | ユーザーを識別する自由形式のテキスト(例:"checkout-pro テスト用の購入者" ) |
profile |
はい | sellerまたはbuyer — シミュレートが必要なロール |
amount |
オプション | 初期残高(その国の通貨) |
ツールはユーザーID、メール、パスワード、APP_USR-認証情報を返します。
⚠️ 重大な違い — 2つのタイプの認証情報:
.envには使用しません。APP_USR-認証情報 → テストユーザー自身のAPI認証情報。そのテストユーザーとしてAPIコールが必要な場合のみ使用(例:マーケットプレイス売り手のOAuthフロー)。あなたのアプリのMP_ACCESS_TOKENではありません。MP_ACCESS_TOKEN → DevPanel → あなたのアプリ → {test_tab}タブから取得。.envに入るもの。mp-integrateで作成され、create_test_userでは作成されません。開発者が取引の両側が必要な場合(マーケットプレイス、サブスクリプション、P2P等が典型的)、
sellerとbuyerを1つずつ作成してください。
セッションがまだ認証されていない場合は、以下のMCP呼び出しの直前にステップ0を適用してください。
mcp__plugin_mercadopago_mcp__add_money_test_userを以下の値で呼び出してください:
| パラメータ | 必須 |
|---|---|
test_user_id |
はい — create_test_userが返したID |
amount |
はい — ユーザーの通貨での数値 |
国別の上限が適用されます。呼び出しが上限エラーで失敗した場合は、より小さい金額を求めて1回再試行してください。
カードテストでは、カード番号を作成しないでください。
${CLAUDE_PLUGIN_ROOT}/skills/mp-integrate/references/products.mdを読んでください — AR、BR、MX、CO、CL用の厳選されたバージョン確定済みテストカードが記載されています(番号、CVV、有効期限、APRO/OTHE/FUND/…ステータスコード表)。Claude Codeはこれをアクティブなプラグインバージョンに解決します。他のマーケットプレイスやインストールキャッシュを検索しないでください。これら5か国については、MCPコールは不要です。search_documentationに"test cards {country}"(例:"test cards peru")でフォールバックしてください。出力テンプレート:
## テストユーザーを作成しました
**国**: {country}
**プロフィール**: {seller | buyer}
**ユーザーID**: {id}
**初期残高**: {amount} {currency}
### 🔑 ログイン認証情報(チェックアウト時に買い手/売り手をシミュレート)
テスト購入時にMercado Pagoチェックアウトページにログインするために使用してください:
- **メール**: {email}
- **パスワード**: {password}
> これらはあなたのMP_ACCESS_TOKENではありません。`.env`に**入れないでください**。
---
### 📋 あなたのアプリのテスト認証情報(`.env`用)
これらは**DevPanel → あなたのアプリ → {test_tab}タブ**から取得 — テストユーザーからは**ありません**。
MP_ACCESS_TOKEN=APP_USR-... ← あなたのアプリのテストアクセストークン(DevPanelから) MP_PUBLIC_KEY=APP_USR-... ← あなたのアプリのテスト公開キー(DevPanelから)
> 両方のタイプの認証情報は`APP_USR-`プレフィックスを使用 — 重要なのは**どこから来た**かです:
> - `.env`用:DevPanel → あなたのアプリ → {test_tab}タブから
> - チェックアウトログイン用:上記のテストユーザーのメール+パスワード
### 次のステップ
- テスト購入を行う際、チェックアウト時にテストユーザーの**メール+パスワード**を使用してログインしてください。
- バックエンドで注文/支払いを作成する際は、あなたのアプリの**MP_ACCESS_TOKEN**(DevPanelから)を使用してください。
- カード決済の場合は、`references/products.md`のテストカードを使用してください。
- スモークテストは`mp-webhooks`で → 実際のテスト支払いを実行してウェブフック(登録したコールバック)を発火させてください。
- テスト支払いが成功した後、`mp-review`を実行してください。
This skill is the only place test users get created. It exists because the testing model is a frequent source of confusion — there are two distinct types of test credentials with different prefixes.
You are at step 4 of 7 in the integration journey:
1. Create app · 2. Get TEST creds · 3. Scaffold · 4. Create test user ← here · 5. E2E · 6. /mp-review · 7. Prod
Before creating test users, confirm the basics via AskUserQuestion (up to 3 questions — skip any already in .mp-integrate-progress.md):
.mp-integrate-progress.md. Otherwise: "Do you have a Mercado Pago developer account?" → Yes / NoAPP_USR- access token?" → Yes / NoYes, test credentials / No, production credentials / I don't knowNo account → point to the dashboard for the country (Chile: https://www.mercadopago.cl/developers — no .com; others https://www.mercadopago.com.{cc}/developers).
No credentials → if the developer chooses to import them: apply the on-demand procedure in Step 0 immediately before application_list, ask via AskUserQuestion "Which app do you want to use?", then call mcp__plugin_mercadopago_mcp__get_credentials with the chosen application_id and display credentials inline. Never write to file or commit. Manual dashboard guidance requires no MCP.
Credential type — No, production credentials OR I don't know → show this BLOCKING WARNING and do NOT create a test user:
⛔ WARNING — Production credentials detected A real card charge may occur if you test against production. Switch to the {test_tab} tab in the Developer Dashboard first. 👉
https://{DOMAIN}/developers/panel/app→ Credentials → {test_tab} tab
Re-show question 3 until the developer confirms "Yes, test credentials". This gate has no Skip option — do not proceed to Step 2 (test user creation) otherwise.
Creating or funding a test user requires MCP, but readiness guidance and bundled test cards do not. Connect only if the developer proceeds to an MCP-backed action.
APP_USR- → test user credentials from create_test_user, production credentials, Orders API, Checkout Pro, Point, QRTEST- → static test credentials from the {test_tab} tab, Checkout API / Bricks / Payments API
Both are valid. get_credentials returns the correct format automatically. Never tell a developer to change their prefix.APP_USR- prefix and run against the production API. A test user has its own balance (loaded via this skill) and behaves like a real account.Do not probe MCP when this skill starts. Use this procedure immediately before application_list, get_credentials, create_test_user, add_money_test_user, or the search_documentation fallback:
application_list as a generic connection check.mcp__plugin_mercadopago_mcp__authenticate and show the OAuth link in the developer's language.application_list only when the actual operation is choosing an app or importing credentials.site_id before askingThe MCP does not currently return a site_id (its application_list only returns AppID/AppName/AppDescription, and the OAuth access token that would let us call /users/me is not exposed to the plugin client). Resolve in this order:
country= — the agent already resolved it (persisted state or wizard)..mp-integrate-progress.md at the project root — if a previous run persisted a country, reuse it.AskUserQuestion (picker, never a numbered text block). Persist the answer to .mp-integrate-progress.md.Do not grep the repo for currency_id/site_id literals or locale strings — they're unreliable on a clean repo and waste tokens.
Apply Step 0 immediately before the following MCP call.
Call mcp__plugin_mercadopago_mcp__create_test_user with:
| Param | Required | Values |
|---|---|---|
site_id |
yes | MLA (Argentina), MLB (Brazil), MLM (Mexico), MLC (Chile), MCO (Colombia), MPE (Peru), MLU (Uruguay) |
description |
yes | Free text identifying the user (e.g., "buyer for checkout-pro tests") |
profile |
yes | seller or buyer — pick the role you need to simulate |
amount |
optional | Initial balance in the country's currency |
The tool returns the user id, email, password, and APP_USR- credentials.
⚠️ Critical distinction — two types of credentials:
.env.APP_USR- credentials → the test user's own API credentials. Used only if you need to make API calls AS that test user (e.g., marketplace seller OAuth flows). NOT your app's MP_ACCESS_TOKEN.MP_ACCESS_TOKEN → comes from DevPanel → your app → {test_tab} tab. This is what goes in your .env. Created by mp-integrate, NOT by create_test_user.If the developer needs both sides of a transaction (typical for marketplace, subscriptions, P2P), create one
sellerand onebuyer.
Apply Step 0 immediately before the following MCP call if the session is not already authenticated.
Call mcp__plugin_mercadopago_mcp__add_money_test_user with:
| Param | Required |
|---|---|
test_user_id |
yes — the id returned by create_test_user |
amount |
yes — number in the user's currency |
Country-specific limits apply. If the call fails with a limit error, ask for a smaller amount and retry once.
For card testing, do not invent card numbers.
${CLAUDE_PLUGIN_ROOT}/skills/mp-integrate/references/products.md — it has curated, version-pinned test cards for AR, BR, MX, CO, CL (numbers, CVV, expiry, and the APRO/OTHE/FUND/… status-code table). Claude Code resolves this to the active plugin version. Never search another marketplace or an installation cache. For these five countries, no MCP call is needed.search_documentation with "test cards {country}" (e.g., "test cards peru").Output template:
## Test user created
**Country**: {country}
**Profile**: {seller | buyer}
**User id**: {id}
**Initial balance**: {amount} {currency}
### 🔑 Login credentials (to simulate the buyer/seller at checkout)
Use these to **log in at the Mercado Pago checkout page** during a test purchase:
- **Email**: {email}
- **Password**: {password}
> These are NOT your MP_ACCESS_TOKEN. Do NOT put these in your `.env`.
---
### 📋 Your app's test credentials (for your `.env`)
These come from **DevPanel → your app → {test_tab} tab** — NOT from the test user.
MP_ACCESS_TOKEN=APP_USR-... ← your app's test access token (from DevPanel) MP_PUBLIC_KEY=APP_USR-... ← your app's test public key (from DevPanel)
> Both types of credentials use the `APP_USR-` prefix — what matters is WHERE they come from:
> - Your `.env`: from DevPanel → your app → {test_tab} tab
> - Checkout login: the test user's email + password above
### Next steps
- Use the test user **email + password** to log in at the checkout when making a test purchase.
- Use your app's **MP_ACCESS_TOKEN** (from DevPanel) in your backend to create orders/payments.
- For card payments, use the test cards in `references/products.md`.
- Smoke test with `mp-webhooks` → trigger a real test payment to fire the webhook.
- Run `mp-review` after a successful test payment.
.env file leaks, both buyer and seller balances are exposed.mercadopago.com.{tld} — the developer can sign in to inspect movements.site_id; trying to use Argentine test credentials against the Brazilian site fails silently with a not_found payment.mp-webhooks) or scaffold integration code (use mp-integrate).原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。