@4da/mcp-server 4.6.3 → 4.6.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 +2 -2
- package/dist/doctor.js +1 -1
- package/dist/index.js +15 -3
- package/dist/schema-registry.d.ts +13 -0
- package/dist/schema-registry.js +15 -0
- package/dist/setup.js +1 -1
- package/package.json +14 -27
package/README.md
CHANGED
|
@@ -174,7 +174,7 @@ The MCP server works without the desktop app. On first run it creates a local da
|
|
|
174
174
|
| Actionable signals + knowledge gaps | -- | Yes |
|
|
175
175
|
| Compound intelligence (learns over time) | -- | Yes |
|
|
176
176
|
|
|
177
|
-
> **[Download 4DA](https://github.com/
|
|
177
|
+
> **[Download 4DA](https://github.com/4DA-Systems/4DA/releases/latest)** for the full experience.
|
|
178
178
|
|
|
179
179
|
## Transports
|
|
180
180
|
|
|
@@ -219,7 +219,7 @@ Any tool that supports [MCP](https://modelcontextprotocol.io): Claude Code, Clau
|
|
|
219
219
|
## Build from Source
|
|
220
220
|
|
|
221
221
|
```bash
|
|
222
|
-
git clone https://github.com/
|
|
222
|
+
git clone https://github.com/4DA-Systems/4DA.git
|
|
223
223
|
cd 4DA/mcp-4da-server
|
|
224
224
|
pnpm install
|
|
225
225
|
pnpm build
|
package/dist/doctor.js
CHANGED
|
@@ -108,7 +108,7 @@ export function runDoctor() {
|
|
|
108
108
|
console.log(" Standalone: scans your dependencies for known CVEs and provides project context.");
|
|
109
109
|
console.log(" Full app: adds content scoring, source monitoring, and more.");
|
|
110
110
|
console.log("");
|
|
111
|
-
console.log(" Desktop app: https://github.com/
|
|
111
|
+
console.log(" Desktop app: https://github.com/4DA-Systems/4DA/releases/latest");
|
|
112
112
|
console.log(" Learn more: https://4da.ai");
|
|
113
113
|
console.log("");
|
|
114
114
|
}
|
package/dist/index.js
CHANGED
|
@@ -45,13 +45,25 @@ import { getSlimToolList, getSchemaResources, hasToolSchema, getSchemaFilename,
|
|
|
45
45
|
import { dispatchTool } from "./tool-dispatch.js";
|
|
46
46
|
const __filename = fileURLToPath(import.meta.url);
|
|
47
47
|
const __dirname = dirname(__filename);
|
|
48
|
+
// Single source of truth for the server version — read from package.json so
|
|
49
|
+
// serverInfo and --version can never drift from the published version again
|
|
50
|
+
// (drift shipped in 4.6.1: serverInfo reported 4.6.0).
|
|
51
|
+
const SERVER_VERSION = (() => {
|
|
52
|
+
try {
|
|
53
|
+
const pkg = JSON.parse(readFileSync(join(__dirname, "..", "package.json"), "utf8"));
|
|
54
|
+
return pkg.version ?? "0.0.0";
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
return "0.0.0";
|
|
58
|
+
}
|
|
59
|
+
})();
|
|
48
60
|
import { createDatabase, FourDADatabase } from "./db.js";
|
|
49
61
|
// =============================================================================
|
|
50
62
|
// Server Setup
|
|
51
63
|
// =============================================================================
|
|
52
64
|
const server = new Server({
|
|
53
65
|
name: "4da-server",
|
|
54
|
-
version:
|
|
66
|
+
version: SERVER_VERSION,
|
|
55
67
|
}, {
|
|
56
68
|
capabilities: {
|
|
57
69
|
tools: { listChanged: true },
|
|
@@ -293,7 +305,7 @@ async function main() {
|
|
|
293
305
|
const args = process.argv.slice(2);
|
|
294
306
|
// Version
|
|
295
307
|
if (args.includes("--version") || args.includes("-v")) {
|
|
296
|
-
console.log(
|
|
308
|
+
console.log(`@4da/mcp-server ${SERVER_VERSION}`);
|
|
297
309
|
return;
|
|
298
310
|
}
|
|
299
311
|
// Help
|
|
@@ -321,7 +333,7 @@ async function main() {
|
|
|
321
333
|
|
|
322
334
|
Works standalone (scans your project on startup) or with the full
|
|
323
335
|
4DA desktop app for content scoring, source monitoring, and more.
|
|
324
|
-
Desktop app: https://github.com/
|
|
336
|
+
Desktop app: https://github.com/4DA-Systems/4DA/releases/latest
|
|
325
337
|
Docs: https://4da.ai
|
|
326
338
|
`);
|
|
327
339
|
return;
|
|
@@ -12,6 +12,17 @@
|
|
|
12
12
|
*/
|
|
13
13
|
/** Tool categories — maps to the functional groupings in the MCP server */
|
|
14
14
|
export type ToolCategory = "security" | "intelligence" | "decisions" | "agent" | "identity";
|
|
15
|
+
/**
|
|
16
|
+
* MCP tool annotations (spec 2025-03-26+). Directory reviews (Anthropic
|
|
17
|
+
* Connectors, client marketplaces) expect these on every tool; a missing
|
|
18
|
+
* readOnlyHint/destructiveHint is a documented rejection cause.
|
|
19
|
+
*/
|
|
20
|
+
export interface ToolAnnotations {
|
|
21
|
+
readOnlyHint: boolean;
|
|
22
|
+
openWorldHint: boolean;
|
|
23
|
+
destructiveHint?: boolean;
|
|
24
|
+
idempotentHint?: boolean;
|
|
25
|
+
}
|
|
15
26
|
/** Shape of each entry in the tool registry */
|
|
16
27
|
export interface ToolRegistryEntry {
|
|
17
28
|
summary: string;
|
|
@@ -19,6 +30,7 @@ export interface ToolRegistryEntry {
|
|
|
19
30
|
category: ToolCategory;
|
|
20
31
|
tags: string[];
|
|
21
32
|
standalone: boolean;
|
|
33
|
+
annotations: ToolAnnotations;
|
|
22
34
|
}
|
|
23
35
|
/**
|
|
24
36
|
* Slim tool registry — one-liner descriptions + category/tag metadata.
|
|
@@ -37,6 +49,7 @@ export declare function getSlimToolList(standaloneOnly?: boolean): Array<{
|
|
|
37
49
|
inputSchema: {
|
|
38
50
|
type: "object";
|
|
39
51
|
};
|
|
52
|
+
annotations: ToolAnnotations;
|
|
40
53
|
}>;
|
|
41
54
|
/**
|
|
42
55
|
* Get list of schema resources for ListResources
|
package/dist/schema-registry.js
CHANGED
|
@@ -25,6 +25,7 @@ export const TOOL_REGISTRY = {
|
|
|
25
25
|
category: "security",
|
|
26
26
|
tags: ["security", "vulnerabilities", "cve", "dependencies", "osv"],
|
|
27
27
|
standalone: true,
|
|
28
|
+
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
28
29
|
},
|
|
29
30
|
dependency_health: {
|
|
30
31
|
summary: "Dependency version freshness, deprecation, and CVE counts across npm/Rust/Python/Go. Call when the user asks whether their dependencies are outdated, stale, or need updating.",
|
|
@@ -32,6 +33,7 @@ export const TOOL_REGISTRY = {
|
|
|
32
33
|
category: "security",
|
|
33
34
|
tags: ["dependencies", "health", "outdated", "deprecated", "versions"],
|
|
34
35
|
standalone: true,
|
|
36
|
+
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
35
37
|
},
|
|
36
38
|
upgrade_planner: {
|
|
37
39
|
summary: "Prioritized upgrade plan (CVE severity, deprecation, version distance), quick wins vs breaking changes. Call when the user asks what to upgrade, or after dependency_health surfaces problems.",
|
|
@@ -39,6 +41,7 @@ export const TOOL_REGISTRY = {
|
|
|
39
41
|
category: "security",
|
|
40
42
|
tags: ["upgrade", "dependencies", "recommendations", "versions"],
|
|
41
43
|
standalone: true,
|
|
44
|
+
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
42
45
|
},
|
|
43
46
|
// --- Intelligence (mixed) ---
|
|
44
47
|
what_should_i_know: {
|
|
@@ -47,6 +50,7 @@ export const TOOL_REGISTRY = {
|
|
|
47
50
|
category: "intelligence",
|
|
48
51
|
tags: ["briefing", "advisories", "pre-task", "signals"],
|
|
49
52
|
standalone: true,
|
|
53
|
+
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
50
54
|
},
|
|
51
55
|
ecosystem_pulse: {
|
|
52
56
|
summary: "Live Hacker News discussions filtered to the user's tech stack. Call when the user asks what is new or trending in their ecosystem.",
|
|
@@ -54,6 +58,7 @@ export const TOOL_REGISTRY = {
|
|
|
54
58
|
category: "intelligence",
|
|
55
59
|
tags: ["ecosystem", "news", "hacker-news", "live"],
|
|
56
60
|
standalone: true,
|
|
61
|
+
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
57
62
|
},
|
|
58
63
|
get_context: {
|
|
59
64
|
summary: "What 4DA knows about the user: role, tech stack, interests, and learned affinities. Call FIRST when you need to know what the user works on before answering or recommending.",
|
|
@@ -61,6 +66,7 @@ export const TOOL_REGISTRY = {
|
|
|
61
66
|
category: "intelligence",
|
|
62
67
|
tags: ["context", "interests", "tech-stack", "profile"],
|
|
63
68
|
standalone: true,
|
|
69
|
+
annotations: { readOnlyHint: true, openWorldHint: false },
|
|
64
70
|
},
|
|
65
71
|
get_relevant_content: {
|
|
66
72
|
summary: "The user's personalized feed: articles, advisories, releases scored by relevance to their stack. Call when the user asks what to read, what is relevant to them, or for content on a topic.",
|
|
@@ -68,6 +74,7 @@ export const TOOL_REGISTRY = {
|
|
|
68
74
|
category: "intelligence",
|
|
69
75
|
tags: ["content", "feed", "relevance", "filter"],
|
|
70
76
|
standalone: false,
|
|
77
|
+
annotations: { readOnlyHint: true, openWorldHint: false },
|
|
71
78
|
},
|
|
72
79
|
get_actionable_signals: {
|
|
73
80
|
summary: "Classify content into prioritized signals (security_alert, breaking_change, tool_discovery, tech_trend, learning, competitive_intel). Call when the user wants what is urgent or actionable, not just relevant.",
|
|
@@ -75,6 +82,7 @@ export const TOOL_REGISTRY = {
|
|
|
75
82
|
category: "intelligence",
|
|
76
83
|
tags: ["signals", "priority", "actionable", "classification"],
|
|
77
84
|
standalone: false,
|
|
85
|
+
annotations: { readOnlyHint: true, openWorldHint: false },
|
|
78
86
|
},
|
|
79
87
|
knowledge_gaps: {
|
|
80
88
|
summary: "Dependencies the user relies on but never reads about, where a CVE or breaking change could surprise them. Call when the user asks what they are missing or where their blind spots are.",
|
|
@@ -82,6 +90,7 @@ export const TOOL_REGISTRY = {
|
|
|
82
90
|
category: "intelligence",
|
|
83
91
|
tags: ["gaps", "dependencies", "knowledge", "blind-spots"],
|
|
84
92
|
standalone: false,
|
|
93
|
+
annotations: { readOnlyHint: true, openWorldHint: false },
|
|
85
94
|
},
|
|
86
95
|
record_feedback: {
|
|
87
96
|
summary: "Record click/save/dismiss on a content item to sharpen future scoring. Call AFTER the user reacts to a surfaced item (opens, saves, or dismisses it).",
|
|
@@ -89,6 +98,7 @@ export const TOOL_REGISTRY = {
|
|
|
89
98
|
category: "intelligence",
|
|
90
99
|
tags: ["feedback", "learning", "save", "dismiss"],
|
|
91
100
|
standalone: false,
|
|
101
|
+
annotations: { readOnlyHint: false, openWorldHint: false, destructiveHint: false, idempotentHint: false },
|
|
92
102
|
},
|
|
93
103
|
// --- Decisions (standalone) ---
|
|
94
104
|
decision_memory: {
|
|
@@ -97,6 +107,7 @@ export const TOOL_REGISTRY = {
|
|
|
97
107
|
category: "decisions",
|
|
98
108
|
tags: ["decisions", "memory", "record", "architecture"],
|
|
99
109
|
standalone: true,
|
|
110
|
+
annotations: { readOnlyHint: false, openWorldHint: false, destructiveHint: false, idempotentHint: false },
|
|
100
111
|
},
|
|
101
112
|
check_decision_alignment: {
|
|
102
113
|
summary: "Check whether a technology or pattern aligns with the developer's recorded decisions. Call BEFORE suggesting a major tech change, new library, or architecture shift.",
|
|
@@ -104,6 +115,7 @@ export const TOOL_REGISTRY = {
|
|
|
104
115
|
category: "decisions",
|
|
105
116
|
tags: ["alignment", "decisions", "enforcement", "check"],
|
|
106
117
|
standalone: true,
|
|
118
|
+
annotations: { readOnlyHint: true, openWorldHint: false },
|
|
107
119
|
},
|
|
108
120
|
// --- Agent (standalone) ---
|
|
109
121
|
agent_memory: {
|
|
@@ -112,6 +124,7 @@ export const TOOL_REGISTRY = {
|
|
|
112
124
|
category: "agent",
|
|
113
125
|
tags: ["agent", "memory", "persistent", "cross-session"],
|
|
114
126
|
standalone: true,
|
|
127
|
+
annotations: { readOnlyHint: false, openWorldHint: false, destructiveHint: false, idempotentHint: false },
|
|
115
128
|
},
|
|
116
129
|
// --- Identity (full-mode) ---
|
|
117
130
|
developer_dna: {
|
|
@@ -120,6 +133,7 @@ export const TOOL_REGISTRY = {
|
|
|
120
133
|
category: "identity",
|
|
121
134
|
tags: ["identity", "dna", "profile", "tech-stack", "export"],
|
|
122
135
|
standalone: false,
|
|
136
|
+
annotations: { readOnlyHint: true, openWorldHint: false },
|
|
123
137
|
},
|
|
124
138
|
};
|
|
125
139
|
/**
|
|
@@ -133,6 +147,7 @@ export function getSlimToolList(standaloneOnly) {
|
|
|
133
147
|
name,
|
|
134
148
|
description: info.summary,
|
|
135
149
|
inputSchema: { type: "object" },
|
|
150
|
+
annotations: info.annotations,
|
|
136
151
|
}));
|
|
137
152
|
}
|
|
138
153
|
/**
|
package/dist/setup.js
CHANGED
|
@@ -158,7 +158,7 @@ export function runSetup(dryRun = false) {
|
|
|
158
158
|
console.log("");
|
|
159
159
|
console.log(" Note: This server reads data from the 4DA desktop app.");
|
|
160
160
|
console.log(" If you haven't installed it yet:");
|
|
161
|
-
console.log(" https://github.com/
|
|
161
|
+
console.log(" https://github.com/4DA-Systems/4DA/releases/latest");
|
|
162
162
|
console.log("");
|
|
163
163
|
console.log(" Run: npx @4da/mcp-server --doctor to verify everything works.\n");
|
|
164
164
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@4da/mcp-server",
|
|
3
|
-
"version": "4.6.
|
|
4
|
-
"mcpName": "io.github.
|
|
3
|
+
"version": "4.6.4",
|
|
4
|
+
"mcpName": "io.github.4da-systems/4da-mcp-server",
|
|
5
5
|
"description": "Dependency intelligence for AI coding agents. Live CVE scanning, dependency health, upgrade planning, ecosystem news, decision memory — zero config, privacy-first. 9 tools standalone, 14 total with desktop app.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
|
@@ -18,17 +18,6 @@
|
|
|
18
18
|
"README.md",
|
|
19
19
|
"LICENSE"
|
|
20
20
|
],
|
|
21
|
-
"scripts": {
|
|
22
|
-
"build": "tsc && pnpm run copy-schemas",
|
|
23
|
-
"copy-schemas": "node -e \"const fs=require('fs');const path=require('path');const src='src/schemas';const dst='dist/schemas';if(!fs.existsSync(dst))fs.mkdirSync(dst,{recursive:true});fs.readdirSync(src).filter(f=>f.endsWith('.json')).forEach(f=>fs.copyFileSync(path.join(src,f),path.join(dst,f)))\"",
|
|
24
|
-
"dev": "tsc --watch",
|
|
25
|
-
"start": "node dist/index.js",
|
|
26
|
-
"inspect": "npx @modelcontextprotocol/inspector node dist/index.js",
|
|
27
|
-
"setup": "node dist/setup.js",
|
|
28
|
-
"test": "vitest run",
|
|
29
|
-
"test:watch": "vitest",
|
|
30
|
-
"prepublishOnly": "pnpm run build"
|
|
31
|
-
},
|
|
32
21
|
"keywords": [
|
|
33
22
|
"mcp",
|
|
34
23
|
"mcp-server",
|
|
@@ -72,12 +61,12 @@
|
|
|
72
61
|
"license": "Apache-2.0",
|
|
73
62
|
"repository": {
|
|
74
63
|
"type": "git",
|
|
75
|
-
"url": "git+https://github.com/
|
|
64
|
+
"url": "git+https://github.com/4DA-Systems/4DA.git",
|
|
76
65
|
"directory": "mcp-4da-server"
|
|
77
66
|
},
|
|
78
67
|
"homepage": "https://4da.ai",
|
|
79
68
|
"bugs": {
|
|
80
|
-
"url": "https://github.com/
|
|
69
|
+
"url": "https://github.com/4DA-Systems/4DA/issues"
|
|
81
70
|
},
|
|
82
71
|
"dependencies": {
|
|
83
72
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
@@ -93,16 +82,14 @@
|
|
|
93
82
|
"engines": {
|
|
94
83
|
"node": ">=18.0.0"
|
|
95
84
|
},
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
"
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
"esbuild": ">=0.28.1"
|
|
106
|
-
}
|
|
85
|
+
"scripts": {
|
|
86
|
+
"build": "tsc && pnpm run copy-schemas",
|
|
87
|
+
"copy-schemas": "node -e \"const fs=require('fs');const path=require('path');const src='src/schemas';const dst='dist/schemas';if(!fs.existsSync(dst))fs.mkdirSync(dst,{recursive:true});fs.readdirSync(src).filter(f=>f.endsWith('.json')).forEach(f=>fs.copyFileSync(path.join(src,f),path.join(dst,f)))\"",
|
|
88
|
+
"dev": "tsc --watch",
|
|
89
|
+
"start": "node dist/index.js",
|
|
90
|
+
"inspect": "npx @modelcontextprotocol/inspector node dist/index.js",
|
|
91
|
+
"setup": "node dist/setup.js",
|
|
92
|
+
"test": "vitest run",
|
|
93
|
+
"test:watch": "vitest"
|
|
107
94
|
}
|
|
108
|
-
}
|
|
95
|
+
}
|