MCP.so
登录

Xcode MCP Server

@zackbissell

基本信息

分类

其他

许可证

MIT license

传输方式

stdio

作者

zackbissell

关于 Xcode MCP Server

暂无概览

Xcode MCP Server 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "xcode": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/xcode-server"
      ],
      "env": {
        "PROJECTS_BASE_DIR": ""
      }
    }
  }
}

Xcode MCP Server 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

点击上方按钮,在临时沙箱中运行此服务器并实时获取工具列表。

概览

What is Xcode MCP Server?

A Model Context Protocol (MCP) server that acts as a bridge between Claude and your local Xcode projects. It enables intelligent code assistance, project management, and automated development tasks while keeping all communication on your machine—your code is never exposed to the internet.

How to use Xcode MCP Server?

Install via NPM (npx -y @modelcontextprotocol/xcode-server), global NPM install, or from source. Set the PROJECTS_BASE_DIR environment variable to your Xcode projects directory, then add the server configuration to your Claude Desktop config file (claude_desktop_config.json). After restarting Claude, you can ask natural language requests like “Create a new SwiftUI view” or “Build the project in Debug configuration.”

Key features of Xcode MCP Server

  • Automatically detects your active Xcode project
  • Supports manual project selection for precise control
  • Reads and writes Swift, Objective‑C, and config files
  • Lists files with type filtering and search
  • Accesses targets, configurations, and build schemes
  • Executes builds and runs test suites

Use cases of Xcode MCP Server

  • Ask Claude to set the projects directory and switch active projects
  • Create new Swift views with preview providers or add properties to existing files
  • Analyze source files for potential issues and code improvements
  • Build the project in a specific configuration and run unit test modules

常见问题

1

How do I specify which Xcode projects Claude can access?

Set the `PROJECTS_BASE_DIR` environment variable in the server configuration to the absolute path of your Xcode projects directory. The server will scan that folder for `.xcodeproj` and `.xcworkspace` files.

2

What happens if my project isn’t detected?

Verify that the path in `PROJECTS_BASE_DIR` is correct, ensure Xcode Command Line Tools are installed, and check file permissions on the project directory.

3

Does Claude send my source code over the internet?

No. All communication between the Xcode MCP server and your projects happens locally on your machine. The MCP protocol ensures Claude only performs approved operations through well‑defined interfaces.

4

What file types can Claude read or modify?

Claude can read and modify Swift files, Objective‑C files, and project configuration files (e.g., `.pbxproj`). It also supports syntax‑aware creation of new source files with proper imports.

5

Which build and test operations are supported?

The server can execute builds with specific configurations (e.g., Debug) and run test suites. You can ask for available build schemes and trigger a build or test run through Claude.

评论

其他 分类下的更多 MCP 服务器