Skip to main content
Glama
devyhan
by devyhan

xcode-codesign-info

Extract and display code signing configuration details from Xcode projects to verify certificates, provisioning profiles, and signing settings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectPathYesXcode 프로젝트 또는 워크스페이스 경로
targetNo특정 타겟 이름 (선택사항)

Implementation Reference

  • src/index.ts:371-447 (registration)
    Registration of the 'xcode-codesign-info' tool using server.tool(), including inline schema and handler.
    server.tool( "xcode-codesign-info", { projectPath: z.string().describe("Xcode 프로젝트 또는 워크스페이스 경로"), target: z.string().optional().describe("특정 타겟 이름 (선택사항)") }, async ({ projectPath, target }) => { try { console.error(`Xcode 코드 서명 정보 조회: ${projectPath}`); // 먼저 프로비저닝 프로파일 목록 조회 const profilesCommand = `security find-identity -v -p codesigning`; try { const { stdout: profilesStdout, stderr: profilesStderr } = await executeCommand(profilesCommand); let resultText = "코드 서명 인증서 목록:\n"; if (profilesStdout) resultText += `${profilesStdout}\n`; if (profilesStderr) resultText += `${profilesStderr}\n`; // 프로젝트 빌드 설정에서 서명 관련 정보 추출 let buildSettingsCommand = `xcodebuild`; // 워크스페이스인지 프로젝트인지 확인 if (projectPath.endsWith(".xcworkspace")) { buildSettingsCommand += ` -workspace "${projectPath}"`; } else { buildSettingsCommand += ` -project "${projectPath}"`; } // 타겟이 지정된 경우 추가 if (target) { buildSettingsCommand += ` -target "${target}"`; } buildSettingsCommand += ` -showBuildSettings | grep -E 'CODE_SIGN|PROVISIONING_PROFILE|DEVELOPMENT_TEAM'`; try { const { stdout: settingsStdout, stderr: settingsStderr } = await executeCommand(buildSettingsCommand); resultText += "\n프로젝트 코드 서명 설정:\n"; if (settingsStdout) resultText += `${settingsStdout}\n`; if (settingsStderr) resultText += `${settingsStderr}\n`; } catch (settingsError: any) { // grep 결과가 없어도 오류가 발생할 수 있으므로 무시 resultText += "\n프로젝트 코드 서명 설정을 찾을 수 없습니다.\n"; } // 프로비저닝 프로파일 목록 (~/Library/MobileDevice/Provisioning Profiles/) try { const profileListCommand = `ls -la ~/Library/MobileDevice/Provisioning\\ Profiles/ 2>/dev/null || echo "프로비저닝 프로파일 디렉토리를 찾을 수 없습니다."`; const { stdout: profileListStdout } = await executeCommand(profileListCommand); resultText += "\n설치된 프로비저닝 프로파일:\n"; resultText += `${profileListStdout}\n`; } catch (profileError) { resultText += "\n프로비저닝 프로파일 정보를 가져올 수 없습니다.\n"; } return { content: [{ type: "text", text: resultText }] }; } catch (error: any) { throw error; } } catch (error: any) { console.error(`코드 서명 정보 조회 오류: ${error.message}`); return { content: [{ type: "text", text: `코드 서명 정보를 조회하는 중 오류가 발생했습니다:\n${error.message}\n${error.stderr || ''}` }], isError: true }; } } );
  • Handler function that implements the tool logic: fetches code signing identities with security command, project build settings with xcodebuild, and lists provisioning profiles.
    async ({ projectPath, target }) => { try { console.error(`Xcode 코드 서명 정보 조회: ${projectPath}`); // 먼저 프로비저닝 프로파일 목록 조회 const profilesCommand = `security find-identity -v -p codesigning`; try { const { stdout: profilesStdout, stderr: profilesStderr } = await executeCommand(profilesCommand); let resultText = "코드 서명 인증서 목록:\n"; if (profilesStdout) resultText += `${profilesStdout}\n`; if (profilesStderr) resultText += `${profilesStderr}\n`; // 프로젝트 빌드 설정에서 서명 관련 정보 추출 let buildSettingsCommand = `xcodebuild`; // 워크스페이스인지 프로젝트인지 확인 if (projectPath.endsWith(".xcworkspace")) { buildSettingsCommand += ` -workspace "${projectPath}"`; } else { buildSettingsCommand += ` -project "${projectPath}"`; } // 타겟이 지정된 경우 추가 if (target) { buildSettingsCommand += ` -target "${target}"`; } buildSettingsCommand += ` -showBuildSettings | grep -E 'CODE_SIGN|PROVISIONING_PROFILE|DEVELOPMENT_TEAM'`; try { const { stdout: settingsStdout, stderr: settingsStderr } = await executeCommand(buildSettingsCommand); resultText += "\n프로젝트 코드 서명 설정:\n"; if (settingsStdout) resultText += `${settingsStdout}\n`; if (settingsStderr) resultText += `${settingsStderr}\n`; } catch (settingsError: any) { // grep 결과가 없어도 오류가 발생할 수 있으므로 무시 resultText += "\n프로젝트 코드 서명 설정을 찾을 수 없습니다.\n"; } // 프로비저닝 프로파일 목록 (~/Library/MobileDevice/Provisioning Profiles/) try { const profileListCommand = `ls -la ~/Library/MobileDevice/Provisioning\\ Profiles/ 2>/dev/null || echo "프로비저닝 프로파일 디렉토리를 찾을 수 없습니다."`; const { stdout: profileListStdout } = await executeCommand(profileListCommand); resultText += "\n설치된 프로비저닝 프로파일:\n"; resultText += `${profileListStdout}\n`; } catch (profileError) { resultText += "\n프로비저닝 프로파일 정보를 가져올 수 없습니다.\n"; } return { content: [{ type: "text", text: resultText }] }; } catch (error: any) { throw error; } } catch (error: any) { console.error(`코드 서명 정보 조회 오류: ${error.message}`); return { content: [{ type: "text", text: `코드 서명 정보를 조회하는 중 오류가 발생했습니다:\n${error.message}\n${error.stderr || ''}` }], isError: true }; } }
  • Input schema defined using Zod for projectPath (required) and target (optional).
    { projectPath: z.string().describe("Xcode 프로젝트 또는 워크스페이스 경로"), target: z.string().optional().describe("특정 타겟 이름 (선택사항)")

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