Upgrade to Pro — share decks privately, control downloads, hide ads and more …

SwiftでMCPサーバーを作ろう!

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.

 SwiftでMCPサーバーを作ろう!

Avatar for giginet

giginet PRO

July 19, 2025
Tweet

More Decks by giginet

Other Decks in Programming

Transcript

  1. import MCP public struct GetBuildSettingsTool: Sendable { private let pathUtility:

    PathUtility public init(pathUtility: PathUtility) { self.pathUtility = pathUtility } public func tool() -> Tool { Tool( name: "get_build_settings", description: "Get build settings for a specific target in an Xcode project", inputSchema: .object([ "type": .string("object"), "properties": .object([ "project_path": .object([ "type": .string("string"), "description": .string( "Path to the .xcodeproj file (relative to current directory)"), ]), "target_name": .object([ "type": .string("string"), "description": .string("Name of the target to get build settings for"), ]), "configuration": .object([ "type": .string("string"), "description": .string( "Build configuration name (optional, defaults to Debug)"), ]), ]), "required": .array([.string("project_path"), .string("target_name")]), ]) ) } }
  2. xcodeproj-mcp-serverͰԿ͕Ͱ͖Δͷ w 9DPEFϓϩδΣΫτΛϑϧεΫϥονͰ࡞੒ DSFBUF@YDPEFQSPK  w 5BSHFUͷ௥Ճɺ࡟আɺಡΈऔΓ BEE@UBSHFU  w

    8JEHFU΍XBUDI04&YUFOTJPOͳͲ΋؆୯ʹ௥ՃͰ͖Δ w #VJME4FUUJOHTͷಡΈॻ͖ HFU@CVJME@TFUUJOHT  w FOUJUMFNFOUT΍*OGPQMJTUɺ$PEF4JHOͳͲ໘౗ͳઃఆͷࣗಈԽ w 1PTU#VJME4DSJQUͷ௥Ճ BEE@CVJME@QIBTF  w 4XJGU'PSNBUͷݺͼग़͠ͳͲΛࣗಈ௥Ճ w 4XJGU1BDLBHFͷ؅ཧ BEE@TXJGU@QBDLBHF