Logo vun XCF Xcode MCP Server

XCF Xcode MCP Server

Organisatioun
CodeFreezeAI

Xcode MCP Server xcf is a 100% Swift based allowing you to integrate Xcode with your favorite AI IDE or MCP Client

EditeurCodeFreezeAI
Repositoryxcf
SproochSwift
Forks
1
Stären
12
Disponibel Tools
0
Transporttypstdio
Kategorien
LizenzMIT
Linken
  • Tools mat KI-Workflows verbannen

    XCF Xcode MCP Server stellt MCP-Funktioune bereit, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • 0 disponibel Tools

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an Ärem bevorzugte MCP-Client ze konfiguréieren.

  • Indicateure fir Open Source

    12 Stären an 1 Forks aus dem verlinkte Repository.

🚀 XCF Xcode MCP Server

The Swift way to Super Charge your AI Workflow!

Swift 6.1 Website Version GitHub downloads GitHub stars GitHub forks

🖌️ New features in 1.0.5!

  • ✅ File & Directory Operations
  • ✅ Scripting Bridge Xcode Doc Operations
  • ✅ Fuzzy Logic Path Resolution
  • ✅ Swift Code Analysis (without building in Xcode)
  • ✅ 21 MCP Tools for Xcode Automation

Speed up writing Xcode apps with xcf, a dead simple Swift-based MCP server designed for Cursor, Claude Code, and VSCode — no TypeScript, no JavaScript, no BS!

🧰 XCF Installation & Configuration

Installation Steps

  1. Download the XCF application and drag it to your /Applications folder.
  2. Launch the application to approve the internet download.
  1. You will see the following alert (this is expected):
  1. Click the "Press to Quit this XCF Xcode MCP Server" button.

💡 Troubleshooting: If XCF doesn't display the alert, run this command:

bash
codesign --force --deep --sign - /Applications/xcf.app

You can also build xcf from source using Xcode. It's 100% Swift and easy to build locally.

🔧 Quick Setup

Minimum Requirements:

Add xcf to your MCP configuration file:

json
{
  "mcpServers": {
    "xcf": {
      "type": "stdio",
      "command": "Applications/xcf.app/Contents/MacOS/xcf",
      "args": ["server"]
    }
  }
}          

Configuration Locations

  • Cursor: ~/.cursor/mcp.json
  • Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json

⚠️ Important: Restart your AI assistant after setup or refresh the tool.

⚙️ Advanced Configuration

For non-Cursor clients or users requiring strict project-level control:

json
{
  "mcpServers": {
    "xcf": {
      "type": "stdio",
      "command": "Applications/xcf.app/Contents/MacOS/xcf",
      "args": ["server"],
      "env": {
          "XCODE_PROJECT_FOLDER": "/path/to/project/",
          "XCODE_PROJECT": "/path/to/project/project.xcodeproj"
      }
    }
  }
}

These environment variables let you:

  • Pre-select a specific Xcode project to work with
  • Define a custom workspace boundary for security

✨ Key Features

  • Zero Dependencies: Easy to install, no reliance on other MCP servers
  • Automatic Project Detection: Auto-selects your Xcode project so you can start coding immediately
  • Real-time Error Handling: xcf build or xcf run sends errors and warnings from Xcode directly to your AI IDE
  • AI-Powered Fixes: Let Claude fix bugs and mistakes during your coding sessions
  • Intuitive Commands: Simple, developer-friendly command structure for maximum productivity
  • Comprehensive File Operations: Read files and directories with ease
  • Xcode Integration: Build, run, and manage Xcode projects directly
  • Advanced Code Analysis: Get detailed Swift code analysis without building in Xcode

🛠️ Perfect for Swift Developers

The tool is designed by Swift developers, for Swift developers. Commands like build, run, show, and our new file and directory operations make the workflow intuitive and natural.

📋 Commands Reference

xcf Commandaction Description
showList open Xcode projects
open #Select project by number
runRun current project
buildBuild current project
currentShow selected project
envShow environment variables
pwdShow current folder (aliases: dir, path)
helpDisplay all available commands

File Operations

CommandDescription
read_file <file>Read content from a file
read_dir [path] [extension]List directory contents
cd_dir <path>Change directory

Analysis Tools

CommandDescription
snippet <file> [start] [end]Extract code snippets
analyzer <file> [start] [end]Analyze Swift code
lz <file>Shorthand for analyzer

📄 Using Snippets

For Human Commands

xcf supports simplified, user-friendly snippet commands:

To get an entire file, just use the filename:

xcf snippet filename.swift

No need for full paths in many cases - xcf will intelligently find and display the complete file contents.

For specific line ranges:

xcf snippet filename.swift 10 20

You can use either format for file operations:

xcf snippet /path/to/file.swift                 // Direct path
xcf snippet filePath=/path/to/file.swift        // Named parameter

xcf analyze /path/to/file.swift                 // Direct path
xcf analyze filePath=/path/to/file.swift        // Named parameter

xcf lz /path/to/file.swift                      // Direct path (shorthand)
xcf lz filePath=/path/to/file.swift             // Named parameter (shorthand)

For specific line ranges:

xcf snippet /path/to/file.swift 10 20           // Direct path with line range
xcf snippet filePath=/path/to/file.swift startLine=10 endLine=20  // Named parameters

For AI Assistants

When using xcf through MCP tools, use this syntax:

mcp_xcf_snippet filePath="filename.swift" entireFile=true

For specific line ranges:

mcp_xcf_snippet filePath="filename.swift" startLine=10 endLine=20

Smart Path Resolution

When a file isn't found at the exact path, xcf will intelligently search for it in:

  1. First tries the exact path provided
  2. Resolves relative paths using the current working directory
  3. Searches in the current project directory and one level up
  4. Searches in the workspace folder defined by WORKSPACE_FOLDER_PATHS
  5. Searches recursively in workspace folders with limited depth
  6. As a last resort, performs a fuzzy search for similar filenames

This smart path resolution is used consistently across ALL file operations in xcf, including:

  • File reading and code snippets
  • Code analysis
  • Directory operations

This means you can usually just use the filename without any path for any operation:

xcf snippet Constants.swift    // For humans
xcf analyze Constants.swift    // For humans

Or for AI assistants:

mcp_xcf_snippet filePath="Constants.swift" entireFile=true
mcp_xcf_analyzer filePath="Constants.swift" entireFile=true

🔍 Swift Code Analysis

For Human Commands

Analyze an entire Swift file for potential issues:

xcf analyze filename.swift

Or use the shorthand version:

xcf lz filename.swift

For specific line ranges:

xcf analyze filename.swift --startLine 10 --endLine 50

For AI Assistants

When using xcf through MCP tools, use this syntax:

mcp_xcf_analyzer filePath="filename.swift" entireFile=true

Or use the shorthand version:

mcp_xcf_xcf action="lz filename.swift"

For specific line ranges:

mcp_xcf_analyzer filePath="filename.swift" startLine=10 endLine=50

The analysis identifies issues like:

  • Code style and formatting problems
  • Functions with high complexity
  • Unused variables and symbols
  • Magic numbers
  • Long methods
  • And more

🧩 MCP Tools (21 Tools)

Core Tools

ToolDescription
xcfExecute xcf actions (show, open, build, run, current, env, pwd, analyze, lz)
listLists all available tools on this server
xcf_helpQuick help for xcf actions only
helpRegular help with common examples
use_xcfActivate XCF mode
toolsShow detailed reference for all tools including AI function calls
show_helpDisplay help information about available commands

Project Management Tools

ToolDescription
build_projectBuild the current Xcode project
run_projectRun the current Xcode project
list_projectsList all open Xcode projects
select_projectSelect an Xcode project by number
show_current_projectShow information about the currently selected project
show_envDisplay all environment variables
show_folderDisplay the current working folder
grant_permissionGrant Xcode automation permissions

File System Tools

ToolDescription
read_fileRead content from a file
read_dirList contents of a directory
cd_dirChange current directory

Code Analysis Tools

ToolDescription
snippetExtract code snippets from files
analyzerAnalyze Swift code for potential issues
analyze_swift_codeAnalyze Swift code with customizable check groups (syntax, style, safety, performance, bestPractices)

For AI Function Calls

To get an entire file:

mcp_xcf_snippet(filePath="/full/path/to/file.swift", entireFile=true)

For specific line ranges:

mcp_xcf_snippet(filePath="/full/path/to/file.swift", startLine=10, endLine=20)

To analyze an entire file:

mcp_xcf_analyzer(filePath="/full/path/to/file.swift", entireFile=true)

For specific line ranges:

mcp_xcf_analyzer(filePath="/full/path/to/file.swift", startLine=10, endLine=50)

Working with Files and Directories

Read a file:

mcp_xcf_read_file filePath="main.swift"

List directory contents:

mcp_xcf_read_dir directoryPath="."

List Swift files only:

mcp_xcf_read_dir directoryPath="src" fileExtension="swift"

Change directory:

mcp_xcf_cd_dir directoryPath="src"

🔒 Security Features

  • Safely works with projects in your designated workspace
  • Automatically prevents access outside your workspace boundaries
  • Redirects to safe alternatives when needed
  • Uses environment variables to define secure boundaries

🔄 Workflow Examples

Basic Workflow (For Humans)

  1. xcf show - See available projects
  2. xcf open 1 - Select a project
  3. xcf build - Build the project
  4. xcf run - Run the project

Code Analysis Workflow (For Humans)

  1. xcf current - Check current project
  2. xcf snippet filename.swift - Examine code
  3. xcf lz filename.swift - Analyze code
  4. xcf build - Build after fixing issues

File Manipulation Workflow (For Humans)

  1. read_dir . - List files in current directory
  2. read_file main.swift - View file contents
  3. Use Agent native tools for file editing
  4. xcf build - Build after changes

Basic Workflow (For AI Assistants)

  1. mcp_xcf_xcf action="show" - See available projects
  2. mcp_xcf_xcf action="open 1" - Select a project
  3. mcp_xcf_xcf action="build" - Build the project
  4. mcp_xcf_xcf action="run" - Run the project

Code Analysis Workflow (For AI Assistants)

  1. mcp_xcf_xcf action="current" - Check current project
  2. mcp_xcf_snippet filePath="filename.swift" entireFile=true - Examine code
  3. mcp_xcf_analyzer filePath="filename.swift" entireFile=true - Analyze code
  4. mcp_xcf_xcf action="build" - Build after fixing issues

File Manipulation Workflow (For AI Assistants)

  1. mcp_xcf_read_dir directoryPath="." - List files in current directory
  2. mcp_xcf_read_file filePath="main.swift" - View file contents
  3. Use Agent native edit_file tool for file editing
  4. mcp_xcf_xcf action="build" - Build after changes

📺 Demo

Watch XCF in action: YouTube Demo

❓ Troubleshooting

If commands fail, check:

  • xcf installation is correct
  • Refreshing xcf MCP Server
  • Verify the server launches and is in your /Applications folder
  • Environment variables with env such as "server"
  • Relaunch your AI assistant

🤝 Open Source Community

Swift Engineers are welcome to contribute! Help us make xcf even better.

💯 100% Swift. 100% Open Source.

GitHub Repository


Created by XCodeFreeze Automation and CodeFreeze.ai - Bringing the future of Swift development to your fingertips!

Installatioun

TypingMind
Viraussetzungen:

Node.js 18+

{
  "mcpServers": {
    "codefreezeai-xcf": {
      "command": "",
      "args": []
    }
  }
}

XCF Xcode MCP Server MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal XCF Xcode MCP Server verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dës MCP-Integratioun leeft lokal iwwer den TypingMind-MCP-Connector op Ärem Apparat.

Ariichtungsuleedung fir de lokale Connector ze benotzen

Benotzt dës Optioun, wann den MCP-Server Zougrëff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „Dësen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector mat „Dësen Apparat“ ausgewielt
2

De Connector-Befeel ausféieren

Wielt „Dësen Apparat“, kopéiert de Befeel aus TypingMind a féiert en am Terminal aus. Loosst de Prozess lafen, wärend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Pescht de Befeel an a féiert en aus.
  4. Bestätegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wärend Dir MCP-Tools benotzt.
3

XCF Xcode MCP Server als Server derbäisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren änneren“ a pescht d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren änneren“.
  3. Pescht d'MCP-Serverkonfiguratioun vu XCF Xcode MCP Server an.
  4. Späichert d'Serverlëscht.
  5. Aktualiséiert, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem Knäppchen „Serveren änneren“
{
  "mcpServers": {
    "codefreezeai-xcf": {
      "command": "npx",
      "args": [
        "-y",
        "xcf"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

Späichert d'Serverlëscht, maacht „Plugins“ op an aktivéiert d'MCP-Tools vu XCF Xcode MCP Server. Wielt dann e belibegen ënnerstëtzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'Säit „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vu XCF Xcode MCP Server.
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierte MCP-Tools an engem ausgewielte KI-Modell
Hëlleft Dir mir bei dëser Aufgab mat XCF Xcode MCP Server?
XCF Xcode MCP Server
Jo. Ech hunn et gelies.
Dat hunn ech mat XCF Xcode MCP Server fonnt.

Heefeg gestallte Froen

Fir wat gëtt de MCP-Server XCF Xcode MCP Server benotzt?

XCF Xcode MCP Server ass e MCP-Server, deen et kompatibele KI-Clienten erlaabt, sech mat externen Tools a Kontext ze verbannen. An TypingMind kënnt Dir dëse MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech XCF Xcode MCP Server MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir XCF Xcode MCP Server mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni de MCP-Server fir all Modell separat anzeriichten.

Firwat XCF Xcode MCP Server MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann XCF Xcode MCP Server verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Är Chataarbecht an TypingMind organiséieren.

Wéi verbannen ech XCF Xcode MCP Server MCP mat TypingMind?

XCF Xcode MCP Server leeft iwwer de lokale MCP-Connector vun TypingMind. Dat eegent sech am beschten, wann de MCP-Server Zougrëff op lokal Fichieren, Desktop-Apps, Kommandozeilen-Tools oder privat Ressourcen op Ärem Computer brauch.

Wéi eng Tools stellt XCF Xcode MCP Server MCP an TypingMind zur Verfügung?

XCF Xcode MCP Server stellt MCP-Funktiounen zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agenten zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir XCF Xcode MCP Server MCP ze benotzen?

Nee. TypingMind setzt op lokal Veraarbechtung a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann XCF Xcode MCP Server eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir dee MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇