Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .vscode/mcp.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"servers": {
"xcode-mcp-server-dev": {
"xcodebuildmcp-dev": {
"type": "stdio",
"command": "node",
"args": [
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ VS Code is especially good for developing XcodeBuildMCP as it has a built-in way

To make your development workflow in VS Code more efficient:

1. **Start the MCP Server**: Open the `.vscode/mcp.json` file. You can start the `xcode-mcp-server-dev` server either by clicking the `Start` CodeLens that appears above the server definition, or by opening the Command Palette (`Cmd+Shift+P` or `Ctrl+Shift+P`), running `Mcp: List Servers`, selecting `xcode-mcp-server-dev`, and starting the server.
1. **Start the MCP Server**: Open the `.vscode/mcp.json` file. You can start the `xcodebuildmcp-dev` server either by clicking the `Start` CodeLens that appears above the server definition, or by opening the Command Palette (`Cmd+Shift+P` or `Ctrl+Shift+P`), running `Mcp: List Servers`, selecting `xcodebuildmcp-dev`, and starting the server.
2. **Launch the Debugger**: Press `F5` to attach the Node.js debugger.

Once these steps are completed, you can utilize the tools from the MCP server you are developing within this repository in agent mode.
Expand Down
11 changes: 11 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,17 @@ async function main(): Promise<void> {
// Start the server
await startServer(server);

// Clean up on exit
process.on('SIGTERM', async () => {
await server.close();
process.exit(0);
});

process.on('SIGINT', async () => {
Comment thread
cameroncooke marked this conversation as resolved.
await server.close();
process.exit(0);
});

// Log successful startup
log('info', `XcodeBuildMCP server (version ${version}) started successfully`);
} catch (error) {
Expand Down