KYA-OS MCP 是 AI Skill Hub 本期精选MCP工具之一。综合评分 8.0 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。
KYA-OS MCP 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
KYA-OS MCP 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/decentralized-identity/kya-os-mcp
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"kya-os-mcp": {
"command": "npx",
"args": ["-y", "kya-os-mcp"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 KYA-OS MCP 执行以下任务... Claude: [自动调用 KYA-OS MCP MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"kya-os_mcp": {
"command": "npx",
"args": ["-y", "kya-os-mcp"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
<p align="center"> <a href="https://kya-os.org"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://kya-os.org/mcp/images/logo-mark_white.svg"> <img alt="" src="https://kya-os.org/mcp/images/logo-mark_black.svg" width="64"> </picture> </a> </p>
<p align="center"> <strong>KYA-OS: agent identity, delegation, and proof. This repo is the MCP binding.</strong> </p>
<p align="center"> <a href="https://www.npmjs.com/package/@kya-os/mcp"><img src="https://img.shields.io/npm/v/@kya-os/mcp" alt="npm"></a> <a href="https://kya-os.org/mcp"><img src="https://img.shields.io/badge/spec-KYA--OS-blue" alt="spec"></a> <a href="https://identity.foundation/working-groups/trusted-agents.html"><img src="https://img.shields.io/badge/DIF-TAAWG-purple" alt="DIF TAAWG"></a> <a href="./LICENSE"><img src="https://img.shields.io/github/license/decentralized-identity/kya-os-mcp" alt="license"></a> </p>
---
| Capability | How it works |
|---|---|
| **Cryptographic identity** | Ed25519 (EdDSA) and P-256 (ES256, FIPS-eligible) key pairs, did:key / did:web resolution, optional did:cheqd resolver support |
| **Entity Card** | Typed, DID-anchored identity: fluent card() builder, requireProof per-request holder-of-key guard, CIMD OAuth on-ramp (client_id ⇄ did:web, MCP's default client auth), and withKyaOsCard projections that embed into MCP server.json / Server Cards (draft SEP-2127), A2A AgentCards, and NANDA AgentFacts |
| **Signed proofs** | Detached JWS over JCS-canonicalized request/response hashes |
| **Delegation credentials** | W3C Verifiable Credentials with scope constraints, rooted at a Responsible Party |
| **Revocation** | StatusList2021 bitstring with cascading revocation; lists are GZIP-compressed by the shipped statusListGzipCodec, the manager's default |
| **Replay prevention** | Nonce-based handshake with timestamp skew validation |
| **Verifiable auditability** | Typed producer events, authoritative atomic recorder, signed chain receipts, RFC 9162 checkpoints, independent observation, encrypted evidence references, replay bundles, and offline CLI |
| **Extensible** | Bring your own KMS, HSM, atomic nonce provider, or DID method |
The in-memory defaults are single-process only. For a load-balanced / multi-instance deployment, inject a durable Redis / Durable Object / DB-backed implementation for every runtime-state seam — the nonce cache (NonceCacheProvider) together with the consent stores (GrantStore, PendingFlowStore, SessionStore) — so replay protection, grants, pending OAuth flows, and sessions are shared across instances and survive restarts.
Delegation grants must retain their original signed evidence: credentialJwt for VC-JWTs, or delegationCredential for object VCs. wrapWithDelegation revalidates that evidence with the same verifier as a directly presented credential on every reuse, including chain resolution, audience, scope, expiry, and configured status/revocation checks. Store providers must preserve these fields and return only active grants; cache availability alone does not authorize a request. Grant expiry is bounded by the earliest credential or constraint expiry in the verified chain.
Upgrade compatibility: legacy grants without signed evidence intentionally return needs_authorization; re-present a valid delegation or complete the normal consent flow to replace them. Do not reconstruct unsigned credentials from cached metadata. Under holderBinding: 'enforce', did:key session retries also require a fresh holder proof. off and warn retain their documented session behavior, and non-did:key binding remains deferred; neither provides an enforced proof-of-possession guarantee for those requests. Status and chain providers now receive reads on grant reuse as they do on direct calls, and an unavailable required provider prevents reuse. This does not strengthen a provider's own status-cache freshness policy.
VC-JWT envelope exp and nbf are checked on every verification, including signature-cache hits and grant reuse. Omitted claims remain supported. A present claim must be a finite NumericDate. An expired envelope denies authorization even when the embedded VC is otherwise current, and verified envelope expiry can shorten the cached grant's lifetime. nbf allows JWT_NBF_LEEWAY_SECONDS (30 seconds) of clock skew; exp allows none.
Delegation issuers: each re-delegation must be signed by its parent's subject. The issuerDid inside a credential is only a claim, so the chain walk also checks who signed it. Set delegation.trustedRootIssuers to the DIDs allowed to issue root delegations, the Responsible Party for the whole chain. With it set, a chain whose root is signed by any other DID is rejected, including when a stored grant is reused. Without it, any issuer is accepted, including an agent signing a delegation for itself, and the middleware logs a warning at startup. A root whose claimed issuerDid differs from its signer is still accepted, and logged.
Nonce providers: give your NonceCacheProvider an atomic consume(nonce, ttlSeconds, agentDid?). It must record an unseen (agentDid, nonce), return literal true only to the call that recorded it, and reject on storage failure. Implement the claim in the shared backend with a conditional insert and expiry, not with a local mutex around remote reads and writes. Eventually consistent KV alone cannot provide it. The bundled memory provider implements consume, but it protects only one cache instance and loses its state on restart. consume is optional: a provider without it keeps working by falling back to has then add, which cannot stop concurrent duplicates of one signed request, and a warning is logged once. Set requireAtomicNonce: true on the middleware, ProofVerifier, SessionManager or consumeFromNonceCacheProvider to refuse that fallback; each then throws at construction for a provider without consume. Any result other than literal true, or a storage failure, denies admission. withKyaOs takes the same nonceCache and requireAtomicNonce options (and responseProofProfile) and passes them to the middleware.
Providers must honor the requested retention duration. The verifiers retain nonces through the final accepted second, including future timestamps and clock skew, while preserving a longer configured TTL. The detached verifier also covers later increases up to its supported setTimestampSkew maximum. Custom card consumeNonceIfFresh callbacks must honor the new third minTtlSec argument; the bundled card cache and provider adapter do so. Instances sharing a replay namespace must agree on the longest proof-acceptance policy and retain state accordingly. Retire old non-atomic writers before claiming atomic protection. Preserve or extend existing records through the full remaining acceptance window; merely keeping their old, shorter TTLs is insufficient. If the backend cannot extend them safely, pause affected admission and wait out that window before cutover. Do not clear records while their proofs may still be accepted.
---
git clone https://github.com/decentralized-identity/kya-os-mcp.git
cd kya-os-mcp && npm install
bash scripts/demo.sh
This starts all example servers and opens MCP Inspector. Connect to any server, call a tool, and inspect the proof in _meta:
| Port | Example | What it demonstrates |
|---|---|---|
| 3001 | [node-server](./examples/node-server/) | Proofs + restricted tools (low-level API) |
| 3002 | [consent-basic](./examples/consent-basic/) | Human consent flow with built-in UI |
| 3003 | [consent-full](./examples/consent-full/) | Production consent UI ([@kya-os/consent](https://www.npmjs.com/package/@kya-os/consent)) |
| 3004 | [context7-with-kya-os](./examples/context7-with-kya-os/) | 2-line migration of a real MCP server |
Also available: outbound-delegation (gateway pattern), verify-proof (standalone verification), statuslist (revocation lifecycle), cheqd-dlr (operator DID linkage + DLR publishing).
To run one example on its own, use its npm run example:* script, for example npm run example:server. The scripts and scripts/demo.sh run the examples from src/ through tsconfig.examples.json, so they need no build step. The scripts also need nothing beyond the root npm install; demo.sh additionally installs each example's own dependencies.
KYA-OS integrates through typed seams — the adapter pattern is the whole model. Every external dependency is a port with an in-memory or reference default; bind your own backend, or drop in a shipped adapter. Adding one is "implement this interface" (or, for a self-contained system, "drop a folder under src/integrations/") — contributions welcome.
| Seam (port) | Reference / default | Bring your own |
|---|---|---|
DID resolution — DIDResolver | did:key, did:web | did:cheqd, custom methods |
Revocation — StatusListResolver | not configured | cheqd StatusList2021 |
Authorization — AuthorizationServerAdapter | GenericOidcAdapter (OIDC + PKCE) | Auth0, Okta, your IdP ([example](./examples/authz-inspector/)) |
State — GrantStore, SessionStore, NonceCacheProvider, PendingFlowStore | in-memory | Redis, DynamoDB, Durable Objects, DB; atomic consumption for replay and pending state ([multi-instance](#multi-instance-deployments)) |
Audit delivery — AuditRecorder, AuditAnchorProvider | local recorder | Checkpoint, on-chain anchoring ([AUDITABILITY.md](./AUDITABILITY.md)) |
Crypto — CryptoProvider | Node, WebCrypto | your KMS / HSM |
Policy — PolicyEngine | built-in default | custom engine |
cheqd is the reference for what filling the seams looks like end to end — one package binds three at once: DID resolution (did:cheqd), revocation (on-chain StatusList2021), and audit anchoring (DID-Linked Resources). Enabling the resolver is a small config change:
import { cheqdResolver } from '@kya-os/mcp/cheqd';
await withKyaOs(server, {
crypto,
delegation: {
didResolvers: { cheqd: cheqdResolver({ resolverUrl: 'https://resolver.cheqd.net' }) },
},
});
Its full reference (registrar writes, did:web <-> did:cheqd linkage, DID-Linked Resource helpers, live testnet E2E) lives in src/integrations/cheqd/README.md; see examples/cheqd-dlr for a complete operator flow.
高质量的MCP协议实现,代码组织清晰
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
经综合评估,KYA-OS MCP 在MCP工具赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | kya-os-mcp |
| 原始描述 | 开源MCP工具:KYA-OS MCP protocol reference implementation — delegation, proof generation, ses。⭐11 · TypeScript |
| Topics | mcptypescript开源 |
| GitHub | https://github.com/decentralized-identity/kya-os-mcp |
| License | MIT |
| 语言 | TypeScript |
收录时间:2026-05-25 · 更新时间:2026-05-30 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端