@aikdna/kdna-mcp-server 0.2.2 → 0.2.4
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 +11 -6
- package/bin/kdna-mcp.mjs +3 -22
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
# KDNA MCP Server
|
|
2
2
|
|
|
3
3
|
`@aikdna/kdna-mcp-server` exposes KDNA as MCP tools so agent runtimes can use
|
|
4
|
-
`.kdna` assets without learning the container internals. Stdio-only,
|
|
4
|
+
packaged `.kdna` assets without learning the container internals. Stdio-only,
|
|
5
|
+
minimal footprint. The npm package source lives in this repository under
|
|
6
|
+
[`mcp-server/`](./); there is no separate public `kdna-mcp-server` repository.
|
|
5
7
|
|
|
6
8
|
## Why MCP instead of the kdna-loader skill?
|
|
7
9
|
|
|
@@ -16,13 +18,12 @@ The `kdna-loader` skill teaches an agent the full KDNA protocol (7-part routing,
|
|
|
16
18
|
|
|
17
19
|
| Tool | Purpose | Input | Output |
|
|
18
20
|
|------|---------|-------|--------|
|
|
19
|
-
| `kdna.inspect` | Inspect a v1 `.kdna` asset
|
|
21
|
+
| `kdna.inspect` | Inspect a v1 `.kdna` asset | File path | Structured metadata |
|
|
20
22
|
| `kdna.verify` | Verify asset integrity state | File path | Pass/fail with reasons |
|
|
21
23
|
| `kdna.plan-load` | Return Core LoadPlan before loading | File path, optional password or entitlement state | LoadPlan JSON |
|
|
22
24
|
| `kdna.load` | Load and render a `.kdna` profile for agent context | File path, optional profile | Prompt-mode text or raw JSON |
|
|
23
|
-
| `kdna.available-local` | List local v1 `.kdna` assets
|
|
25
|
+
| `kdna.available-local` | List local v1 `.kdna` assets | Root directory | Local v1 asset inventory |
|
|
24
26
|
| `kdna.match` | Rank candidate assets for a task string | Task description | Scored list with fit signals |
|
|
25
|
-
| `kdna.available` | Legacy registry compatibility only | `domains.json` path | Legacy domain list |
|
|
26
27
|
|
|
27
28
|
## Install & Run
|
|
28
29
|
|
|
@@ -76,10 +77,14 @@ kdna-mcp
|
|
|
76
77
|
|
|
77
78
|
| Variable | Purpose |
|
|
78
79
|
|----------|---------|
|
|
79
|
-
| `KDNA_ASSET_DIR` | Root directory for `kdna.available-local
|
|
80
|
-
| `
|
|
80
|
+
| `KDNA_ASSET_DIR` | Root directory for `kdna.available-local`; overrides the default |
|
|
81
|
+
| `KDNA_PACKAGE_DIR` | Package directory fallback for `kdna.available-local` |
|
|
81
82
|
| `KDNA_DATA_ROOT` | Override KDNA data directory (default: `~/.kdna`) |
|
|
82
83
|
|
|
84
|
+
When no override is provided, `kdna.available-local` scans
|
|
85
|
+
`~/.kdna/packages`. Explicit local roots can be provided when a user keeps
|
|
86
|
+
assets elsewhere.
|
|
87
|
+
|
|
83
88
|
## Local Development
|
|
84
89
|
|
|
85
90
|
```bash
|
package/bin/kdna-mcp.mjs
CHANGED
|
@@ -77,7 +77,7 @@ const tools = [
|
|
|
77
77
|
},
|
|
78
78
|
{
|
|
79
79
|
name: 'kdna.available-local',
|
|
80
|
-
description: 'List local v1 .kdna
|
|
80
|
+
description: 'List local v1 .kdna files without using a registry.',
|
|
81
81
|
inputSchema: {
|
|
82
82
|
type: 'object',
|
|
83
83
|
properties: {
|
|
@@ -124,10 +124,8 @@ function textResult(value) {
|
|
|
124
124
|
function isV1Asset(assetPath) {
|
|
125
125
|
if (!assetPath) return false;
|
|
126
126
|
try {
|
|
127
|
-
if (fs.existsSync(assetPath)
|
|
128
|
-
|
|
129
|
-
}
|
|
130
|
-
return detectContainerFormat(assetPath) === 'v1';
|
|
127
|
+
if (!fs.existsSync(assetPath) || !fs.statSync(assetPath).isFile()) return false;
|
|
128
|
+
return assetPath.endsWith('.kdna') && detectContainerFormat(assetPath) === 'v1';
|
|
131
129
|
} catch {
|
|
132
130
|
return false;
|
|
133
131
|
}
|
|
@@ -150,23 +148,6 @@ function findLocalAssets(root = defaultAssetRoot(), maxDepth = 3) {
|
|
|
150
148
|
return;
|
|
151
149
|
}
|
|
152
150
|
|
|
153
|
-
if (isV1SourceDir(dir)) {
|
|
154
|
-
const inspection = inspectV1(dir);
|
|
155
|
-
const validation = validateV1(dir);
|
|
156
|
-
found.push({
|
|
157
|
-
path: dir,
|
|
158
|
-
kind: 'v1_source_dir',
|
|
159
|
-
asset_id: inspection.asset_id,
|
|
160
|
-
title: inspection.title,
|
|
161
|
-
version: inspection.version,
|
|
162
|
-
judgment_version: inspection.judgment_version,
|
|
163
|
-
checksums_present: Boolean(inspection.checksums_present),
|
|
164
|
-
loadable: Boolean(validation.overall_valid),
|
|
165
|
-
problems: validation.overall_valid ? [] : validation.problems || [],
|
|
166
|
-
});
|
|
167
|
-
return;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
151
|
for (const entry of entries) {
|
|
171
152
|
if (entry.name === 'node_modules' || entry.name === '.git') continue;
|
|
172
153
|
const full = path.join(dir, entry.name);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aikdna/kdna-mcp-server",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "MCP server for loading, inspecting, verifying, and matching KDNA .kdna assets.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://aikdna.com",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"license": "Apache-2.0",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@aikdna/kdna-core": "^0.12.
|
|
37
|
+
"@aikdna/kdna-core": "^0.12.3",
|
|
38
38
|
"ajv": "^8.20.0",
|
|
39
39
|
"ajv-formats": "^3.0.1"
|
|
40
40
|
},
|