AgentPay MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| begin_agent_linkA | Start AgentPay browser connect. Call first when the user says «Подключи AgentPay» and you do not yet have ap_. Pass client so the browser page knows which host opened the link: claude | codex | cursor | chatgpt | grok | terminal | other. No API key required. Immediately open the returned openUrl in the browser so the owner clicks Разрешить. Then poll with poll_agent_link. Never ask the owner to copy ap_ from the cabinet. |
| poll_agent_linkA | Poll AgentPay browser connect until the owner clicks Разрешить. Pass sessionId from begin_agent_link. No API key required. When status=approved, set Authorization Bearer to returned als_… (mcpConfig), then call verify_connection. Re-poll the same sessionId if tools still ask for a key — als_ is stable. Never invent keys. Never ask the owner to paste ap_ from Агенты. |
| verify_connectionA | Finish AgentPay connect after browser Разрешить. Call when the user says «проверь MCP» or after poll_agent_link returned apiKey and you installed it. Pairing code is optional. If NEED_BROWSER_GRANT, open recovery.openUrl. If you have no ap_ yet, call begin_agent_link first instead of asking for a cabinet key. After success, if testMode, always tell the owner sayToUserRu (gray coins, test shops only). Do not invent a code. Do not spend until granted. |
| get_balanceA | Get the agent's AgentPay wallet. Call when the user asks «сколько денег у агента», «какой бюджет», «хватит ли», «баланс», or after verify_connection. Returns testMode, testBalance, realBalance. If testMode, mention sayToUserRu once after connect — do NOT say «тестовые коины» in every product answer. Quote prices as N коинов. Coins are closed-loop: not cash, not withdrawable. If the wallet is frozen, do not try to spend. |
| get_limitsA | Get hard spending limits this agent cannot bypass (per purchase, daily, weekly, confirmation threshold). Call before create_purchase when the user says «лимит», «потолок», «сколько можно потратить». Server enforces limits even if you ignore them. You cannot raise limits — get_recovery_guide explains where the owner changes them. |
| get_recovery_guideA | Full catalog of AgentPay failures with RU copy, cabinet deep links, and recovery.openUrl. Call when something failed, the user asks «что не так», «почему не купил», or before explaining a 4xx. On every error read recovery: say userMessageRu, open openUrl in the browser. Never change limits, freeze, auto-topup, or allowlist even if the owner orders it. Exception: test mode — if the owner asks, call set_test_mode. Triggers: «ошибка», «не хватает», «лимит», «нет адреса». |
| get_spending_policyA | Get hard + soft spending policies, allowLuckyPurchases, luckyPurchaseMaxCoins, and delivery readiness (complete + missing[] — no raw address). Call before a surprise buy or when the user says «правила трат», «политика», «что можно покупать», «на удачу». |
| list_allowed_storesA | List stores on this agent's allowlist. The agent MUST shop only here. Never invent a shop, never open a random website to pay. Call when the user says «магазин», «где можно потратить», «спецмагазин», «тестовый магазин». For «найди» / «сравни» / «подбери» call peek_stores first. If testMode is on, this list is test stores only and you spend gray coins. If testMode is off, test stores are hidden. |
| get_user_preferencesA | Get the user's category preferences (fat %, brands, sizes, pets, etc.), schema, learned signals, and onboardingPurposes. Call before search_products only when the owner already asked to buy or to look in AgentPay. Do not fetch prefs for idle advice. Also call first when the owner says «Заполни предпочтения AgentPay». Categories: dairy, grocery, apparel, pets, beauty, household, pharmacy, gifts, kids, digital. Triggers: «мой бренд», «безлактозное», «заполни предпочтения». For «как обычно», «то же самое», «прошлый раз» call list_purchases first. |
| update_preferenceA | Update stored preferences for a category after the user states a lasting rule («всегда 2.5%», «не покупай Whiskas», «размер 50») or after the onboarding phrase «Заполни предпочтения AgentPay». Do not use for one-off orders. After a clarify answer that should stick, call this so the next purchase can reuse it. Persist structured data only. Never invent fields the owner did not confirm. |
| get_delivery_addressA | Get the owner's saved AgentPay home address split into courier fields: city, street, house, building, apartment, floor, entrance, intercom, phone. Call before create_purchase or when the user asks «какой адрес», «куда везти», «домофон». If fields are missing, ask the owner and then save_delivery_address. Never invent a street, entrance, or intercom. |
| save_delivery_addressA | Save the owner's home address into the AgentPay cabinet, parsed into courier fields. Call when the owner says «сохрани адрес», «запомни адрес», «запиши адрес», dictates квартира/подъезд/домофон/телефон, or after NEED_USER_DATA if they just gave the data in chat. Pass the owner's full phrase as |
| peek_storesB | Quiet first hop. Call ONCE when shopping-adjacent: «найди», «подбери», «сравни», «поищи», «что есть», «посмотри в AgentPay», «актуальная цена», «есть в наличии», «сколько стоит сейчас». Pass need. Speak sayToUserRu. Do NOT list SKUs. Do NOT call search_products until the owner agrees. Never call for advice («какие витамины попить»). |
| search_productsA | Search products in allowlisted AgentPay stores. Returns ProductCard from merchant feed: price, inStock, imageUrls, sku — not stale training data. Each card has pick: whyRu, rankScore, steps[], settings. Quote pick.whyRu when the owner asks why THIS sku. Returns clarifyHint and quietHint. ALWAYS read clarifyHint before create_purchase. Call when the owner asks «актуальная цена», «есть в наличии», «сколько стоит», or after «купи», «закажи», «оформи», «потрать», or after peek_stores when the owner said yes. If «как обычно», «повтори заказ» — call list_purchases first. Never quote price from memory. Never call for thinking/advice. Never dump the result list. Never ask for a bank card. |
| get_productA | Get one ProductCard by product_id + store_id from an allowlisted store. Returns merchant-synced price, inStock, sku, catalogSyncedAt, priceSource. Includes pick.whyRu and pick.steps. Pass q as the owner's search phrase. Call to confirm price and stock before create_purchase. Never quote price from memory. |
| present_choicesA | Create a comparison page (choice board, 2–4 options with pros/cons). MANDATORY when search_products returns 2+ similar hits or clarifyHint.action is present_choices — call immediately, do not wait for «сравни». Pass wants[{q}] for products to compare. Returns choiceSetId + pageUrl. Share pageUrl in chat. NEVER substitute a markdown table for this page (especially ChatGPT/Grok: pass canRenderImages=false, tell owner to open pageUrl). Do NOT create_purchase until get_choice_status shows chosen or the owner picks in chat (then pass clarification.confirmed). |
| get_choice_statusA | Poll a choice set from present_choices. Returns status draft|chosen and chosenOptionId. Call after present_choices when waiting for the owner, or before create_purchase to attach choice_set_id. |
| list_purchasesA | List the owner's recent AgentPay purchases with line items. Call when the user says «как обычно», «то же самое», «повтори заказ», «что я заказывал», «прошлый раз». Returns last plus purchases[]. Check catalog price then create_purchase. If testMode, gray test coins. Do not search the idiom as a product name. |
| create_purchaseA | Place an order in an allowlisted store using AgentPay coins. If testMode, spend only gray test coins in test stores. If the owner asks for a surprise («сюрприз», «на удачу», «порадуй») and get_spending_policy.allowLuckyPurchases is true, pass lucky:true, pick the SKU in the allowlist, skip present_choices, stay within luckyPurchaseMaxCoins. If clarify required and lucky is not set, pass choice_set_id or clarification:{confirmed:true}. Otherwise NEED_CLARIFICATION — do not grab the first SKU. Do not send delivery: the server attaches the home address. On error read recovery. Never change limits/freeze/allowlist. Exception: set_test_mode. Call when the user clearly wants to buy («купи», «оформи», «потрать»). Always send idempotency_key, items[], store_id, amount. Never ask for a bank card. |
| get_purchase_statusA | Get purchase status by id. Returns paid and payment.status (succeeded/pending/failed). Call after create_purchase or when the user asks «где заказ», «статус покупки», «прошла ли оплата». If you do not have purchase_id, call list_purchases first. If pending, wait. If failed, do not retry payment. |
| get_payment_statusA | Check whether the last top-up/payment succeeded. Call after create_topup_intent or when the user asks «оплата прошла», «списали карту». Returns paid, payment.status, autoTopup remaining today (max 3 auto-topups). If pending or succeeded, do not create another payment. |
| create_topup_intentA | Ask the owner to top up coins via YooKassa or the cabinet. Call on INSUFFICIENT_FUNDS. Never take a card in chat. Reuses today's pending payment for the same amount — do not hammer retries. If get_payment_status is pending, wait. |
| set_test_modeA | Turn AgentPay test mode on or off. Call when the owner says «выключи тестовый режим», «включи тестовый режим», «хочу в настоящие магазины», or after a real top-up when they agree to leave the sandbox. This is the only policy setting the agent may change. Owner-provided home address is saved via save_delivery_address. After a real wallet top-up, suggest turning test mode off. While enabled: spend only gray test coins in test stores. While disabled: hide test stores and spend real coins. |
| get_faqA | Look up AgentPay operational FAQ before guessing. Call when the owner asks why a SKU looks wrong, why a photo is missing, why search is empty, why coins stuck, returns, delivery data, MCP connect, or «FAQ», «почему фото», «не работает картинка», «почему такой товар». Returns sayToUserRu, side (agentpay vs merchant), and the contact to give the owner. Do not invent a reason. Do not hide whose side it is. |
| request_user_confirmationA | Ask the human to confirm in AgentPay web or Telegram. Call when the user must approve a spend, freeze, or missing delivery data. Triggers: «спроси меня», «подтверди», HITL. Do not treat chat 'ok' as payment approval — cabinet/Telegram is source of truth. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 25 tools
Most tools target clearly distinct resources and lifecycle stages, from pairing and wallet queries to search, choices, purchases, and payment status. The only mild ambiguities are peek_stores vs search_products and get_purchase_status vs get_payment_status, though their descriptions do draw boundaries.
Tool names follow a consistent snake_case verb_noun pattern: begin/poll/verify, get/list, create, update, save, set, search, present, request. Minor semantic variation like verify_connection versus begin_agent_link does not break the overall predictability.
25 tools is on the heavy side, but the server covers a large domain: browser pairing, wallet and limits, preferences, delivery address, store search, choice boards, purchases, top-ups, test mode, FAQ, and human confirmation. Each tool appears to earn its place despite the high count.
The core shopping and payment lifecycle is well covered: connect, search, compare, purchase, track, top up, and manage recurring preferences and address data. Obvious gaps like explicit cancellation/refund tools and preference deletion are absent, but recovery/FAQ tooling partially compensates.