Skip to main content
Glama

MCP Xcode

by Stefan-Nitu
DependencyChecker.ts1.7 kB
import { IDependencyChecker, MissingDependency } from '../../presentation/interfaces/IDependencyChecker.js'; import { ICommandExecutor } from '../../application/ports/CommandPorts.js'; /** * Checks for system dependencies using shell commands */ export class DependencyChecker implements IDependencyChecker { private readonly dependencyMap: Record<string, { checkCommand: string; installCommand?: string }> = { 'xcodebuild': { checkCommand: 'which xcodebuild', installCommand: 'Install Xcode from the App Store' }, 'xcrun': { checkCommand: 'which xcrun', installCommand: 'Install Xcode Command Line Tools: xcode-select --install' }, 'xcbeautify': { checkCommand: 'which xcbeautify', installCommand: 'brew install xcbeautify' } }; constructor( private readonly executor: ICommandExecutor ) {} async check(dependencies: string[]): Promise<MissingDependency[]> { const missing: MissingDependency[] = []; for (const dep of dependencies) { const config = this.dependencyMap[dep]; if (!config) { // Unknown dependency - just check with 'which' const result = await this.executor.execute(`which ${dep}`, { shell: '/bin/bash' }); if (result.exitCode !== 0) { missing.push({ name: dep }); } continue; } // Check using configured command const result = await this.executor.execute(config.checkCommand, { shell: '/bin/bash' }); if (result.exitCode !== 0) { missing.push({ name: dep, installCommand: config.installCommand }); } } return missing; } }

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/Stefan-Nitu/mcp-xcode'

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