superkit-mcp-server 1.2.3 → 1.2.5

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/build/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
3
3
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
- import { CallToolRequestSchema, ListToolsRequestSchema, ListPromptsRequestSchema, GetPromptRequestSchema } from "@modelcontextprotocol/sdk/types.js";
4
+ import { CallToolRequestSchema, ListToolsRequestSchema, ListPromptsRequestSchema, GetPromptRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
5
5
  import * as path from "path";
6
6
  import * as fs from "fs/promises";
7
7
  import * as toml from "@iarna/toml";
@@ -11,11 +11,11 @@ import { manageSession } from "./tools/sessionManager.js";
11
11
  import { runChecklist } from "./tools/checklist.js";
12
12
  import { runVerifyAll } from "./tools/verifyAll.js";
13
13
  import { logSkill, logWorkflow, rotateLogs } from "./tools/loggerTools.js";
14
- import { getNextTodoId, createTodo, startTodo, doneTodo, completeTodo } from "./tools/todoTools.js";
15
- import { compoundSearch, updateSolutionRef, validateCompound, auditStateDrift, suggestSkills, compoundHealth, compoundDashboard, compoundMetrics } from "./tools/compoundTools.js";
16
- import { bootstrapFolderDocs, checkDocsFreshness, discoverUndocumentedFolders, validateFolderDocs } from "./tools/docsTools.js";
17
- import { generateChangelog, validateChangelog, archiveCompleted, prePushHousekeeping } from "./tools/gitTools.js";
18
- import { validateSpecConsistency, completePlan, validateArchitecture, syncSpec, updateSpecPhase } from "./tools/archTools.js";
14
+ import { getNextTodoId, createTodo, startTodo, doneTodo, completeTodo, } from "./tools/todoTools.js";
15
+ import { compoundSearch, updateSolutionRef, validateCompound, auditStateDrift, suggestSkills, compoundHealth, compoundDashboard, compoundMetrics, } from "./tools/compoundTools.js";
16
+ import { bootstrapFolderDocs, checkDocsFreshness, discoverUndocumentedFolders, validateFolderDocs, } from "./tools/docsTools.js";
17
+ import { generateChangelog, validateChangelog, archiveCompleted, prePushHousekeeping, } from "./tools/gitTools.js";
18
+ import { validateSpecConsistency, completePlan, validateArchitecture, syncSpec, updateSpecPhase, } from "./tools/archTools.js";
19
19
  const __filename = fileURLToPath(import.meta.url);
20
20
  const __dirname = path.dirname(__filename);
21
21
  const superKitRoot = path.resolve(__dirname, "../");
@@ -32,7 +32,7 @@ const server = new Server({
32
32
  async function listDirectorySafe(dirPath) {
33
33
  try {
34
34
  const entries = await fs.readdir(dirPath, { withFileTypes: true });
35
- return entries.map((entry) => (entry.isDirectory() ? `${entry.name}/` : entry.name));
35
+ return entries.map((entry) => entry.isDirectory() ? `${entry.name}/` : entry.name);
36
36
  }
37
37
  catch (err) {
38
38
  return [];
@@ -56,10 +56,10 @@ const TOOLS = [
56
56
  type: "object",
57
57
  properties: {
58
58
  action: { type: "string", enum: ["start", "stop", "status"] },
59
- port: { type: "number", default: 3000 }
59
+ port: { type: "number", default: 3000 },
60
60
  },
61
61
  required: ["action"],
62
- }
62
+ },
63
63
  },
64
64
  {
65
65
  name: "call_tool_session_manager",
@@ -68,10 +68,10 @@ const TOOLS = [
68
68
  type: "object",
69
69
  properties: {
70
70
  command: { type: "string", enum: ["status", "info"] },
71
- path: { type: "string", default: "." }
71
+ path: { type: "string", default: "." },
72
72
  },
73
73
  required: ["command"],
74
- }
74
+ },
75
75
  },
76
76
  {
77
77
  name: "call_tool_checklist",
@@ -81,10 +81,10 @@ const TOOLS = [
81
81
  properties: {
82
82
  projectPath: { type: "string", default: "." },
83
83
  url: { type: "string" },
84
- skipPerformance: { type: "boolean", default: false }
84
+ skipPerformance: { type: "boolean", default: false },
85
85
  },
86
- required: ["projectPath"]
87
- }
86
+ required: ["projectPath"],
87
+ },
88
88
  },
89
89
  {
90
90
  name: "call_tool_verify_all",
@@ -95,10 +95,10 @@ const TOOLS = [
95
95
  projectPath: { type: "string", default: "." },
96
96
  url: { type: "string" },
97
97
  skipE2E: { type: "boolean", default: false },
98
- stopOnFail: { type: "boolean", default: false }
98
+ stopOnFail: { type: "boolean", default: false },
99
99
  },
100
- required: ["projectPath", "url"]
101
- }
100
+ required: ["projectPath", "url"],
101
+ },
102
102
  },
103
103
  {
104
104
  name: "call_tool_logger_manager",
@@ -106,13 +106,16 @@ const TOOLS = [
106
106
  inputSchema: {
107
107
  type: "object",
108
108
  properties: {
109
- action: { type: "string", enum: ["logSkill", "logWorkflow", "rotateLogs"] },
109
+ action: {
110
+ type: "string",
111
+ enum: ["logSkill", "logWorkflow", "rotateLogs"],
112
+ },
110
113
  name: { type: "string" },
111
114
  outcome: { type: "string" },
112
- projectPath: { type: "string", default: "." }
115
+ projectPath: { type: "string", default: "." },
113
116
  },
114
- required: ["action", "projectPath"]
115
- }
117
+ required: ["action", "projectPath"],
118
+ },
116
119
  },
117
120
  {
118
121
  name: "call_tool_todo_manager",
@@ -120,16 +123,20 @@ const TOOLS = [
120
123
  inputSchema: {
121
124
  type: "object",
122
125
  properties: {
123
- action: { type: "string", enum: ["nextId", "create", "start", "done", "complete"] },
126
+ action: {
127
+ type: "string",
128
+ enum: ["nextId", "create", "start", "done", "complete"],
129
+ },
124
130
  title: { type: "string" },
125
131
  description: { type: "string" },
126
- priority: { type: "number" },
132
+ priority: { type: "string" },
133
+ criteria: { type: "array", items: { type: "string" } },
127
134
  todoId: { type: "string" },
128
135
  force: { type: "boolean", default: false },
129
- projectPath: { type: "string", default: "." }
136
+ projectPath: { type: "string", default: "." },
130
137
  },
131
- required: ["action", "projectPath"]
132
- }
138
+ required: ["action", "projectPath"],
139
+ },
133
140
  },
134
141
  {
135
142
  name: "call_tool_compound_manager",
@@ -137,15 +144,27 @@ const TOOLS = [
137
144
  inputSchema: {
138
145
  type: "object",
139
146
  properties: {
140
- action: { type: "string", enum: ["search", "updateRef", "validate", "auditDrift", "suggestSkills", "health", "dashboard", "metrics"] },
147
+ action: {
148
+ type: "string",
149
+ enum: [
150
+ "search",
151
+ "updateRef",
152
+ "validate",
153
+ "auditDrift",
154
+ "suggestSkills",
155
+ "health",
156
+ "dashboard",
157
+ "metrics",
158
+ ],
159
+ },
141
160
  terms: { type: "array", items: { type: "string" } },
142
161
  files: { type: "array", items: { type: "string" } },
143
162
  fix: { type: "boolean", default: false },
144
163
  force: { type: "boolean", default: false },
145
- projectPath: { type: "string", default: "." }
164
+ projectPath: { type: "string", default: "." },
146
165
  },
147
- required: ["action", "projectPath"]
148
- }
166
+ required: ["action", "projectPath"],
167
+ },
149
168
  },
150
169
  {
151
170
  name: "call_tool_docs_manager",
@@ -153,15 +172,18 @@ const TOOLS = [
153
172
  inputSchema: {
154
173
  type: "object",
155
174
  properties: {
156
- action: { type: "string", enum: ["bootstrap", "freshness", "discover", "validate"] },
175
+ action: {
176
+ type: "string",
177
+ enum: ["bootstrap", "freshness", "discover", "validate"],
178
+ },
157
179
  folder: { type: "string" },
158
180
  skipDocs: { type: "boolean", default: false },
159
181
  strict: { type: "boolean", default: false },
160
182
  targetFolders: { type: "array", items: { type: "string" } },
161
- projectPath: { type: "string", default: "." }
183
+ projectPath: { type: "string", default: "." },
162
184
  },
163
- required: ["action", "projectPath"]
164
- }
185
+ required: ["action", "projectPath"],
186
+ },
165
187
  },
166
188
  {
167
189
  name: "call_tool_git_manager",
@@ -169,12 +191,15 @@ const TOOLS = [
169
191
  inputSchema: {
170
192
  type: "object",
171
193
  properties: {
172
- action: { type: "string", enum: ["changelog", "validateChangelog", "archive", "housekeeping"] },
194
+ action: {
195
+ type: "string",
196
+ enum: ["changelog", "validateChangelog", "archive", "housekeeping"],
197
+ },
173
198
  applyFix: { type: "boolean", default: false },
174
- projectPath: { type: "string", default: "." }
199
+ projectPath: { type: "string", default: "." },
175
200
  },
176
- required: ["action", "projectPath"]
177
- }
201
+ required: ["action", "projectPath"],
202
+ },
178
203
  },
179
204
  {
180
205
  name: "call_tool_arch_manager",
@@ -182,17 +207,26 @@ const TOOLS = [
182
207
  inputSchema: {
183
208
  type: "object",
184
209
  properties: {
185
- action: { type: "string", enum: ["validateSpecs", "completePlan", "validateArch", "syncSpec", "updatePhase"] },
210
+ action: {
211
+ type: "string",
212
+ enum: [
213
+ "validateSpecs",
214
+ "completePlan",
215
+ "validateArch",
216
+ "syncSpec",
217
+ "updatePhase",
218
+ ],
219
+ },
186
220
  planFile: { type: "string" },
187
221
  force: { type: "boolean", default: false },
188
222
  specDir: { type: "string" },
189
223
  specName: { type: "string" },
190
224
  phaseNum: { type: "string" },
191
225
  status: { type: "string" },
192
- projectPath: { type: "string", default: "." }
226
+ projectPath: { type: "string", default: "." },
193
227
  },
194
- required: ["action", "projectPath"]
195
- }
228
+ required: ["action", "projectPath"],
229
+ },
196
230
  },
197
231
  {
198
232
  name: "list_superkit_assets",
@@ -369,7 +403,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
369
403
  if (args.action === "nextId")
370
404
  res = String(await getNextTodoId(args.projectPath));
371
405
  else if (args.action === "create")
372
- res = await createTodo(args.title, args.description, args.priority, args.projectPath);
406
+ res = await createTodo(String(args.priority ?? "p3"), args.title, args.description, args.criteria || [], args.projectPath);
373
407
  else if (args.action === "start")
374
408
  res = await startTodo(args.todoId, args.force, args.projectPath);
375
409
  else if (args.action === "done")
@@ -497,7 +531,14 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
497
531
  const fallbackSafePath = getSafePath(path.join(superKitRoot, "skills"), path.join(args.category, args.skillName));
498
532
  if (fallbackSafePath) {
499
533
  const items = await listDirectorySafe(fallbackSafePath);
500
- return { content: [{ type: "text", text: `SKILL.md not found. Directory contains: ${items.join(', ')}` }] };
534
+ return {
535
+ content: [
536
+ {
537
+ type: "text",
538
+ text: `SKILL.md not found. Directory contains: ${items.join(", ")}`,
539
+ },
540
+ ],
541
+ };
501
542
  }
502
543
  throw e;
503
544
  }
@@ -518,7 +559,9 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
518
559
  }
519
560
  catch (error) {
520
561
  return {
521
- content: [{ type: "text", text: `Error executing tool: ${error.message}` }],
562
+ content: [
563
+ { type: "text", text: `Error executing tool: ${error.message}` },
564
+ ],
522
565
  isError: true,
523
566
  };
524
567
  }
@@ -4,11 +4,18 @@ export async function manageSession(command, rootPath = '.') {
4
4
  const root = path.resolve(rootPath);
5
5
  const pkgPath = path.join(root, 'package.json');
6
6
  const getPackageInfo = async () => {
7
+ let name = root.split(path.sep).pop() || 'unnamed';
8
+ let version = '0.0.0';
9
+ const stack = [];
10
+ let scripts = [];
11
+ // 1. Node.js Check
7
12
  try {
8
13
  const data = await fs.readFile(pkgPath, 'utf8');
9
14
  const pkg = JSON.parse(data);
15
+ name = pkg.name || name;
16
+ version = pkg.version || version;
17
+ scripts = Object.keys(pkg.scripts || {});
10
18
  const allDeps = { ...(pkg.dependencies || {}), ...(pkg.devDependencies || {}) };
11
- const stack = [];
12
19
  if (allDeps['next'])
13
20
  stack.push("Next.js");
14
21
  else if (allDeps['react'])
@@ -27,16 +34,69 @@ export async function manageSession(command, rootPath = '.') {
27
34
  stack.push("Prisma");
28
35
  if (allDeps['typescript'])
29
36
  stack.push("TypeScript");
30
- return {
31
- name: pkg.name || 'unnamed',
32
- version: pkg.version || '0.0.0',
33
- stack,
34
- scripts: Object.keys(pkg.scripts || {})
35
- };
37
+ if (stack.length === 0)
38
+ stack.push("Node.js");
36
39
  }
37
- catch (e) {
38
- return { name: root.split(path.sep).pop() || 'unnamed', version: '0.0.0', stack: ['Generic'], scripts: [] };
40
+ catch { }
41
+ // 2. Polyglot Checks
42
+ try {
43
+ const files = await fs.readdir(root);
44
+ // Python
45
+ if (files.includes('requirements.txt') || files.includes('Pipfile') || files.includes('pyproject.toml')) {
46
+ if (!stack.includes("Python"))
47
+ stack.push("Python");
48
+ if (files.includes('manage.py'))
49
+ stack.push("Django");
50
+ if (files.includes('requirements.txt')) {
51
+ const content = await fs.readFile(path.join(root, 'requirements.txt'), 'utf8');
52
+ if (content.includes('flask'))
53
+ stack.push("Flask");
54
+ if (content.includes('fastapi'))
55
+ stack.push("FastAPI");
56
+ if (content.includes('django') && !stack.includes("Django"))
57
+ stack.push("Django");
58
+ }
59
+ }
60
+ // Go
61
+ if (files.includes('go.mod'))
62
+ stack.push("Go");
63
+ // Rust
64
+ if (files.includes('Cargo.toml'))
65
+ stack.push("Rust");
66
+ // Java / Kotlin
67
+ if (files.includes('pom.xml'))
68
+ stack.push("Java (Maven)");
69
+ if (files.includes('build.gradle') || files.includes('build.gradle.kts'))
70
+ stack.push("Java/Kotlin (Gradle)");
71
+ // PHP
72
+ if (files.includes('composer.json')) {
73
+ if (!stack.includes("PHP"))
74
+ stack.push("PHP");
75
+ try {
76
+ const composer = JSON.parse(await fs.readFile(path.join(root, 'composer.json'), 'utf8'));
77
+ const deps = { ...(composer.require || {}), ...(composer['require-dev'] || {}) };
78
+ if (deps['laravel/framework'])
79
+ stack.push("Laravel");
80
+ if (deps['symfony/framework-bundle'])
81
+ stack.push("Symfony");
82
+ }
83
+ catch { }
84
+ }
85
+ // Infrastructure
86
+ if (files.includes('Dockerfile') || files.includes('docker-compose.yml'))
87
+ stack.push("Docker");
88
+ if (files.some(f => f.endsWith('.tf')))
89
+ stack.push("Terraform");
39
90
  }
91
+ catch { }
92
+ if (stack.length === 0)
93
+ stack.push("Generic");
94
+ return {
95
+ name,
96
+ version,
97
+ stack: Array.from(new Set(stack)),
98
+ scripts
99
+ };
40
100
  };
41
101
  const countFiles = async (dir) => {
42
102
  let count = 0;
@@ -91,7 +151,16 @@ export async function manageSession(command, rootPath = '.') {
91
151
  output += `📁 Project: ${info.name}\n`;
92
152
  output += `📂 Path: ${root}\n`;
93
153
  output += `🏷️ Type: ${info.stack.join(', ')}\n`;
94
- output += `📊 Status: Active\n\n`;
154
+ // Check for active todos to determine status
155
+ let status = 'Idle';
156
+ try {
157
+ const todos = await fs.readdir(path.join(root, 'todos'));
158
+ const hasActive = todos.some(f => f.endsWith('.md') && !f.includes('template') && !f.includes('archive'));
159
+ if (hasActive)
160
+ status = 'Active';
161
+ }
162
+ catch { }
163
+ output += `📊 Status: ${status}\n\n`;
95
164
  output += `🔧 Tech Stack:\n`;
96
165
  for (const tech of info.stack)
97
166
  output += ` • ${tech}\n`;
@@ -1,4 +1,4 @@
1
- description = "Create detailed implementation plans (Planner Agent)"
1
+ description = "Create detailed implementation plans and auto-create a task (Planner Agent)"
2
2
 
3
3
  prompt = """
4
4
  # 📋 PLANNER AGENT
@@ -153,6 +153,40 @@ When fixing complex bugs:
153
153
  ## OUTPUT
154
154
  Save to: `plans/[feature-name]-YYYYMMDD.md`
155
155
 
156
+ ---
157
+
158
+ ## AUTO-TASK CREATION (MANDATORY)
159
+
160
+ After saving the plan file, you **MUST** automatically create a todo task using the `call_tool_todo_manager` tool.
161
+
162
+ **Do NOT ask the user — just do it.**
163
+
164
+ Call the tool with:
165
+ - `action`: `"create"`
166
+ - `title`: The feature/task name from the plan (e.g., `"Add user authentication"`)
167
+ - `description`: A 1-2 sentence summary of what the plan covers
168
+ - `priority`: `"p2"` by default (use `"p1"` for urgent/critical, `"p3"` for low-impact)
169
+ - `criteria`: The top acceptance criteria extracted from the plan (as a string array)
170
+ - `projectPath`: `"."`
171
+
172
+ Example tool call:
173
+ ```json
174
+ {
175
+ "action": "create",
176
+ "title": "Add user authentication",
177
+ "description": "Implement JWT-based authentication with login, logout, and protected routes.",
178
+ "priority": "p2",
179
+ "criteria": [
180
+ "User can log in with email and password",
181
+ "JWT token is issued and stored securely",
182
+ "Protected routes redirect unauthenticated users"
183
+ ],
184
+ "projectPath": "."
185
+ }
186
+ ```
187
+
188
+ After the todo is created, confirm to the user with the todo ID and file path returned by the tool.
189
+
156
190
  ## NEXT STEPS
157
191
  ```bash
158
192
  # Ready? Run:
@@ -165,8 +199,8 @@ Save to: `plans/[feature-name]-YYYYMMDD.md`
165
199
  # ---
166
200
  # USAGE:
167
201
  # /plan Add user authentication
168
- # /plan:two REST vs GraphQL for mobile app
202
+ # /plan:two REST vs GraphQL for mobile app
169
203
  # /plan:hard Fix checkout race condition causing double charges
170
204
  # /plan:cro Improve signup conversion rate
171
205
  # /plan:ci Fix failing GitHub Actions workflow
172
- # ---
206
+ # ---
package/package.json CHANGED
@@ -1,36 +1,36 @@
1
- {
2
- "name": "superkit-mcp-server",
3
- "version": "1.2.3",
4
- "type": "module",
5
- "description": "An MCP server for exploring and loading Super-Kit AI agent resources.",
6
- "main": "build/index.js",
7
- "bin": {
8
- "superkit-mcp-server": "./build/index.js"
9
- },
10
- "scripts": {
11
- "build": "tsc",
12
- "start": "node build/index.js",
13
- "dev": "tsc --watch"
14
- },
15
- "dependencies": {
16
- "@iarna/toml": "^2.2.5",
17
- "@modelcontextprotocol/sdk": "^1.4.1",
18
- "playwright": "^1.58.2",
19
- "toml": "^3.0.0",
20
- "zod": "^3.23.8"
21
- },
22
- "devDependencies": {
23
- "@types/node": "^22.19.13",
24
- "typescript": "^5.7.2",
25
- "vitest": "^4.0.18"
26
- },
27
- "files": [
28
- "build/",
29
- "agents/",
30
- "skills/",
31
- "commands/",
32
- "SUPERKIT.md",
33
- "README.md",
34
- "ARCHITECTURE.md"
35
- ]
36
- }
1
+ {
2
+ "name": "superkit-mcp-server",
3
+ "version": "1.2.5",
4
+ "type": "module",
5
+ "description": "An MCP server for exploring and loading Super-Kit AI agent resources.",
6
+ "main": "build/index.js",
7
+ "bin": {
8
+ "superkit-mcp-server": "./build/index.js"
9
+ },
10
+ "scripts": {
11
+ "build": "tsc",
12
+ "start": "node build/index.js",
13
+ "dev": "tsc --watch"
14
+ },
15
+ "dependencies": {
16
+ "@iarna/toml": "^2.2.5",
17
+ "@modelcontextprotocol/sdk": "^1.4.1",
18
+ "playwright": "^1.58.2",
19
+ "toml": "^3.0.0",
20
+ "zod": "^3.23.8"
21
+ },
22
+ "devDependencies": {
23
+ "@types/node": "^22.19.13",
24
+ "typescript": "^5.7.2",
25
+ "vitest": "^4.0.18"
26
+ },
27
+ "files": [
28
+ "build/",
29
+ "agents/",
30
+ "skills/",
31
+ "commands/",
32
+ "SUPERKIT.md",
33
+ "README.md",
34
+ "ARCHITECTURE.md"
35
+ ]
36
+ }