@infinitedusky/indusk-mcp 1.4.3 → 1.4.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/dist/bin/commands/init.js +38 -0
- package/package.json +1 -1
|
@@ -267,6 +267,44 @@ export async function init(projectRoot, options = {}) {
|
|
|
267
267
|
console.info(` ${ext.manifest.name}: ${result.slice(0, 100)}`);
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
|
+
// Print expected .mcp.json config for extensions with mcp_server
|
|
271
|
+
if (ext.manifest.mcp_server) {
|
|
272
|
+
const mcpJsonPath = join(projectRoot, ".mcp.json");
|
|
273
|
+
let hasMcpEntry = false;
|
|
274
|
+
if (existsSync(mcpJsonPath)) {
|
|
275
|
+
try {
|
|
276
|
+
const mcpConfig = JSON.parse(readFileSync(mcpJsonPath, "utf-8"));
|
|
277
|
+
hasMcpEntry = !!mcpConfig?.mcpServers?.[ext.manifest.name];
|
|
278
|
+
}
|
|
279
|
+
catch { }
|
|
280
|
+
}
|
|
281
|
+
if (!hasMcpEntry) {
|
|
282
|
+
const srv = ext.manifest.mcp_server;
|
|
283
|
+
const config = {};
|
|
284
|
+
if (srv.type)
|
|
285
|
+
config.type = srv.type;
|
|
286
|
+
if (srv.url)
|
|
287
|
+
config.url = srv.url;
|
|
288
|
+
if (srv.command)
|
|
289
|
+
config.command = srv.command;
|
|
290
|
+
if (srv.args)
|
|
291
|
+
config.args = srv.args;
|
|
292
|
+
if (srv.headers)
|
|
293
|
+
config.headers = srv.headers;
|
|
294
|
+
if (srv.env)
|
|
295
|
+
config.env = srv.env;
|
|
296
|
+
console.info(`\n ${ext.manifest.name}: add this to .mcp.json:\n`);
|
|
297
|
+
console.info(` "${ext.manifest.name}": ${JSON.stringify(config, null, " ")}\n`);
|
|
298
|
+
if (srv.setup_instructions) {
|
|
299
|
+
for (const instruction of srv.setup_instructions) {
|
|
300
|
+
console.info(` ${instruction}`);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
else {
|
|
305
|
+
console.info(` ${ext.manifest.name}: .mcp.json entry exists`);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
270
308
|
}
|
|
271
309
|
if (enabledExts.length === 0) {
|
|
272
310
|
console.info(" no extensions enabled — run 'extensions enable' to add tool integrations");
|