AgentPay-mcp
AgentPay MCP
Совместим с x402 V1/V2 + Stripe MPP — протокол-агностический контроль расходов.
agentpay-mcp — это человеко-ориентированный уровень доверия и политик поверх товарных платёжных рельсов (x402, ACP, UCP). OWS-совместимый уровень доверия — работает поверх MoonPay Open Wallet Standard. Протокол-агностический уровень доверия — работает и с x402, и со Stripe MPP. Пока x402 обрабатывает $600 млн в годовом исчислении — при этом 40% активности протокола приходится на ИИ-агентов (март 2026) — недостающим звеном является не исполнение платежей. А управление: кто одобрил, сколько можно потратить и что происходит, когда агент пытается превысить свой бюджет. Именно это и обеспечивает agentpay-mcp.
ACP управляет тем, что агенты ПРОДАЮТ. agentpay-mcp управляет тем, что агенты ПОКУПА. ACP (Agent Commerce Protocol) позволяет агентам публиковать услуги, вести переговоры и получать платежи. agentpay-mcp — это дополняющий слой — контроль того, что агенты тратят при потреблении платных API, инструментов и сервисов. Разные задачи, совместимые решения.
Когда ваш агент получает HTTP 402 Payment Required, ему нужно заплатить и повторить попытку — с вашего одобрения, в пределах установленных вами лимитов. AgentPay MCP — это сервер Model Context Protocol, который даёт Claude, Cursor и любому MCP-совместимому агенту платёжный кошелёк с жёсткими лимитами расходов, режимом одобрения человеком и полным ончейн-аудитом.
Экосистема MCP теперь насчитывает 97M+ ежемесячных загрузок и 10 000+ активных серверов — agentpay-mcp — это единственный MCP-нативный полный слой исполнения платежей.
✅ Интегрирован в NVIDIA/NeMo-Agent-Toolkit-Examples (PR #17 объединён) — платёжная инфраструктура для официального агентского тулкита NVIDIA.
📌 Флагманское предложение AgentIndex и песочница для демонстрации платежей: Как агенты безопасно покупают вызовы API и результат доверия AgentPay MCP.
📌 Контекст листинга экосистемы x402 отслеживается в docs/x402-ecosystem-submission.md.
Кто использует agentpay-mcp?
agentpay-mcp создан для трёх типов покупателей, которых объединяет одна проблема: автономные агенты тратят деньги без контроля.
Персона | Проблема | Для чего они используют agentpay-mcp |
Специалисты FinOps (владельцы ИИ-расходов в Fortune 500) | 98% команд FinOps теперь управляют ИИ-расходами (FinOps Foundation 2026) — но для автономных агентов не существует слоя управления | Атрибуция затрат по центрам затрат, лимиты бюджета на агента, дашборды расходов для CFO, принудительное исполнение политик как кода |
Платформенные инженеры (разработчики MCP / агентских фреймворков) | Агенты вызывают платные API в рантайме без нативных контролей расходов в x402, Stripe MPP или протоколе MCP | Готовое промежуточное ПО для управления расходами: дневные лимиты, аварийные выключатели, лимиты на задачу, аудит-трейлы |
Корпоративные команды комплаенса (EU AI Act, SOC 2, внутренний аудит) | Статья 14 EU AI Act (вступает в силу 2 августа 2026) требует человеческого надзора в рантайме и принудительного исполнения решений для автономных агентов | Очереди человеческого одобрения, аварийные выключатели в рантайме, полный ончейн-аудит для доказательств комплаенса |
Команды FinOps: agentpay-mcp — это первый слой управления, созданный для ваших рабочих процессов — не только для разработчиков. Лимиты бюджета, пороги одобрения и атрибуция затрат, которые встраиваются в ваши существующие инструменты FinOps.
Related MCP server: 402-mcp
Почему доверие имеет значение
Исследование McKinsey 2026 года по зрелости ИИ-доверия количественно подтверждает то, что уже чувствуют разработчики: возможности агентов опередили управление агентами.
Вывод | Статистика |
Предприятия, которые официально одобряют агентов перед развёртыванием | 14.4% |
Предприятия, сообщившие хотя бы об одном инциденте безопасности агентов | 88% |
Предприятия, уверенные в IAM агентов для платежей | 18% |
Разрыв доверия — это разрыв развёртывания. Предприятия не говорят, что агенты не работают — они говорят, что инфраструктура надзора (рабочие процессы одобрения, защитные ограничения расходов, проверка личности, аудит-трейлы) не поспевает.
AgentPay MCP решает это напрямую:
Режим человеческого одобрения — транзакции выше вашего порога требуют явного подтверждения человеком перед исполнением
Ончейн-лимиты расходов — лимиты смарт-контракта AgentAccountV2, которые код приложения не может переопределить, когда владелец кошелька настроил их в контракте. Инструмент
set_spend_policyустанавливает отдельную внутрипроцессную политику (см. docs/security-posture.md для точных границ контроля)Аудит-трейл — неизменяемая ончейн-история событий AgentAccountV2 через
get_transaction_history(получатель, сумма, номер блока). Попытки платежей, отклонённые до достижения цепочки, не записываютсяFail-closed — любая ошибка движка политик приводит к отклонению, а не к одобрению
Некастодиальный — приватные ключи никогда не покидают локальную машину
Когда 88% предприятий имели инцидент безопасности агентов, «доверие по умолчанию» — не жизнеспособная архитектура. AgentPay MCP построен на принципе «проверь, затем доверяй» — это единственная модель, которая масштабируется.
Почему управление затратами важно для MCP-агентов
Протокол Model Context Protocol даёт агентам доступ к мощным инструментам — но в самом протоколе нет встроенного механизма контроля того, сколько стоят эти инструменты. Это не теоретический пробел. Руководство WorkOS 2026 по безопасности MCP явно называет ограничение скорости, атрибуцию затрат и лимиты расходов на вызов нерешёнными проблемами на уровне протокола MCP. Каждый MCP-сервер может взимать плату. Ни один MCP-клиент не обеспечивает соблюдение бюджетов.
Результат: агент с доступом к 10 MCP-серверам может накапливать неограниченные затраты между сессиями, без стандартного способа атрибуции расходов по инструментам, ограничения экспозиции на вызов или остановки зацикленных процессов до того, как они опустошат кошелёк.
AgentPay MCP закрывает этот пробел на уровне инфраструктуры:
Пробел управления затратами MCP | Решение AgentPay MCP |
Нет лимитов расходов на вызов в спецификации MCP | Лимиты на транзакцию — ончейн-лимиты AgentAccountV2 (настроенные владельцем в контракте) плюс внутрипроцессный лимит |
Нет атрибуции затрат между MCP-серверами | Ончейн-история транзакций с получателем, суммой и номером блока на транзакцию (только ончейн-события — нет журнала по вызовам инструментов) |
Нет ограничения скорости для платных вызовов инструментов | Дневные агрегированные лимиты расходов — жёсткий потолок независимо от того, сколько инструментов или сессий работает |
Нет механизма человеческого надзора в протоколе | Одобрение с участием человека — транзакции выше порога ставятся в очередь на явное рассмотрение человеком |
Нет симуляции/сухого прогона для оценки затрат | Режим симуляции — предпросмотр стоимости транзакции и получателя перед фиксацией средств |
Если вы создаёте агентов, которые взаимодействуют с платными API, лимиты расходов MCP и управление затратами MCP — не опция, а разница между демо и продакшн-развёртыванием. AgentPay MCP — это эталонная реализация с открытым исходным кодом для решения этой задачи на границе протокола.
Безопасность и зависимости
AgentPay MCP создан для корпоративных MCP-развёртываний, где безопасность цепочки поставок имеет значение.
Нулевая зависимость от LiteLLM. Никакой прямой или транзитивной зависимости от LiteLLM или какого-либо тяжелого слоя маршрутизации LLM. Когда версии LiteLLM 1.82.7-1.82.8 были скомпрометированы на PyPI (март 2026), пользователи AgentPay MCP не пострадали.
Аудируемое минимальное дерево зависимостей. Сервер работает на
viem,@modelcontextprotocol/sdkи небольшом наборе аудируемых npm-пакетов. Никакого PyPI. Python runtime не требуется.Сигнал доверия для предприятий. Интегрирован в официальные примеры NeMo Agent Toolkit от NVIDIA (PR #17, объединено). Процесс проверки NVIDIA подтвердил уровень безопасности перед объединением.
Некастодиальная архитектура. Закрытые ключи никогда не покидают локальную машину. Ончейн-лимиты расходов обеспечивают соблюдение ограничений, даже если агент или его ключ скомпрометированы.
Усиление безопасности развертывания на Vercel. Если вы развертываете ИИ-агентов на Vercel, ознакомьтесь с контрольным списком усиления безопасности развертывания на Vercel перед повторным подключением платных инструментов после любого раскрытия OAuth, панели управления, CI или переменных окружения.
Готовность x402 к сканированию. Для платных API-демо, которым требуется поддержка x402, читаемая сканером, используйте рецепт готовности x402 к сканированию.
Наблюдаемость x402 Bazaar. Для платных MCP-инструментов, попадающих в доступные для поиска каталоги Bazaar, используйте рецепт наблюдаемости x402 Bazaar, чтобы охватить поисковые метаданные WithBazaar, единую аутентификацию и обратное чтение
EXTENSION-RESPONSES.Каналы пакетных расчетов x402. Для повторяющихся платных MCP-вызовов, использующих потоки депозитов, ваучеров, возвратов и претензий, используйте рецепт каналов пакетных расчетов x402, чтобы обеспечить производственную безопасность хранения каналов, лимитов ваучеров, восстановления и аудиторских журналов внецепочечных расчетов.
Паритет пакетных расчетов x402 для нескольких SDK. Для провайдеров, тестирующих клиенты пакетных расчетов x402 на TypeScript и Go, используйте рецепт паритета пакетных расчетов для нескольких SDK, чтобы подтвердить общее состояние каналов, поэтапные результаты e2e, разделение подписантов, видимость возвратов/восстановления и форму пакета доказательств.
Готовность x402 к TVM. Для предложений точной оплаты TVM/TON из новых примеров x402 используйте примечание о готовности x402 к TVM, чтобы убедиться, что неподдерживаемые требования TVM закрываются отказом до появления осознанной поддержки подписи, газа, jetton и расчетов.
UX пополнения x402 MCP. Для сравнения размещенных ссылок на пополнение и управляемых кошельков используйте бенчмарк UX пополнения x402 MCP, чтобы отделить скорость адаптации от шлюзов одобрения, ежедневных лимитов, аудита и некастодиального контроля.
Готовность к интроспекции каталогов. Для Glama, Smithery и других MCP-каталогов используйте примечание о готовности к интроспекции каталогов для проверенных путей
npx, Docker, имени MCP и некастодиальных метаданных.Совместимость x402 v2.11 с платным MCP. Используйте подтверждение совместимости для
Payment-Signature,payment-response,mcp-session-id, открытых заголовков CORS, порядка инициализации Streamable HTTP, ссылок на квитанции и перехода с Base Sepolia на Base mainnet.Метаданные уровня каталога. Используйте подтверждение реестра/листинга,
docs/mcp-registry-listing.json,glama.json,smithery.yamlиllms.txtдля поисковых роботов каталогов и агентов-покупателей.Нейтральный к блокчейну профиль шлюза x402. Используйте подтверждение нейтрального к блокчейну профиля шлюза, схему и фикстуру, чтобы документировать поддерживаемые сети, метаданные фасилитатора/расчетов, политики пробного периода/возврата и манифесты каталогов, не допуская утечки предположений, характерных только для Base, в не-EVM обнаружение.
Нормализация квитанций x402 для нескольких реестров. Используйте подтверждение нормализации квитанций для нескольких реестров, схему и фикстуру XRPL, чтобы нормализовать метки реестров, активы, цели расчетов,
Payment-Signature,payment-response, статус проверки, некастодиальные границы и отказы для неподдерживаемых реестров перед подписанием.Профиль предварительной проверки действий кошелька. Используйте профиль предварительной проверки действий кошелька и фикстуру TRON, чтобы требовать симуляцию, лимиты цепочки/ресурсов, разрешенные списки, подтверждение получателя и суммы, рекомендации по nonce и текст одобрения перед необратимыми переводами, обменами или покупками ресурсов.
Пакет листинга в каталоге машинных платежей. Используйте пакет листинга в каталоге и JSON листинга для каталогов MPP и платных MCP, не заявляя о поддержке неподдерживаемого не-EVM подписания.
Подтверждение паритета пяти инструментов x402. Используйте подтверждение паритета пяти инструментов и машиночитаемую карту, чтобы сопоставить потоки поиска, проверки, выборки, кошелька и оплаты с локальным подписантом AgentPay и контролем на основе одобрений.
Граница эскроу и репутации. Используйте подтверждение границы эскроу/репутации, чтобы отделить авторизацию платежей x402 от эскроу задач, идентичности, репутации и подтверждения работы.
Готовность платного MCP-прокси и обнаружения. Используйте пакет готовности платного прокси и обнаружения и JSON листинга для прокси и каталогов в стиле Toolstem/Cinderwright.
Динамический дрейф манифеста платного MCP. Используйте подтверждение дрейфа динамического манифеста, схему и фикстуры Rug Munch, чтобы проверять свежие снимки
.well-known/x402, предупреждения об устаревших метаданных, ясность отсутствия пробного периода/ценообразования, поддерживаемые сети и свежесть конечных точек каталога перед подписанием агентами-покупателями.Установка Smithery для платного MCP. Используйте подтверждение установки Smithery и
examples/smithery-paid-mcp-installationдля Smithery CLI, Vercel AI SDK MCP,@smithery/api, шлюзов одобрения, лимитов расходов по умолчанию и проверок свежих x402-манифестов. Не заявляйте о живой проверке Smithery, пока листинг не будет подтвержден.Нативный x402 против MCP на основе Stripe-прокси. Для разработчиков, сравнивающих AgentPay MCP с новыми репозиториями MCP на основе Stripe-прокси, используйте примечание «нативный x402 против Stripe-прокси», чтобы отделить шлюзы одобрения, лимиты расходов, строки аудита и некастодиальное подписание от заявлений о прокси-биллинге.
Проверка размещенного x402-прокси. Прежде чем агент заплатит размещенному x402 MCP-шлюзу, используйте контрольный список покупателя размещенного x402-прокси, чтобы проверить заголовки
payment-required, ненулевойpayTo, разрешенные списки сетей и активов, состояние одобрения, лимит расходов, корреляцию аудита и блокировку объединенных токенов.Обнаружение платного MCP и бюджетный ответ. Для сравнения обнаружения, учета и бюджетных платформ в стиле SettleGrid используйте ответ об обнаружении платного MCP и бюджете, чтобы отделить обнаружение каталога от авторизации покупателя x402.
Паритет потока покупателя для однокомандных x402-инструментов. Для сравнения покупательских CLI в стиле AgentScore Pay используйте контрольный список паритета потока покупателя AgentPay, чтобы подтвердить обнаружение, проверку, пробный запуск, оплату, лимиты расходов, типизированные ошибки оплаты, квоты, отказы без списания, идемпотентность, MCP-доступность и аудит перед подписанием.
Усиление безопасности платного MCP-шлюза. Для шаблонов Worker в стиле create-mcpay используйте контрольный список усиления безопасности платного MCP-шлюза, чтобы протестировать регистрацию, разбор вызовов, выпуск ключей, атомарный биллинг, области по умолчанию, отказы валидации без списания и строки аудита покупателя.
Подтверждение работоспособности платного провайдера. Для публичных каналов работоспособности провайдеров в стиле Voidly используйте контрольный список подтверждения работоспособности платного провайдера, чтобы проверить процент успешных операций провайдера, устаревшие серии, состояние квитанций, сеть x402, актив, payTo и маршрутизацию с отказом по умолчанию перед подписанием.
Пороги качества платных инструментов. Для каталогов с рейтингами в стиле Strale используйте подтверждение порогов качества платных инструментов, чтобы проверить свежие поля оценок, предупреждения об устаревших оценках, снимки работоспособности провайдера, отклонение по минимальному качеству и шлюзы одобрения перед подписанием x402.
Авторизованные сканирования кибербезопасности. Для платных инструментов безопасности в стиле AgentAegis используйте профиль оплаты авторизованного сканирования кибербезопасности, чтобы требовать авторизацию цели, привязку разрешенных доменов, лимиты расходов на цель, политику частоты сканирования, запросы на одобрение и язык аудиторских квитанций.
Постквантовая совместимость конвертов расходов. Для вопросов покупателей в стиле PQSafe используйте оценку постквантового конверта расходов, чтобы сопоставить лимиты расходов, разрешенные списки, квитанции x402, шлюзы одобрения и метаданные аудита, не заявляя о реализации ML-DSA.
Критически важные для платежей закрепления зависимостей. Для путей проверки и подписания x402 AgentPay закрепляет
viemточно на версии2.52.2, применяет то же переопределение корня и запускает дымовую проверку чистой установки перед выпуском. См. политику закрепления зависимостей.Элементы управления агентами WhatsApp и SMB. Для нативных для каналов платных агентов используйте рецепт элементов управления платными агентами WhatsApp и SMB.
Контроль партнерских выплат канальных агентов. Для партнерских и реферальных долей дохода в стиле Axon используйте спецификацию контроля партнерских выплат канальных агентов, чтобы отделить лимиты выплат, одобрение по каждому контакту, строки аудита и опциональные расчеты x402 от одобрения расходов на платные инструменты.
Дрейф цепочек x402. AgentPay MCP отслеживает базовую линию шаблона пейволла x402 Foundation с точной версией
viem2.52.2и отключается с отказом для несопоставленных цепочек. При изменениях PaymentWrapper и шаблона пейволла следуйте примечанию о совместимости дрейфа цепочек x402.
Если ваша команда безопасности проверяет зависимости MCP-сервера после инцидента с LiteLLM, npm ls в agentpay-mcp даст вам короткое, проверяемое дерево с нулевой подверженностью цепочке поставок Python.
Доверие и управление — согласование с протоколом A2A
Протокол Agent2Agent (A2A) от Google (v1.0.0) определяет, как агенты обнаруживают друг друга, проходят аутентификацию и взаимодействуют через организационные границы. Спецификация построена на карточках агентов (Agent Cards), схемах безопасности и управлении задачами с участием человека, но она намеренно не определяет управление расходами на уровне протокола.
agentpay-mcp заполняет этот пробел в качестве дополнительного уровня управления. Вот как наши элементы управления соотносятся с архитектурой A2A:
Концепция A2A | Что определяет спецификация | Что добавляет agentpay-mcp |
Agent Cards ( | Агенты объявляют, что они умеют делать и как аутентифицироваться | agentpay-mcp добавляет политику расходов как обнаруживаемую возможность — дневные лимиты, лимиты на транзакцию, пороги утверждения |
Human-in-the-loop (состояние задачи | Задачи могут приостанавливаться для ввода данных человеком в процессе выполнения | agentpay-mcp обеспечивает это для платежей: транзакции выше настраиваемого порога ставятся в очередь на явное утверждение человеком перед выполнением |
Security schemes (OAuth, API keys, mTLS) | Аутентификация между агентами | agentpay-mcp предоставляет дополнение авторизации — не просто «разрешено ли этому агенту подключаться?», а «разрешено ли этому агенту тратить $X?» |
Extensions (спецификация §4.6) | Агенты могут предоставлять дополнительные структурированные данные помимо базового A2A | Лимиты расходов, история утверждений и квитанции транзакций могут отображаться как данные расширений в метаданных задач A2A |
Opaque execution (руководящий принцип) | Агенты взаимодействуют, не раскрывая внутренние детали | agentpay-mcp сохраняет непрозрачность — закрытый ключ платящего агента и внутренняя логика бюджета никогда не покидают локальную машину |
Что это означает на практике
Когда два A2A-совместимых агента совместно выполняют задачу, включающую платные вызовы API:
Обнаружение — вызывающий агент читает Agent Card удаленного агента (спецификация A2A)
Аутентификация — взаимная аутентификация через объявленные security schemes (спецификация A2A)
Управление расходами — agentpay-mcp обеспечивает соблюдение бюджетных лимитов, ведет журнал транзакций и ставит высокоценные платежи на утверждение человеком (уровень agentpay-mcp)
Аудит — полный след транзакций в блокчейне обеспечивает доказательства соответствия, независимые от внутреннего состояния любого из агентов
Это позиционирует agentpay-mcp как уровень управления расходами для A2A-совместимых экосистем агентов — дополняя идентичность и управление задачами протокола финансовыми контролами, которые предприятия требуют перед развертыванием автономных агентов.
Примечание: Спецификация A2A v1.0.0 не определяет механизм оценки доверия или сигналов доверия на уровне протокола. Контроли управления agentpay-mcp (лимиты расходов, утверждение человеком, следы аудита в блокчейне) спроектированы так, чтобы быть совместимыми с будущими расширениями, связанными с доверием, по мере развития экосистемы A2A.
Обнаружение AI-агентами
AgentPay MCP спроектирован для обнаружения и использования AI-агентами. Совместим с:
claude-mem — Состояние платежей (история транзакций, бюджеты, токены сессий) сохраняется как память агента между сессиями через уровень наблюдения claude-mem
AgentSkills — Устанавливается как кросс-фреймворковый навык в любой совместимой среде AgentSkills (Claude Code, Cursor, Gemini CLI, Antigravity)
Chrome DevTools MCP — Используется в паре как платежный уровень для браузерных агентов
Установка как навык
Добавьте в конфигурацию любой MCP-совместимой среды:
{
"mcpServers": {
"agentpay": {
"command": "npx",
"args": ["agentpay-mcp"],
"env": {
"AGENT_PRIVATE_KEY": "0x...",
"AGENT_WALLET_ADDRESS": "0x..."
}
}
}
}Работает с Claude Code, Cursor, Gemini CLI, OpenClaw, Windsurf и любым MCP-клиентом.
Поток 402 — Что это на самом деле делает
Agent calls a paid API
│
▼
HTTP 402 ←── "Payment required: 0.50 USDC on Base"
│
▼
AgentPay MCP evaluates your policy:
• Is 0.50 USDC under your per-tx cap? ($5 limit → ✅)
• Is this recipient allowlisted? (api.example.com → ✅)
• Require human approval? (under $1 threshold → auto)
│
▼
Payment sent → API retried with payment proof → 200 OK
│
▼
Agent gets the data. Full tx on basescan.org.agentpay-mcp против x402-mcp — В чем разница?
Оба проекта обеспечивают платежи агентов. Они решают разные задачи на разных уровнях.
Возможность | agentpay-mcp | x402-mcp (Coinbase) |
Выполнение платежей | ✅ x402 + Stripe MPP | ✅ Только x402 |
Лимиты расходов в блокчейне | ✅ Обеспечивается смарт-контрактом | ❌ Без лимитов |
Лимиты бюджета на сессию | ✅ Жесткий потолок сессии | ❌ Без ограничений на сессию |
Суточные агрегированные лимиты | ✅ Настраиваемый дневной максимум | ❌ Без дневных лимитов |
Утверждение человеком | ✅ Очередь на основе порога | ❌ Только полностью автономно |
Симуляция транзакций | ✅ Пробный прогон перед коммитом | ❌ Выполнить или ничего |
Поддержка нескольких протоколов | ✅ x402 V1/V2 + Stripe MPP | ⚠️ Только x402 |
Совместимость с OWS-кошельками | ✅ MoonPay Open Wallet Standard | ❌ Только кошелек Coinbase |
След аудита | ✅ Полная история транзакций с мерчантом, суммой, статусом | ⚠️ Базовый журнал транзакций |
Интеграция FinOps | ✅ Отнесение затрат на сессию/агента | ❌ Недоступно |
Политика fail-closed | ✅ Ошибки → отклонение, никогда не утверждение | ❌ Нет механизма политики |
Без кастодиального хранения | ✅ Ключи никогда не покидают локальную машину | ✅ Ключи никогда не покидают локальную машину |
Сигнал доверия для предприятий | ✅ NVIDIA NeMo Toolkit PR #17 объединен | — |
Когда использовать x402-mcp: Вам нужно максимально простое интегрирование платежей x402 без требований к управлению. Ваш агент работает с неограниченными бюджетными полномочиями.
Когда использовать agentpay-mcp: Вам нужны контроли расходов, соблюдение бюджета, рабочие процессы утверждения человеком или поддержка нескольких протоколов. Ваши агенты работают с реальными корпоративными бюджетами, где неконтролируемые расходы являются блокирующим фактором развертывания.
x402-mcp добавляет платежи вашему агенту. agentpay-mcp добавляет управляемые платежи — лимиты расходов, лимиты сессий, утверждение человеком и следы аудита, которые предприятия требуют перед развертыванием агентов против производственных бюджетов.
FAQ: Нативный x402 AgentPay MCP против прокси-решения Stripe MCP
Публичные репозитории MCP-платежей начинают использовать формулировки x402 и Stripe Agent для обнаружения. Относитесь к этому как к рыночному сигналу, а не как к доказательству того, что каждый прокси выпустил полный контроль расходов.
В чем основная разница?
AgentPay MCP сохраняет решение о платеже внутри границ политики агента. Агент запрашивает x402_pay, AgentPay проверяет состояние утверждения и политику расходов перед подписанием, а след аудита записывает инструмент, сумму, мерчанта, квитанцию и результат политики. Паттерн прокси Stripe обычно размещает платежный или биллинговый прокси перед нижестоящим сервисом.
Почему не использовать прокси для каждого платного вызова MCP?
Прокси может помочь с биллингом и агрегацией счетов. Он не отвечает автоматически на вопросы о том, кто утвердил расход, остался ли агент в рамках бюджета задачи или была ли заблокирована подпись до утверждения политики. AgentPay MCP обрабатывает эти контроли до выполнения платежа.
Какие доказательства каталог или покупатель может проверить уже сегодня?
npm:
agentpay-mcp@4.1.9или новееGlama: https://glama.ai/mcp/servers/up2itnow0822/claw-pay-mcp
Метаданные каталога:
glama.jsonиsmithery.yamlПути установки:
npxи DockerИнтроспекция: 27 MCP-инструментов, включая
x402_pay,check_budget,set_spend_policyиotel_evaluate_spend
Как это соотносится с Lightning Wallet MCP?
Lightning Wallet MCP — это Bitcoin-кошелек MCP с работой над бейджами для Glama и позиционированием с запасным вариантом x402. AgentPay MCP сосредоточен на управлении платежными инструментами x402: шлюзы утверждения, жесткие лимиты расходов, локальное подписание без кастодиального хранения, метаданные каталога и строки аудита, привязанные к платным вызовам инструментов.
Полный чек-лист см. в Паттерны нативного x402 AgentPay MCP против прокси-решения Stripe.
Для размещенных шлюзов платных MCP используйте Чек-лист проверки покупателя размещенного прокси x402 перед подписанием. Он проверяет заголовки payment-required, payTo, цепочку, актив, лимит расходов, шлюз утверждения, журнал аудита и блокировку объединенных токенов.
Для сравнения однокомандного покупательского CLI используйте Чек-лист паритета покупательского потока AgentPay. Он превращает обнаружение, проверку, пробный прогон, оплату, лимит расходов, типизированные ошибки платежей, квоты, сбои без списания, идемпотентность, MCP-доступ и аудит в фикстуру fail-closed. Для платных шаблонов Worker используйте Чек-лист усиления шлюза платного MCP перед тем, как считать каркас готовым к производству.
Быстрый старт
1. Установка
npm install -g agentpay-mcp2. Настройка Claude Desktop
Добавьте в ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"agentpay": {
"command": "npx",
"args": ["agentpay-mcp"],
"env": {
"AGENT_PRIVATE_KEY": "0x...",
"AGENT_WALLET_ADDRESS": "0x...",
"CHAIN_ID": "8453"
}
}
}
}3. Настройка Cursor
Добавьте в .cursor/mcp.json или ~/.cursor/mcp.json:
{
"mcpServers": {
"agentpay": {
"command": "npx",
"args": ["agentpay-mcp"],
"env": {
"AGENT_PRIVATE_KEY": "0x...",
"AGENT_WALLET_ADDRESS": "0x...",
"CHAIN_ID": "8453"
}
}
}
}4. Установка лимитов расходов
После запуска скажите своему агенту:
Set my spend policy: $1 per transaction, $10 per day, only send to allowlisted addresses.Или вызовите set_spend_policy напрямую:
{
"tool": "set_spend_policy",
"arguments": {
"perTxCapEth": "0.0004",
"dailyLimitEth": "0.004",
"allowedRecipients": ["0xapi-provider-address..."]
}
}Теперь ваш агент может платить за API — и не может потратить более $1 за раз или $10 в день, независимо от того, что ему поручено делать.
Режим утверждения человеком (по умолчанию)
По умолчанию транзакции выше вашего порога автоматического утверждения ставятся в очередь на проверку человеком. Агент не может обойти это.
$0.50 USDC request → under $1 threshold → auto-approved → paid → result returned
$5.00 USDC request → over $1 threshold → queued → you get notified → approve or rejectЧтобы утвердить платеж из очереди:
{
"tool": "queue_approval",
"arguments": {
"action": "approve",
"tx_id": "0x..."
}
}Чтобы отклонить его:
{
"tool": "queue_approval",
"arguments": {
"action": "cancel",
"tx_id": "0x..."
}
}Агент видит результат и решает, что делать дальше (использовать кэшированные данные, спросить пользователя, прервать).
Ценные пакеты — Три производственных паттерна рабочих процессов
1. Агент платных API
Что делает: Находит подходящий платный API для потребности в данных, платит один раз, кэширует результат.
Когда использовать: Вашему агенту нужны данные (рыночные данные, обогащение, геокодирование), и вы хотите, чтобы он обрабатывал платеж автоматически, а не завершался с ошибкой 402.
Agent: "I need current options flow data for AAPL"
│
├─ Tries free sources → insufficient data
├─ Finds paid API → gets 402 for $0.25 USDC
├─ Checks: $0.25 < $1 cap → auto-approved
├─ Pays with x402_pay → gets data
├─ Caches result at ~/.clawpowers/state/market:AAPL:options
└─ Returns data + payment receiptИспользуемые инструменты: x402_pay, check_spend_limit, get_transaction_history
Пример обмена:
User: Get me the options flow for AAPL for the last 7 days.
Agent: Checking free sources... insufficient. Found paid API at data.example.com.
Cost: $0.25 USDC (under your $1 auto-approve cap). Paying now.
[x402_pay → 200 OK, paid 0.25 USDC, tx: 0xabc...]
Here's the options flow data: [results]
Total cost today: $0.25 of your $10 daily budget.2. Исследовательский агент
Что делает: Собирает данные сначала из бесплатных источников, заполняет пробелы платными данными, компилирует структурированный вывод.
Когда использовать: Вам нужен комплексный исследовательский отчет, и вы хотите, чтобы агент тратил деньги только там, где бесплатных данных действительно недостаточно.
Agent: "Research competitive landscape for real-time flight tracking APIs"
│
├─ Scrapes free sources (GitHub, HN, docs) → baseline data
├─ Identifies gaps: pricing data, SLA guarantees, enterprise contacts
├─ Proposes paid lookups totaling $2.75 USDC → presents for approval
├─ Human approves
├─ Pays for Apollo contact enrichment ($1.50) + Crunchbase data ($1.25)
└─ Compiles: free data + paid data → structured reportИспользуемые инструменты: x402_pay, x402_session_start, x402_session_fetch, check_budget
Пример обмена:
User: Research the real-time flight tracking API market. Budget up to $5.
Agent: Starting with free sources... [scrapes 12 sources, builds baseline]
Gaps identified:
- Vendor pricing (not public for 3 of 5 vendors)
- Contact info for enterprise sales at FlightAware
- Recent funding data for two startups
To fill these I'd spend ~$2.75 USDC:
- Apollo contact enrichment: $1.50
- Crunchbase firmographics: $1.25
Approve? (y/n)
User: y
Agent: [pays, fetches, compiles]
Report ready. Spent $2.75 of your $5 budget. [structured report attached]3. Агент автоматизации
Что делает: Выполняет реальные задачи от начала до конца, оплачивая все необходимые сервисы по ходу работы.
Когда использовать: Вы хотите агента, который действительно может завершить работу — забронировать звонок, запустить конвейер обогащения, развернуть что-то — а не просто исследовать это.
Agent: "Enrich this list of 50 leads and add to CRM"
│
├─ Processes first 10 free (from existing data)
├─ Remaining 40 need enrichment → $0.10/contact = $4.00 USDC
├─ Presents plan: 40 contacts × $0.10 = $4.00 total → user approves
├─ Runs enrichment in batches of 10 (staying under per-tx cap)
├─ Writes enriched data to CRM via API
└─ Reports: 50 leads enriched, $4.00 spent, 47 successfulИспользуемые инструменты: x402_pay, x402_session_start, set_spend_policy, get_transaction_history
Корпоративный FinOps — Шаблоны бюджетных лимитов
Производственные развертывания агентов нуждаются в управлении расходами, удовлетворяющем корпоративным требованиям FinOps. Эти шаблоны показывают распространенные паттерны контроля расходов агентов на уровне инфраструктуры.
Бюджеты отделов на агента
// Marketing agent — $50/day cap, restricted to approved data vendors
{
"tool": "set_spend_policy",
"arguments": {
"perTxCapEth": "0.02",
"dailyLimitEth": "0.02",
"allowedRecipients": ["0xmarketingVendor1...", "0xmarketingVendor2..."]
}
}
// Engineering agent — $200/day cap, broader vendor access
{
"tool": "set_spend_policy",
"arguments": {
"perTxCapEth": "0.04",
"dailyLimitEth": "0.08",
"allowedRecipients": ["0xcloudProvider...", "0xapiVendor...", "0xdataSource..."]
}
}Многоуровневые пороги утверждения
Сопоставьте матрицу согласований вашей организации с уровнями расходов агента:
$0 - $1 -> auto-approved (routine API calls)
$1 - $25 -> auto-approved with logging (standard tool usage)
$25 - $100 -> queued for team lead approval via queue_approval
$100+ -> queued for finance team approvalУстановите потолок автоматического одобрения с помощью set_spend_policy (внутрипроцессный лимит, обеспечиваемый MCP-сервером). Транзакции выше on-chain лимитов AgentAccountV2 — настроенных владельцем кошелька в контракте — попадают в очередь на проверку человеком через сам смарт-контракт.
Мониторинг бюджета для FinOps-дашбордов
Получайте данные о расходах в реальном времени для ваших FinOps-инструментов:
// Check remaining budget before starting expensive workflows
{ "tool": "check_budget", "arguments": {} }
// Returns: { "remaining": "142.50 USDC", "spent": "57.50 USDC", "limit": "200.00 USDC" }
// Pull transaction history for cost attribution
{ "tool": "get_transaction_history", "arguments": { "limit": 100 } }
// Each entry includes: merchant, amount, timestamp, tool context — ready for FinOps importЭти шаблоны работают с любой FinOps-платформой (CloudHealth, Kubecost, Apptio) — экспортируйте историю транзакций через MCP-инструмент и передавайте её в существующий конвейер атрибуции затрат.
Переменные окружения
# Required
AGENT_PRIVATE_KEY=0x... # Agent hot wallet key (0x-prefixed hex)
AGENT_WALLET_ADDRESS=0x... # Deployed AgentAccountV2 contract address
# Optional
CHAIN_ID=8453 # 8453 = Base Mainnet (default, recommended)
RPC_URL=https://mainnet.base.org # Custom RPC (Alchemy/Infura recommended for production)
SESSION_TTL_SECONDS=3600 # x402 session lifetime (default: 1 hour)
FACTORY_ADDRESS=0x... # For deploy_wallet and create_escrow
NFT_CONTRACT_ADDRESS=0x... # For deploy_wallet
# Optional — otel_register_budget_policy circuit breaker
# Comma-separated hosts whose private/loopback/link-local kill-callback URL is
# explicitly permitted. Empty by default: a killCallbackUrl pointing into
# private space is dropped (with a warning) and never POSTed to, though the
# budget policy's spend cap is always registered and enforced regardless.
# Set this only if your circuit-breaker webhook genuinely lives in-VPC.
AGENTPAY_KILL_CALLBACK_ALLOWED_HOSTS=orchestrator.svc.internalОграничения SSRF для kill-callback. Значение killCallbackUrl должно использовать http(s), не должно содержать учётные данные и не должно указывать на частный, loopback, link-local или иной не глобально маршрутизируемый адрес (RFC1918, CGNAT, multicast, зарезервированные адреса, назначения протоколов IETF, диапазоны для бенчмаркинга и документации, а также эквиваленты IPv6 и все переходные формы IPv4-в-IPv6). Имена хостов разрешаются и повторно проверяются по тем же правилам непосредственно перед срабатыванием callback. Единый фиксированный таймаут в 10 секунд охватывает и разрешение DNS, и POST вместе, поэтому резолвер, который никогда не отвечает, не может удерживать оценку спана открытой.
Одна брешь не закрыта: соединение не привязывается к адресу, который был проверен, поэтому резолвер, который в момент проверки отвечает публичным адресом, а в момент подключения — частным (DNS rebinding), всё ещё может быть достигнут. Для закрытия этой бреши нужно перенести этот вызов с глобального fetch на node:http/node:https с закреплённым lookup; это отслеживается отдельно. Если вам нужна жёсткая гарантия уже сегодня, поместите перед вебхуком сетевой allowlist исходящих подключений. Недоставленные callback-вызовы сообщают только ok=false с единственной общей причиной — HTTP-статус и конкретная ошибка никогда не возвращаются вызывающей стороне, а только логируются на стороне сервера (только origin, никогда — путь или query callback).
Все 23 инструмента
Платежи и поток 402
Tool | Что делает |
| Загрузить URL, автоматически оплатить 402, повторить — основной сценарий использования |
| Оплатить один раз, получить переиспользуемый токен сессии для базового URL |
| Выполнять вызовы в рамках активной сессии (без новой оплаты) |
| Просматривать активные сессии и TTL |
| Явно закрыть сессию |
Кошелёк и контроль расходов
Tool | Что делает |
| Адрес, балансы, лимиты расходов, глубина очереди |
| Отправить ETH или ERC-20 через контракт AgentAccountV2 |
| Оставшийся лимит расходов за текущий период |
| Настроить дневные лимиты, потолки на транзакцию, allowlist получателей |
| Запросить оставшийся on-chain бюджет |
| Одобрить или отменить транзакцию из очереди |
| On-chain логи событий с фильтрацией |
| Развернуть новый кошелёк на смарт-контракте AgentAccountV2 |
Операции с токенами
Tool | Что делает |
| Адрес токена и число десятичных знаков по символу и сети |
| Зарегистрировать кастомный ERC-20 в реестре токенов |
| Все зарегистрированные токены для сети |
| Отправить любой токен из реестра (автоматически определяет адрес и десятичные знаки) |
| Балансы токенов по одному или нескольким токенам |
DeFi
Tool | Что делает |
| Uniswap V3 своп в Base, Arbitrum, Optimism или Polygon |
| Кроссчейн-мост USDC на CCTP V2 (10 EVM-сетей, ~12 с) |
Идентификация и доверие
Tool | Что делает |
| On-chain проверка идентичности ERC-8004 |
| On-chain репутационная оценка и история |
| Эскроу USDC с взаимным обеспечением — обе стороны блокируют залог |
Ключевые примеры инструментов
x402_pay — основной инструмент
// Request
{
"tool": "x402_pay",
"arguments": {
"url": "https://api.example.com/premium-data",
"max_payment_eth": "0.0002"
}
}
// Response
{ "status": 200, "body": "{ ... }" }Если стоимость превышает max_payment_eth, инструмент возвращает ошибку до оплаты — никаких неожиданных списаний.
x402_session_start — платите один раз за несколько вызовов
// Request
{
"tool": "x402_session_start",
"arguments": {
"endpoint": "https://api.example.com/",
"ttl_seconds": 3600,
"label": "market-data-session"
}
}
// Response
{ "session_id": "sess_abc123", "token": "eyJ...", "expires_at": 1741000000 }// Subsequent calls — no new payment
{
"tool": "x402_session_fetch",
"arguments": {
"url": "https://api.example.com/stocks/AAPL",
"session_id": "sess_abc123"
}
}check_budget — узнайте до начала цикла
// Request — check before starting an expensive loop
{ "tool": "check_budget", "arguments": {} }
// Response
{
"remaining": "7.50 USDC",
"spent": "2.50 USDC",
"limit": "10.00 USDC",
"periodEnds": "2026-03-24T00:00:00Z"
}Поддерживаемые сети
Chain | Chain ID | Рекомендуется для |
Base Mainnet | 8453 | Всё — самый низкий газ, наибольшая активность x402 |
Arbitrum One | 42161 | Свопы с высокой пропускной способностью |
Optimism | 10 | Недорогие переводы |
Polygon | 137 | Микроплатежи с высокой частотой |
Ethereum Mainnet | 1 | Идентификация, крупные расчёты |
Avalanche | 43114 | Мост, переводы |
Linea / Unichain / Sonic / Worldchain | various | Мост, переводы |
Base Sepolia | 84532 | Тестирование |
Модель безопасности
Некастодиальная модель: агент подписывает все транзакции локально своим приватным ключом. Ни одна третья сторона не хранит и не проверяет ключи.
On-chain контроль (лимиты AgentAccountV2, настроенные владельцем кошелька в контракте):
Потолки на транзакцию — транзакции сверх потолка попадают в очередь на одобрение человеком через
queue_approvalЛимиты дневного периода — совокупный расход обеспечивается смарт-контрактом AgentAccountV2
Внутрипроцессная политика (set_spend_policy — применяется на MCP-сервере, не on-chain):
Allowlist получателей, потолки на транзакцию и дневные лимиты — удобное защитное ограничение, которое можно обойти при компрометации серверного процесса. Точные границы контроля см. в docs/security-posture.md.
Разделение ролей:
Подписывающий ключ агента (AGENT_PRIVATE_KEY) может совершать транзакции только в пределах лимитов, установленных владельцем кошелька. Даже если ключ агента утёк или агент скомпрометирован, атакующий сможет потратить не больше настроенного потолка до следующего сброса.
Сессии x402:
Токены сессий — это утверждения, подписанные с помощью ECDSA. Любой x402 V2-сервер может независимо проверить их — центральное хранилище сессий не требуется.
Минимальный след зависимостей:
У AgentPay MCP нулевая зависимость от LiteLLM. Весь сервер работает на viem (клиент Ethereum), @modelcontextprotocol/sdk и небольшом наборе аудируемых пакетов — в дереве зависимостей нет тяжёлых слоёв маршрутизации LLM. Это важно: 24 марта 2026 года версии LiteLLM 1.82.7 и 1.82.8 на PyPI были подтверждённо скомпрометированы в результате атаки на цепочку поставок, нацеленной на инфраструктуру ИИ-агентов. Любой MCP-сервер, который зависит от LiteLLM (напрямую или транзитивно), оказался под угрозой. AgentPay MCP — нет, потому что платёжная инфраструктура должна иметь максимально малую поверхность атаки.
agentpay-mcp уже поддерживает несколько платёжных рельсов
Ландшафт агентских платежей только что раскололся: x402 от Coinbase (открытый, не требующий разрешений, on-chain) против MPP от Stripe (требующий разрешений, на базе Tempo, USDC). Разработчики продакшен-агентов стоят перед выбором — или используют agentpay-mcp, который уже работает поверх обеих.
agentpay-mcp изначально не зависит от протокола:
Payment Rail | Status | Как agentpay-mcp работает с ним |
x402 (Coinbase) | ✅ Поддерживается | Нативное исполнение платежей x402 V1/V2 с on-chain лимитами расходов |
Stripe MPP | ✅ Совместим | Отделение расчётного слоя, совместимого с MPP, — agentpay-mcp управляет политикой расходов поверх расчётов MPP |
Будущие рельсы | ✅ Готов | Нейтральная архитектура управления — новые рельсы подключаются без изменения кода |
Почему это важно: Ни x402, ни MPP не включают управление расходами. Кошельки x402 по умолчанию не ограничены. MPP предлагает лимиты, устанавливаемые человеком в дашборде, но не обеспечивает программного соблюдения лимитов на сессию или задачу. agentpay-mcp предоставляет бюджетный предохранитель, процессы утверждения и аудиторский след поверх обеих систем — независимо от того, какой рельс проводит расчёт по транзакции.
Это не обёртка над одним протоколом. Это слой управления с намеренным разделением между политикой (кто это одобрил, каков бюджет, должен ли человек это проверить) и расчётами (какой блокчейн или платёжная сеть перемещает деньги). Именно это разделение делает agentpay-mcp нейтральным к рельсам — и именно оно позиционирует его как стандарт управления, пока разворачивается война протоколов.
Работает с AWS AgentCore
AWS AgentCore предоставляет корпоративный хостинг агентов с применением политик на основе Cedar для контроля доступа. Политики Cedar отвечают на вопросы: «Разрешено ли этому агенту вызывать этот API?» и «Может ли этот агент получить доступ к этому ресурсу?»
Чего Cedar НЕ предоставляет: лимитов расходов. В Cedar нет примитива для «этот агент может потратить не более $50 за сессию» или «остановите агента, если совокупный расход за сегодня превысит $200». Контроль доступа и управление бюджетом — разные задачи.
agentpay-mcp добавляет бюджетный предохранитель поверх AgentCore:
Слой | Кто отвечает | Что контролирует |
Контроль доступа | AWS AgentCore (Cedar) | Какие API агент может вызывать, к каким ресурсам он может обращаться |
Управление бюджетом | agentpay-mcp | Сколько агент может потратить за транзакцию, сессию и день |
Надзор человека | agentpay-mcp | Когда автономная работа приостанавливается для одобрения человеком |
Аудиторский след | Оба (взаимодополняющие) | Cedar логирует решения о доступе; agentpay-mcp логирует решения о расходах с on-chain квитанциями |
Паттерн развёртывания: AgentCore запускает агента с политиками Cedar, управляющими доступом к инструментам. agentpay-mcp работает как MCP-сервер в наборе инструментов агента, обеспечивая соблюдение лимитов расходов для каждого платёжного действия. Cedar говорит: «ты можешь вызывать этот платный API». agentpay-mcp говорит: «ты можешь потратить до $5 на этот вызов».
{
"mcpServers": {
"agentpay": {
"command": "npx",
"args": ["agentpay-mcp"],
"env": {
"AGENT_PRIVATE_KEY": "0x...",
"AGENT_WALLET_ADDRESS": "0x...",
"MAX_TRANSACTION_USDC": "5.00",
"DAILY_LIMIT_USDC": "50.00"
}
}
}
}Для предприятий, запускающих агентов на AgentCore: Cedar отвечает на вопрос «можно ли?». agentpay-mcp отвечает на вопрос «стоит ли тратить столько?». Вместе они обеспечивают стек управления доступом и бюджетом, который требуется продакшен-развёртываниям агентов.
Конкурентное позиционирование
Проще всего думать об этом так: ACP (Stripe) отвечает за то, что агенты ПРОДАЮТ, а agentpay-mcp — за то, что агенты ПОКУПАЮТ.
Stripe MCP против agentpay-mcp
Разработчики часто спрашивают: «Разве Stripe MCP уже не обрабатывает платежи агентов?» Ответ: они решают разные задачи на разных уровнях.
Stripe MCP | agentpay-mcp | |
Направление денег | Пользователь платит продавцу (через агента) | Агент платит поставщику API |
Сценарий использования | Оформление заказов, подписки, выставление счетов | Доступ к API, оплата инструментов, коммерция между агентами |
Расчеты | Традиционные карточные рельсы | On-chain (Base, EVM) или Stripe MPP |
Контроль расходов | Сторона покупателя (корзина + оформление заказа) | Сторона агента (on-chain лимиты, одобрение человеком, лимиты сессий) |
Протокол | ACP (Agent Commerce Protocol) | x402 (HTTP 402 Payment Required) |
Stripe MCP — это инструмент продавца: он помогает бизнесу взимать оплату с клиентов через агентские интерфейсы. Думайте: «купить этот товар» или «оформить подписку на этот план».
agentpay-mcp — это инструмент закупок для агента: он позволяет агентам оплачивать API и инструменты, которые нужны им для работы. Думайте: «получить доступ к этому премиальному эндпоинту данных» или «использовать этот вычислительный ресурс».
Большинству production-агентов потребуются оба уровня: Stripe MCP — для пользовательской коммерции, agentpay-mcp — для собственных расходов агента на инструменты. Они дополняют друг друга, а не конкурируют.
MCP 2026 Compliance
AgentPay MCP соответствует новым стандартам безопасности MCP на 2026 год, включая категории угроз CoSAI (Coalition for Secure AI) и требования OAuth 2.1.
Документация security posture: полную матрицу соответствия см. в docs/security-posture.md. Она охватывает:
CoSAI T9 (Financial Fraud) — многоуровневые лимиты расходов: политика расходов внутри процесса (
set_spend_policy, применяется в процессе MCP-сервера — не on-chain) плюс on-chain лимиты AgentAccountV2 и очередь одобрений, настроенные владельцем кошелькаCoSAI T10 (Identity Spoofing) — проверка идентичности агента через ERC-8004 + некастодиальное управление ключами предотвращают атаки, связанные с подменой личности
OAuth 2.1 + PKCE — аутентификация MCP-сервера поддерживает OAuth 2.1 с PKCE для корпоративной интеграции SSO (Azure AD, Okta)
Аудит-лог — история событий AgentAccountV2 on-chain via методы
get_transaction_history(исполнения, запланированные транзакции, одобрения, обновления политик); отдельный лог не ведетсяwe do not "per-tool-invocation log"— см. точный состав записываемого. В документе security posture указано, что записывается, а что нет
Для корпоративных команд безопасности, оценивающих MCP-серверы: документ security posture содержит артефакт, необходимый вашему процессу аудита.
Архитектура
┌─────────────────────────────────────────┐
│ AI Agent (Claude / Cursor / Windsurf) │
└────────────────┬────────────────────────┘
│ MCP (stdio / SSE)
┌────────────────▼────────────────────────┐
│ AgentPay MCP Server │
│ ┌────────────┐ ┌────────────────────┐ │
│ │ 23 Tools │ │ Session Manager │ │
│ └─────┬──────┘ └────────────────────┘ │
│ │ │
│ ┌─────▼──────────────────────────────┐ │
│ │ agentwallet-sdk v6.0.0 │ │
│ │ TokenRegistry SwapModule │ │
│ │ BridgeModule ERC8004Client │ │
│ └─────┬──────────────────────────────┘ │
└────────┼────────────────────────────────┘
│ viem + RPC
┌────────▼────────────────────────────────┐
│ AgentAccountV2 Smart Contract │
│ SpendingPolicy · Tx Queue │
│ (12 chains — Base, ETH, ARB, OP, ...) │
└─────────────────────────────────────────┘Транспорт: по умолчанию stdio (Claude Desktop, Cursor, Windsurf). Для удаленных развертываний доступен SSE.
Contributing
git clone https://github.com/up2itnow0822/agentpay-mcp
cd agentpay-mcp
npm install
npm run build
npm testУведомление о патенте
Patent Pending — предварительная заявка в USPTO, поданная в марте 2026 года: «Non-Custodial Multi-Chain Financial Infrastructure System for Autonomous AI Agents».
Мы поддерживаем открытый стандарт x402. Наша заявка имеет носители оборонительный характер — чтобы предотвратить вражду на монополизацию открытых платежных рельсов, а не ограничить разработчиков, использующих открытые стандарты.
Интероперабельность с Vercel x402-mcp
agentpay-mcp полностью совместим с пакетом Vercel x402-mcp. Если вы используете paidTool() от Vercel для монетизации MCP-инструментов, agentpay-mcp работает как платежный слой на стороне клиента — ваш агент автоматически оплачивает счета x402 от paidTool() через x402_pay.
Что agentpay-mcp добавляет поверх x402-mcp:
Multi-rail payments — маршрутизация через x402 (USDC on-chain) или Stripe Machine Payments Protocol (фиат) в зависимости от продавца
Spend governance (управление расходами) — лимиты на транзакцию, суточные лимиты и очереди одобрения человеком, которые эндпоинты
paidTool()не применяют на стороне клиентаMulti-chain: x402 v2 — оплата в Base, Solana или Polygon (x402 v2 поддерживает все сети нативно)
Используйте Vercel x402-mcp на стороне сервера для монетизации своих инструментов. Используйте agentpay-mcp на стороне клиента для безопасной оплаты инструментов.
Circle 2024 — Zero-Gas Settlement
agentpay-mcp поддерживает Circle Nanopayments как вариант расчетов для платежей x402 v2. Nanopayments обеспечивают бесплатные для газа переводы USDC суб-центра, объединяя мелкие платежи в одну on-chain транзакцию.
Как это работает с agentpay-mcp:
Агент совершает платеж по x402 через
x402_payкак обычноЕсли сервер x402 v2 поддерживает Circle Nanopayments, расчет происходит без расхода газа
Платежи меньше цента ($0.001, $0.0001) становятся экономически целесообразными для цены за вызов API *Кросс-чейн поддержка через шлюз Circle — работает в любой EVM-сети
Это полезно для высокочастотных агентских сценариев, где затраты на газ в противном случае превысили бы сумму платежа. Подробности протокола — в объявлении Чирка.
Экосистема x402 — 75M+ транзакций, нативная поддержка Cloudflare
agentpay-mcp построен на стандарте API-платежей [x402](https:// x402.org), который к настоящему моменту обработал более 75 млн транзакций в основной сети Base — в основном через Coinbase Agentic Wallets и интеграции разработчиков.
Cloudflare добавила нативную поддержку x402 в свой Agents SDK и среду вызова MCP-серверов, что означает: любой агент на Cloudflare Workers теперь может выполнять платежи x402 напрямую. Google, Circle и Stripe активно интегрируют x402 в свои агентские экосистемы.
agentpay-mcp — это свободный (open-source) слой управления поверх этой инфраструктуры: в то время как x402 отвечает за протокол платежей, agentpay-mcp добавляет provide доверие, которое требуется production-агентам: HITL-одобрение (включение человека в цикл), лимиты расходов, списки разрешения получателей (allowlist) и on-chain жур гарантии аудита.
Экосистема x402 | Статус |
Транзакции в Base mainnet | 75M+ |
Cloudflare Agents SDK | ✅ Нативная поддержка |
Cloudflare MCP servers | ✅ Нативная поддержка |
Coinbase Agentic Wallets | ✅ Основной клиент |
Google / Circle / Stripe | 🔄 Активная интеграция |
Слой управления agentpay-mcp | ✅ Open-source |
Совместимость со спецификацией OpenAI Delegated Payments
OpenAI представила Delegated Payment Spec (спецификацию делегации платежей агентов), которая определяет, что агенты оплачивают / отдох on behalf of пользователей: ограниченный токен с предельным размером allowance, совместимый со Stripe Scoped Payment Tokens (SPTs). Это прототипная архитектура, предшествующая встроенному платежному инструментарию в Agents SDK.
Модель лимитов расходов agentpay-mcp напрямую согласована с паттернами Delegated Payment Spec:
Концепция Delegated Payment Spec | Реализация в agentpay-mcp |
Scoped token — контролируемый токен, который получает агент |
|
Allowance cap — максимум затрат агента | Внутрипроцессовые лимиты на транзацию и на день через |
Human approval — пользователь делегирует, а агент исполняет |
|
Audit trail — все делегирование расходы логируются |
|
Revocation — пользователь в любой момент отзывает делегирование | Мгновенное применение изменений политики расходов; владелец кошелька может заморозитьключилее агента |
Ключевой принцип идентичен: человек одобряет бюджет → агент выполняет действия в рамках бюджета → вся активность подлежит аудиту. Разница — в слое расчетов: спецификация OpenAI нацелена на Stripe SPT (фиатные сети), а agentpay-mcp осуществляет расчеты on-chain (USDC/ETH в Base, Arbitrum и 8 других EVM-сетей).
Для разработчиков, создающих workflows OpenAI Agents SDK, которые нуждаются в on-chain или multi-rail выполнении платежей, agentpay-mcp служит MCP-инструментом для оплат, реализующим паттерн Delegated Payment Spec с правом прикинем смарт-контрактов, а не доверием на уровне приложения.
{
"mcpServers": {
"agentpay": {
"command": "npx",
"args": ["agentpay-mcp"],
"env": {
"AGENT_PRIVATE_KEY": "0x...",
"AGENT_WALLET_ADDRESS": "0x..."
}
}
}
}Добавьте этот MCP-сервер в любой воркфлоу OpenAI Agents SDK через MCP-мост, и агент получит функции x402_pay, check_budget и set_spend_policy — тот же паттерн «scoped token + allowance cap». Обратите внимание: set_spend_policy приводит к процессу MCP-сервера; смарт-контрактное исполнение осуществляется on-chain лимитами AgentAccountV2, которые настраивает владелец кошелька (см. docs/security-posture.md).
Совместимость с Google AP2
agentpay-mcp дополняет протоколен Agent2Agent Payment (AP2) от Google. AP2 — поддержанный более чем 60 организациями, включая Visa, Mastercard и PayPal, — отвечает за авторизацию платежей агентов: проверку, что расчетный запрос правомерен. agentpay-mcp работает на уровне управления поверх AP2, добавляя лимиты бюджета на каждого агента, суточные рабочие лимиты и пороги одобрения человеком, которые AP2 намерено выносит за пределы. Для предприятий, размещающих агентов на нескольких платежных платах, agentpay-mcp обеспечивает единое управление расходами, которое не обеспечивает ни один отдельный протокол.
Соответствие EU AI Act
Крайний срок: 2 августа 2026 г. AI-системы, которые выполняют или позволяют финансовых операции, классифицируются как высокорисковые в соответствии с Приложением III EU AI Act. Высокорисковая классификация требует:
✅ Контроль — человеческое рассмотрение и возможность отмены (override)
✅ Прозрачность и объяснимость — проверяемые записи о транзакциях
✅ Контроль доступа — затратные лимиты, которые агент не может обойти
✅ Техническая документация — поддержка оценки соответствия
agentpay-mcp удовлетворяет все четыре требования «из коробки»:
| Требование | Функция в agentpay-mcp |
| | — |
| Human oversight (контроль человеком) | queue_approval — транзакции выше порога требуют явного одобрения человека |
| Audit trail (аудит) | get_transaction_history — полный on-chain лог событий, неизменяем и проверяемый (basescan.org) |
| Spend controls расходов | On-chain лимиты AgentAccountV2: на транзакцию и период — настройка владельца контракта, не обходится агентом; плюс set_spend_policy в качестве guardrail |
| Scope restriction | set_spend_policy — разрешенные получатели enforced в процессе MCP-сервера, а не in-chain; границы контроля см. в docs/security-posture.md |
Европейские предприятия, развертывающие агентские системы, работающие с платежами, имеют ~150 days на внедрение процессов надзора и аудита. agentpay-mcp — самый быстрый путь к соответствию EU AI Act для MCP–совместимых развертываний.
Штрафы за несоблюдение: до €35 млн или 7% мировой годовой выручки. Германия опубликовала свой национальный законопроект о правоприменении в феврале 2026 года.
Лицензия
MIT © AI Agent Economy
Создано AI Agent Economy — инфраструктура для производственных агентских рабочих процессов.
Available Tools
11 toolscheck_spend_limitA
Check whether a proposed payment amount is within the wallet's autonomous spend limits. Returns a clear yes/no with remaining budget details. Use this before send_payment to avoid surprise queuing.
| Name | Required | Description | Default |
|---|---|---|---|
| amount_eth | Yes | Amount in ETH to check (e.g. "0.01") | |
| token | No | Token address. Omit for native ETH. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It does well by explaining the return format ('clear yes/no with remaining budget details') and the practical consequence ('avoid surprise queuing'), but doesn't mention authentication requirements, rate limits, error conditions, or whether this is a read-only operation (though 'check' implies it).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is perfectly concise with two sentences that each earn their place. The first sentence states the purpose and return value, the second provides crucial usage guidance. No wasted words, and the most important information (what it does) is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 2-parameter tool with no annotations and no output schema, the description does well by explaining the purpose, return format, and usage context. However, it could be more complete by explicitly stating this is a read-only operation (implied but not stated) and mentioning any authentication requirements. The connection to 'send_payment' is excellent contextual guidance.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already fully documents both parameters. The description doesn't add any parameter-specific information beyond what's in the schema (it mentions 'proposed payment amount' which aligns with 'amount_eth' but provides no additional syntax or format details). Baseline 3 is appropriate when the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with specific verb ('check') and resource ('proposed payment amount'), and distinguishes it from sibling tools by explicitly mentioning 'send_payment' as an alternative. It explains what the tool does (verifies if amount is within wallet's autonomous spend limits) and what it returns (yes/no with budget details).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit guidance on when to use this tool ('Use this before send_payment to avoid surprise queuing'), clearly positioning it as a prerequisite check. It distinguishes from the 'send_payment' sibling by explaining the sequential relationship and purpose (avoid queuing).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
deploy_walletA
Deploy a new AgentAccountV2 wallet via the factory contract. The wallet is deterministically addressed (CREATE2) and owned by an NFT. Returns the wallet address and deployment transaction hash. Requires FACTORY_ADDRESS and NFT_CONTRACT_ADDRESS env vars (or pass them as arguments).
| Name | Required | Description | Default |
|---|---|---|---|
| token_id | Yes | NFT token ID that will own this wallet (e.g. "1") | |
| nft_contract_address | No | NFT contract address. Defaults to NFT_CONTRACT_ADDRESS env var. | |
| factory_address | No | Factory contract address. Defaults to FACTORY_ADDRESS env var. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: the deterministic addressing (CREATE2), NFT ownership, return values (wallet address and transaction hash), and environment variable requirements. It doesn't mention potential side effects like gas costs or blockchain confirmation times, but covers the core operational behavior adequately for a deployment tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is efficiently structured in two sentences: the first states the core purpose and key characteristics, the second covers return values and configuration options. Every phrase adds value with zero redundant information, making it easy to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a deployment tool with no annotations and no output schema, the description provides good coverage: it explains what the tool does, how it works, what it returns, and configuration options. The main gap is the lack of explicit output format details (though 'wallet address and deployment transaction hash' gives a general idea), but given the tool's straightforward purpose, this is reasonably complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all three parameters thoroughly. The description adds minimal parameter semantics beyond the schema, mainly noting that factory_address and nft_contract_address can come from environment variables. This meets the baseline expectation when schema coverage is high.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Deploy a new AgentAccountV2 wallet'), the mechanism ('via the factory contract'), and key characteristics ('deterministically addressed (CREATE2) and owned by an NFT'). It distinguishes this tool from sibling tools like 'check_spend_limit' or 'send_payment' by focusing on wallet creation rather than transaction management or querying.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for when to use this tool: to deploy a new wallet with specific ownership and addressing. It mentions environmental variable alternatives ('Requires FACTORY_ADDRESS and NFT_CONTRACT_ADDRESS env vars (or pass them as arguments)'), which helps guide parameter usage. However, it doesn't explicitly state when NOT to use it or compare it to specific sibling tools for similar functions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_transaction_historyA
Retrieve the wallet's recent on-chain transaction history from event logs. Shows executions, queued transactions, approvals, cancellations, spend policy updates, and operator changes. Filter by event type or block range for targeted queries.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max entries to return (default: 20, max: 100) | |
| from_block | No | Start block (decimal string). Defaults to 1000 blocks ago. | |
| to_block | No | End block (decimal string). Defaults to latest. | |
| event_type | No | Filter by event type (default: all) | all |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It describes what data is retrieved ('executions, queued transactions, approvals, cancellations, spend policy updates, and operator changes') but lacks details on permissions, rate limits, pagination, or error handling. It adds some context about filtering but is incomplete for a read operation with no annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the core purpose in the first sentence, followed by specific details and usage guidance in the second. Both sentences are essential—no wasted words—making it efficient and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (4 parameters, no annotations, no output schema), the description is adequate but has gaps. It explains what data is retrieved and filtering options, but lacks details on return format, error cases, or prerequisites. Without annotations or output schema, more behavioral context would improve completeness for a historical query tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds minimal value by mentioning filtering by 'event type or block range', which aligns with the schema but does not provide additional semantics beyond what the schema specifies. Baseline 3 is appropriate as the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Retrieve') and resource ('wallet's recent on-chain transaction history from event logs'), and distinguishes this tool from siblings by focusing on historical transaction data rather than current operations (like check_spend_limit) or wallet management (like deploy_wallet).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for usage ('Filter by event type or block range for targeted queries'), but does not explicitly state when to use this tool versus alternatives like get_wallet_info or when not to use it. It implies usage for historical queries without naming specific sibling alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_wallet_infoA
Get comprehensive wallet information including address, on-chain balance, spend limits, remaining period allowance, and queue depth. Use token parameter to check budget for a specific ERC20 (defaults to ETH).
| Name | Required | Description | Default |
|---|---|---|---|
| token | No | Token address to check. Use "0x0000000000000000000000000000000000000000" for ETH (default). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes the tool's function and scope (read-only data retrieval for wallet status), but lacks details on potential errors, rate limits, authentication needs, or response format. It adds value beyond the schema by explaining the token parameter's purpose, but does not fully compensate for the absence of annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the core purpose in the first sentence, followed by specific usage guidance. Both sentences are essential—the first defines scope, the second explains parameter usage—with zero redundant or vague language, making it highly efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (1 optional parameter, no output schema, no annotations), the description is adequate but has gaps. It clearly explains what the tool does and parameter usage, but lacks details on output structure, error conditions, or dependencies. Without annotations or output schema, the description does not fully compensate for these missing elements, making it minimally viable.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, so the baseline is 3. The description adds meaningful context by explaining that the token parameter is used 'to check budget for a specific ERC20' and defaults to ETH, which clarifies the semantic purpose beyond the schema's technical specification. This elevates the score above the baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Get comprehensive wallet information') and enumerates the exact data returned (address, on-chain balance, spend limits, remaining period allowance, queue depth). It distinguishes from siblings like 'get_transaction_history' (historical data) or 'check_spend_limit' (specific limit check) by emphasizing comprehensive status retrieval.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for when to use this tool ('to check budget for a specific ERC20') and mentions the default behavior (defaults to ETH). However, it does not explicitly state when to use alternatives like 'check_spend_limit' for focused limit queries or 'get_transaction_history' for past activity, leaving some sibling differentiation implicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
queue_approvalA
Manage over-limit transactions queued for owner review. Use action="list" to see pending transactions, "approve" to approve one by ID, or "cancel" to cancel one by ID. Approve/cancel require the agent key to have owner privileges.
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action: "list", "approve", or "cancel" | |
| tx_id | No | Transaction queue ID (required for approve/cancel) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses key behavioral traits: the tool manages queued transactions for review, requires owner privileges for approve/cancel actions, and implies mutation capabilities (approve/cancel are destructive). However, it lacks details on error handling, rate limits, or response formats, leaving some gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the purpose, followed by usage instructions and prerequisites in two concise sentences. Every sentence adds essential information without redundancy, making it efficient and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations and no output schema, the description does well by covering purpose, usage, and behavioral aspects like privileges. However, it lacks details on return values, error cases, or pagination for the list action, which could be important for a tool with mutation capabilities.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description adds value by explaining the semantics of the 'action' parameter (list for pending transactions, approve/cancel by ID) and clarifying that 'tx_id' is required for approve/cancel, which enhances understanding beyond the schema's enum and required fields.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Manage over-limit transactions queued for owner review.' It specifies the verb ('manage') and resource ('over-limit transactions'), distinguishing it from sibling tools like check_spend_limit or send_payment, which handle different aspects of transactions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit usage guidance: 'Use action="list" to see pending transactions, "approve" to approve one by ID, or "cancel" to cancel one by ID.' It also specifies prerequisites: 'Approve/cancel require the agent key to have owner privileges,' clearly indicating when and how to use each action.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
send_paymentA
Send ETH or ERC20 tokens from the Agent Wallet. If the amount is within the configured spend limits, it executes immediately and returns the tx hash. If it exceeds limits, the transaction is queued for owner approval (use queue_approval to manage). Always check spend limits first with check_spend_limit to avoid surprises.
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Recipient wallet address (0x-prefixed) | |
| amount_eth | Yes | Amount in ETH (or token units). E.g. "0.001" for 0.001 ETH, "1.5" for 1.5 USDC | |
| token | No | ERC20 token address. Omit for native ETH. | |
| token_decimals | No | Token decimals (default 18 for ETH, 6 for USDC) | |
| memo | No | Optional memo for this payment (not stored on-chain) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: immediate execution within limits, queuing for owner approval if exceeding limits, and the need to check limits first. It doesn't cover rate limits or auth needs, but provides substantial operational context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is efficiently structured with three sentences: purpose, conditional behavior, and prerequisite action. Every sentence adds value—no wasted words—and it's front-loaded with the core functionality.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a payment tool with no annotations and no output schema, the description does well by explaining the execution flow (immediate vs. queued) and linking to related tools. It could mention return values (tx hash) more explicitly, but overall it's quite complete given the context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description doesn't add any parameter-specific semantics beyond what's in the schema (e.g., it doesn't explain token address format or memo usage further). Baseline 3 is appropriate when the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Send ETH or ERC20 tokens from the Agent Wallet.' It specifies the action (send), resources (ETH/ERC20 tokens), and source (Agent Wallet), distinguishing it from siblings like check_spend_limit or get_transaction_history.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit guidance on when to use this tool vs. alternatives: 'Always check spend limits first with check_spend_limit to avoid surprises.' It also explains what happens if limits are exceeded (queued for approval, use queue_approval to manage), offering clear context and exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
x402_payA
Fetch a URL and automatically handle HTTP 402 Payment Required responses. If an active x402 V2 session covers this URL, the session token is used instead of making a new payment (no on-chain cost). If no session exists, the Agent Wallet pays the required amount and retries. Payment is rejected if it exceeds your wallet's spend limits or the max_payment_eth cap. Powered by the x402 protocol on Base network. Tip: Use x402_session_start to pay once for a session and save on repeated calls.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL to fetch (HTTP 402 responses are handled automatically) | |
| method | No | HTTP method (default: GET) | GET |
| headers | No | Additional request headers | |
| body | No | Request body string (for POST/PUT/PATCH) | |
| max_payment_eth | No | Maximum payment cap in ETH (e.g. "0.001") | |
| timeout_ms | No | Timeout in milliseconds (default: 30000) | |
| skip_session_check | No | Skip session auto-detection and force a fresh x402 payment |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: automatic handling of HTTP 402 responses, session token usage to avoid costs, payment rejection based on spend limits or max_payment_eth cap, and the underlying x402 protocol on Base network. However, it lacks details on error handling or response formats, leaving some gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded, with the core functionality stated first. Each sentence adds value: explaining session handling, payment logic, rejection conditions, protocol details, and a usage tip. There is no wasted text, making it efficient and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (payment handling, session management) and no annotations or output schema, the description is largely complete. It covers the main behavioral aspects and usage context. However, it could benefit from more details on error scenarios or response formats to achieve full completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, so the schema already documents all 7 parameters thoroughly. The description adds minimal parameter semantics beyond the schema, such as implying 'url' is the target for payment handling and 'max_payment_eth' sets a cap. Baseline 3 is appropriate as the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: fetching a URL while automatically handling HTTP 402 Payment Required responses. It specifies the verb ('fetch') and resource ('URL'), and distinguishes it from siblings by mentioning the x402 protocol and session handling capabilities, unlike generic payment or session tools in the sibling list.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit guidance on when to use this tool vs alternatives. It states to use 'x402_session_start to pay once for a session and save on repeated calls,' indicating an alternative for cost-saving scenarios. It also implies usage for URLs requiring payment, with no misleading suggestions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
x402_session_endA
Explicitly close an x402 V2 session before it expires naturally. After calling this, x402_session_fetch will return an error for the closed session. Useful for security hygiene or when you know a session is no longer needed.
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Session ID to close (from x402_session_start) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: it's a destructive operation (closes a session), has side effects (x402_session_fetch will return an error), and mentions security implications. It doesn't cover rate limits or authentication needs, but provides substantial context beyond basic function.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is efficiently structured in two sentences: the first states the core action and immediate effect, the second provides usage context. Every phrase adds value without redundancy, making it front-loaded and appropriately sized for the tool's complexity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (destructive operation with security implications), no annotations, and no output schema, the description does well by explaining the action, effects, and usage scenarios. It could be more complete by mentioning authentication requirements or response format, but it covers the essential context for safe use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, with the session_id parameter fully documented in the schema. The description adds no additional parameter semantics beyond what the schema provides, such as format examples or constraints. This meets the baseline for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('explicitly close') and resource ('an x402 V2 session'), distinguishing it from siblings like x402_session_fetch, x402_session_start, and x402_session_status. It precisely defines what the tool does beyond just restating the name.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly states when to use this tool ('before it expires naturally', 'useful for security hygiene or when you know a session is no longer needed') and provides a clear alternative (letting it expire naturally). It also mentions the consequence for x402_session_fetch, guiding usage relative to siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
x402_session_fetchA
Make an HTTP request within an established x402 V2 session — NO payment required. The session token (signed by your wallet) is automatically attached to the request. The server recognises your session and grants access without a new on-chain payment. Requires a session_id from x402_session_start. Returns an error if the session has expired (call x402_session_start again to renew).
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Session ID from x402_session_start | |
| url | Yes | URL to fetch (must be covered by the session) | |
| method | No | HTTP method (default: GET) | GET |
| headers | No | Additional headers (session token is injected automatically) | |
| body | No | Request body for POST/PUT/PATCH | |
| timeout_ms | No | Timeout in milliseconds (default: 30000) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden and does well by disclosing key behaviors: it automatically attaches the session token, grants access without payment, and returns an error for expired sessions. However, it lacks details on rate limits, authentication needs beyond the session, or what specific errors might occur, leaving some gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the core purpose in the first sentence, followed by essential context and error handling. Every sentence adds value—no wasted words—and it's structured logically from usage to prerequisites to error resolution.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (session-based HTTP requests with 6 parameters), no annotations, and no output schema, the description is mostly complete. It covers purpose, usage, prerequisites, and error handling, but lacks details on return values or advanced behavioral traits like rate limits, which would be helpful for full completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds minimal value beyond the schema, only implying that the URL must be 'covered by the session' and noting automatic token injection, but doesn't provide additional syntax or format details. Baseline 3 is appropriate as the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Make an HTTP request within an established x402 V2 session') and resource (session-based HTTP requests), distinguishing it from siblings like x402_session_start (which creates sessions) and x402_pay (which involves payments). It explicitly notes 'NO payment required' to differentiate from payment-related tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit guidance on when to use this tool ('within an established x402 V2 session'), prerequisites ('Requires a session_id from x402_session_start'), and alternatives for errors ('call x402_session_start again to renew'). It also clarifies when not to use it ('NO payment required'), distinguishing it from payment tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
x402_session_startA
Establish an x402 V2 payment session: make a SINGLE on-chain payment and receive a cryptographically signed session token. All subsequent calls to the same endpoint within the session lifetime use x402_session_fetch — no additional payments required. Agents pay once per session rather than once per API call. Session tokens are signed locally by your wallet key (non-custodial). Returns a session_id you pass to x402_session_fetch for all future calls.
| Name | Required | Description | Default |
|---|---|---|---|
| endpoint | Yes | Base URL to establish a session for (e.g., "https://api.example.com/v1") | |
| scope | No | "prefix": covers all paths under this URL (default). "exact": single URL only. | prefix |
| ttl_seconds | No | Session TTL in seconds (default: 3600 / 1 hour). Max: 30 days. | |
| label | No | Optional label for this session (e.g., "Premium API session") | |
| max_payment_eth | No | Maximum ETH to pay for this session. Rejects if price exceeds this. | |
| method | No | HTTP method for the initial request (default: GET) | GET |
| headers | No | Additional request headers | |
| body | No | Request body for POST/PUT/PATCH session-start requests | |
| timeout_ms | No | Request timeout in milliseconds (default: 30000) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: the payment mechanism (on-chain payment), session token characteristics (cryptographically signed, non-custodial), session lifetime concept, and the relationship with x402_session_fetch. It could be improved by mentioning error conditions or rate limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured and efficiently conveys essential information in four sentences. Each sentence adds value: establishing the session, explaining the session-fetch relationship, describing the payment model, and detailing the token characteristics. There's no wasted text.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 9 parameters, no annotations, and no output schema, the description provides good context about the tool's purpose, usage patterns, and behavioral characteristics. It explains the return value (session_id) and how to use it. It could be more complete by mentioning error conditions or providing examples of typical use cases.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 100% schema description coverage, the schema already documents all 9 parameters thoroughly. The description adds some context about the session establishment process but doesn't provide additional parameter-specific semantics beyond what's in the schema. This meets the baseline expectation when schema coverage is complete.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Establish an x402 V2 payment session' with specific details about making a single on-chain payment and receiving a signed session token. It distinguishes from sibling tools like x402_session_fetch by explaining the relationship between them.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit usage guidelines: 'All subsequent calls to the same endpoint within the session lifetime use x402_session_fetch — no additional payments required.' It clearly explains when to use this tool versus its sibling x402_session_fetch, and mentions the 'Agents pay once per session rather than once per API call' principle.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
x402_session_statusA
Check the status of x402 V2 payment sessions. Without arguments, lists all active sessions with TTL remaining. With a session_id, shows full details for that session including call count, payment info, and the signed session token.
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | No | Specific session ID to inspect. Omit to list all active sessions. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses that the tool can list sessions or show details, but lacks information on permissions, rate limits, error conditions, or response format. It adds some context about TTL and details like call count and payment info, but behavioral traits are incomplete.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded and concise, with two sentences that efficiently cover purpose and usage without wasted words. Every sentence earns its place by providing essential information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations and no output schema, the description is moderately complete for a read-only tool. It explains what the tool does and how to use it, but lacks details on return values, error handling, or operational constraints, leaving gaps in context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents the parameter. The description adds value by explaining the semantic effect: omitting the parameter lists all active sessions, while including it shows full details for a specific session. This goes beyond the schema's basic description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with specific verbs ('check', 'lists', 'shows') and resources ('x402 V2 payment sessions'), and distinguishes it from siblings by focusing on session status rather than creation, ending, or payment actions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly states when to use the tool: 'Without arguments, lists all active sessions with TTL remaining. With a session_id, shows full details for that session.' This provides clear guidance on usage based on parameter presence.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
11 tool updates
v3.0.1- First observed
check_spend_limit - First observed
deploy_wallet - First observed
get_transaction_history - First observed
get_wallet_info - First observed
queue_approval - First observed
send_payment - First observed
x402_pay - First observed
x402_session_end - First observed
x402_session_fetch - First observed
x402_session_start - First observed
x402_session_status
TDQS
Scored across 11 tools
The tools are mostly distinct with clear purposes, but there is some overlap between check_spend_limit and send_payment, as both involve spend limit checks, which could cause minor confusion. The x402 session tools are well-differentiated, and other tools like deploy_wallet and get_transaction_history have unique functions.
Naming is mostly consistent with a verb_noun pattern, such as check_spend_limit and send_payment, but there are minor deviations like x402_pay (which mixes protocol prefix with verb) and the x402_session_* tools that use a consistent prefix but vary in verb style. Overall, it's readable with only slight inconsistencies.
With 11 tools, the count is well-scoped for managing AgentPay wallets and x402 payments. Each tool serves a specific purpose, such as deployment, transactions, and session management, without feeling excessive or insufficient for the domain.
The tool set provides comprehensive coverage for wallet management and x402 payment handling. It includes deployment, transaction sending, limit checks, history retrieval, approval queuing, and full session lifecycle management, leaving no obvious gaps for the intended use cases.
Maintenance
Related MCP Connectors
x402 pay-per-call APIs over MCP, settled in USDC on Base for autonomous agents and developers.
Policy-gated MCP treasury for AI agents — x402 subscribe, 50+ tools, multi-chain.
Monetize any MCP server: x402 paywall, pay-per-call billing in USDC on Base, agent marketplace.
Agent Commerce Protocol MCP — bridges Stripe ACP + Google AP2 + Coinbase x402 for agent payments
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAg402 is the payment layer for Coinbase's x402 protocol. Wrap any API or MCP server with a paywall in one command (ag402 serve), or let your AI agent auto-pay for paid APIs (ag402 run). Zero code changes for both buyers and sellers. Solana USDC, ~0.5s settlement, non-custodial, 648+ tests, MIT licensed. Works with Claude Code, Cursor, OpenClaw, LangChain, AutoGen, CrewAI out of the box.9MIT
- AlicenseAqualityBmaintenanceL402 + x402 client MCP. AI agents discover, pay for, and consume any payment-gated API autonomously. Supports Lightning (NWC), Cashu ecash, stablecoins, and human-in-the-loop payments.14302 npmMIT
- AlicenseNot gradedqualityBmaintenanceDrop-in x402 payment middleware for MCP servers. Charge AI agents per tool call using USDC on Base chain — Python and JavaScript SDKs, no payment processor, no KYC.MIT
- AlicenseAqualityDmaintenanceAn MCP server that lets your AI coding agent (Claude Code, OpenClaw, Codex, Cursor, etc.) discover and pay on-chain agents registered on ERC-8004, using Coinbase's official x402 protocol. No smart account. No bundler. No relay. Just your EOA, an HTTPS request, and an automatic 402 → sign → retry flow.35MIT