Skip to main content
Glama
Omicron6

KLAIM MCP server

by Omicron6

KLAIM

面向 AI 代理的按次付费人工验证 API

无需暴露用户文档即可完成验证。

KLAIM 是一个隐私优先的验证基础设施,允许应用程序和 AI 代理验证关于用户的声明——例如 年龄 > 18——而无需接收用户的基础身份文档或原始 PII。

Algorand x402 MCP Privacy


🚀 什么是 KLAIM?

现代应用程序越来越需要验证用户是否有资格使用某项服务。

例如:

  • 该用户是否年满 18 岁?

  • 该用户是否为特定国家的居民?

  • 该用户是否持有有效凭证?

  • 该用户是否已完成所需验证?

  • 该用户是否为经过验证的真实人类?

传统方法是收集实际的身份文档。

这会产生一个重大的隐私问题。

应用程序可能只需要知道:

Age > 18 = TRUE

但实际上收到的却是:

Name
Date of Birth
Address
Aadhaar/PAN information
Document number
Issuer information
Full document

KLAIM 改变了这种模式。

KLAIM 不再向应用程序提供文档,而是提供一个按次付费的人工验证 API

应用程序或 AI 代理询问:

"Is this person over 18?"

KLAIM 在内部执行验证并返回:

{
  "verified": true,
  "claim": "AGE_OVER_18"
}

底层凭证和个人信息保持私密。

KLAIM 出售的是验证结果,而非身份数据。

Related MCP server: AgentStamp

🔗 已验证的 Algorand 测试网交易

KLAIM 使用 x402 支付协议实现按次付费的人工验证。

对于 MVP,支付以 Algorand 测试网上的 USDC 结算。以下交易是真实的链上转账,从付款方钱包 → 提供方钱包,每笔代表一次 0.01 USDC 的验证支付

这些不是模拟的交易 ID。它们是真实的 Algorand 测试网交易,可以使用 AlgoKit Lora 浏览器独立验证。

实时 x402 支付证据

#

金额

网络

流向

交易

1

0.01 USDC

Algorand 测试网

付款方 → 提供方

在 Lora 上查看

2

0.01 USDC

Algorand 测试网

付款方 → 提供方

在 Lora 上查看

3

0.01 USDC

Algorand 测试网

付款方 → 提供方

在 Lora 上查看

4

0.01 USDC

Algorand 测试网

付款方 → 提供方

在 Lora 上查看

这证明了什么

支付层围绕以下流程设计:

AI Agent
   │
   │ MCP tool call
   ▼
KLAIM Verification API
   │
   │ No payment
   ▼
HTTP 402 Payment Required
   │
   │ x402 payment requirements
   ▼
AI Agent / Payer Wallet
   │
   │ Sign USDC payment
   ▼
GoPlausible Facilitator
   │
   │ Verify + settle
   ▼
Algorand Testnet
   │
   │ Real USDC transaction
   ▼
Provider Wallet
   │
   │ Settlement confirmed
   ▼
KLAIM Verification
   │
   ▼
Verified Claim
---

# 🎯 Problem

Digital onboarding and AI-agent workflows have three major problems.

### 1. Over-collection of personal information

Applications collect complete identity documents even when they only need one attribute.

### 2. AI agents cannot easily perform trusted identity verification

AI agents can interact with APIs and tools, but identity verification still requires manual document workflows.

### 3. Verification APIs are not naturally machine-payable

Traditional verification providers usually depend on subscriptions, accounts, billing systems, or manual payment workflows.

KLAIM combines:

* **MCP** for AI-agent interoperability
* **x402** for machine-to-machine payments
* **Algorand** for on-chain settlement
* **DID / VC** for identity
* **Zero-Knowledge Proofs** for privacy-preserving verification

into a single verification infrastructure layer.

---

# 💡 The Core Idea

KLAIM separates identity from verification.

### Traditional Verification

```text
User
 │
 │ Upload document
 ▼
Application
 │
 ├── Name
 ├── DOB
 ├── Address
 ├── ID Number
 └── Full Document

KLAIM 架构

User
 │
 │ Credential + Consent
 ▼
KLAIM
 │
 │ Verify privately
 │
 │ ZK Proof
 ▼
Application / AI Agent
 │
 └── "AGE > 18 = TRUE"

应用程序收到的是答案,而不是文档。


🏗️ 架构

flowchart TD

    H[Human User]

    DL[DigiLocker / Credential Issuer]

    DID[DID + Verifiable Credential]

    H -->|Consent| DL
    DL -->|Credential| DID

    A[AI Agent<br/>Claude / GPT / Custom Agent]

    MCP[KLAIM MCP Server]

    X402[x402 Payment Middleware]

    FAC[GoPlausible Facilitator]

    ALGO[Algorand Testnet]

    API[Verification API]

    PA[Provider Agent<br/>Strands]

    ZK[ZK Proof Engine<br/>Midnight-ready]

    RESULT[Verified Claim<br/>No Raw PII]

    A -->|MCP Tool Call| MCP
    MCP --> API

    API --> X402

    X402 -->|402 Payment Required| A

    A -->|USDC Payment| X402

    X402 --> FAC
    FAC --> ALGO

    ALGO -->|Settlement TX| X402

    X402 --> API

    API --> PA

    PA -->|Check DID| DID
    PA -->|Check Credential| DID
    PA -->|Check Claim| DID

    PA --> ZK

    ZK --> RESULT

    RESULT --> API
    API --> MCP
    MCP --> A

🔄 完整验证流程

1. 人类用户接入

用户连接其身份凭证来源。

对于 MVP,DigiLocker 是预期的凭证来源。

Human
  │
  ▼
DigiLocker
  │
  ▼
Credential
  │
  ▼
KLAIM DID

KLAIM 存储凭证引用和派生声明,而不是向验证消费者暴露完整的身份文档。


2. AI 代理通过 MCP 连接

AI 代理通过**模型上下文协议(MCP)**连接到 KLAIM。

Claude / GPT / Custom Agent
            │
            │ MCP
            ▼
     KLAIM MCP Server

MCP 服务器暴露验证工具,例如:

verify_human_age

因此,代理可以请求:

Verify whether DID xyz is over 18.

3. 代理认证

每个验证方都会收到一个唯一的 KLAIM 代理凭证。

示例:

Agent ID:
agent_xxxxxxxxx

Agent Key:
klm_xxxxxxxxxxxxxxxxx

该密钥:

  • 由 KLAIM 生成

  • 仅显示一次

  • 存储前经过哈希处理

  • 可撤销

  • 可轮换


4. 验证请求

MCP 工具调用受保护的验证 API。

POST /api/v1/verify/age

示例:

{
  "did": "did:klaim:demo-user-001"
}

5. x402 支付边界

验证 API 受 x402 保护。

如果未附加有效支付:

HTTP/1.1 402 Payment Required

x402 层提供客户端所需的支付要求。

流程变为:

AI Agent
   │
   │ POST /verify/age
   ▼
KLAIM
   │
   │ HTTP 402
   ▼
AI Agent
   │
   │ Prepare payment
   ▼
x402

6. USDC 支付

验证方代理使用 Algorand 测试网上的 USDC 支付验证费用。

AI Agent
    │
    │ USDC
    ▼
x402
    │
    ▼
GoPlausible Facilitator
    │
    ▼
Algorand Testnet

支付在链上结算。

成功的验证包含结算交易 ID。

示例:

{
  "payment": {
    "txId": "REAL_ALGORAND_TX_ID",
    "explorerUrl": "https://lora.algokit.io/testnet/transaction/..."
  }
}

7. 提供方代理

只有在支付成功结算后,验证管道才会执行。

KLAIM 提供方代理基于 Strands Agents SDK 设计,并为 MVP 提供确定性回退方案。

验证管道为:

check_did
    ↓
check_credential
    ↓
check_claim
    ↓
generate_zk_proof
    ↓
verify_zk_proof

关键不变量

NO PAYMENT
     ↓
NO VERIFICATION

验证业务逻辑不会在支付边界成功之前执行。


8. 凭证验证

提供方代理检查用户 DID 是否存在所请求的凭证。

例如:

Requested:

AGE > 18

Available:

DigiLocker Credential
       │
       └── DOB available

所需声明在内部派生。

实际的出生日期永远不会返回给验证方。


9. 零知识验证

KLAIM 遵循一个简单的原则:

证明声明,而不揭示底层数据。

KLAIM 不暴露:

Date of Birth:
12/03/2002

而是旨在产生以下内容的证明:

AGE > 18

验证方只需要:

verified = true

架构包含一个 ZK 抽象层,旨在连接 Midnight prover。

当前 MVP 架构:

ZK Service
    │
    ├── Local / deterministic engine
    │
    └── Midnight prover integration point

系统明确标识证明引擎,而不是将本地模拟虚假地表示为生产级密码学 ZK。


🔐 隐私模型

KLAIM 遵循最小披露架构

保持私密的数据

Name
Date of Birth
Address
Aadhaar
PAN
Document Number
Raw Identity Document

返回的数据

Verification Result
Claim
Proof Descriptor
Payment Receipt
Algorand Transaction ID

示例:

{
  "verified": true,
  "claim": "AGE_OVER_18",
  "proof": {
    "type": "zk",
    "notDisclosed": [
      "date_of_birth",
      "name",
      "address",
      "document"
    ]
  }
}

🤖 AI 代理架构

KLAIM 专为机器对机器验证而设计。

sequenceDiagram

    participant C as Claude / AI Agent
    participant M as KLAIM MCP
    participant API as Verification API
    participant X as x402
    participant F as GoPlausible
    participant A as Algorand
    participant P as Provider Agent
    participant Z as ZK Engine

    C->>M: verify_human_age(DID)

    M->>API: POST /verify/age

    API->>X: Check payment

    X-->>C: HTTP 402 + requirements

    C->>X: Signed USDC payment

    X->>F: Verify + settle

    F->>A: Algorand Testnet settlement

    A-->>F: Transaction ID

    F-->>X: Settlement successful

    X->>API: Payment verified

    API->>P: Start verification

    P->>P: Check DID

    P->>P: Check credential

    P->>P: Evaluate claim

    P->>Z: Generate / verify proof

    Z-->>P: Proof

    P-->>API: Verified claim

    API-->>M: Result + TX ID

    M-->>C: Verified claim

🧩 为什么选择 MCP?

如果没有 MCP,每个 AI 代理都需要自定义的 KLAIM 集成。

Claude → Custom SDK
GPT → Custom SDK
Agent X → Custom SDK
Agent Y → Custom SDK

有了 MCP:

Claude
GPT
Custom Agent
     │
     ▼
    MCP
     │
     ▼
   KLAIM

KLAIM 成为 AI 代理可以发现和调用的可复用验证能力。


💰 为什么选择 x402?

x402 实现了 HTTP 原生的机器支付。

代理不需要:

  • 订阅

  • 手动结账

  • 信用卡表单

  • 人工计费干预

取而代之的是:

Request
   ↓
402
   ↓
Pay
   ↓
Retry
   ↓
Verification

这为按次验证付费 API 创造了一种自然模式。


🌐 为什么选择 Algorand?

Algorand 被用作 MVP 的结算网络,因为它提供:

  • 快速结算

  • 低交易成本

  • USDC 支持

  • 可访问的测试网基础设施

  • 可独立验证的交易

支付收据可以在 Algorand 测试网上查看。


⭐ 独特卖点

KLAIM 不是另一个身份仪表板。

KLAIM 是面向 AI 代理的验证基础设施层

传统身份验证

Application
     │
     ▼
Identity Provider
     │
     ▼
Upload Document
     │
     ▼
PII Processing
     │
     ▼
Verification

KLAIM

AI Agent
   │
   ▼
MCP
   │
   ▼
x402 Payment
   │
   ▼
KLAIM
   │
   ├── DID / Credential
   ├── Provider Agent
   └── ZK Proof
          │
          ▼
   Boolean Verification

关键区别

KLAIM 出售的是验证结果,而非身份数据。


👥 产品角色

人类用户

人类用户控制自己的身份。

能力:

  • 创建 / 管理 DID

  • 连接凭证

  • 查看凭证

  • 删除凭证

  • 管理验证权限

  • 查看验证历史

人类用户不支付验证费用。


验证方

验证方代表应用程序或 AI 代理。

能力:

  • 创建 AI 代理

  • 生成 MCP 凭证

  • 轮换 / 撤销代理密钥

  • 将 MCP 连接到 Claude

  • 请求验证

  • 监控 x402 支付

  • 查看交易历史

  • 查看验证活动


🔑 代理认证

KLAIM 为验证方代理生成唯一凭证。

示例:

Agent ID
agent_xxxxxxxxx

Agent Key
klm_xxxxxxxxxxxxxxxxx

原始密钥仅显示一次。

KLAIM 存储密钥的 SHA-256 哈希。

Agent Key
    │
    ▼
 SHA-256
    │
    ▼
Stored Hash

🏗️ 项目结构

KLAIM/
│
├── src/
│   ├── routes/
│   │   ├── api/
│   │   │   ├── public/
│   │   │   │   └── mcp.ts
│   │   │   │
│   │   │   └── v1/
│   │   │       ├── verify/
│   │   │       │   └── age.ts
│   │   │       ├── agents.ts
│   │   │       ├── credentials.ts
│   │   │       ├── digilocker.ts
│   │   │       ├── integrations.ts
│   │   │       └── transactions.ts
│   │   │
│   │   ├── human.*
│   │   ├── verifier.*
│   │   └── index.tsx
│   │
│   ├── lib/
│   │   └── klaim/
│   │       ├── server/
│   │       │   ├── mcp.server.ts
│   │       │   ├── x402.server.ts
│   │       │   ├── provider-agent.server.ts
│   │       │   ├── zkp.server.ts
│   │       │   ├── digilocker.server.ts
│   │       │   ├── store.server.ts
│   │       │   └── env.server.ts
│   │       │
│   │       ├── api.ts
│   │       ├── services.ts
│   │       ├── types.ts
│   │       └── mock-data.ts
│   │
│   └── components/
│       ├── app/
│       ├── ui/
│       └── klaim-landing.tsx
│
├── scripts/
│   ├── provision-agent.ts
│   └── test-x402.ts
│
├── tests/
│   └── mcp-x402-flow.test.ts
│
├── .env.example
├── package.json
└── README.md

🛠️ 技术栈

技术

前端

React

框架

TanStack Start

路由

TanStack Router

样式

Tailwind CSS

UI

shadcn/ui / Radix

后端

Nitro / TanStack server routes

语言

TypeScript

运行时

Bun / Node

AI 代理

Strands Agents SDK

AI 集成

MCP

支付

x402

协调方

GoPlausible

区块链

Algorand 测试网

支付资产

USDC

身份

DID / VC

凭证来源

DigiLocker

ZK 层

Midnight-ready abstraction

状态

Repository-based ephemeral store


🧪 本地运行

要求

安装:

  • Node.js 或 Bun

  • Git

  • Claude Desktop(可选,用于 MCP 测试)

克隆仓库:

git clone <YOUR_GITHUB_REPOSITORY_URL>
cd KLAIM

安装依赖:

npm install

或:

bun install

创建环境文件:

cp .env.example .env

启动开发服务器:

npm run dev

应用程序将在以下地址可用:

http://localhost:8080

🔌 测试 MCP

MCP 端点为:

http://localhost:8080/api/public/mcp

MCP 服务器支持:

initialize
ping
tools/list
tools/call

主要验证工具为:

verify_human_age

🤖 连接 Claude Desktop

在配置 KLAIM 验证方代理后,使用以下配置 Claude Desktop:

{
  "mcpServers": {
    "klaim": {
      "type": "http",
      "url": "http://localhost:8080/api/public/mcp",
      "headers": {
        "X-KLAIM-Agent-Id": "YOUR_AGENT_ID",
        "Authorization": "Bearer YOUR_AGENT_KEY"
      }
    }
  }
}

重启 Claude Desktop。

然后询问:

Use KLAIM to verify whether did:klaim:demo-user-001 is over 18.

Claude 应发现并调用:

verify_human_age

💳 测试 x402

配置所需的 Algorand 测试网钱包。

完整流程为:

POST /api/v1/verify/age
        │
        ▼
HTTP 402
        │
        ▼
Payment Requirements
        │
        ▼
USDC Payment
        │
        ▼
GoPlausible
        │
        ▼
Algorand Testnet
        │
        ▼
Settlement TX
        │
        ▼
Provider Agent
        │
        ▼
Verification
        │
        ▼
HTTP 200

运行独立的 x402 测试客户端:

npm run test:x402

成功的结果应包含真实的 Algorand 测试网交易 ID。


🔎 Algorand 测试网交易

成功的 KLAIM x402 交易可以使用 Lora 独立验证。

示例

将下面的占位符替换为项目生成的实际交易:

https://lora.algokit.io/testnet/transaction/YOUR_REAL_TX_ID

重要提示: 在最终提交之前,必须将上述交易链接替换为真实的 KLAIM 交易。


🧪 完整演示流程

按以下顺序运行系统。

终端 1 — 启动 KLAIM

npm run dev

终端 2 — 配置代理

npx tsx scripts/provision-agent.ts

将生成的:

KLAIM_AGENT_ID
KLAIM_AGENT_KEY

存储在相应的环境/配置中。

终端 3 — 执行 x402 测试

npm run test:x402

然后将 Claude Desktop 连接到:

/api/public/mcp

询问 Claude:

Verify whether the user is over 18 using KLAIM.

预期架构:

Claude
   ↓
MCP
   ↓
KLAIM
   ↓
HTTP 402
   ↓
USDC Payment
   ↓
GoPlausible
   ↓
Algorand Testnet
   ↓
Provider Agent
   ↓
Credential Verification
   ↓
ZK Proof
   ↓
Verified Claim
   ↓
Claude

🔐 安全与隐私

KLAIM 围绕数据最小化原则设计。

KLAIM 不暴露:

❌ Aadhaar number
❌ PAN number
❌ Date of Birth
❌ Address
❌ Raw identity document
❌ Private wallet keys
❌ Agent private credentials

KLAIM 暴露:

✓ Verification result
✓ Claim
✓ Proof metadata
✓ Payment receipt
✓ Algorand transaction ID

⚠️ MVP 状态

KLAIM 目前是 MVP / 黑客松实现。

架构有意将生产集成隔离在服务接口之后。

已实现

  • 人类用户 / 验证方角色分离

  • 面向 DID 的身份模型

  • 凭证管理

  • MCP 服务器

  • MCP 认证

  • MCP 工具发现

  • 验证 API

  • x402 支付边界

  • Algorand 测试网结算流程

  • GoPlausible 协调方集成

  • 提供方代理架构

  • Strands 集成点

  • ZK 抽象

  • DigiLocker 集成接口

  • 代理配置

  • 代理密钥轮换 / 撤销

  • 验证历史

  • 交易历史

依赖集成的功能

DigiLocker production credentials
        ↓
Official DigiLocker OAuth / issuer integration

Midnight prover
        ↓
MIDNIGHT_PROVER_URL

Strands / Bedrock
        ↓
AWS credentials + model configuration

这些集成可以在不改变核心 MCP 和 x402 架构的情况下启用。


🚀 路线图

第一阶段 — MVP

✓ MCP
✓ x402
✓ Algorand Testnet
✓ USDC settlement
✓ Agent authentication
✓ Credential abstraction
✓ Provider Agent
✓ Verification API
✓ ZK abstraction

第二阶段 — 生产级身份

DigiLocker production integration
        ↓
Verifiable Credentials
        ↓
DID interoperability

第三阶段 — 生产级 ZK

Midnight prover
        ↓
Cryptographically verifiable claims

第四阶段 — 代理经济

KLAIM 可以成为面向自主代理的通用验证市场。

潜在 API:

verify_age
verify_residency
verify_credential
verify_student_status
verify_business_registration
verify_human

每次验证都成为机器可支付的 API。


🌍 使用场景

年龄限制的应用程序

AI Agent
   ↓
KLAIM
   ↓
AGE > 18

不暴露出生日期。

金融入职

AI Agent
   ↓
KLAIM
   ↓
Credential Valid

应用程序不需要完整的身份证明文件。

教育

AI Agent
   ↓
KLAIM
   ↓
Student Credential = TRUE

仅限人工服务

AI Agent
   ↓
KLAIM
   ↓
Human Verification

🏆 为什么选择 KLAIM?

大多数身份系统会问:

"这个人是谁?"

KLAIM 会问:

"我能否在不查看其他所有信息的情况下,验证我需要知道的那一件事?"

KLAIM 将以下功能整合:

Privacy-Preserving Verification
            +
AI Agent Interoperability
            +
Pay-Per-Use Payments
            +
Zero-Knowledge Architecture
            +
On-Chain Settlement

整合为一个统一的验证 API。


📜 许可证

MIT

KLAIM

面向智能体经济的人类验证基础设施

"不要发送文件。"

"证明你的主张。"

F
license - not found
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Omicron6/Klaim'

If you have feedback or need assistance with the MCP directory API, please join our Discord server