Gives AI agents a persistent identity token that survives across sessions and merchants. Wraps the Badge SDK's three-tier credential ladder (guest pass, badge token, authenticated identity) and exposes lifecycle tracking via MCP tools. Agents declare visits to merchant sites, report outcomes like "not_denied", and accumulate trust over time through a portable kyaScore (500–850 range). The MCP server is a convenience layer for Claude Desktop and similar clients. If you're building a framework or platform, use the SDK directly. It's zero-dependency, offline-resilient, and issues credentials on first run with no signup required. Integrates with UCP as an identity credential provider using ES256-signed JWTs.
Persistent identity for AI agents across merchant sites. Badge gives agents a credential they carry on every request — merchants verify it, trust accumulates across visits, and agents that build history earn better treatment over time.
Framework-agnostic. Transport-agnostic. Zero runtime dependencies.
The SDK is the primary integration surface. Three methods cover the full lifecycle:
import { Badge } from "@kyalabs/badge-sdk";
const badge = await Badge.init();
const runId = badge.startRun();
await badge.declareVisit({
merchant: "store.example.com",
runId,
url: "https://store.example.com/cart",
});
await badge.reportOutcome({
merchant: "store.example.com",
runId,
outcome: "not_denied",
});
No signup. No API key. Badge.init() issues a guest pass on first run and caches it to disk. Identity survives process restarts.
npm install @kyalabs/badge-sdk
gp_v1_*) → badge token (kya_*) → authenticated identityio.kyalabs.common.identity Credential Provider, published schemas, ES256-signed JWTsFor MCP client users (Claude Desktop, Cursor, Windsurf), Badge also ships as an MCP tool server. The MCP server wraps the SDK — same identity model, same tokens, same scoring.
npx @kyalabs/badge
The SDK is the canonical integration path for platform builders and agent frameworks. The MCP server is a convenience wrapper for end users working within MCP clients.
MIT
PAYCLAW_API_KEY*secretYour PayClaw API key (get one at payclaw.io)
PAYCLAW_API_URLPayClaw API URL (default: https://payclaw.io)