sdd-mcp-server 1.1.18 → 1.1.19
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/debug-mcp-server.js +109 -0
- package/mcp-server.js +0 -0
- package/package.json +3 -2
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// Debug version - logs errors to file to see what's failing in npx
|
|
4
|
+
import fs from 'fs';
|
|
5
|
+
|
|
6
|
+
const logError = (msg, error) => {
|
|
7
|
+
const timestamp = new Date().toISOString();
|
|
8
|
+
const logEntry = `[${timestamp}] ${msg}: ${error?.message || error}\n${error?.stack || ''}\n\n`;
|
|
9
|
+
fs.appendFileSync('/tmp/sdd-mcp-debug.log', logEntry);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
// Still silence normal output but capture errors
|
|
13
|
+
console.log = () => {};
|
|
14
|
+
console.info = () => {};
|
|
15
|
+
console.warn = () => {};
|
|
16
|
+
console.debug = () => {};
|
|
17
|
+
console.error = (msg, ...args) => logError('CONSOLE_ERROR', msg + ' ' + args.join(' '));
|
|
18
|
+
|
|
19
|
+
try {
|
|
20
|
+
logError('DEBUG_START', 'Starting MCP server');
|
|
21
|
+
|
|
22
|
+
const { Server } = await import('@modelcontextprotocol/sdk/server/index.js');
|
|
23
|
+
const { StdioServerTransport } = await import('@modelcontextprotocol/sdk/server/stdio.js');
|
|
24
|
+
const {
|
|
25
|
+
ListToolsRequestSchema,
|
|
26
|
+
CallToolRequestSchema,
|
|
27
|
+
InitializedNotificationSchema
|
|
28
|
+
} = await import('@modelcontextprotocol/sdk/types.js');
|
|
29
|
+
|
|
30
|
+
logError('DEBUG_IMPORTS', 'All imports successful');
|
|
31
|
+
|
|
32
|
+
const server = new Server({
|
|
33
|
+
name: 'sdd-mcp-server',
|
|
34
|
+
version: '1.1.19'
|
|
35
|
+
}, {
|
|
36
|
+
capabilities: {
|
|
37
|
+
tools: {}
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
logError('DEBUG_SERVER', 'Server created');
|
|
42
|
+
|
|
43
|
+
// Add basic SDD tools
|
|
44
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
45
|
+
return {
|
|
46
|
+
tools: [
|
|
47
|
+
{
|
|
48
|
+
name: 'sdd-init',
|
|
49
|
+
description: 'Initialize a new SDD project',
|
|
50
|
+
inputSchema: {
|
|
51
|
+
type: 'object',
|
|
52
|
+
properties: {
|
|
53
|
+
projectName: { type: 'string' },
|
|
54
|
+
description: { type: 'string' }
|
|
55
|
+
},
|
|
56
|
+
required: ['projectName']
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'sdd-status',
|
|
61
|
+
description: 'Get current SDD project status',
|
|
62
|
+
inputSchema: {
|
|
63
|
+
type: 'object',
|
|
64
|
+
properties: {}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
};
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
72
|
+
const { name, arguments: args } = request.params;
|
|
73
|
+
|
|
74
|
+
switch (name) {
|
|
75
|
+
case 'sdd-init':
|
|
76
|
+
return {
|
|
77
|
+
content: [{
|
|
78
|
+
type: 'text',
|
|
79
|
+
text: `SDD project "${args?.projectName}" initialization would begin here. (Debug mode)`
|
|
80
|
+
}]
|
|
81
|
+
};
|
|
82
|
+
case 'sdd-status':
|
|
83
|
+
return {
|
|
84
|
+
content: [{
|
|
85
|
+
type: 'text',
|
|
86
|
+
text: 'SDD project status: No active project found. Use sdd-init to create a new project.'
|
|
87
|
+
}]
|
|
88
|
+
};
|
|
89
|
+
default:
|
|
90
|
+
throw new Error(`Unknown tool: ${name}`);
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
server.setNotificationHandler(InitializedNotificationSchema, async () => {
|
|
95
|
+
logError('DEBUG_INITIALIZED', 'Server initialized');
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
logError('DEBUG_TRANSPORT', 'Creating transport');
|
|
99
|
+
const transport = new StdioServerTransport();
|
|
100
|
+
|
|
101
|
+
logError('DEBUG_CONNECT', 'Connecting server');
|
|
102
|
+
await server.connect(transport);
|
|
103
|
+
|
|
104
|
+
logError('DEBUG_SUCCESS', 'Server connected successfully');
|
|
105
|
+
|
|
106
|
+
} catch (error) {
|
|
107
|
+
logError('DEBUG_ERROR', error);
|
|
108
|
+
process.exit(1);
|
|
109
|
+
}
|
package/mcp-server.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sdd-mcp-server",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.19",
|
|
4
4
|
"description": "MCP server for spec-driven development workflows across AI-agent CLIs and IDEs",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
7
|
-
"sdd-mcp-server": "mcp-server.js",
|
|
7
|
+
"sdd-mcp-server": "debug-mcp-server.js",
|
|
8
8
|
"sdd-mcp": "dist/index.js"
|
|
9
9
|
},
|
|
10
10
|
"type": "module",
|
|
11
11
|
"files": [
|
|
12
12
|
"dist/**/*",
|
|
13
13
|
"mcp-server.js",
|
|
14
|
+
"debug-mcp-server.js",
|
|
14
15
|
"README.md",
|
|
15
16
|
"LICENSE",
|
|
16
17
|
"package.json"
|