mcpField
B

badge

Local
github.com/payclawSecurity0Updated 22w ago

About badge

Badge provides persistent AI agent credentials across merchant sites, tracks visits and outcomes, and builds portable trust scores from that history. It offers an SDK for platform builders and an MCP server for end users.

Key features

  1. 01Persistent identity across merchants
  2. 02Visit and outcome tracking
  3. 03Offline fallback on network failure
  4. 04UCP credential provider integration
  5. 05Portable outcome-based scoring

Use cases

  1. 01Declare an agent's identity across merchants
  2. 02Correlate visits with run IDs
  3. 03Continue identity calls during network failures
  4. 04Build merchant trust from recorded outcomes

MCP support

The Badge MCP server wraps the SDK’s identity model, tokens, and scoring as MCP tools for clients such as Claude Desktop, Cursor, and Windsurf.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"payclaw-badge": {
"command": "npx",
"args": [
"-y",
"@payclaw/badge"
],
"env": {
"PAYCLAW_API_KEY": "<PAYCLAW_API_KEY>",
"PAYCLAW_API_URL": "<PAYCLAW_API_URL>"
}
}
}
}
Run commandnpx -y @payclaw/badge
Environment variables to set
PAYCLAW_API_KEYSecretYour PayClaw API key (get one at payclaw.io)
PAYCLAW_API_URLPayClaw API URL (default: https://payclaw.io)

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@payclaw/badge0.4.0

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

Badge by kya labs

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.


Badge SDK

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

Full SDK documentation →

What the SDK covers
  • Identity model — three-tier ladder: guest pass (gp_v1_*) → badge token (kya_*) → authenticated identity
  • Lifecycle tracking — declare visits, report outcomes, correlate with run IDs
  • Offline resilience — never throws on network failure, deterministic fallback on every call
  • UCP integration — io.kyalabs.common.identity Credential Provider, published schemas, ES256-signed JWTs
  • Scoring — outcomes feed kyaScore (500–850), portable across merchants

npm


Badge MCP Server

For 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.

npm


Links

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.