File tree Expand file tree Collapse file tree 4 files changed +31
-2
lines changed
Expand file tree Collapse file tree 4 files changed +31
-2
lines changed Original file line number Diff line number Diff line change 99build /
1010* .tsbuildinfo
1111
12+ # Auto-generated files
13+ src /version.ts
14+
1215# IDE and editor files
1316.idea /
1417.vscode /
Original file line number Diff line number Diff line change @@ -148,6 +148,30 @@ https://github.com/user-attachments/assets/e3c08d75-8be6-4857-b4d0-9350b26ef086
148148 node build/index.js
149149 ```
150150
151+ ### Configure your MCP client
152+
153+ To configure your MCP client to use the local XcodeBuildMCP server, add the following configuration:
154+
155+ ``` json
156+ {
157+ "mcpServers" : {
158+ "XcodeBuildMCP" : {
159+ "command" : " node" ,
160+ "args" : [
161+ " /path_to/XcodeBuildMCP/build/index.js"
162+ ]
163+ }
164+ }
165+ }
166+ ```
167+
168+ Remember after making changes to the server implemetation you'll need to rebuild and restart the server.
169+
170+ ``` bash
171+ npm run build
172+ node build/index.js
173+ ```
174+
151175### Debugging
152176
153177You can use MCP Inspector via:
Original file line number Diff line number Diff line change 77 "xcodebuildmcp" : " ./build/index.js"
88 },
99 "scripts" : {
10+ "prebuild" : " node -p \" 'export const version = ' + JSON.stringify(require('./package.json').version) + ';'\" > src/version.ts" ,
1011 "build" : " tsc && node -e \" require('fs').chmodSync('build/index.js', '755')\" " ,
1112 "lint" : " eslint 'src/**/*.{js,ts}'" ,
1213 "lint:fix" : " eslint 'src/**/*.{js,ts}' --fix" ,
Original file line number Diff line number Diff line change 11import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js' ;
22import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js' ;
33import { log } from '../utils/logger.js' ;
4+ import { version } from '../version.js' ;
45
56/**
67 * Create and configure the MCP server
@@ -11,7 +12,7 @@ export function createServer(): McpServer {
1112 const server = new McpServer (
1213 {
1314 name : 'xcodebuildmcp' ,
14- version : '1.0.0' ,
15+ version,
1516 } ,
1617 {
1718 capabilities : {
@@ -24,7 +25,7 @@ export function createServer(): McpServer {
2425 ) ;
2526
2627 // Log server initialization
27- log ( 'info' , ' Server initialized' ) ;
28+ log ( 'info' , ` Server initialized (version ${ version } )` ) ;
2829
2930 return server ;
3031}
You can’t perform that action at this time.
0 commit comments