@joelbonito/mcp-server 5.1.7 → 5.2.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/dist/core/resources.js +71 -0
- package/dist/core/tools.js +36 -0
- package/dist/init.d.ts +13 -0
- package/dist/init.js +129 -0
- package/package.json +4 -3
package/dist/core/resources.js
CHANGED
|
@@ -33,6 +33,77 @@ export function registerResources(server, cache) {
|
|
|
33
33
|
}
|
|
34
34
|
return { contents: [{ uri: uri.href, text: skill.raw, mimeType: "text/markdown" }] };
|
|
35
35
|
});
|
|
36
|
+
// Static: condensed system prompt with operational rules
|
|
37
|
+
server.resource("system-prompt", "inove://system-prompt", { mimeType: "text/markdown", description: "Condensed operational rules (Socratic Gate, routing, clean code). Inject into system prompt for full framework behavior." }, () => {
|
|
38
|
+
const agentList = [...cache.agents.values()]
|
|
39
|
+
.map((a) => `| \`${a.meta.name}\` | ${a.meta.description} | ${a.meta.skills.join(", ")} |`)
|
|
40
|
+
.join("\n");
|
|
41
|
+
const workflowList = [...cache.workflows.entries()]
|
|
42
|
+
.map(([name, w]) => `| \`/${name}\` | ${w.meta.description} |`)
|
|
43
|
+
.join("\n");
|
|
44
|
+
const prompt = `# Inove AI Framework — Operational Rules
|
|
45
|
+
|
|
46
|
+
> Injected via MCP. These rules govern how you operate with the framework.
|
|
47
|
+
|
|
48
|
+
## Routing Protocol
|
|
49
|
+
|
|
50
|
+
When the user asks for help, detect the domain from their request and activate the appropriate agent using the \`activate_agent\` tool. Use \`route_task\` if unsure which agent to pick.
|
|
51
|
+
|
|
52
|
+
## Socratic Gate (MANDATORY)
|
|
53
|
+
|
|
54
|
+
For ALL requests involving code, STOP and ASK first:
|
|
55
|
+
|
|
56
|
+
| Request Type | Strategy | Action |
|
|
57
|
+
|---|---|---|
|
|
58
|
+
| New Feature / Build | Deep Discovery | ASK minimum 3 strategic questions |
|
|
59
|
+
| Edit / Bug Fix | Diagnosis | Present DIAGNOSIS + PROPOSAL → wait for approval → only then edit |
|
|
60
|
+
| Vague / Simple | Clarification | Ask Purpose, Users and Scope |
|
|
61
|
+
|
|
62
|
+
**Never assume.** If 1% is undefined, ASK.
|
|
63
|
+
|
|
64
|
+
## Clean Code (Global)
|
|
65
|
+
|
|
66
|
+
- Concise, self-documenting code
|
|
67
|
+
- No over-engineering
|
|
68
|
+
- Tests mandatory (Unit > Integration > E2E)
|
|
69
|
+
- Comments in English, variables/functions in English
|
|
70
|
+
- Respond in user's language
|
|
71
|
+
|
|
72
|
+
## Workflow Invocation
|
|
73
|
+
|
|
74
|
+
Use the \`execute_workflow\` tool to run slash commands. Available workflows:
|
|
75
|
+
|
|
76
|
+
| Command | Description |
|
|
77
|
+
|---|---|
|
|
78
|
+
${workflowList}
|
|
79
|
+
|
|
80
|
+
## Agent Activation
|
|
81
|
+
|
|
82
|
+
Use the \`activate_agent\` tool to load an agent's persona, rules and skills. Available agents:
|
|
83
|
+
|
|
84
|
+
| Agent | Description | Skills |
|
|
85
|
+
|---|---|---|
|
|
86
|
+
${agentList}
|
|
87
|
+
|
|
88
|
+
## Backlog Integration
|
|
89
|
+
|
|
90
|
+
When the user says "implement Epic X" or "implement Story Y.Z":
|
|
91
|
+
|
|
92
|
+
1. Read backlog: \`docs/BACKLOG.md\`
|
|
93
|
+
2. If \`docs/stories/\` doesn't exist, suggest running \`shard_epic.py shard\`
|
|
94
|
+
3. Detect domain → Activate appropriate agent
|
|
95
|
+
4. Implement following agent rules
|
|
96
|
+
5. After completion, update progress
|
|
97
|
+
|
|
98
|
+
## Post-Define Flow
|
|
99
|
+
|
|
100
|
+
After \`/define\` or \`/readiness\`:
|
|
101
|
+
1. \`/track\` — Initialize tracking
|
|
102
|
+
2. \`shard_epic.py shard\` — Split backlog into story files
|
|
103
|
+
3. Start implementing Story 1.1
|
|
104
|
+
`;
|
|
105
|
+
return { contents: [{ uri: "inove://system-prompt", text: prompt, mimeType: "text/markdown" }] };
|
|
106
|
+
});
|
|
36
107
|
// Template: individual workflow
|
|
37
108
|
server.resource("workflow", new ResourceTemplate("inove://workflows/{name}", { list: undefined }), { mimeType: "text/markdown", description: "Full content of a specific workflow" }, (uri, { name }) => {
|
|
38
109
|
const workflow = cache.workflows.get(name);
|
package/dist/core/tools.js
CHANGED
|
@@ -56,6 +56,42 @@ export function registerTools(server, cache) {
|
|
|
56
56
|
const result = routeTask(request, cache);
|
|
57
57
|
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
58
58
|
});
|
|
59
|
+
// execute_workflow — simulates /slash invocation for MCP clients
|
|
60
|
+
server.tool("execute_workflow", "Execute a framework workflow (slash command). Returns the full workflow instructions for the AI to follow. Use this instead of typing /define, /debug, etc.", {
|
|
61
|
+
name: z.string().min(1).max(100).describe("Workflow name without slash (e.g. 'define', 'debug', 'create')"),
|
|
62
|
+
arguments: z.string().max(10000).optional().describe("Arguments to pass to the workflow (e.g. 'App de gestao de tarefas')"),
|
|
63
|
+
}, ({ name, arguments: args }) => {
|
|
64
|
+
const workflow = cache.workflows.get(name);
|
|
65
|
+
if (!workflow) {
|
|
66
|
+
const available = [...cache.workflows.keys()].join(", ");
|
|
67
|
+
return { content: [{ type: "text", text: `Workflow "${name}" not found. Available: ${available}` }], isError: true };
|
|
68
|
+
}
|
|
69
|
+
const header = `# Executing /${name}${args ? ` ${args}` : ""}\n\n> Follow the instructions below to execute this workflow.\n\n---\n\n`;
|
|
70
|
+
const footer = args ? `\n\n---\n\n## Arguments Provided\n\n\`\`\`\n${args}\n\`\`\`\n\nApply the workflow above using these arguments.` : "";
|
|
71
|
+
return { content: [{ type: "text", text: header + workflow.raw + footer }] };
|
|
72
|
+
});
|
|
73
|
+
// activate_agent — loads agent persona, rules and skills for MCP clients
|
|
74
|
+
server.tool("activate_agent", "Activate a specialist agent. Returns the agent's full persona, rules and loaded skills. Use this to adopt agent behavior (e.g. @frontend-specialist, @debugger).", {
|
|
75
|
+
name: z.string().min(1).max(100).describe("Agent name (e.g. 'frontend-specialist', 'debugger', 'security-auditor')"),
|
|
76
|
+
}, ({ name }) => {
|
|
77
|
+
const agent = cache.agents.get(name);
|
|
78
|
+
if (!agent) {
|
|
79
|
+
const available = [...cache.agents.keys()].join(", ");
|
|
80
|
+
return { content: [{ type: "text", text: `Agent "${name}" not found. Available: ${available}` }], isError: true };
|
|
81
|
+
}
|
|
82
|
+
// Load all skills referenced by the agent
|
|
83
|
+
const skillContents = agent.meta.skills
|
|
84
|
+
.map((skillName) => {
|
|
85
|
+
const skill = cache.skills.get(skillName);
|
|
86
|
+
if (!skill)
|
|
87
|
+
return null;
|
|
88
|
+
return `\n---\n\n## Skill: ${skillName}\n\n${skill.raw}`;
|
|
89
|
+
})
|
|
90
|
+
.filter(Boolean)
|
|
91
|
+
.join("\n");
|
|
92
|
+
const header = `# Agent Activated: @${name}\n\n> You are now operating as **${name}**. Follow the persona, rules and skills below.\n> Loaded ${agent.meta.skills.length} skill(s): ${agent.meta.skills.join(", ")}\n\n---\n\n`;
|
|
93
|
+
return { content: [{ type: "text", text: header + agent.raw + skillContents }] };
|
|
94
|
+
});
|
|
59
95
|
// search_content
|
|
60
96
|
server.tool("search_content", "Full-text search across all framework content (agents, skills, workflows)", {
|
|
61
97
|
query: z.string().min(1).max(5000).describe("Search query"),
|
package/dist/init.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Bootstrap generator for Inove AI Framework (MCP Mode).
|
|
4
|
+
*
|
|
5
|
+
* Creates minimal instruction files that bridge /slash and @agent
|
|
6
|
+
* patterns to the MCP tools (execute_workflow, activate_agent).
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* npx @joelbonito/mcp-server init # generates CLAUDE.md + AGENTS.md
|
|
10
|
+
* npx @joelbonito/mcp-server init --claude # only CLAUDE.md
|
|
11
|
+
* npx @joelbonito/mcp-server init --codex # only AGENTS.md
|
|
12
|
+
*/
|
|
13
|
+
export {};
|
package/dist/init.js
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Bootstrap generator for Inove AI Framework (MCP Mode).
|
|
4
|
+
*
|
|
5
|
+
* Creates minimal instruction files that bridge /slash and @agent
|
|
6
|
+
* patterns to the MCP tools (execute_workflow, activate_agent).
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* npx @joelbonito/mcp-server init # generates CLAUDE.md + AGENTS.md
|
|
10
|
+
* npx @joelbonito/mcp-server init --claude # only CLAUDE.md
|
|
11
|
+
* npx @joelbonito/mcp-server init --codex # only AGENTS.md
|
|
12
|
+
*/
|
|
13
|
+
import { writeFileSync, existsSync } from "node:fs";
|
|
14
|
+
import { resolve } from "node:path";
|
|
15
|
+
const WORKFLOWS = [
|
|
16
|
+
"define", "debug", "create", "brainstorm", "enhance", "deploy",
|
|
17
|
+
"test", "track", "status", "log", "finish", "orchestrate", "plan",
|
|
18
|
+
"preview", "ui-ux-pro-max", "review", "test-book", "release",
|
|
19
|
+
"squad", "context", "readiness", "journeys",
|
|
20
|
+
];
|
|
21
|
+
const AGENTS = [
|
|
22
|
+
"orchestrator", "project-planner", "product-manager",
|
|
23
|
+
"frontend-specialist", "backend-specialist", "database-architect",
|
|
24
|
+
"mobile-developer", "security-auditor", "debugger", "devops-engineer",
|
|
25
|
+
"test-engineer", "qa-automation-engineer", "documentation-writer",
|
|
26
|
+
"code-archaeologist", "performance-optimizer", "seo-specialist",
|
|
27
|
+
"penetration-tester", "game-developer", "product-owner",
|
|
28
|
+
"ux-researcher", "explorer-agent", "n8n-specialist",
|
|
29
|
+
];
|
|
30
|
+
const SHARED_RULES = `
|
|
31
|
+
## Slash Commands — Workflow Invocation
|
|
32
|
+
|
|
33
|
+
When the user types \`/<command>\` (e.g. \`/define\`, \`/debug\`), use the MCP tool \`execute_workflow\` with the command name (without the slash) and any arguments.
|
|
34
|
+
|
|
35
|
+
Example: \`/define App de gestao de tarefas\` → call \`execute_workflow(name="define", arguments="App de gestao de tarefas")\`
|
|
36
|
+
|
|
37
|
+
Available workflows: ${WORKFLOWS.map((w) => `\`/${w}\``).join(", ")}
|
|
38
|
+
|
|
39
|
+
## Agent Activation — @ Mentions
|
|
40
|
+
|
|
41
|
+
When the user mentions \`@agent-name\` (e.g. \`@frontend-specialist\`), use the MCP tool \`activate_agent\` with the agent name. This loads the agent's full persona, rules and all referenced skills.
|
|
42
|
+
|
|
43
|
+
Example: \`@security-auditor\` → call \`activate_agent(name="security-auditor")\`
|
|
44
|
+
|
|
45
|
+
Available agents: ${AGENTS.map((a) => `\`@${a}\``).join(", ")}
|
|
46
|
+
|
|
47
|
+
## Intelligent Routing
|
|
48
|
+
|
|
49
|
+
When unsure which agent to use, call \`route_task\` with the user's request. It returns the best-matching agents based on keyword analysis.
|
|
50
|
+
|
|
51
|
+
## Operational Rules
|
|
52
|
+
|
|
53
|
+
For full framework behavior (Socratic Gate, Clean Code, Routing Protocol), read the MCP resource \`inove://system-prompt\`.
|
|
54
|
+
|
|
55
|
+
## Socratic Gate (MANDATORY)
|
|
56
|
+
|
|
57
|
+
For ALL requests involving code, STOP and ASK first:
|
|
58
|
+
|
|
59
|
+
| Request Type | Strategy | Action |
|
|
60
|
+
|---|---|---|
|
|
61
|
+
| New Feature / Build | Deep Discovery | ASK minimum 3 strategic questions |
|
|
62
|
+
| Edit / Bug Fix | Diagnosis | Present DIAGNOSIS + PROPOSAL → wait for approval |
|
|
63
|
+
| Vague / Simple | Clarification | Ask Purpose, Users and Scope |
|
|
64
|
+
|
|
65
|
+
## Clean Code (Global)
|
|
66
|
+
|
|
67
|
+
- Concise, self-documenting code — no over-engineering
|
|
68
|
+
- Tests mandatory (Unit > Integration > E2E)
|
|
69
|
+
- Code comments and variables in English
|
|
70
|
+
- Respond in the user's language
|
|
71
|
+
`;
|
|
72
|
+
const CLAUDE_MD = `# Inove AI Framework (MCP Mode)
|
|
73
|
+
|
|
74
|
+
> This project uses the Inove AI Framework via MCP server (\`@joelbonito/mcp-server\`).
|
|
75
|
+
> No local framework files needed — all agents, skills and workflows are served via MCP.
|
|
76
|
+
|
|
77
|
+
${SHARED_RULES}`;
|
|
78
|
+
const AGENTS_MD = `# Inove AI Framework (MCP Mode)
|
|
79
|
+
|
|
80
|
+
> This project uses the Inove AI Framework via MCP server (\`@joelbonito/mcp-server\`).
|
|
81
|
+
> No local framework files needed — all agents, skills and workflows are served via MCP.
|
|
82
|
+
|
|
83
|
+
${SHARED_RULES}`;
|
|
84
|
+
function main() {
|
|
85
|
+
const args = process.argv.slice(2);
|
|
86
|
+
// Remove "init" if passed as first arg (from bin dispatch)
|
|
87
|
+
if (args[0] === "init")
|
|
88
|
+
args.shift();
|
|
89
|
+
const claudeOnly = args.includes("--claude");
|
|
90
|
+
const codexOnly = args.includes("--codex");
|
|
91
|
+
const both = !claudeOnly && !codexOnly;
|
|
92
|
+
const cwd = process.cwd();
|
|
93
|
+
let created = 0;
|
|
94
|
+
if (both || claudeOnly) {
|
|
95
|
+
const path = resolve(cwd, "CLAUDE.md");
|
|
96
|
+
if (existsSync(path)) {
|
|
97
|
+
console.log(`⚠️ CLAUDE.md already exists — skipping (use --force to overwrite is not supported, merge manually)`);
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
writeFileSync(path, CLAUDE_MD, "utf-8");
|
|
101
|
+
console.log(`✅ Created CLAUDE.md`);
|
|
102
|
+
created++;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
if (both || codexOnly) {
|
|
106
|
+
const path = resolve(cwd, "AGENTS.md");
|
|
107
|
+
if (existsSync(path)) {
|
|
108
|
+
console.log(`⚠️ AGENTS.md already exists — skipping`);
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
writeFileSync(path, AGENTS_MD, "utf-8");
|
|
112
|
+
console.log(`✅ Created AGENTS.md`);
|
|
113
|
+
created++;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
if (created > 0) {
|
|
117
|
+
console.log(`\n🚀 Inove AI Framework (MCP Mode) initialized!`);
|
|
118
|
+
console.log(` Now you can use /slash commands and @agent mentions.`);
|
|
119
|
+
console.log(`\n Make sure the MCP server is configured:`);
|
|
120
|
+
console.log(` • Claude Code: claude mcp add inove-ai -- npx -y @joelbonito/mcp-server`);
|
|
121
|
+
console.log(` • Codex CLI: codex mcp add inove-ai -- npx -y @joelbonito/mcp-server`);
|
|
122
|
+
console.log(` • Cursor: .cursor/mcp.json`);
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
console.log(`\nNothing to create — files already exist.`);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
main();
|
|
129
|
+
//# sourceMappingURL=init.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@joelbonito/mcp-server",
|
|
3
|
-
"version": "5.1
|
|
3
|
+
"version": "5.2.1",
|
|
4
4
|
"description": "MCP server for Inove AI Framework — agents, skills, and workflows as MCP resources, tools and prompts",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Inove AI <hello@inove.ai>",
|
|
@@ -22,12 +22,13 @@
|
|
|
22
22
|
"type": "module",
|
|
23
23
|
"main": "dist/index.js",
|
|
24
24
|
"bin": {
|
|
25
|
-
"inove-mcp": "dist/index.js"
|
|
25
|
+
"inove-mcp": "dist/index.js",
|
|
26
|
+
"inove-init": "dist/init.js"
|
|
26
27
|
},
|
|
27
28
|
"scripts": {
|
|
28
29
|
"prebuild": "tsx scripts/bundle-content.ts",
|
|
29
30
|
"build": "tsc",
|
|
30
|
-
"postbuild": "chmod +x dist/index.js",
|
|
31
|
+
"postbuild": "chmod +x dist/index.js dist/init.js",
|
|
31
32
|
"dev": "tsx src/index.ts",
|
|
32
33
|
"start": "node dist/index.js",
|
|
33
34
|
"test": "vitest run",
|