io.github.payclaw/spend

编码与调试

by payclaw

提供 Agent 身份与虚拟 Visa 卡,支持申报、支付和审计流程,直接运行在现有 Visa 支付网络上。

什么是 io.github.payclaw/spend

提供 Agent 身份与虚拟 Visa 卡,支持申报、支付和审计流程,直接运行在现有 Visa 支付网络上。

README

kya labs — Badge + Spend for AI Agents

Your agent isn't a bot. kya proves it — then lets it pay.

Your AI agent looks like a bot to every merchant on the internet. kya gives it two things:

Badge — Declares your agent as an authorized actor. The Universal Commerce Protocol "identity" token for a merchant handshake. Free. No card required.

Spend — Issues a single-use virtual Visa when your agent needs to pay. Human-approved. Self-destructs after use. Your real card never enters the chat.

If you're like 20% of Americans last year - you used an agent to shop. And you probably ran into a ton of login walls, workarounds, bumps?

So did we. So we created kya - the first MCP tool suite that works with the new Universal Commerce Protocol to easily handshake verified agents at supporting merchants (Shopify, Target, Walmart, Etsy... it's a lot). Badge for identity. Spend for payment.

🧪 Developer Sandbox is open. Real infrastructure, test money. Get sandbox access →

npm version License: MIT

<a href="https://glama.ai/mcp/servers/@kyalabs/kyalabs-mcp"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@kyalabs/kyalabs-mcp/badge" alt="payclaw-mcp MCP server" /> </a>

Quick Start

bash
npx @kyalabs/mcp-server

OR add to your MCP client config (Claude Desktop, Cursor, or any MCP client):

json
{
  "mcpServers": {
    "kyalabs": {
      "command": "npx",
      "args": ["@kyalabs/mcp-server"]
    }
  }
}

That's it. Badge works immediately — no API key, no signup, no network calls on install.

The first time your agent calls kya_getAgentIdentity, it declares itself to the merchant and gets back a response with next_step guidance. One anonymous event is recorded. Your agent is now a declared, authorized actor.

Or install via ClawHub:

bash
clawhub install payclaw-io

Upgrade to verified mode + Spend

For cryptographic identity and virtual card issuance, add an API key:

json
"env": {
  "KYA_API_KEY": "pk_live_your_key_here",
  "KYA_API_URL": "https://www.kyalabs.io"
}

Get your API key at kyalabs.io/signup. API keys don't expire.

Without an API key, Badge uses device auth when a merchant requires verified identity — your agent shows a code and URL, you approve on your phone. This only happens when a merchant asks for it. We never ask for it ourselves. Sign up + API key means 1. you dont have to use phone OAuth every time and 2. you can track your agentic shopping (custom avatars included)

Node version

kya MCP requires Node.js 20 or newer. Node 18 is end-of-life and unsupported.

If you see engine or compatibility errors: node -v — install Node 20+ from nodejs.org or nvm install 20


How Badge Works: Two Modes

Declared (default)

First time your agent goes to a merchant with Badge, Badge generates an anonymous install ID — a random UUID stored locally at ~/.kya/install_id. It has no connection to you, your device, or any personal information.

Your agent gets back a declaration and a next_step guiding it to report its badge presentation at the merchant.

This is the default mode. It's how Badge works out of the box, for every user, forever.

Verified (when merchant requires it)

When a merchant requires verified identity — their UCP manifest says required: true — your agent will ask you to approve a device flow. You visit a merchant-kya URL, enter the OAuth code from your agent, and prove you're a real person.

Badge issues a tokenized credential: an ES256-signed JWT, signed by kya's private key, verifiable locally by the merchant. Your agent is free to continue - no login, PII or anything needed.


Our Data Philosophy

WhenWhatWhy
On installNothingWe help agents shop. If they're not shopping, we don't need anything
On server startAnonymous ping — Badge version and MCP client name. No identifiers stored on your machineSo we know Badge is actively running. If this number ever diverges from active agents, it tells us something is broken in the pipeline — not something about you
On first shopping tripinstall_id (random UUID, stored locally at ~/.kya/install_id), merchant, agent_type, event_type, timestampMinimum viable signal to reduce agent friction at merchants
On verified identity+ hashed user token, intent scope (checkout, etc.)Only required where login is traditionally required (i.e. checkout) to prove there's a real person authorizing the agent's next step
On Spend (card issuance)+ full transaction trail: intent, amount, merchant, audit logCard network compliance, gated behind consent + MFA

The server start ping contains no persistent identifiers — a new random session ID is generated each time and never saved to disk. You can disable it entirely:

json
"env": { "KYA_PING": "false" }

The install_id is a file we wrote to your disk. You can delete it (rm ~/.kya/install_id) and get a new one.

Full data practices: kyalabs.io/trust


The Universal Commerce Protocol

Badge is a UCP (Universal Commerce Protocol) Credential Provider. Merchants who declare the kya identity extension signal to every UCP-compliant agent that authorized agents are preferred at their store.

When your agent encounters a UCP merchant with Badge installed, it presents a cryptographic badge automatically — no extra steps.

We believe the UCP is the future of commerce and are proud to support reduce friction for agents and users.

Without kya: Agent browses → bot detection fires → blocked. Even if it gets through, it can't check out without your real card number. You're stuck finishing manually.

With Badge: Agent declares itself as an authorized actor → merchants see a verified identity → agent gets through. No bypass. Just proof.

With Spend: Agent declares a purchase → you approve with a tap → kya issues a single-use virtual Visa locked to that merchant → agent checks out → card self-destructs. Your real card never enters the chat.

Your agent will recognize when it needs this. When it encounters a merchant that may challenge automated traffic, or when it's ready to check out, it tells you: "I need kya installed to complete this." You click Allow. Done.


Tools

See docs/tool-contract.md for the formal input/output contract.

ToolWhat It Does
kya_getAgentIdentityDeclare identity → get verification token + next_step guidance (Badge)
kya_reportBadgePresentedRecord that you presented your badge at a merchant
kya_reportBadgeOutcomeReport how the merchant responded (accepted, denied, inconclusive)
kya_reportBadgeNotPresentedReport that you did not present your badge (abandoned, merchant didn't ask)
kya_getCardDeclare purchase intent → get virtual Visa (Spend)
kya_reportPurchaseReport transaction outcome → close the audit trail

Every Badge tool call works immediately — no auth required. Events fire in both anonymous and verified modes.

Badge: Declare Identity

code
Agent → kya_getAgentIdentity({ merchantUrl })
kya → browse_declared event fires automatically
kya → verification token + next_step + checkoutPatch (if merchant supports UCP)
Agent → merges checkoutPatch into checkout payload
Agent → kya_reportBadgePresented({ merchantUrl, verification_token })
Agent → kya_reportBadgeOutcome (accepted | denied | inconclusive)

Spend: Get a Card

code
Agent → kya_getCard (merchant, amount, description)
User → approves via MFA
kya → issues single-use virtual Visa
Agent → uses card at checkout
Agent → kya_reportPurchase (closes audit trail)
Card → self-destructs

One task. One approval. One card. Done.

Extended Auth (optional)

When enabled, kya checks back with your agent 7 seconds after each badge presentation to confirm whether the merchant accepted or denied. Results are logged to your dashboard so you can see when and which merchants are rejecting your agent.

json
"env": {
  "KYA_EXTENDED_AUTH": "true"
}

How Authorization Scales

ActionWhat Happens
BrowseBadge declaration — identity token issued
SearchBadge declaration — identity token issued
CheckoutBadge + Spend — MFA approval → single-use Visa issued

Browsing requires declaration. Spending money requires declaration + stated intent + explicit human approval + an ephemeral card that self-destructs after one use.


Why kya labs

Give Agent Your CardCrypto Walletkya
Agent identity declaredNoNoEvery session
Human approval per purchaseNoNoEvery purchase
Card credential lifespanPermanentPermanentSingle use
Works at existing merchantsYesNoYes — Visa rails
Your real card exposedYesN/ANever

Badge Only?

If you only need identity (no payment), use the lighter package:

bash
npx @kyalabs/badge

What's New (v2.3)

CapabilityDescription
assurance_levelEvery trip now carries a trust score (starterelite) sourced from token introspection. Visible in your dashboard and included in all trip outcome events.
Merchant signal awarenesskya_getAgentIdentity now detects whether a merchant has active kya signal infrastructure (window.__kya_commerce, meta tags, llms.txt). Returned as merchant_signals in the identity result.
Anonymous-firstBadge works on install. No auth, no signup, no network on install. First kya_getAgentIdentity call fires browse_declared automatically.
Enrichment branchingAnonymous events fire without auth. Verified events include full user context. No silent gates.
next_step fieldEvery identity response includes guidance for the agent's next action. Spend-aware when virtual cards are available.

KYA — Know Your Agent

kya is KYA infrastructure. Every declaration creates a verified record of agentic commerce behavior — building the trust signal that merchants need to tell authorized agents from anonymous bots.

Links


Agents are not bots. kya labs proves it. Your real card never enters the chat.

常见问题

io.github.payclaw/spend 是什么?

提供 Agent 身份与虚拟 Visa 卡,支持申报、支付和审计流程,直接运行在现有 Visa 支付网络上。

相关 Skills

前端设计

by anthropics

Universal
热门

面向组件、页面、海报和 Web 应用开发,按鲜明视觉方向生成可直接落地的前端代码与高质感 UI,适合做 landing page、Dashboard 或美化现有界面,避开千篇一律的 AI 审美。

想把页面做得既能上线又有设计感,就用前端设计:组件到整站都能产出,难得的是能避开千篇一律的 AI 味。

编码与调试
未扫描165.3k

网页应用测试

by anthropics

Universal
热门

用 Playwright 为本地 Web 应用编写自动化测试,支持启动开发服务器、校验前端交互、排查 UI 异常、抓取截图与浏览器日志,适合调试动态页面和回归验证。

借助 Playwright 一站式验证本地 Web 应用前端功能,调 UI 时还能同步查看日志和截图,定位问题更快。

编码与调试
未扫描165.3k

网页构建器

by anthropics

Universal
热门

面向复杂 claude.ai HTML artifact 开发,快速初始化 React + Tailwind CSS + shadcn/ui 项目并打包为单文件 HTML,适合需要状态管理、路由或多组件交互的页面。

在 claude.ai 里做复杂网页 Artifact 很省心,多组件、状态和路由都能顺手搭起来,React、Tailwind 与 shadcn/ui 组合效率高、成品也更精致。

编码与调试
未扫描165.3k

相关 MCP Server

GitHub

编辑精选

by GitHub

热门

GitHub 是 MCP 官方参考服务器,让 Claude 直接读写你的代码仓库和 Issues。

这个参考服务器解决了开发者想让 AI 安全访问 GitHub 数据的问题,适合需要自动化代码审查或 Issue 管理的团队。但注意它只是参考实现,生产环境得自己加固安全。

编码与调试
89.1k

by Context7

热门

Context7 是实时拉取最新文档和代码示例的智能助手,让你告别过时资料。

它能解决开发者查找文档时信息滞后的问题,特别适合快速上手新库或跟进更新。不过,依赖外部源可能导致偶尔的数据延迟,建议结合官方文档使用。

编码与调试
60.0k

by tldraw

热门

tldraw 是让 AI 助手直接在无限画布上绘图和协作的 MCP 服务器。

这解决了 AI 只能输出文本、无法视觉化协作的痛点——想象让 Claude 帮你画流程图或白板讨论。最适合需要快速原型设计或头脑风暴的开发者。不过,目前它只是个基础连接器,你得自己搭建画布应用才能发挥全部潜力。

编码与调试
49.5k

评论