home / mcp / xcf xcode mcp server
Provides MCP-driven control over Xcode projects, file operations, document handling, and Swift code analysis for streamlined AI-assisted development.
Configuration
View docs{
"mcpServers": {
"codefreezeai-xcf": {
"command": "Applications/xcf.app/Contents/MacOS/xcf",
"args": [
"server"
],
"env": {
"XCODE_PROJECT": "/path/to/project/project.xcodeproj",
"XCODE_PROJECT_FOLDER": "/path/to/project/"
}
}
}
}You set up and run the XCF Xcode MCP Server to control and automate your Swift development workflow from your preferred MCP client. This server lets you manage Xcode projects, read and write files, work with documents in Xcode, and analyze Swift code directly from your AI environment with minimal setup and zero dependencies.
You connect your MCP client to the XCF MCP server to perform actions such as listing open Xcode projects, selecting a project, building, running, and analyzing Swift code. Use the server to read and write files, manage directories, and interact with Xcode documents without leaving your AI IDE. Start by configuring the MCP server in your client, then issue commands like show, open, build, run, and various file and document operations. Use the analysis tools to inspect Swift code for style, complexity, and potential bugs, and leverage the snippet and analyzer features to extract code snippets or analyze code ranges.
Prerequisites: ensure you have the macOS environment ready for running a Swift-based MCP server. You will install the XCF app, then configure it in your MCP setup.
Step 1: Download the XCF application and move it to your /Applications folder.
Step 2: Launch the application to approve the internet download.
Step 3: You will see an alert confirming the server is ready once the approval completes.
Step 4: If no alert appears, you may need to fix codesigning with the following command and try launching again.
codesign --force --deep --sign - /Applications/xcf.appAdd XCF as a MCP server in your configuration so your AI tools can communicate with it.
{
"mcpServers": {
"xcf": {
"type": "stdio",
"command": "Applications/xcf.app/Contents/MacOS/xcf",
"args": ["server"]
}
}
}Store the MCP config in these locations depending on your environment.
Cursor: ~/.cursor/mcp.json
Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json
Extract code snippets from a file or range, usable by human or AI assistants.
Analyze Swift code for potential issues, such as style deviations, high complexity, and unused symbols.
Read contents of a file from the workspace.
Write content to a file in the workspace.
Edit specific lines in a file with a replacement block.
Open a document in Xcode for reading or editing.
Save changes to an open Xcode document.
List contents of a directory.
Create a new directory in the workspace.
Remove a directory from the workspace.