XCF Xcode MCP Server

by codefreezeai

204 downloads
Not rated
GitHub

About

A Swift-based MCP server that integrates with Xcode to enhance AI development workflows.

Details

Author
codefreezeai
Downloads
204
Categories
Developer Tools, Other, Productivity

- Execute Xcode build and run commands via AI
- File access through snippets with smart path resolution
- Security with automatic workspace boundary enforcement
- Optional environment variables for project pre-selection
- Dedicated MCP tools for AI function calls and help

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name XCF Xcode MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Configure by adding the server to your MCP config file (~/.cursor/mcp.json or ~/Library/Application Support/Claude/claude_desktop_config.json) with a stdio transport pointing to the xcf binary, then restart your AI tool. Activate with the use xcf command, then use commands like show, open #, build, and run.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "xcf xcode mcp server": {
            "xcf": {
                "type": "stdio",
                "command": "/Users/username/xcf/xcf",
                "args": [],
                "env": {
                    "XCODE_PROJECT_FOLDER_optional": "/path/to/project/",
                    "XCODE_PROJECT_optional": "/path/to/project/project.xcodeproj"
                }
            }
        }
    }
}

McpServers

{
    "xcf": {
        "type": "stdio",
        "command": "/Users/username/xcf/xcf",
        "args": [],
        "env": {
            "XCODE_PROJECT_FOLDER_optional": "/path/to/project/",
            "XCODE_PROJECT_optional": "/path/to/project/project.xcodeproj"
        }
    }
}

The Swift way to Super Charge your AI Workflow!

- ✅ 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!
- Download the XCF application and drag it to your /Applications folder.
- Launch the application to approve the internet download.
- You will see the following alert (this is expected):
- Click the "Press to Quit this XCF Xcode MCP Server" button.

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

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.

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

- 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.

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

{ "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" } } } }

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

- 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 buildorxcf runsends 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

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

xcf supports simplified, user-friendly snippet commands:

To get an entire file, just use the filename:

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

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)
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

When using xcf through MCP tools, use this syntax:

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

When a file isn't found at the exact path, xcf will intelligently search for it in:
- First tries the exact path provided
- Resolves relative paths using the current working directory
- Searches in the current project directory and one level up
- Searches in the workspace folder defined by WORKSPACE_FOLDER_PATHS
- Searches recursively in workspace folders with limited depth
- 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
mcp_xcf_snippet filePath="Constants.swift" entireFile=true mcp_xcf_analyzer filePath="Constants.swift" entireFile=true

Analyze an entire Swift file for potential issues:

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

When using xcf through MCP tools, use this syntax:

mcp_xcf_analyzer filePath="filename.swift" entireFile=true
mcp_xcf_xcf action="lz filename.swift"
mcp_xcf_analyzer filePath="filename.swift" startLine=10 endLine=50

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

mcp_xcf_snippet(filePath="/full/path/to/file.swift", entireFile=true)
mcp_xcf_snippet(filePath="/full/path/to/file.swift", startLine=10, endLine=20)
mcp_xcf_analyzer(filePath="/full/path/to/file.swift", entireFile=true)
mcp_xcf_analyzer(filePath="/full/path/to/file.swift", startLine=10, endLine=50)
mcp_xcf_read_file filePath="main.swift"
mcp_xcf_read_dir directoryPath="."
mcp_xcf_read_dir directoryPath="src" fileExtension="swift"
mcp_xcf_cd_dir directoryPath="src"

- 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
- xcf show- See available projects
- xcf open 1- Select a project
- xcf build- Build the project
- xcf run- Run the project
- xcf current- Check current project
- xcf snippet filename.swift- Examine code
- xcf lz filename.swift- Analyze code
- xcf build- Build after fixing issues
- read_dir .- List files in current directory
- read_file main.swift- View file contents
- Use Agent native tools for file editing
- xcf build- Build after changes
- mcp_xcf_xcf action="show"- See available projects
- mcp_xcf_xcf action="open 1"- Select a project
- mcp_xcf_xcf action="build"- Build the project
- mcp_xcf_xcf action="run"- Run the project

Code Analysis Workflow (For AI Assistants)

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

File Manipulation Workflow (For AI Assistants)

- mcp_xcf_read_dir directoryPath="."- List files in current directory - mcp_xcf_read_file filePath="main.swift"- View file contents - Use Agent nativeedit_filetool for file editing - mcp_xcf_xcf action="build"- Build after changes

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

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

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

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

An MCP server to help AI assistants to answer questions and generate AccelByte Extend SDK code more effectively .

Local stdio MCP server that lets AI coding agents read and maintain structured architecture, rules, and decisions directly from your repository.

Official Context7 MCP server that brings up-to-date, version-specific library documentation and code examples into AI coding prompts.

Remote, no-auth MCP server providing AI-powered codebase context and answers

Instead of direct calling MCP tools, mcpcode server transforms MCP tool calls into TypeScript programs, enabling smarter, lower-latency orchestration by LLMs.

Help agents automatically write and test stories for your UI components

Official Svelte MCP server, provides docs and suggestions on the generated code.

Supercharge your Agent with Semantic Code Intelligence and save 💰 in the process!

Execute any LLM-generated code in the YepCode secure and scalable sandbox environment and create your own MCP tools using JavaScript or Python, with full support for NPM and PyPI packages

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.