Name | xcode-mcp-server JSON |
Version |
1.0.5
JSON |
| download |
home_page | None |
Summary | Drew's MCP server for Xcode integration |
upload_time | 2025-07-26 04:05:36 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | MIT |
keywords |
mcp
server
xcode
|
VCS |
 |
bugtrack_url |
|
requirements |
mcp
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Xcode MCP Server
An MCP (Model Context Protocol) server for controlling and interacting with Xcode from AI assistants like Claude.
## Features
- Get project hierarchy
- Build and run projects
- Retrieve build errors
- Get runtime output (placeholder)
- Clean projects
## Security
The server implements path-based security to prevent unauthorized access to files outside of allowed directories:
- You must specify allowed folders using the environment variable:
- `XCODEMCP_ALLOWED_FOLDERS=/path1:/path2:/path3`
- Otherwise, all files and subfolders from your home directory ($HOME) will be allowed.
Security requirements:
- All paths must be absolute (starting with /)
- No path components with `..` are allowed
- All paths must exist and be directories
Example:
```bash
# Set the environment variable
export XCODEMCP_ALLOWED_FOLDERS=/Users/username/Projects:/Users/username/checkouts
python3 xcode_mcp.py
# Or inline with the MCP command
XCODEMCP_ALLOWED_FOLDERS=/Users/username/Projects mcp dev xcode_mcp.py
```
If no allowed folders are specified, access will be restricted and tools will return error messages.
## Setup
1. Configure Claude for Desktop:
First, using homebrew, install 'uv'. You might already have this on your system, but installing it via Homebrew usually ensures that `uvx` (part of `uv`) is in the $PATH that Claude Desktop vends to on-device local MCP servers:
```brew install uv```
Open/create your Claude for Desktop configuration file
- Open Claude Desktop --> Settings --> Developer --> Edit Config (to find the file in finder)
- It should be at `~/Library/Application Support/Claude/claude_desktop_config.json`
- Add the following:
```json
{
"mcpServers": {
"xcode-mcp-server": {
"command": "uvx",
"args": [
"xcode-mcp-server"
]
}
}
}
```
If you'd like to allow only certain projects or folders to be accessible by xcode-mcp-server, add the `env` option, with a colon-separated list of absolute folder paths, like this:
```json
{
"mcpServers": {
"xcode-mcp-server": {
"command": "uvx",
"args": [
"xcode-mcp-server"
],
"env": {
"XCODEMCP_ALLOWED_FOLDERS": "/Users/andrew/my_project:/Users/andrew/Documents/source"
}
}
}
}
```
If you omit the `env` section, access will default to your $HOME directory.
2. Add xcode-mcp-server to **Claude Code** (Anthropic's CLI-based agent)
- Install claude code
- Add xcode-mcp-server:
claude mcp add --scope user --transport stdio `which uvx` xcode-mcp-server
## Usage
1. Open Xcode with a project
2. Start Claude for Desktop
- If xcode-mcp-server failed to initialize properly, you'll see errors
3. Look for the hammer icon to find available Xcode tools
4. Use natural language to interact with Xcode, for example:
- "Build the project at /path/to/MyProject.xcodeproj"
- "Run the app in /path/to/MyProject"
- "What build errors are there in /path/to/MyProject.xcodeproj?"
- "Clean the project at /path/to/MyProject"
### Parameter Format
All tools require a `project_path` parameter pointing to an Xcode project/workspace directory:
```
"/path/to/your/project.xcodeproj"
```
or
```
"/path/to/your/project"
```
## Development
The server is built with the MCP Python SDK and uses AppleScript to communicate with Xcode.
To test the server locally without Claude, use:
```bash
# Set the environment variable first
export XCODEMCP_ALLOWED_FOLDERS=/Users/username/Projects
mcp dev xcode_mcp.py
# Or inline with the command
XCODEMCP_ALLOWED_FOLDERS=/Users/username/Projects mcp dev xcode_mcp.py
```
This will open the MCP Inspector interface where you can test the tools directly.
### Testing in MCP Inspector
When testing in the MCP Inspector, provide input values as quoted strings:
```
"/Users/username/Projects/MyApp"
```
## Limitations
- Project hierarchy is a simple file listing implementation
- AppleScript syntax may need adjustments for specific Xcode versions # xcode-mcp-server
Raw data
{
"_id": null,
"home_page": null,
"name": "xcode-mcp-server",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "mcp, server, xcode",
"author": null,
"author_email": "Andrew Benson <db@nuclearcyborg.com>",
"download_url": "https://files.pythonhosted.org/packages/3a/c6/a73174e03d61221ed5a9a6e469905c04961b1ded7f0f1190cbe0190781c6/xcode_mcp_server-1.0.5.tar.gz",
"platform": null,
"description": "# Xcode MCP Server\n\nAn MCP (Model Context Protocol) server for controlling and interacting with Xcode from AI assistants like Claude.\n\n## Features\n\n- Get project hierarchy\n- Build and run projects\n- Retrieve build errors\n- Get runtime output (placeholder)\n- Clean projects\n\n## Security\n\nThe server implements path-based security to prevent unauthorized access to files outside of allowed directories:\n\n- You must specify allowed folders using the environment variable:\n - `XCODEMCP_ALLOWED_FOLDERS=/path1:/path2:/path3`\n- Otherwise, all files and subfolders from your home directory ($HOME) will be allowed.\n\nSecurity requirements:\n- All paths must be absolute (starting with /)\n- No path components with `..` are allowed\n- All paths must exist and be directories\n\nExample:\n```bash\n# Set the environment variable\nexport XCODEMCP_ALLOWED_FOLDERS=/Users/username/Projects:/Users/username/checkouts\npython3 xcode_mcp.py\n\n# Or inline with the MCP command\nXCODEMCP_ALLOWED_FOLDERS=/Users/username/Projects mcp dev xcode_mcp.py\n```\n\nIf no allowed folders are specified, access will be restricted and tools will return error messages.\n\n## Setup\n\n1. Configure Claude for Desktop:\n\nFirst, using homebrew, install 'uv'. You might already have this on your system, but installing it via Homebrew usually ensures that `uvx` (part of `uv`) is in the $PATH that Claude Desktop vends to on-device local MCP servers:\n\n```brew install uv```\n\nOpen/create your Claude for Desktop configuration file\n- Open Claude Desktop --> Settings --> Developer --> Edit Config (to find the file in finder)\n- It should be at `~/Library/Application Support/Claude/claude_desktop_config.json`\n- Add the following:\n\n```json\n{\n \"mcpServers\": {\n \"xcode-mcp-server\": {\n \"command\": \"uvx\",\n \"args\": [\n \"xcode-mcp-server\"\n ]\n }\n }\n}\n```\n\nIf you'd like to allow only certain projects or folders to be accessible by xcode-mcp-server, add the `env` option, with a colon-separated list of absolute folder paths, like this:\n\n```json\n{\n \"mcpServers\": {\n \"xcode-mcp-server\": {\n \"command\": \"uvx\",\n \"args\": [\n \"xcode-mcp-server\"\n ],\n \"env\": {\n \"XCODEMCP_ALLOWED_FOLDERS\": \"/Users/andrew/my_project:/Users/andrew/Documents/source\"\n }\n }\n }\n}\n```\n\nIf you omit the `env` section, access will default to your $HOME directory.\n\n2. Add xcode-mcp-server to **Claude Code** (Anthropic's CLI-based agent)\n\n- Install claude code \n- Add xcode-mcp-server:\n\n claude mcp add --scope user --transport stdio `which uvx` xcode-mcp-server\n \n \n## Usage\n\n1. Open Xcode with a project\n2. Start Claude for Desktop\n - If xcode-mcp-server failed to initialize properly, you'll see errors\n3. Look for the hammer icon to find available Xcode tools\n4. Use natural language to interact with Xcode, for example:\n - \"Build the project at /path/to/MyProject.xcodeproj\"\n - \"Run the app in /path/to/MyProject\"\n - \"What build errors are there in /path/to/MyProject.xcodeproj?\"\n - \"Clean the project at /path/to/MyProject\"\n\n### Parameter Format\n\nAll tools require a `project_path` parameter pointing to an Xcode project/workspace directory:\n\n```\n\"/path/to/your/project.xcodeproj\"\n```\n\nor\n\n```\n\"/path/to/your/project\"\n```\n\n## Development\n\nThe server is built with the MCP Python SDK and uses AppleScript to communicate with Xcode.\n\nTo test the server locally without Claude, use:\n\n```bash\n# Set the environment variable first\nexport XCODEMCP_ALLOWED_FOLDERS=/Users/username/Projects\nmcp dev xcode_mcp.py\n\n# Or inline with the command\nXCODEMCP_ALLOWED_FOLDERS=/Users/username/Projects mcp dev xcode_mcp.py\n```\n\nThis will open the MCP Inspector interface where you can test the tools directly.\n\n### Testing in MCP Inspector\n\nWhen testing in the MCP Inspector, provide input values as quoted strings:\n\n```\n\"/Users/username/Projects/MyApp\"\n```\n\n## Limitations\n\n- Project hierarchy is a simple file listing implementation\n- AppleScript syntax may need adjustments for specific Xcode versions # xcode-mcp-server\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Drew's MCP server for Xcode integration",
"version": "1.0.5",
"project_urls": {
"Homepage": "https://github.com/drewster99/xcode-mcp-server",
"Issues": "https://github.com/drewster99/xcode-mcp-server/issues",
"Repository": "https://github.com/drewster99/xcode-mcp-server"
},
"split_keywords": [
"mcp",
" server",
" xcode"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "fb1b9bc22f5c7b6ae2d5a9efce64e49f05bbbd3a4809e0afec5c72ab767f983d",
"md5": "b3dc431dadb53445d3611daeab0a0447",
"sha256": "9e78f8f6285cae09be746caed7f2d2b39d495ad1435052fb0dd5c75349db175a"
},
"downloads": -1,
"filename": "xcode_mcp_server-1.0.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b3dc431dadb53445d3611daeab0a0447",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 11125,
"upload_time": "2025-07-26T04:05:35",
"upload_time_iso_8601": "2025-07-26T04:05:35.588656Z",
"url": "https://files.pythonhosted.org/packages/fb/1b/9bc22f5c7b6ae2d5a9efce64e49f05bbbd3a4809e0afec5c72ab767f983d/xcode_mcp_server-1.0.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "3ac6a73174e03d61221ed5a9a6e469905c04961b1ded7f0f1190cbe0190781c6",
"md5": "8e7336f71bc0d3bd18cdbf0b0f85be24",
"sha256": "8fc3e67088f1188eb688e397c033439ddd599268ee7404f05f87e9f09d8c708e"
},
"downloads": -1,
"filename": "xcode_mcp_server-1.0.5.tar.gz",
"has_sig": false,
"md5_digest": "8e7336f71bc0d3bd18cdbf0b0f85be24",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 9588,
"upload_time": "2025-07-26T04:05:36",
"upload_time_iso_8601": "2025-07-26T04:05:36.653377Z",
"url": "https://files.pythonhosted.org/packages/3a/c6/a73174e03d61221ed5a9a6e469905c04961b1ded7f0f1190cbe0190781c6/xcode_mcp_server-1.0.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-26 04:05:36",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "drewster99",
"github_project": "xcode-mcp-server",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "mcp",
"specs": [
[
">=",
"1.2.0"
]
]
}
],
"lcname": "xcode-mcp-server"
}