@kya-os/mcp-i 0.1.0-alpha.3.9 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +350 -213
- package/dist/149.js +1 -0
- package/dist/189.js +1 -0
- package/dist/261.js +1 -0
- package/dist/28.js +1 -0
- package/dist/295.js +1 -0
- package/dist/460.js +1 -0
- package/dist/570.js +1 -0
- package/dist/634.js +1 -0
- package/dist/647.js +1 -0
- package/dist/67.js +1 -0
- package/dist/739.js +1 -0
- package/dist/742.js +1 -0
- package/dist/904.js +1 -0
- package/dist/938.js +1 -0
- package/dist/auth/api-key.d.ts +16 -0
- package/dist/auth/api-key.js +82 -0
- package/dist/auth/jwt.d.ts +43 -0
- package/dist/auth/jwt.js +51 -0
- package/dist/auth/oauth/factory.d.ts +12 -0
- package/dist/auth/oauth/factory.js +36 -0
- package/dist/auth/oauth/index.d.ts +5 -0
- package/dist/auth/oauth/index.js +27 -0
- package/dist/auth/oauth/providers/proxy-provider.d.ts +13 -0
- package/dist/auth/oauth/providers/proxy-provider.js +159 -0
- package/dist/auth/oauth/router.d.ts +4 -0
- package/dist/auth/oauth/router.js +294 -0
- package/dist/auth/oauth/storage/memory-storage.d.ts +12 -0
- package/dist/auth/oauth/storage/memory-storage.js +40 -0
- package/dist/auth/oauth/types.d.ts +112 -0
- package/dist/cache/__tests__/cloudflare-kv-nonce-cache.test.d.ts +4 -0
- package/dist/cache/__tests__/cloudflare-kv-nonce-cache.test.js +176 -0
- package/dist/cache/__tests__/concurrency.test.d.ts +5 -0
- package/dist/cache/__tests__/concurrency.test.js +300 -0
- package/dist/cache/__tests__/dynamodb-nonce-cache.test.d.ts +4 -0
- package/dist/cache/__tests__/dynamodb-nonce-cache.test.js +176 -0
- package/dist/cache/__tests__/memory-nonce-cache.test.d.ts +4 -0
- package/dist/cache/__tests__/memory-nonce-cache.test.js +132 -0
- package/dist/cache/__tests__/nonce-cache-factory-simple.test.d.ts +4 -0
- package/dist/cache/__tests__/nonce-cache-factory-simple.test.js +133 -0
- package/dist/cache/__tests__/nonce-cache-factory.test.d.ts +4 -0
- package/dist/cache/__tests__/nonce-cache-factory.test.js +252 -0
- package/dist/cache/__tests__/redis-nonce-cache.test.d.ts +4 -0
- package/dist/cache/__tests__/redis-nonce-cache.test.js +95 -0
- package/dist/cache/cloudflare-kv-nonce-cache.d.ts +14 -0
- package/dist/cache/cloudflare-kv-nonce-cache.js +93 -0
- package/dist/cache/dynamodb-nonce-cache.d.ts +15 -0
- package/dist/cache/dynamodb-nonce-cache.js +92 -0
- package/dist/cache/index.d.ts +16 -0
- package/dist/cache/index.js +32 -0
- package/dist/cache/memory-nonce-cache.d.ts +44 -0
- package/dist/cache/memory-nonce-cache.js +105 -0
- package/dist/cache/nonce-cache-factory.d.ts +20 -0
- package/dist/cache/nonce-cache-factory.js +208 -0
- package/dist/cache/redis-nonce-cache.d.ts +14 -0
- package/dist/cache/redis-nonce-cache.js +53 -0
- package/dist/compiler/compiler-context.d.ts +23 -0
- package/dist/compiler/compiler-context.js +24 -0
- package/dist/compiler/config/constants.d.ts +41 -0
- package/dist/compiler/config/constants.js +45 -0
- package/dist/compiler/config/index.d.ts +252 -0
- package/dist/compiler/config/index.js +15 -0
- package/dist/compiler/config/injection.d.ts +26 -0
- package/dist/compiler/config/injection.js +58 -0
- package/dist/compiler/config/schemas/experimental/index.d.ts +91 -0
- package/dist/compiler/config/schemas/experimental/index.js +16 -0
- package/dist/compiler/config/schemas/experimental/oauth.d.ts +74 -0
- package/dist/compiler/config/schemas/experimental/oauth.js +25 -0
- package/dist/compiler/config/schemas/index.d.ts +6 -0
- package/dist/compiler/config/schemas/index.js +17 -0
- package/dist/compiler/config/schemas/paths.d.ts +9 -0
- package/dist/compiler/config/schemas/paths.js +12 -0
- package/dist/compiler/config/schemas/transport/http.d.ts +82 -0
- package/dist/compiler/config/schemas/transport/http.js +33 -0
- package/dist/compiler/config/schemas/transport/stdio.d.ts +9 -0
- package/dist/compiler/config/schemas/transport/stdio.js +15 -0
- package/dist/compiler/config/schemas/webpack.d.ts +3 -0
- package/dist/compiler/config/schemas/webpack.js +15 -0
- package/dist/compiler/config/types.d.ts +1 -0
- package/dist/compiler/config/types.js +2 -0
- package/dist/compiler/config/utils.d.ts +20 -0
- package/dist/compiler/config/utils.js +36 -0
- package/dist/compiler/generate-env-code.d.ts +1 -0
- package/dist/compiler/generate-env-code.js +8 -0
- package/dist/compiler/generate-import-code.d.ts +1 -0
- package/dist/compiler/generate-import-code.js +24 -0
- package/dist/compiler/get-webpack-config/get-entries.d.ts +3 -0
- package/dist/compiler/get-webpack-config/get-entries.js +29 -0
- package/dist/compiler/get-webpack-config/get-externals.d.ts +7 -0
- package/dist/compiler/get-webpack-config/get-externals.js +88 -0
- package/dist/compiler/get-webpack-config/get-injected-variables.d.ts +8 -0
- package/dist/compiler/get-webpack-config/get-injected-variables.js +25 -0
- package/dist/compiler/get-webpack-config/index.d.ts +4 -0
- package/dist/compiler/get-webpack-config/index.js +101 -0
- package/dist/compiler/get-webpack-config/plugins.d.ts +8 -0
- package/dist/compiler/get-webpack-config/plugins.js +132 -0
- package/dist/compiler/get-webpack-config/resolve-tsconfig-paths.d.ts +9 -0
- package/dist/compiler/get-webpack-config/resolve-tsconfig-paths.js +40 -0
- package/dist/compiler/index.d.ts +6 -0
- package/dist/compiler/index.js +194 -0
- package/dist/compiler/on-first-build.d.ts +3 -0
- package/dist/compiler/on-first-build.js +58 -0
- package/dist/compiler/parse-xmcp-config.d.ts +9 -0
- package/dist/compiler/parse-xmcp-config.js +155 -0
- package/dist/compiler/start-http-server.d.ts +1 -0
- package/dist/compiler/start-http-server.js +34 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +38 -0
- package/dist/index.js.LICENSE.txt +49 -0
- package/dist/runtime/__tests__/audit.test.d.ts +4 -0
- package/dist/runtime/__tests__/audit.test.js +328 -0
- package/dist/runtime/__tests__/identity.test.d.ts +4 -0
- package/dist/runtime/__tests__/identity.test.js +164 -0
- package/dist/runtime/__tests__/mcpi-runtime.test.d.ts +4 -0
- package/dist/runtime/__tests__/mcpi-runtime.test.js +372 -0
- package/dist/runtime/__tests__/proof.test.d.ts +4 -0
- package/dist/runtime/__tests__/proof.test.js +302 -0
- package/dist/runtime/__tests__/session.test.d.ts +4 -0
- package/dist/runtime/__tests__/session.test.js +254 -0
- package/dist/runtime/__tests__/well-known.test.d.ts +4 -0
- package/dist/runtime/__tests__/well-known.test.js +312 -0
- package/dist/runtime/adapter-express.js +2 -0
- package/dist/runtime/adapter-express.js.LICENSE.txt +252 -0
- package/dist/runtime/adapter-nextjs.js +2 -0
- package/dist/runtime/adapter-nextjs.js.LICENSE.txt +53 -0
- package/dist/runtime/adapters/express/index.d.ts +2 -0
- package/dist/runtime/adapters/express/index.js +48 -0
- package/dist/runtime/adapters/nextjs/index.d.ts +8 -0
- package/dist/runtime/adapters/nextjs/index.js +18 -0
- package/dist/runtime/audit.d.ts +93 -0
- package/dist/runtime/audit.js +212 -0
- package/dist/runtime/debug.d.ts +118 -0
- package/dist/runtime/debug.js +612 -0
- package/dist/runtime/delegation-hooks.d.ts +85 -0
- package/dist/runtime/delegation-hooks.js +116 -0
- package/dist/runtime/demo.d.ts +71 -0
- package/dist/runtime/demo.js +135 -0
- package/dist/runtime/headers.d.ts +1 -0
- package/dist/runtime/headers.js +9 -0
- package/dist/runtime/http.js +2 -0
- package/dist/runtime/http.js.LICENSE.txt +252 -0
- package/dist/runtime/identity.d.ts +105 -0
- package/dist/runtime/identity.js +232 -0
- package/dist/runtime/index.d.ts +16 -0
- package/dist/runtime/index.js +56 -0
- package/dist/runtime/mcpi-runtime.d.ts +164 -0
- package/dist/runtime/mcpi-runtime.js +352 -0
- package/dist/runtime/proof.d.ts +87 -0
- package/dist/runtime/proof.js +223 -0
- package/dist/runtime/session.d.ts +88 -0
- package/dist/runtime/session.js +216 -0
- package/dist/runtime/stdio.js +2 -0
- package/dist/runtime/stdio.js.LICENSE.txt +1 -0
- package/dist/runtime/templates/home.d.ts +2 -0
- package/dist/runtime/templates/home.js +50 -0
- package/dist/runtime/transports/http/base-streamable-http.d.ts +25 -0
- package/dist/runtime/transports/http/base-streamable-http.js +16 -0
- package/dist/runtime/transports/http/http-context.d.ts +9 -0
- package/dist/runtime/transports/http/http-context.js +8 -0
- package/dist/runtime/transports/http/index.js +55 -0
- package/dist/runtime/transports/http/setup-cors.d.ts +4 -0
- package/dist/runtime/transports/http/setup-cors.js +24 -0
- package/dist/runtime/transports/http/stateless-streamable-http.d.ts +39 -0
- package/dist/runtime/transports/http/stateless-streamable-http.js +331 -0
- package/dist/runtime/transports/stdio/index.d.ts +1 -0
- package/dist/runtime/transports/stdio/index.js +51 -0
- package/dist/runtime/utils/server.d.ts +42 -0
- package/dist/runtime/utils/server.js +39 -0
- package/dist/runtime/utils/tools.d.ts +8 -0
- package/dist/runtime/utils/tools.js +115 -0
- package/dist/runtime/verifier-middleware.d.ts +76 -0
- package/dist/runtime/verifier-middleware.js +322 -0
- package/dist/runtime/well-known.d.ts +151 -0
- package/dist/runtime/well-known.js +258 -0
- package/dist/storage/config.d.ts +28 -0
- package/dist/storage/config.js +79 -0
- package/dist/storage/delegation.d.ts +59 -0
- package/dist/storage/delegation.js +130 -0
- package/dist/storage/merkle-verifier.d.ts +84 -0
- package/dist/storage/merkle-verifier.js +261 -0
- package/dist/test/__tests__/nonce-cache-integration.test.d.ts +1 -0
- package/dist/test/__tests__/nonce-cache-integration.test.js +116 -0
- package/dist/test/__tests__/nonce-cache.test.d.ts +1 -0
- package/dist/test/__tests__/nonce-cache.test.js +122 -0
- package/dist/test/__tests__/runtime-integration.test.d.ts +4 -0
- package/dist/test/__tests__/runtime-integration.test.js +192 -0
- package/dist/test/__tests__/test-infrastructure.test.d.ts +4 -0
- package/dist/test/__tests__/test-infrastructure.test.js +178 -0
- package/dist/test/deterministic-keys.d.ts +31 -0
- package/dist/test/deterministic-keys.js +108 -0
- package/dist/test/examples/test-usage-example.d.ts +140 -0
- package/dist/test/examples/test-usage-example.js +175 -0
- package/dist/test/index.d.ts +11 -0
- package/dist/test/index.js +27 -0
- package/dist/test/local-verification.d.ts +28 -0
- package/dist/test/local-verification.js +342 -0
- package/dist/test/mock-identity-provider.d.ts +96 -0
- package/dist/test/mock-identity-provider.js +243 -0
- package/dist/test/runtime-integration.d.ts +63 -0
- package/dist/test/runtime-integration.js +140 -0
- package/dist/test/test-environment.d.ts +26 -0
- package/dist/test/test-environment.js +50 -0
- package/dist/types/declarations.d.ts +1 -0
- package/dist/types/declarations.js +6 -0
- package/dist/types/middleware.d.ts +2 -0
- package/dist/types/middleware.js +2 -0
- package/dist/types/tool.d.ts +80 -0
- package/dist/types/tool.js +2 -0
- package/dist/utils/cli-icons.d.ts +3 -0
- package/dist/utils/cli-icons.js +7 -0
- package/dist/utils/constants.d.ts +6 -0
- package/dist/utils/constants.js +13 -0
- package/dist/utils/context.d.ts +33 -0
- package/dist/utils/context.js +58 -0
- package/dist/utils/file-watcher.d.ts +19 -0
- package/dist/utils/file-watcher.js +49 -0
- package/dist/utils/fs-utils.d.ts +2 -0
- package/dist/utils/fs-utils.js +22 -0
- package/dist/utils/path-validation.d.ts +3 -0
- package/dist/utils/path-validation.js +56 -0
- package/dist/utils/spawn-process.d.ts +9 -0
- package/dist/utils/spawn-process.js +50 -0
- package/dist/utils/subscribable.d.ts +12 -0
- package/dist/utils/subscribable.js +44 -0
- package/package.json +91 -77
- package/dist/cjs/auto.js +0 -16
- package/dist/cjs/cli-mode.d.ts +0 -16
- package/dist/cjs/cli-mode.js +0 -32
- package/dist/cjs/crypto.d.ts +0 -16
- package/dist/cjs/crypto.js +0 -212
- package/dist/cjs/dev-helper.d.ts +0 -3
- package/dist/cjs/dev-helper.js +0 -46
- package/dist/cjs/encrypted-storage.d.ts +0 -11
- package/dist/cjs/encrypted-storage.js +0 -73
- package/dist/cjs/index.d.ts +0 -56
- package/dist/cjs/index.js +0 -727
- package/dist/cjs/logger.d.ts +0 -32
- package/dist/cjs/logger.js +0 -85
- package/dist/cjs/nextjs.d.ts +0 -10
- package/dist/cjs/nextjs.js +0 -83
- package/dist/cjs/platform-info.d.ts +0 -36
- package/dist/cjs/platform-info.js +0 -274
- package/dist/cjs/polling.d.ts +0 -13
- package/dist/cjs/polling.js +0 -52
- package/dist/cjs/registry/index.d.ts +0 -12
- package/dist/cjs/registry/index.js +0 -56
- package/dist/cjs/registry/knowthat.d.ts +0 -17
- package/dist/cjs/registry/knowthat.js +0 -173
- package/dist/cjs/rotation.d.ts +0 -35
- package/dist/cjs/rotation.js +0 -102
- package/dist/cjs/storage.d.ts +0 -41
- package/dist/cjs/storage.js +0 -163
- package/dist/cjs/transport.d.ts +0 -35
- package/dist/cjs/transport.js +0 -300
- package/dist/cjs/types.d.ts +0 -206
- package/dist/cjs/vercel-adapter.d.ts +0 -8
- package/dist/cjs/vercel-adapter.js +0 -67
- package/dist/esm/auto.d.ts +0 -13
- package/dist/esm/auto.d.ts.map +0 -1
- package/dist/esm/auto.js +0 -30
- package/dist/esm/auto.js.map +0 -1
- package/dist/esm/cli-mode.d.ts +0 -52
- package/dist/esm/cli-mode.d.ts.map +0 -1
- package/dist/esm/cli-mode.js +0 -59
- package/dist/esm/cli-mode.js.map +0 -1
- package/dist/esm/crypto.d.ts +0 -51
- package/dist/esm/crypto.d.ts.map +0 -1
- package/dist/esm/crypto.js +0 -230
- package/dist/esm/crypto.js.map +0 -1
- package/dist/esm/dev-helper.d.ts +0 -15
- package/dist/esm/dev-helper.d.ts.map +0 -1
- package/dist/esm/dev-helper.js +0 -63
- package/dist/esm/dev-helper.js.map +0 -1
- package/dist/esm/encrypted-storage.d.ts +0 -19
- package/dist/esm/encrypted-storage.d.ts.map +0 -1
- package/dist/esm/encrypted-storage.js +0 -48
- package/dist/esm/encrypted-storage.js.map +0 -1
- package/dist/esm/index.d.ts +0 -129
- package/dist/esm/index.d.ts.map +0 -1
- package/dist/esm/index.js +0 -853
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/logger.d.ts +0 -46
- package/dist/esm/logger.d.ts.map +0 -1
- package/dist/esm/logger.js +0 -100
- package/dist/esm/logger.js.map +0 -1
- package/dist/esm/nextjs.d.ts +0 -22
- package/dist/esm/nextjs.d.ts.map +0 -1
- package/dist/esm/nextjs.js +0 -83
- package/dist/esm/nextjs.js.map +0 -1
- package/dist/esm/package.json +0 -1
- package/dist/esm/platform-info.d.ts +0 -74
- package/dist/esm/platform-info.d.ts.map +0 -1
- package/dist/esm/platform-info.js +0 -293
- package/dist/esm/platform-info.js.map +0 -1
- package/dist/esm/polling.d.ts +0 -29
- package/dist/esm/polling.d.ts.map +0 -1
- package/dist/esm/polling.js +0 -76
- package/dist/esm/polling.js.map +0 -1
- package/dist/esm/registry/index.d.ts +0 -43
- package/dist/esm/registry/index.d.ts.map +0 -1
- package/dist/esm/registry/index.js +0 -89
- package/dist/esm/registry/index.js.map +0 -1
- package/dist/esm/registry/knowthat.d.ts +0 -44
- package/dist/esm/registry/knowthat.d.ts.map +0 -1
- package/dist/esm/registry/knowthat.js +0 -220
- package/dist/esm/registry/knowthat.js.map +0 -1
- package/dist/esm/rotation.d.ts +0 -57
- package/dist/esm/rotation.d.ts.map +0 -1
- package/dist/esm/rotation.js +0 -133
- package/dist/esm/rotation.js.map +0 -1
- package/dist/esm/storage.d.ts +0 -65
- package/dist/esm/storage.d.ts.map +0 -1
- package/dist/esm/storage.js +0 -160
- package/dist/esm/storage.js.map +0 -1
- package/dist/esm/transport.d.ts +0 -52
- package/dist/esm/transport.d.ts.map +0 -1
- package/dist/esm/transport.js +0 -340
- package/dist/esm/transport.js.map +0 -1
- package/dist/esm/types.d.ts +0 -293
- package/dist/esm/types.d.ts.map +0 -1
- package/dist/esm/types.js +0 -5
- package/dist/esm/types.js.map +0 -1
- package/dist/esm/vercel-adapter.d.ts +0 -26
- package/dist/esm/vercel-adapter.d.ts.map +0 -1
- package/dist/esm/vercel-adapter.js +0 -80
- package/dist/esm/vercel-adapter.js.map +0 -1
- /package/dist/{cjs → auth/oauth}/types.js +0 -0
- /package/dist/{cjs/auto.d.ts → runtime/transports/http/index.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -1,315 +1,452 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
|
+
<a href="https://github.com/modelcontextprotocol-identity/xmcp-i">
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/modelcontextprotocol-identity/xmcp-i/main/assets/mcp-i-logo-dark.png">
|
|
5
|
+
<img alt="MCP-I logo" src="https://raw.githubusercontent.com/modelcontextprotocol-identity/xmcp-i/main/assets/mcp-i-logo-light.png" height="128">
|
|
6
|
+
</picture>
|
|
7
|
+
</a>
|
|
8
|
+
<h1>xmcp-i</h1>
|
|
2
9
|
|
|
3
|
-
|
|
10
|
+
<a href="https://github.com/modelcontextprotocol-identity/xmcp-i"><img alt="XMCP-I" src="https://img.shields.io/badge/XMCP--I-000000.svg?style=for-the-badge&labelColor=000"></a>
|
|
11
|
+
<a href="https://www.npmjs.com/package/xmcp-i"><img alt="NPM version" src="https://img.shields.io/npm/v/xmcp-i.svg?style=for-the-badge&labelColor=000000"></a>
|
|
12
|
+
<a href="https://github.com/modelcontextprotocol-identity/xmcp-i/blob/main/license.md"><img alt="License" src="https://img.shields.io/npm/l/xmcp-i.svg?style=for-the-badge&labelColor=000000"></a>
|
|
4
13
|
|
|
5
|
-
|
|
6
|
-
v1.0.0 will be released this week.
|
|
14
|
+
</div>
|
|
7
15
|
|
|
8
|
-
|
|
9
|
-
[](https://opensource.org/licenses/MIT)
|
|
10
|
-
[](https://modelcontextprotocol-identity.io)
|
|
16
|
+
## Own Your AI Agent with Cryptographic Identity
|
|
11
17
|
|
|
12
|
-
|
|
18
|
+
`xmcp-i` enables you to **create your own AI agents** with cryptographic identity and secure delegation. Register and claim your agents with [knowthat.ai](https://knowthat.ai), store your identity securely within them, and delegate or revoke permissions as needed. Built on the XMCP framework with identity features baked in from day one.
|
|
13
19
|
|
|
14
|
-
|
|
20
|
+
## Quick Start
|
|
21
|
+
|
|
22
|
+
Create your first owned AI agent:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npx @kya-os/create-xmcpi-app@latest my-agent
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Then register and claim ownership at [knowthat.ai](https://knowthat.ai)
|
|
29
|
+
|
|
30
|
+
> **New to XMCP-I?** Use [`@kya-os/create-xmcpi-app`](https://www.npmjs.com/package/@kya-os/create-xmcpi-app) to scaffold a complete agent with identity. For existing projects, install `@kya-os/xmcpi` directly.
|
|
31
|
+
|
|
32
|
+
## Installation
|
|
33
|
+
|
|
34
|
+
### For New Projects
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npx create-xmcpi-app@latest my-agent
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### For Existing Projects
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npx init-xmcp-i@latest
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
This will add identity features to your existing Node.js/TypeScript project with automatic framework detection and configuration.
|
|
47
|
+
|
|
48
|
+
## Why Agent Ownership Matters
|
|
49
|
+
|
|
50
|
+
⊹ **True Ownership** - Your agent belongs to you, not a platform\
|
|
51
|
+
⊹ **Cryptographic Security** - Ed25519 keys and DID-based identity\
|
|
52
|
+
⊹ **Permission Control** - Delegate and revoke capabilities securely\
|
|
53
|
+
⊹ **Verifiable Actions** - All responses are cryptographically signed\
|
|
54
|
+
⊹ **Decentralized Trust** - No central authority controls your agent\
|
|
55
|
+
⊹ **Portable Identity** - Move your agent between platforms while keeping ownership
|
|
15
56
|
|
|
16
|
-
|
|
17
|
-
- **Automatic Directory Listings** - Submit to multiple directories with zero extra work
|
|
18
|
-
- **Build Reputation** - Every interaction is signed and verifiable
|
|
19
|
-
- **Future-Proof** - Ready for the decentralized agent ecosystem
|
|
20
|
-
- **Production-Ready** - Optimized for Lambda, Edge, Next.js, and traditional deployments
|
|
21
|
-
- **Fast Registration** - New CLI endpoint provides 100-200ms registration (10-50x faster!)
|
|
57
|
+
### Cryptographic Foundation
|
|
22
58
|
|
|
23
|
-
**
|
|
59
|
+
- **DID Generation**: Decentralized identifiers from public keys
|
|
60
|
+
- **Automatic Signing**: All responses signed with your private key
|
|
61
|
+
- **Key Security**: Private keys never leave your control
|
|
24
62
|
|
|
25
|
-
|
|
26
|
-
- **Verified Agents** - Only list agents with cryptographic proof
|
|
27
|
-
- **Join the Network** - Tap into the growing MCP-I ecosystem
|
|
63
|
+
## Security and Trust
|
|
28
64
|
|
|
29
|
-
|
|
65
|
+
**Agent Ownership Verification**: Every XMCP-I agent generates a cryptographic proof of ownership that can be verified independently. When you register your agent with knowthat.ai, you establish a permanent, tamper-proof claim to your agent's identity.
|
|
30
66
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
67
|
+
**Decentralized Trust**: Your agent's identity doesn't depend on any central authority. The cryptographic keys are generated locally and never shared. Even if knowthat.ai goes offline, your agent retains its identity and ownership proof.
|
|
68
|
+
|
|
69
|
+
**Secure Delegation**: Permission delegation uses time-bound, cryptographically signed tokens. You can grant specific capabilities to other users or systems, with full audit trails and instant revocation capabilities.
|
|
70
|
+
|
|
71
|
+
## Real-World Benefits for Developers & Businesses
|
|
72
|
+
|
|
73
|
+
### Privacy-First Tracking & Analytics
|
|
74
|
+
|
|
75
|
+
Unlike traditional web tracking (cookies, pixels), XMCP-I provides **ethical data collection**:
|
|
76
|
+
|
|
77
|
+
- Users can see exactly what data is stored about them
|
|
78
|
+
- Users can revoke access instantly at any time
|
|
79
|
+
- Businesses get analytics for retargeting without violating privacy
|
|
80
|
+
- Think "GDPR-compliant by design" - users control their data completely
|
|
81
|
+
|
|
82
|
+
### XMCP-I Allows AI in Regulated Industries
|
|
83
|
+
|
|
84
|
+
Industries like healthcare, law, and finance can now use AI while maintaining compliance:
|
|
85
|
+
|
|
86
|
+
**The Problem**: These industries need AI efficiency but can't use most AI services due to:
|
|
87
|
+
|
|
88
|
+
- Data privacy regulations (HIPAA, GDPR, SOX)
|
|
89
|
+
- Audit requirements (who did what, when?)
|
|
90
|
+
- Client confidentiality obligations
|
|
91
|
+
|
|
92
|
+
**The Solution**: XMCP-I provides:
|
|
93
|
+
|
|
94
|
+
- **Provable Privacy**: Cryptographic proof of data handling
|
|
95
|
+
- **Complete Audit Trails**: Every AI action is signed and traceable
|
|
96
|
+
- **User Control**: Clients can revoke AI access to their data instantly
|
|
97
|
+
- **Regulatory Compliance**: Built-in features for GDPR, HIPAA, etc.
|
|
98
|
+
- **EU AI Act Compliance**: Built-in audit trails and user consent mechanisms
|
|
99
|
+
|
|
100
|
+
**Real Example**: A law firm can now use AI for document review because:
|
|
101
|
+
|
|
102
|
+
- Clients control exactly which documents the AI can access
|
|
103
|
+
- All AI actions are cryptographically logged
|
|
104
|
+
- Clients can revoke access immediately if they switch firms
|
|
105
|
+
- The firm can prove to regulators exactly how data was handled
|
|
36
106
|
|
|
37
107
|
## Installation
|
|
38
108
|
|
|
109
|
+
### For New Projects
|
|
110
|
+
|
|
39
111
|
```bash
|
|
40
|
-
|
|
112
|
+
npx @kya-os/create-xmcpi-app@latest my-agent
|
|
41
113
|
```
|
|
42
114
|
|
|
43
|
-
|
|
115
|
+
### For Existing Projects
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
npm install @kya-os/xmcpi
|
|
119
|
+
# or
|
|
120
|
+
yarn add @kya-os/xmcpi
|
|
121
|
+
# or
|
|
122
|
+
pnpm add @kya-os/xmcpi
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Migrating from XMCP
|
|
44
126
|
|
|
45
|
-
|
|
127
|
+
Your existing XMCP agents can gain ownership capabilities:
|
|
46
128
|
|
|
47
129
|
```typescript
|
|
48
|
-
|
|
49
|
-
|
|
130
|
+
// Before (original XMCP - platform owned)
|
|
131
|
+
import { createXMCPServer } from "xmcp";
|
|
132
|
+
|
|
133
|
+
// After (XMCP-I - you own the agent!)
|
|
134
|
+
import { createXMCPServer } from "xmcp-i";
|
|
50
135
|
```
|
|
51
136
|
|
|
52
|
-
|
|
137
|
+
Your existing code works unchanged, but now your agent:
|
|
53
138
|
|
|
54
|
-
|
|
55
|
-
|
|
139
|
+
- ✅ Has its own cryptographic identity
|
|
140
|
+
- ✅ Can be registered and claimed by you at knowthat.ai
|
|
141
|
+
- ✅ Signs all responses automatically
|
|
142
|
+
- ✅ Supports secure permission delegation
|
|
143
|
+
- ✅ Provides verifiable ownership proof
|
|
144
|
+
|
|
145
|
+
## Core Identity Features
|
|
146
|
+
|
|
147
|
+
### Agent Identity Verification
|
|
148
|
+
|
|
149
|
+
Your agent provides cryptographic proof of ownership:
|
|
56
150
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
151
|
+
```bash
|
|
152
|
+
# Your agent's identity includes:
|
|
153
|
+
{
|
|
154
|
+
"did": "did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK",
|
|
155
|
+
"publicKey": "-----BEGIN PUBLIC KEY-----\n...",
|
|
156
|
+
"privateKey": "-----BEGIN PRIVATE KEY-----\n...", // Never shared
|
|
157
|
+
"agentId": "agent-abc123...",
|
|
158
|
+
"capabilities": {
|
|
159
|
+
"tools": true,
|
|
160
|
+
"signing": true,
|
|
161
|
+
"verification": true,
|
|
162
|
+
"delegation": true
|
|
62
163
|
}
|
|
63
|
-
}
|
|
164
|
+
}
|
|
64
165
|
```
|
|
65
166
|
|
|
66
|
-
|
|
167
|
+
- **Public Key**: Can be shared and verified by anyone
|
|
168
|
+
- **Private Key**: Never leaves your control, stored securely locally
|
|
169
|
+
- **DID**: Globally unique identifier generated from your public key
|
|
170
|
+
- **Signatures**: All agent responses include cryptographic signatures
|
|
67
171
|
|
|
68
|
-
|
|
69
|
-
|
|
172
|
+
### Trust Infrastructure
|
|
173
|
+
|
|
174
|
+
- `GET /.well-known/mcp-identity/health` - Health check with identity
|
|
175
|
+
- `GET /.well-known/mcp-identity/self` - Agent identity information
|
|
176
|
+
- `POST /.well-known/mcp-identity/verify` - Verify signatures
|
|
177
|
+
- `GET /.well-known/mcp-identity/resolve/:did` - Resolve DIDs
|
|
70
178
|
|
|
71
|
-
|
|
72
|
-
name: "Production Agent",
|
|
179
|
+
### Built-in Identity Tools & Self-Sovereign Features
|
|
73
180
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
181
|
+
- `get-identity-info` - Comprehensive agent identity details
|
|
182
|
+
- `sign-message` - Sign messages with your private key
|
|
183
|
+
- `verify-signature` - Verify signatures against DIDs
|
|
184
|
+
- `get-server-status` - Agent status with identity information
|
|
185
|
+
- `get-user-data` - Allow users to see all stored data about them
|
|
186
|
+
- `revoke-user-access` - Let users instantly revoke AI access to their data
|
|
187
|
+
- `export-user-data` - Enable users to export their data for portability
|
|
77
188
|
|
|
78
|
-
|
|
79
|
-
encryptionPassword: process.env.AGENT_KEY_PASSWORD,
|
|
189
|
+
## Secure Permission Delegation
|
|
80
190
|
|
|
81
|
-
|
|
82
|
-
logLevel: "error", // or 'silent' for production
|
|
191
|
+
Control what your agent can do and for whom:
|
|
83
192
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
193
|
+
```typescript
|
|
194
|
+
// Delegate specific permissions to other DIDs
|
|
195
|
+
await agent.delegate({
|
|
196
|
+
to: "did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK",
|
|
197
|
+
permissions: ["read:data", "execute:safe-actions"],
|
|
198
|
+
expires: new Date("2025-12-31"),
|
|
199
|
+
conditions: {
|
|
200
|
+
rate_limit: "100/hour",
|
|
201
|
+
allowed_tools: ["get-weather", "search-docs"],
|
|
202
|
+
},
|
|
88
203
|
});
|
|
89
204
|
|
|
90
|
-
//
|
|
91
|
-
await
|
|
92
|
-
|
|
93
|
-
|
|
205
|
+
// Revoke permissions instantly
|
|
206
|
+
await agent.revoke({
|
|
207
|
+
delegation_id: "del_abc123",
|
|
208
|
+
reason: "Project completed",
|
|
94
209
|
});
|
|
210
|
+
|
|
211
|
+
// All delegation changes are cryptographically signed and verifiable
|
|
95
212
|
```
|
|
96
213
|
|
|
97
|
-
###
|
|
214
|
+
### Secure Delegation Example
|
|
215
|
+
|
|
216
|
+
Grant specific permissions to other users while maintaining ownership:
|
|
98
217
|
|
|
99
218
|
```typescript
|
|
100
|
-
//
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
219
|
+
// Example: Grant read-only access to specific tools
|
|
220
|
+
await agent.delegate({
|
|
221
|
+
to: "user@example.com",
|
|
222
|
+
permissions: ["read:weather", "read:docs"],
|
|
223
|
+
expires: "2025-12-31T23:59:59Z",
|
|
224
|
+
conditions: { rate_limit: "100/hour" },
|
|
106
225
|
});
|
|
107
226
|
```
|
|
108
227
|
|
|
109
|
-
##
|
|
228
|
+
## Platform Support with Identity Persistence
|
|
110
229
|
|
|
111
|
-
|
|
230
|
+
Deploy your owned agents anywhere with secure identity storage:
|
|
112
231
|
|
|
113
|
-
|
|
114
|
-
- **Signature Caching**: Repeated signatures are 10x faster
|
|
115
|
-
- **Precomputed Values**: DIDs and keys cached in memory
|
|
116
|
-
- **Optimized Transport**: Auto-selects axios vs fetch
|
|
232
|
+
### Vercel
|
|
117
233
|
|
|
118
|
-
|
|
234
|
+
- **Edge Runtime**: Fast cold starts with identity context
|
|
235
|
+
- **KV Storage**: Secure identity persistence using Vercel KV
|
|
236
|
+
- **Zero Config**: Deploy with `vercel --prod` and identity works
|
|
237
|
+
- **Environment**: Automatic identity configuration and key management
|
|
119
238
|
|
|
120
|
-
|
|
121
|
-
- **Key Rotation**: Automatic rotation based on age/usage
|
|
122
|
-
- **Nonce Tracking**: Prevents replay attacks
|
|
123
|
-
- **Timestamp Validation**: Configurable tolerance windows
|
|
239
|
+
### AWS Lambda
|
|
124
240
|
|
|
125
|
-
|
|
241
|
+
- **Cold Start Optimized**: Minimal initialization with cached identity
|
|
242
|
+
- **DynamoDB**: Secure identity storage with DynamoDB persistence
|
|
243
|
+
- **Serverless**: Built-in serverless framework configuration
|
|
244
|
+
- **IAM Integration**: Pre-configured identity and permission policies
|
|
126
245
|
|
|
127
|
-
|
|
128
|
-
- **Vercel Edge**: Native fetch transport
|
|
129
|
-
- **Cloudflare Workers**: Full compatibility
|
|
130
|
-
- **Node.js**: Traditional file storage
|
|
246
|
+
### Next.js
|
|
131
247
|
|
|
132
|
-
|
|
248
|
+
- **API Routes**: Identity-enabled API endpoints out of the box
|
|
249
|
+
- **Middleware**: Request-level identity verification and delegation
|
|
250
|
+
- **SSR Support**: Server-side identity rendering and verification
|
|
251
|
+
- **Full Stack**: Complete client and server identity integration
|
|
133
252
|
|
|
134
|
-
|
|
135
|
-
// Configure directory listings
|
|
136
|
-
await enableMCPIdentity({
|
|
137
|
-
name: "My Agent",
|
|
253
|
+
### Express
|
|
138
254
|
|
|
139
|
-
|
|
140
|
-
|
|
255
|
+
- **Middleware Stack**: Identity verification middleware for existing apps
|
|
256
|
+
- **Flexible Routing**: Identity-aware route handlers and permission checking
|
|
257
|
+
- **Production Ready**: Battle-tested middleware for production workloads
|
|
258
|
+
- **Custom Auth**: Extensible identity providers and authentication flows
|
|
141
259
|
|
|
142
|
-
|
|
143
|
-
directories: ["smithery", "glama"],
|
|
260
|
+
### Standalone
|
|
144
261
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
262
|
+
- **File Persistence**: Local identity storage with file-based backend
|
|
263
|
+
- **Docker Ready**: Containerized deployment with identity intact
|
|
264
|
+
- **Self Hosted**: Complete control over your agent and its identity
|
|
265
|
+
- **Process Management**: PM2 and systemd configurations included
|
|
266
|
+
|
|
267
|
+
## CLI Usage
|
|
268
|
+
|
|
269
|
+
```bash
|
|
270
|
+
# Development with identity features
|
|
271
|
+
xmcp-i dev
|
|
148
272
|
|
|
149
|
-
|
|
150
|
-
|
|
273
|
+
# Build for production deployment
|
|
274
|
+
mcpi build
|
|
275
|
+
|
|
276
|
+
# Platform-specific builds with identity optimization
|
|
277
|
+
mcpi build --vercel
|
|
278
|
+
mcpi build --lambda
|
|
279
|
+
mcpi build --docker
|
|
151
280
|
```
|
|
152
281
|
|
|
153
|
-
##
|
|
282
|
+
## Framework Integration
|
|
154
283
|
|
|
155
|
-
###
|
|
284
|
+
### Agent Ownership in Action
|
|
156
285
|
|
|
157
286
|
```typescript
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
//
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}
|
|
287
|
+
import { createXMCPServer } from "@kya-os/xmcpi";
|
|
288
|
+
|
|
289
|
+
// Create an agent with built-in cryptographic identity
|
|
290
|
+
const agent = await createXMCPServer({
|
|
291
|
+
name: "my-personal-agent",
|
|
292
|
+
identity: {
|
|
293
|
+
// Identity generated automatically with Ed25519 keys
|
|
294
|
+
autoSign: true, // All responses signed with your key
|
|
295
|
+
trustEndpoints: true, // Verification endpoints enabled
|
|
296
|
+
persistence: "file", // Store identity securely
|
|
297
|
+
},
|
|
298
|
+
tools: [
|
|
299
|
+
{
|
|
300
|
+
name: "secure-action",
|
|
301
|
+
description: "Execute action with verified identity",
|
|
302
|
+
parameters: { action: { type: "string", required: true } },
|
|
303
|
+
handler: async ({ action }, context) => {
|
|
304
|
+
// Every response includes your cryptographic signature
|
|
305
|
+
return {
|
|
306
|
+
action: `Executed: ${action}`,
|
|
307
|
+
agent_did: context.server.identity.did,
|
|
308
|
+
owner: "you@knowthat.ai",
|
|
309
|
+
timestamp: new Date().toISOString(),
|
|
310
|
+
// ↑ This response is automatically signed with your private key
|
|
311
|
+
};
|
|
312
|
+
},
|
|
313
|
+
},
|
|
314
|
+
],
|
|
315
|
+
});
|
|
316
|
+
|
|
317
|
+
// Register your agent's DID with knowthat.ai to claim ownership
|
|
318
|
+
await agent.register("https://knowthat.ai");
|
|
169
319
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
320
|
+
agent.listen(3000, () => {
|
|
321
|
+
console.log(`🤖 Your agent is running: ${agent.identity.did}`);
|
|
322
|
+
console.log(
|
|
323
|
+
`🔐 Claim ownership: https://knowthat.ai/claim/${agent.identity.did}`
|
|
324
|
+
);
|
|
174
325
|
});
|
|
175
326
|
```
|
|
176
327
|
|
|
177
|
-
|
|
328
|
+
## Migrating from XMCP
|
|
178
329
|
|
|
179
|
-
|
|
180
|
-
// Get signed URLs for editing
|
|
181
|
-
const { editUrl, claimUrl } = await identity.requestEditAccess();
|
|
330
|
+
Your existing XMCP agents can gain ownership capabilities:
|
|
182
331
|
|
|
183
|
-
|
|
184
|
-
|
|
332
|
+
```typescript
|
|
333
|
+
// Before (original XMCP - platform owned)
|
|
334
|
+
import { createXMCPServer } from "xmcp";
|
|
185
335
|
|
|
186
|
-
//
|
|
187
|
-
|
|
336
|
+
// After (XMCP-I - you own the agent!)
|
|
337
|
+
import { createXMCPServer } from "xmcp-i";
|
|
188
338
|
```
|
|
189
339
|
|
|
190
|
-
|
|
340
|
+
Your existing code works unchanged, but now your agent:
|
|
341
|
+
|
|
342
|
+
- ✅ Has its own cryptographic identity
|
|
343
|
+
- ✅ Can be registered and claimed by you at knowthat.ai
|
|
344
|
+
- ✅ Signs all responses automatically
|
|
345
|
+
- ✅ Supports secure permission delegation
|
|
346
|
+
- ✅ Provides verifiable ownership proof
|
|
347
|
+
|
|
348
|
+
## Advanced Identity Features
|
|
349
|
+
|
|
350
|
+
### Custom Identity Providers
|
|
191
351
|
|
|
192
352
|
```typescript
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
353
|
+
import { createCustomIdentityProvider } from "@kya-os/xmcpi/platforms";
|
|
354
|
+
|
|
355
|
+
const customProvider = createCustomIdentityProvider({
|
|
356
|
+
keyType: "secp256k1", // Alternative key types
|
|
357
|
+
generateDID: (pubKey) => `did:custom:${hash(pubKey)}`,
|
|
358
|
+
persistence: "redis", // Custom storage backends
|
|
359
|
+
knowthat: {
|
|
360
|
+
apiKey: process.env.KNOWTHAT_API_KEY,
|
|
361
|
+
autoRegister: true, // Automatic agent registration
|
|
362
|
+
},
|
|
198
363
|
});
|
|
199
364
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
memoryKey: "agent-123", // Useful for multiple agents
|
|
365
|
+
const agent = await createXMCPServer({
|
|
366
|
+
name: "my-custom-agent",
|
|
367
|
+
identity: { provider: customProvider },
|
|
204
368
|
});
|
|
205
369
|
```
|
|
206
370
|
|
|
207
|
-
###
|
|
371
|
+
### Identity Middleware Integration
|
|
208
372
|
|
|
209
373
|
```typescript
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
374
|
+
import { identityMiddleware, delegationMiddleware } from "@kya-os/xmcpi";
|
|
375
|
+
|
|
376
|
+
const agent = await createXMCPServer({
|
|
377
|
+
name: "my-secure-agent",
|
|
378
|
+
middlewares: [
|
|
379
|
+
identityMiddleware({
|
|
380
|
+
requireSignature: true, // Require signed requests
|
|
381
|
+
trustLevel: "verified", // Only accept verified DIDs
|
|
382
|
+
}),
|
|
383
|
+
delegationMiddleware({
|
|
384
|
+
checkPermissions: true, // Validate delegated permissions
|
|
385
|
+
rateLimiting: true, // Enforce delegation rate limits
|
|
386
|
+
}),
|
|
387
|
+
],
|
|
217
388
|
});
|
|
218
389
|
```
|
|
219
390
|
|
|
220
|
-
##
|
|
391
|
+
## Dependencies and Architecture
|
|
221
392
|
|
|
222
|
-
|
|
393
|
+
XMCP-I builds on proven cryptographic foundations:
|
|
223
394
|
|
|
224
|
-
|
|
395
|
+
### Core Identity Stack
|
|
225
396
|
|
|
226
|
-
**
|
|
397
|
+
- **@kya-os/mcp-i** - Core identity protocol implementation with knowthat.ai integration
|
|
398
|
+
- **jose** - JWT and cryptographic operations (JWS, JWE, JWK)
|
|
399
|
+
- **@modelcontextprotocol/sdk** - MCP protocol SDK for agent communication
|
|
400
|
+
- **axios** - HTTP client for identity resolution and knowthat.ai API calls
|
|
227
401
|
|
|
228
|
-
|
|
229
|
-
interface MCPIdentityOptions {
|
|
230
|
-
// Basic info
|
|
231
|
-
name?: string;
|
|
232
|
-
description?: string;
|
|
233
|
-
repository?: string;
|
|
234
|
-
|
|
235
|
-
// Storage
|
|
236
|
-
storage?: "file" | "memory" | "auto";
|
|
237
|
-
persistencePath?: string;
|
|
238
|
-
memoryKey?: string;
|
|
239
|
-
encryptionPassword?: string;
|
|
240
|
-
|
|
241
|
-
// Transport
|
|
242
|
-
transport?: "axios" | "fetch" | "auto";
|
|
243
|
-
|
|
244
|
-
// Security
|
|
245
|
-
timestampTolerance?: number; // Default: 60000ms
|
|
246
|
-
enableNonceTracking?: boolean; // Default: true
|
|
247
|
-
|
|
248
|
-
// Directory listings
|
|
249
|
-
directories?: string[] | "verified" | "none"; // Default: "verified"
|
|
250
|
-
|
|
251
|
-
// Development
|
|
252
|
-
mode?: "development" | "production";
|
|
253
|
-
|
|
254
|
-
// Logging
|
|
255
|
-
logger?: Logger;
|
|
256
|
-
logLevel?: "debug" | "info" | "warn" | "error" | "silent";
|
|
257
|
-
}
|
|
258
|
-
```
|
|
402
|
+
### Development Stack
|
|
259
403
|
|
|
260
|
-
|
|
404
|
+
- **express** - Web server framework for identity endpoints
|
|
405
|
+
- **webpack** - Module bundler with identity-aware compilation
|
|
406
|
+
- **chalk** - Beautiful CLI output for identity operations
|
|
407
|
+
- **chokidar** - File watching with identity file monitoring
|
|
261
408
|
|
|
262
|
-
|
|
263
|
-
- `verify(message, signature, publicKey?)`: Verify signatures
|
|
264
|
-
- `respondToChallenge(challenge)`: MCP-I authentication
|
|
265
|
-
- `signResponse(response)`: Add identity to responses
|
|
266
|
-
- `requestEditAccess()`: Get edit/claim URLs
|
|
267
|
-
- `rotateKeys(reason?)`: Manual key rotation
|
|
268
|
-
- `enableAutoRotation(policy?)`: Automatic rotation
|
|
269
|
-
- `checkKeyHealth()`: Key rotation status
|
|
409
|
+
### Cryptographic Security
|
|
270
410
|
|
|
271
|
-
|
|
411
|
+
- **Ed25519** - Elliptic curve digital signatures (default)
|
|
412
|
+
- **secp256k1** - Bitcoin-compatible signatures (optional)
|
|
413
|
+
- **DID Keys** - Decentralized identifier generation from public keys
|
|
414
|
+
- **JWS/JWE** - JSON Web Signatures and Encryption for secure transport
|
|
272
415
|
|
|
273
|
-
|
|
274
|
-
.mcp-identity.json # Your agent's identity (encrypted if password set)
|
|
275
|
-
```
|
|
416
|
+
## Development
|
|
276
417
|
|
|
277
|
-
|
|
418
|
+
Build your own identity-enabled MCP agents:
|
|
278
419
|
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
4. **Monitor key health**: Check rotation status regularly
|
|
283
|
-
5. **Add to .gitignore**: Never commit identity files
|
|
420
|
+
```bash
|
|
421
|
+
# Clone the repository
|
|
422
|
+
git clone https://github.com/modelcontextprotocol-identity/xmcp-i.git
|
|
284
423
|
|
|
285
|
-
|
|
424
|
+
# Install dependencies
|
|
425
|
+
pnpm install
|
|
286
426
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
3. **Use 'silent' log level** in production
|
|
290
|
-
4. **Let transport auto-select** based on runtime
|
|
291
|
-
5. **Preload identity** during cold starts
|
|
427
|
+
# Start development with identity features
|
|
428
|
+
pnpm run dev
|
|
292
429
|
|
|
293
|
-
|
|
430
|
+
# Build for production with identity optimization
|
|
431
|
+
pnpm run build
|
|
294
432
|
|
|
295
|
-
|
|
433
|
+
# Run identity-aware tests
|
|
434
|
+
pnpm run test
|
|
296
435
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
436
|
+
# Lint code including identity modules
|
|
437
|
+
pnpm run lint
|
|
438
|
+
```
|
|
300
439
|
|
|
301
|
-
|
|
440
|
+
## Learn more
|
|
302
441
|
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
442
|
+
⊹ **Register Your Agent**: [knowthat.ai](https://knowthat.ai) - Claim ownership of your AI agents\
|
|
443
|
+
⊹ **Original XMCP Framework**: [xmcp.dev](https://xmcp.dev) - Base framework documentation\
|
|
444
|
+
⊹ **Model Context Protocol**: [modelcontextprotocol.io](https://modelcontextprotocol.io) - Core protocol specification
|
|
306
445
|
|
|
307
|
-
|
|
446
|
+
## Security
|
|
308
447
|
|
|
309
|
-
-
|
|
310
|
-
- Check lazy loading (should see delayed first signature)
|
|
311
|
-
- Use memory storage when possible
|
|
448
|
+
If you believe you have found a security vulnerability, please report it to [security@xmcp-i.dev](mailto:security@xmcp-i.dev). We take agent ownership security seriously and will investigate all reports promptly.
|
|
312
449
|
|
|
313
450
|
## License
|
|
314
451
|
|
|
315
|
-
MIT
|
|
452
|
+
This project is licensed under the MIT License - see the [LICENSE](https://github.com/modelcontextprotocol-identity/xmcp-i/blob/main/license.md) file for details.
|