Skip to main content
Glama
devyhan
by devyhan

xcode-project-info

Extract key information from Xcode projects and workspaces to analyze project structure, configurations, and settings for iOS development.

Input Schema

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

Implementation Reference

  • Handler function that executes 'xcodebuild -list -json' on the provided Xcode project path to retrieve and return project information in JSON or raw format, with error handling.
    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 }; } }
  • Zod schema defining the input parameter 'projectPath' for the tool.
    { projectPath: z.string().describe("Xcode 프로젝트 또는 워크스페이스 경로") },
  • src/index.ts:32-78 (registration)
    Registration of the 'xcode-project-info' tool using McpServer.tool(), including schema and inline 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 }; } } );

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