Skip to main content
Glama
devyhan
by devyhan

xcode-project-info

Extract and analyze key details from an Xcode project or workspace to support iOS project management, building, testing, and deployment tasks within the Xcode MCP Server.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectPathYesXcode 프로젝트 또는 워크스페이스 경로

Implementation Reference

  • The asynchronous handler function that runs 'xcodebuild -list -json -project' on the project path, attempts to parse the JSON output, and returns formatted project information or raw output on error.
    try { console.error(`Xcode 프로젝트 정보 확인: ${projectPath}`); // xcodebuild -list 명령어로 프로젝트 정보 가져오기 const command = `xcodebuild -list -json -project "${projectPath}"`; try { const { stdout } = await executeCommand(command); // JSON 파싱 시도 try { const projectInfo = JSON.parse(stdout); return { content: [{ type: "text", text: `Xcode 프로젝트 정보:\n${JSON.stringify(projectInfo, null, 2)}` }] }; } catch (parseError) { // JSON 파싱 실패 시 원본 출력 반환 return { content: [{ type: "text", text: `Xcode 프로젝트 정보:\n${stdout}` }] }; } } catch (error: any) { throw error; } } catch (error: any) { console.error(`Xcode 프로젝트 정보 오류: ${error.message}`); return { content: [{ type: "text", text: `Xcode 프로젝트 정보를 가져오는 중 오류가 발생했습니다:\n${error.message}\n${error.stderr || ''}` }], isError: true }; } }
  • Zod input schema defining the required 'projectPath' parameter as a string.
    projectPath: z.string().describe("Xcode 프로젝트 또는 워크스페이스 경로") },
  • src/index.ts:32-78 (registration)
    Registers the 'xcode-project-info' tool with the MCP server using server.tool(name, schema, handler).
    "xcode-project-info", { projectPath: z.string().describe("Xcode 프로젝트 또는 워크스페이스 경로") }, async ({ projectPath }) => { try { console.error(`Xcode 프로젝트 정보 확인: ${projectPath}`); // xcodebuild -list 명령어로 프로젝트 정보 가져오기 const command = `xcodebuild -list -json -project "${projectPath}"`; try { const { stdout } = await executeCommand(command); // JSON 파싱 시도 try { const projectInfo = JSON.parse(stdout); return { content: [{ type: "text", text: `Xcode 프로젝트 정보:\n${JSON.stringify(projectInfo, null, 2)}` }] }; } catch (parseError) { // JSON 파싱 실패 시 원본 출력 반환 return { content: [{ type: "text", text: `Xcode 프로젝트 정보:\n${stdout}` }] }; } } catch (error: any) { throw error; } } catch (error: any) { console.error(`Xcode 프로젝트 정보 오류: ${error.message}`); return { content: [{ type: "text", text: `Xcode 프로젝트 정보를 가져오는 중 오류가 발생했습니다:\n${error.message}\n${error.stderr || ''}` }], isError: true }; } } );

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/devyhan/xcode-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server