SDK & APIs
Explore developer SDKs, credential methods, and identity utilities for working with MCP-I
SDK & APIs
Key Takeaways
- Offers developer-friendly access to DID management, credential issuance, and delegation logic
- Supports customer-to-DID mapping, credential chain resolution, and revocation
- Includes SDK download tools and versioned documentation APIs
- Built to simplify MCP-I integration in any environment
Overview
The KYA-OS SDK is a TypeScript/JavaScript-first implementation of the MCP-I protocol suite. It supports:
- User and agent DID management
- Credential issuance and revocation
- Delegation chain resolution
- Trust registry interactions
- SDK discovery and documentation tools
Getting a User DID
const userDid = await kyaOsClient.ensureUserHasDid("user-123", {
preferredMethod: "key"
});
Or, map an existing customer ID to a DID:
const did = await kyaOsClient.customerMapping.getDidByCustomerId("cust-456");
Issue a Delegation Credential
const credential = await kyaOsClient.credentials.issueDelegation({
issuerDid: userDid,
subjectDid: agentDid,
scope: ["read:email"],
expiration: "2025-12-31T23:59:59Z"
});
Revoke a Credential
await kyaOsClient.credentials.revoke(credential.id, {
reason: "User logout"
});
Resolve Delegation Chains
const chain = await kyaOsClient.registry.delegation.resolveChain({
subjectDid: agentDid
});
Trust Registry API
const trust = await kyaOsClient.registry.trust.lookup(userDid);
await kyaOsClient.registry.trust.setTrustScore(userDid, 0.95);
SDK Discovery & Docs
const sdks = await kyaOsClient.sdk.listSdks(); // list available SDKs
const versions = await kyaOsClient.sdk.getSdkVersions("kya-os"); // get versions
const docs = await kyaOsClient.sdk.getSdkDocsIndex("kya-os"); // get doc index
SDK Configuration Utilities
const config = await kyaOsClient.sdk.getSdkConfig("kya-os");
const info = await kyaOsClient.sdk.getSdkInfo("kya-os");
Storage Strategies
The SDK supports multiple mapping and persistence layers:
- In-memory (for local dev)
- Supabase (user mapping persistence)
- Postgres or KV support via adapters