claude-autopm 1.14.0 → 1.14.1
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/bin/commands/config.js +19 -21
- package/package.json +1 -1
- package/scripts/mcp-handler.js +1 -1
package/bin/commands/config.js
CHANGED
|
@@ -104,30 +104,28 @@ class ConfigCommand {
|
|
|
104
104
|
|
|
105
105
|
console.log('│ │');
|
|
106
106
|
|
|
107
|
-
// MCP Configuration - check
|
|
107
|
+
// MCP Configuration - check actual .md files in project
|
|
108
108
|
const mcpActiveServers = config.mcp?.activeServers || [];
|
|
109
|
-
let
|
|
110
|
-
|
|
111
|
-
//
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
// Ignore error
|
|
120
|
-
}
|
|
109
|
+
let mcpAvailableServers = 0;
|
|
110
|
+
|
|
111
|
+
// Count actual server definition files (.md) in .claude/mcp/
|
|
112
|
+
const mcpDir = path.join(process.cwd(), '.claude', 'mcp');
|
|
113
|
+
if (await fs.pathExists(mcpDir)) {
|
|
114
|
+
try {
|
|
115
|
+
const files = await fs.readdir(mcpDir);
|
|
116
|
+
mcpAvailableServers = files.filter(f => f.endsWith('.md') && f !== 'MCP-REGISTRY.md').length;
|
|
117
|
+
} catch (error) {
|
|
118
|
+
// Ignore error
|
|
121
119
|
}
|
|
122
120
|
}
|
|
123
121
|
|
|
124
122
|
let mcpStatus;
|
|
125
123
|
if (mcpActiveServers.length > 0) {
|
|
126
|
-
mcpStatus = `✅ ${mcpActiveServers.length} active`;
|
|
127
|
-
} else if (
|
|
128
|
-
mcpStatus = `⚠️ ${
|
|
124
|
+
mcpStatus = `✅ ${mcpActiveServers.length} active (${mcpAvailableServers} total)`;
|
|
125
|
+
} else if (mcpAvailableServers > 0) {
|
|
126
|
+
mcpStatus = `⚠️ ${mcpAvailableServers} available, 0 active`;
|
|
129
127
|
} else {
|
|
130
|
-
mcpStatus = '
|
|
128
|
+
mcpStatus = '⚪ No servers installed';
|
|
131
129
|
}
|
|
132
130
|
console.log(`│ MCP: ${this.padRight(mcpStatus, 22)} │`);
|
|
133
131
|
|
|
@@ -211,17 +209,17 @@ class ConfigCommand {
|
|
|
211
209
|
}
|
|
212
210
|
|
|
213
211
|
if (mcpActiveServers.length === 0) {
|
|
214
|
-
if (
|
|
212
|
+
if (mcpAvailableServers > 0) {
|
|
215
213
|
issues.push({
|
|
216
214
|
icon: 'ℹ️',
|
|
217
|
-
problem: `${
|
|
215
|
+
problem: `${mcpAvailableServers} MCP server(s) available but not active`,
|
|
218
216
|
solution: 'Run: autopm mcp list (then: autopm mcp enable <server>)'
|
|
219
217
|
});
|
|
220
218
|
} else {
|
|
221
219
|
issues.push({
|
|
222
220
|
icon: 'ℹ️',
|
|
223
|
-
problem: 'No MCP servers
|
|
224
|
-
solution: '
|
|
221
|
+
problem: 'No MCP servers installed',
|
|
222
|
+
solution: 'Add servers from examples: cp .claude/examples/mcp/*.md .claude/mcp/'
|
|
225
223
|
});
|
|
226
224
|
}
|
|
227
225
|
}
|
package/package.json
CHANGED
package/scripts/mcp-handler.js
CHANGED
|
@@ -47,7 +47,7 @@ class MCPHandler {
|
|
|
47
47
|
constructor() {
|
|
48
48
|
this.projectRoot = process.cwd();
|
|
49
49
|
this.frameworkRoot = path.join(__dirname, '..');
|
|
50
|
-
this.mcpDir = path.join(this.
|
|
50
|
+
this.mcpDir = path.join(this.projectRoot, '.claude', 'mcp');
|
|
51
51
|
this.configPath = path.join(this.projectRoot, '.claude', 'config.json');
|
|
52
52
|
this.mcpServersPath = path.join(this.projectRoot, '.claude', 'mcp-servers.json');
|
|
53
53
|
this.envPath = path.join(this.projectRoot, '.claude', '.env');
|