Skip to content

Commit 6f4b678

Browse files
committed
fix: Update VSCode configuration and tool registration logic
Changes: - Adjusted `mcp.json` to ensure proper formatting and maintain consistency in server configurations. - Enhanced `settings.json` to include allowed models for the `XcodeBuildMCP-Dev` server. - Modified `tool-registry.ts` to ensure the `session-management` workflow is always included, as it is required by other tools, improving tool registration reliability. This update aims to streamline the development experience and ensure necessary workflows are always available.
1 parent 472c8c6 commit 6f4b678

4 files changed

Lines changed: 63 additions & 37 deletions

File tree

.vscode/mcp.json

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
{
2-
"servers": {
3-
"XcodeBuildMCP": {
4-
"type": "stdio",
5-
"command": "npx",
6-
"args": [
7-
"-y",
8-
"xcodebuildmcp@latest"
9-
],
10-
"env": {
11-
"XCODEBUILDMCP_DEBUG": "true",
12-
"XCODEBUILDMCP_DYNAMIC_TOOLS": "true",
13-
"INCREMENTAL_BUILDS_ENABLED": "false",
14-
"XCODEBUILDMCP_IOS_TEMPLATE_PATH": "/Volumes/Developer/XcodeBuildMCP-iOS-Template",
15-
"XCODEBUILDMCP_MACOS_TEMPLATE_PATH": "/Volumes/Developer/XcodeBuildMCP-macOS-Template"
16-
}
17-
},
18-
"XcodeBuildMCP-Dev": {
19-
"type": "stdio",
20-
"command": "node",
21-
"args": [
22-
"--inspect-brk=9999",
23-
"--trace-warnings",
24-
"/Users/cameroncooke/Developer/XcodeBuildMCP/build/index.js"
25-
],
26-
"env": {
27-
"XCODEBUILDMCP_DEBUG": "true",
28-
"XCODEBUILDMCP_DYNAMIC_TOOLS": "true",
29-
"INCREMENTAL_BUILDS_ENABLED": "false",
30-
"XCODEBUILDMCP_IOS_TEMPLATE_PATH": "/Volumes/Developer/XcodeBuildMCP-iOS-Template",
31-
"XCODEBUILDMCP_MACOS_TEMPLATE_PATH": "/Volumes/Developer/XcodeBuildMCP-macOS-Template"
32-
}
33-
},
34-
}
2+
"servers": {
3+
"XcodeBuildMCP": {
4+
"type": "stdio",
5+
"command": "npx",
6+
"args": [
7+
"-y",
8+
"xcodebuildmcp@latest"
9+
],
10+
"env": {
11+
"XCODEBUILDMCP_DEBUG": "true",
12+
"XCODEBUILDMCP_DYNAMIC_TOOLS": "true",
13+
"INCREMENTAL_BUILDS_ENABLED": "false",
14+
"XCODEBUILDMCP_IOS_TEMPLATE_PATH": "/Volumes/Developer/XcodeBuildMCP-iOS-Template",
15+
"XCODEBUILDMCP_MACOS_TEMPLATE_PATH": "/Volumes/Developer/XcodeBuildMCP-macOS-Template"
16+
}
17+
},
18+
"XcodeBuildMCP-Dev": {
19+
"type": "stdio",
20+
"command": "node",
21+
"args": [
22+
"--inspect=9999",
23+
"--trace-warnings",
24+
"/Users/cameroncooke/Developer/XcodeBuildMCP/build/index.js"
25+
],
26+
"env": {
27+
"XCODEBUILDMCP_DEBUG": "true",
28+
"XCODEBUILDMCP_DYNAMIC_TOOLS": "true",
29+
"INCREMENTAL_BUILDS_ENABLED": "false",
30+
"XCODEBUILDMCP_IOS_TEMPLATE_PATH": "/Volumes/Developer/XcodeBuildMCP-iOS-Template",
31+
"XCODEBUILDMCP_MACOS_TEMPLATE_PATH": "/Volumes/Developer/XcodeBuildMCP-macOS-Template"
32+
}
33+
},
34+
}
3535
}

.vscode/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@
3838
},
3939
"chat.mcp.serverSampling": {
4040
"XcodeBuildMCP/.vscode/mcp.json: XcodeBuildMCP-Dev": {
41-
"allowedDuringChat": true
41+
"allowedDuringChat": true,
42+
"allowedModels": [
43+
"copilot/gpt-5.2"
44+
]
4245
}
4346
},
4447
}

XcodeBuildMCP.code-workspace

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"folders": [
3+
{
4+
"path": "."
5+
},
6+
{
7+
"path": "../XcodeBuildMCP-iOS-Template"
8+
},
9+
{
10+
"path": "../XcodeBuildMCP-macOS-Template"
11+
}
12+
]
13+
}

src/utils/tool-registry.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ export async function registerDiscoveryTools(server: McpServer): Promise<void> {
146146
log('info', `✅ Registered ${registeredCount} discovery tools in dynamic mode.`);
147147
}
148148

149+
// Workflow that must always be included as other tools depend on it
150+
const REQUIRED_WORKFLOW = 'session-management';
151+
149152
/**
150153
* Register selected workflows based on environment variable
151154
*/
@@ -157,8 +160,15 @@ export async function registerSelectedWorkflows(
157160
const workflowGroups = await loadWorkflowGroups();
158161
const selectedTools = [];
159162

160-
for (const workflowName of workflowNames) {
161-
const workflow = workflowGroups.get(workflowName.trim());
163+
// Ensure session-management is always included as it's required by other tools
164+
const normalizedNames = workflowNames.map((name) => name.trim());
165+
if (!normalizedNames.includes(REQUIRED_WORKFLOW)) {
166+
normalizedNames.unshift(REQUIRED_WORKFLOW);
167+
log('info', `📌 Auto-including required workflow: ${REQUIRED_WORKFLOW}`);
168+
}
169+
170+
for (const workflowName of normalizedNames) {
171+
const workflow = workflowGroups.get(workflowName);
162172
if (workflow) {
163173
for (const tool of workflow.tools) {
164174
selectedTools.push({
@@ -181,7 +191,7 @@ export async function registerSelectedWorkflows(
181191

182192
log(
183193
'info',
184-
`✅ Registered ${selectedTools.length} tools from workflows: ${workflowNames.join(', ')}`,
194+
`✅ Registered ${selectedTools.length} tools from workflows: ${normalizedNames.join(', ')}`,
185195
);
186196
}
187197

0 commit comments

Comments
 (0)