Deploying a KYA-OS Server
Deploy KYA-OS servers via the dashboard or self-host with your own infrastructure
Overview
Checkpoint provides three ways to run a KYA-OS server:
| Model | What You Get | Infrastructure |
|---|---|---|
| Dashboard Deploy | One-click setup: GitHub repo + Cloudflare Worker + KYA-OS identity | Your GitHub + Cloudflare account |
| Molti | Managed hosting — Checkpoint runs the agent process for you, no repo or Cloudflare account required | Checkpoint's infrastructure |
| Self-Host (BYOK — bring-your-own-key) | Full control: bring your own server, use KYA-OS packages directly | Your infrastructure |
This page covers Dashboard Deploy and Self-Host (BYOK) below. For managed hosting where Checkpoint runs the agent process for you instead, see Molti.
All three register with Checkpoint for delegation verification, proof auditing, and dashboard monitoring.
Dashboard Deploy
The fastest path to a running KYA-OS server. Checkpoint scaffolds a complete project, creates a GitHub repository, and configures deployment.
Prerequisites
- A Checkpoint account with a GitHub App connection
- A Cloudflare account (for Workers deployment)
Deployment Flow
1. Start Deployment
Navigate to your project in the dashboard and select Deploy KYA-OS Server. Fill in:
| Field | Required | Description |
|---|---|---|
| Project Name | Yes | Becomes the GitHub repo name (lowercase, alphanumeric, hyphens) |
| Agent Name | Yes | Human-readable display name for the agent |
| Agent Description | No | Purpose of the agent (shown in consent screens) |
| Cloudflare API Token | No | Stored as GitHub Secret for automated deployment |
| Cloudflare Account ID | No | Required alongside the API token |
Cloudflare credentials are optional during setup. If not provided, you can add them later as GitHub Secrets in the repository settings.
2. Watch Deployment Progress
After submitting, Checkpoint executes a deployment pipeline with real-time progress. The steps, in order:
- Verify GitHub (
github_verify) — Confirms the GitHub App installation - Check repo name (
repo_check) — Confirms the repository name is available - Create Project (
project_create) — Creates (or reuses) the Checkpoint project for monitoring - Generate API Key (
api_key) — Creates an encrypted API key for the worker - Register Identity (
kta_register) — Registers the agent DID with KnowThat.ai for reputation tracking (with reputation disabled it still runs as a shadow registration for agent tracking, reportingskippedonly when tracking is unavailable or the server has no identity; runs before or after scaffolding depending on that setting) - Scaffold Files (
scaffold) — Generates the KYA-OS server source code - Create Repository (
repo_create) — Creates a private GitHub repository - Commit Files (
commit_files) — Pushes the scaffolded code to the repository - Add Secrets (
add_secrets) — Configures GitHub Secrets for deployment - Deploy to Cloudflare (
cloudflare_deploy) — Deploys the worker (skipped when Cloudflare isn't connected)
3. Deploy to Cloudflare
After the pipeline completes, you'll see:
- GitHub Repository URL — Link to your new repo with the full KYA-OS server source
- Agent DID — Your agent's decentralized identifier
- Deploy to Cloudflare button — One-click Cloudflare Workers deployment
- KTA Claim URL — Claim your agent's profile on KnowThat.ai (if reputation was enabled)
Click Deploy to Cloudflare to deploy the worker, or push changes to the repo to trigger the auto-deploy GitHub Actions workflow.
What Gets Created
GitHub Repository:
my-mcp-server/
├── src/
│ └── index.ts # KYA-OS server entry point
├── wrangler.toml # Cloudflare Workers configuration
├── package.json
├── tsconfig.json
└── .github/
└── workflows/
└── deploy.yml # Auto-deploy on push to mainGitHub Secrets (encrypted):
| Secret | Purpose |
|---|---|
AGENTSHIELD_API_KEY | Worker → Checkpoint API communication |
MCP_IDENTITY_PRIVATE_KEY | Agent's Ed25519 private key for signing proofs |
OAUTH_ENCRYPTION_SECRET | Encrypts stored tokens in OAuth/delegation flows |
CLOUDFLARE_API_TOKEN | Workers deployment (only when you provided your own token) |
Cloudflare Worker secrets (set on the worker during the deploy step): AGENTSHIELD_API_KEY, AGENTSHIELD_PROJECT_ID (the project's friendly ID), MCP_IDENTITY_PRIVATE_KEY, OAUTH_ENCRYPTION_SECRET, KTA_REGISTRATION (lets the proof service notify the reputation engine), and MCP_SERVER_URL (the worker's public URL, required for consent-flow redirects).
One API key, two env names — see Credentials for which plane reads which.
Checkpoint Dashboard:
- A project entry for monitoring delegations, proofs, and sessions
- An API key linked to the project
KnowThat.ai (optional):
- Agent DID registered for reputation tracking
- Public profile page at
knowthat.ai/agents/{slug}
Auto-Deploy with GitHub Actions
The generated repository includes a GitHub Actions workflow that deploys to Cloudflare Workers on every push to main (and on manual workflow_dispatch). Abridged:
# .github/workflows/deploy.yml
on:
push:
branches: [main]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- run: npm install
- name: Deploy to Cloudflare
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
secrets: |
MCP_IDENTITY_PRIVATE_KEY
OAUTH_ENCRYPTION_SECRET
AGENTSHIELD_API_KEY
env:
MCP_IDENTITY_PRIVATE_KEY: ${{ secrets.MCP_IDENTITY_PRIVATE_KEY }}
OAUTH_ENCRYPTION_SECRET: ${{ secrets.OAUTH_ENCRYPTION_SECRET }}
AGENTSHIELD_API_KEY: ${{ secrets.AGENTSHIELD_API_KEY }}If you didn't provide a Cloudflare token during setup, add CLOUDFLARE_API_TOKEN to your repository's Settings → Secrets and variables → Actions.
Self-Host (BYOK)
For full control over your KYA-OS server infrastructure, use the KYA-OS packages directly. You'll need a Project ID and API key — see Credentials for where to find them and which environment variable name applies to this plane.
Option 1: Cloudflare Workers
npx @kya-os/create-mcpi-app my-serverThis scaffolds a Cloudflare Workers project with KYA-OS built in. Configure and deploy with wrangler:
import { MCPICloudflareServer } from '@kya-os/mcp-i-cloudflare';
import { defineConfig } from '@kya-os/mcp-i-cloudflare';
export function getRuntimeConfig(env: CloudflareEnv) {
return defineConfig({
vars: {
ENVIRONMENT: env.ENVIRONMENT || 'production',
AGENTSHIELD_API_KEY: env.AGENTSHIELD_API_KEY,
},
admin: {
enabled: true,
apiKey: env.ADMIN_API_KEY,
},
});
}
export default {
async fetch(request: Request, env: CloudflareEnv, ctx: ExecutionContext) {
const server = new MCPICloudflareServer({
env,
config: getRuntimeConfig(env),
});
return server.handleRequest(request, ctx);
},
};Required Environment Variables:
| Variable | Purpose |
|---|---|
AGENTSHIELD_API_KEY | Checkpoint API key for delegation verification |
MCP_IDENTITY_PRIVATE_KEY | Agent's Ed25519 private key |
ENVIRONMENT | production or development |
KV Namespaces (Cloudflare):
| Namespace | Required? | Purpose |
|---|---|---|
NONCE_CACHE | Yes | Replay attack prevention |
DELEGATION_STORAGE | For OAuth/delegation flows | Delegation storage |
PROOF_ARCHIVE | Optional | Proof storage for auditability |
IDENTITY_STORAGE | Optional | Persistent agent identity |
TOOL_PROTECTION_KV | Optional | Dashboard-controlled tool protection cache |
Only NONCE_CACHE is a required binding — the others are optional and unlock the listed features.
Option 2: Node.js / Express
Add KYA-OS verification to any Node.js server using the middleware:
npm install @kya-os/bouncer-middlewareSee Migrating MCP to KYA-OS for the full Express integration guide.
Option 3: Node.js Runtime
For advanced use cases, use the core KYA-OS runtime directly:
npm install @kya-os/mcp-iimport { createMCPIRuntime } from '@kya-os/mcp-i';
const runtime = createMCPIRuntime({
identity: {
environment: 'production',
},
wellKnown: {
environment: 'production',
baseUrl: 'https://my-server.example.com',
},
});
await runtime.initialize();
// Get agent identity
const identity = await runtime.getIdentity();
console.log(`Agent DID: ${identity.did}`);
// Execute a tool through the runtime — a proof is generated
// automatically and stored for out-of-band retrieval
const result = await runtime.processToolCall('my_tool', args, async (toolArgs) => {
return handleMyTool(toolArgs);
});Package Hierarchy
@kya-os/contracts → Shared types and schemas
↓
@kya-os/mcp-i-core → Platform-agnostic runtime (providers)
↓
@kya-os/mcp-i → Node.js runtime
@kya-os/mcp-i-cloudflare → Cloudflare Workers adapter
↓
@kya-os/bouncer-middleware → Express middleware (verification only)Identity Management
Every KYA-OS server has an agent identity — an Ed25519 key pair that produces a DID.
DID Format
did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doKThe DID is derived from the agent's public key and serves as its persistent identifier across sessions and services.
Identity Storage
- Dashboard Deploy: Identity is generated during deployment and stored as a GitHub Secret (
MCP_IDENTITY_PRIVATE_KEY) - Self-Host: Identity is stored locally in
.mcpi/identity.json(add to.gitignore)
Scaffolding with npx @kya-os/create-mcpi-app (see Option 1: Cloudflare Workers above) generates this identity automatically. To generate a fresh identity (new DID and keys) in an existing scaffolded project, run from the project directory:
npx @kya-os/create-mcpi-app regenerate-identityFor Node.js projects this writes .mcpi/identity.json; for Cloudflare projects it updates wrangler.toml and .dev.vars. Generate Agent Identity covers the full walkthrough, including the programmatic path via the generateIdentity helper.
Never commit your agent's private key to source control. Use environment variables or secret management for production deployments.
Well-Known Endpoints
KYA-OS servers expose discovery endpoints:
| Endpoint | Purpose |
|---|---|
/.well-known/did.json | Agent's DID document (public key, service endpoints) |
/.well-known/agent.json | Agent discovery metadata (name, description, capabilities) |
Reputation (KnowThat.ai)
Agents deployed via the dashboard can optionally register with KnowThat.ai for reputation tracking. Reputation scores (0–100) reflect an agent's trustworthiness based on its history of verified interactions.
Servers can enforce minimum reputation thresholds:
createBouncerMiddleware({
apiKey: process.env.AGENTSHIELD_API_KEY!,
projectId: process.env.AGENTSHIELD_PROJECT_ID!,
reputationThreshold: 60, // Reject agents below 60
});Next Steps
- Migrating MCP to KYA-OS — Add KYA-OS to an existing server
- Authentication Methods — Choose how users authorize agents
- Tool Protection — Define per-tool scope requirements
- Consent Flows — Customize the consent experience
