sdd-mcp-server 1.1.18 → 1.1.20
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/fixed-mcp-server.js +44 -0
- package/mcp-server.js +0 -0
- package/package.json +4 -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
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
|
|
6
|
+
const server = new McpServer({
|
|
7
|
+
name: 'sdd-mcp-server',
|
|
8
|
+
version: '1.1.20'
|
|
9
|
+
}, {
|
|
10
|
+
instructions: 'Use this server for spec-driven development workflows'
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
// Register SDD tools
|
|
14
|
+
server.registerTool("sdd-init", {
|
|
15
|
+
title: "Initialize SDD Project",
|
|
16
|
+
description: "Initialize a new SDD project",
|
|
17
|
+
inputSchema: {
|
|
18
|
+
projectName: z.string().describe('The name of the project to initialize'),
|
|
19
|
+
description: z.string().optional().describe('Optional project description')
|
|
20
|
+
},
|
|
21
|
+
}, async ({ projectName, description }) => {
|
|
22
|
+
return {
|
|
23
|
+
content: [{
|
|
24
|
+
type: 'text',
|
|
25
|
+
text: `SDD project "${projectName}" initialization would begin here.${description ? ` Description: ${description}` : ''}`
|
|
26
|
+
}]
|
|
27
|
+
};
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
server.registerTool("sdd-status", {
|
|
31
|
+
title: "Get SDD Project Status",
|
|
32
|
+
description: "Get current SDD project status",
|
|
33
|
+
inputSchema: {},
|
|
34
|
+
}, async () => {
|
|
35
|
+
return {
|
|
36
|
+
content: [{
|
|
37
|
+
type: 'text',
|
|
38
|
+
text: 'SDD project status: No active project found. Use sdd-init to create a new project.'
|
|
39
|
+
}]
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
const transport = new StdioServerTransport();
|
|
44
|
+
await server.connect(transport);
|
package/mcp-server.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sdd-mcp-server",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.20",
|
|
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": "fixed-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",
|
|
15
|
+
"fixed-mcp-server.js",
|
|
14
16
|
"README.md",
|
|
15
17
|
"LICENSE",
|
|
16
18
|
"package.json"
|