Skip to main content
Glama
devyhan

Xcode MCP Server

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("특정 타겟 이름 (선택사항)")
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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