Skip to content

Commit 1083649

Browse files
authored
Default to Cursor profile for MCP init when no rules specified (eyaltoledano#846)
1 parent 67894a2 commit 1083649

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

.changeset/mean-papayas-share.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"task-master-ai": patch
3+
---
4+
5+
Default to Cursor profile for MCP init when no rules specified

mcp-server/src/core/direct-functions/initialize-project.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,16 @@ export async function initializeProjectDirect(args, log, context = {}) {
7272
yes: true // Force yes mode
7373
};
7474

75-
// Handle rules option just like CLI
75+
// Handle rules option with MCP-specific defaults
7676
if (Array.isArray(args.rules) && args.rules.length > 0) {
7777
options.rules = args.rules;
78+
options.rulesExplicitlyProvided = true;
7879
log.info(`Including rules: ${args.rules.join(', ')}`);
7980
} else {
80-
options.rules = RULE_PROFILES;
81-
log.info(
82-
`No rule profiles specified, defaulting to: ${RULE_PROFILES.join(', ')}`
83-
);
81+
// For MCP initialization, default to Cursor profile only
82+
options.rules = ['cursor'];
83+
options.rulesExplicitlyProvided = true;
84+
log.info(`No rule profiles specified, defaulting to: Cursor`);
8485
}
8586

8687
log.info(`Initializing project with options: ${JSON.stringify(options)}`);

mcp-server/src/tools/initialize-project.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export function registerInitializeProjectTool(server) {
5151
.array(z.enum(RULE_PROFILES))
5252
.optional()
5353
.describe(
54-
`List of rule profiles to include at initialization. If omitted, defaults to all available profiles. Available options: ${RULE_PROFILES.join(', ')}`
54+
`List of rule profiles to include at initialization. If omitted, defaults to Cursor profile only. Available options: ${RULE_PROFILES.join(', ')}`
5555
)
5656
}),
5757
execute: withNormalizedProjectRoot(async (args, context) => {

0 commit comments

Comments
 (0)