xcf-ai-guide

A guide for connecting XCF, a Swift-based server that lets AI assistants automate Xcode project management, to tools such as Cursor or Claude Desktop. It documents MCP server configuration, project settings, and available automation tools.

In plain words
What is it for?
Use it when setting up XCF, configuring an MCP server, selecting an Xcode project folder or project file, or using its AI-assistant workflow tools.
Why use it?
It explains how to point the assistant at the correct Xcode project and configure the connection needed for automated project work.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/codefreezeai/xcf/xcf-ai-guide
Clone the repo
git clone --depth 1 https://github.com/CodeFreezeAI/xcf

Made for: Cursor.

Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,882 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00008 $0.01882
Opus 5 $0.00004 $0.00941
Sonnet 5 $0.00002 $0.00376
Haiku 4.5 $0.00001 $0.00188

Measured 2d ago against content hash de1b816c59bb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

xcf-ai-guide scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/xcf-ai-guide.mdc · 251 lines

How it starts

The opening of the file, as written. The whole thing — 251 lines — stays where its author put it; the contents beside it link to each section on GitHub.

XCF - AI Assistant Integration Guide

🤖 Overview for AI Assistants

XCF (Xcode MCP Server) is a powerful Swift-based automation tool designed to streamline Xcode project management for AI assistants. This guide provides comprehensive instructions for integrating XCF into AI-powered development workflows.

🔧 Configuration

MCP Server Setup

Add XCF to your MCP configuration file with the following JSON:

{
  "mcpServers": {
    "xcf": {
      "type": "stdio",
      "command": "/Applications/xcf.app/Contents/MacOS/xcf server"
    }
  }
}
Configuration Locations
  • Cursor: ~/.cursor/mcp.json
  • Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json

Advanced Project Configuration

For project-specific control, use environment variables:

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

🛠️ AI-Powered Workflow Tools

MCP Function Tools

XCF provides a rich set of tools for AI assistants:

Tool Purpose Example Usage
mcp_xcf_xcf Execute XCF actions mcp_xcf_xcf(action="build")
mcp_xcf_snippet Extract code snippets mcp_xcf_snippet(filePath="main.swift", entireFile=true)
mcp_xcf_analyzer Analyze Swift code mcp_xcf_analyzer(filePath="main.swift", entireFile=true)
mcp_xcf_read_file Read file contents mcp_xcf_read_file(filePath="main.swift")
mcp_xcf_write_file Write file contents mcp_xcf_write_file(filePath="test.txt", content="Hello World")

Standalone Action Tools

In addition to the general-purpose tools, XCF now provides dedicated tools for each action:

Tool Purpose Example Usage
mcp_xcf_show_help Display help information mcp_xcf_show_help()
mcp_xcf_grant_permission Grant Xcode permissions mcp_xcf_grant_permission()
mcp_xcf_run_project Run the current project mcp_xcf_run_project()
mcp_xcf_build_project Build the current project mcp_xcf_build_project()
mcp_xcf_show_current_project Show selected project mcp_xcf_show_current_project()
mcp_xcf_show_env Display environment variables mcp_xcf_show_env()
mcp_xcf_show_folder Show current directory mcp_xcf_show_folder()
mcp_xcf_list_projects List all Xcode projects mcp_xcf_list_projects()
mcp_xcf_select_project Select a project by number mcp_xcf_select_project(projectNumber=1)
mcp_xcf_analyze_swift_code Analyze Swift code mcp_xcf_analyze_swift_code(filePath="main.swift")

Read the full file on GitHub · 251 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 251 lines · 8 tokens per session scan A de1b816c59bb

Subscribe to this mod's changes

xcf-ai-guide is a cursor rule published in the GitHub repository CodeFreezeAI/xcf (12 stars, last pushed 5mo ago), licensed MIT. It adds 8 tokens to every session and 1,882 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.