sdd-mcp-server 1.1.19 → 1.1.21
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/minimal-working-server.js +66 -0
- package/package.json +3 -4
- package/debug-mcp-server.js +0 -109
- package/mcp-server.js +0 -86
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
|
+
|
|
5
|
+
function createServerInstance() {
|
|
6
|
+
const server = new McpServer({
|
|
7
|
+
name: "sdd-mcp-server",
|
|
8
|
+
version: "1.1.21",
|
|
9
|
+
}, {
|
|
10
|
+
instructions: "Use this server for spec-driven development workflows across AI-agent CLIs and IDEs.",
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
// Register SDD tools exactly like context7 does
|
|
14
|
+
server.registerTool("sdd-init", {
|
|
15
|
+
title: "Initialize SDD Project",
|
|
16
|
+
description: "Initialize a new SDD project",
|
|
17
|
+
inputSchema: {
|
|
18
|
+
projectName: {
|
|
19
|
+
type: "string",
|
|
20
|
+
description: "The name of the project to initialize"
|
|
21
|
+
},
|
|
22
|
+
description: {
|
|
23
|
+
type: "string",
|
|
24
|
+
description: "Optional project description"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
}, async ({ projectName, description }) => {
|
|
28
|
+
return {
|
|
29
|
+
content: [
|
|
30
|
+
{
|
|
31
|
+
type: "text",
|
|
32
|
+
text: `SDD project "${projectName}" initialization would begin here.${description ? ` Description: ${description}` : ''}`
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
};
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
server.registerTool("sdd-status", {
|
|
39
|
+
title: "Get SDD Project Status",
|
|
40
|
+
description: "Get current SDD project status",
|
|
41
|
+
inputSchema: {},
|
|
42
|
+
}, async () => {
|
|
43
|
+
return {
|
|
44
|
+
content: [
|
|
45
|
+
{
|
|
46
|
+
type: "text",
|
|
47
|
+
text: "SDD project status: No active project found. Use sdd-init to create a new project."
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
};
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
return server;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
async function main() {
|
|
57
|
+
const server = createServerInstance();
|
|
58
|
+
const transport = new StdioServerTransport();
|
|
59
|
+
await server.connect(transport);
|
|
60
|
+
console.error("SDD MCP Server running on stdio");
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
main().catch((error) => {
|
|
64
|
+
console.error("SDD MCP Server failed to start:", error);
|
|
65
|
+
process.exit(1);
|
|
66
|
+
});
|
package/package.json
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sdd-mcp-server",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.21",
|
|
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": "
|
|
7
|
+
"sdd-mcp-server": "minimal-working-server.js",
|
|
8
8
|
"sdd-mcp": "dist/index.js"
|
|
9
9
|
},
|
|
10
10
|
"type": "module",
|
|
11
11
|
"files": [
|
|
12
12
|
"dist/**/*",
|
|
13
|
-
"
|
|
14
|
-
"debug-mcp-server.js",
|
|
13
|
+
"minimal-working-server.js",
|
|
15
14
|
"README.md",
|
|
16
15
|
"LICENSE",
|
|
17
16
|
"package.json"
|
package/debug-mcp-server.js
DELETED
|
@@ -1,109 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
// Fast startup MCP server - optimized for Claude Code health checks
|
|
4
|
-
|
|
5
|
-
// Silence console output immediately
|
|
6
|
-
console.log = () => {};
|
|
7
|
-
console.info = () => {};
|
|
8
|
-
console.warn = () => {};
|
|
9
|
-
console.debug = () => {};
|
|
10
|
-
console.error = () => {};
|
|
11
|
-
|
|
12
|
-
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
13
|
-
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
14
|
-
import {
|
|
15
|
-
ListToolsRequestSchema,
|
|
16
|
-
CallToolRequestSchema,
|
|
17
|
-
InitializedNotificationSchema
|
|
18
|
-
} from '@modelcontextprotocol/sdk/types.js';
|
|
19
|
-
|
|
20
|
-
const server = new Server({
|
|
21
|
-
name: 'sdd-mcp-server',
|
|
22
|
-
version: '1.1.18'
|
|
23
|
-
}, {
|
|
24
|
-
capabilities: {
|
|
25
|
-
tools: {}
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
// Add basic SDD tools
|
|
30
|
-
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
31
|
-
return {
|
|
32
|
-
tools: [
|
|
33
|
-
{
|
|
34
|
-
name: 'sdd-init',
|
|
35
|
-
description: 'Initialize a new SDD project',
|
|
36
|
-
inputSchema: {
|
|
37
|
-
type: 'object',
|
|
38
|
-
properties: {
|
|
39
|
-
projectName: { type: 'string' },
|
|
40
|
-
description: { type: 'string' }
|
|
41
|
-
},
|
|
42
|
-
required: ['projectName']
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
name: 'sdd-status',
|
|
47
|
-
description: 'Get current SDD project status',
|
|
48
|
-
inputSchema: {
|
|
49
|
-
type: 'object',
|
|
50
|
-
properties: {}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
]
|
|
54
|
-
};
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
58
|
-
const { name, arguments: args } = request.params;
|
|
59
|
-
|
|
60
|
-
switch (name) {
|
|
61
|
-
case 'sdd-init':
|
|
62
|
-
return {
|
|
63
|
-
content: [{
|
|
64
|
-
type: 'text',
|
|
65
|
-
text: `SDD project "${args?.projectName}" initialization would begin here. (Simplified MCP mode)`
|
|
66
|
-
}]
|
|
67
|
-
};
|
|
68
|
-
case 'sdd-status':
|
|
69
|
-
return {
|
|
70
|
-
content: [{
|
|
71
|
-
type: 'text',
|
|
72
|
-
text: 'SDD project status: No active project found. Use sdd-init to create a new project.'
|
|
73
|
-
}]
|
|
74
|
-
};
|
|
75
|
-
default:
|
|
76
|
-
throw new Error(`Unknown tool: ${name}`);
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
// Handle initialized notification
|
|
81
|
-
server.setNotificationHandler(InitializedNotificationSchema, async () => {
|
|
82
|
-
// Client has completed initialization - server is ready
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
const transport = new StdioServerTransport();
|
|
86
|
-
await server.connect(transport);
|