Xcode Errors MCP Server
Monitors Xcode's DerivedData directory and console output to provide real-time access to build errors, warnings, and debug logs, enabling automated analysis and fixes of Swift/SwiftUI projects.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Xcode Errors MCP Serverget the latest build errors from my current Xcode project"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Xcode Errors MCP Server
An MCP (Model Context Protocol) server that bridges Xcode and Cursor, giving an LLM real-time access to build errors, warnings, and console output directly within your editor.
⚠️ This repo is still under development and things may break without warning.
Features
Real-time Error Monitoring: Automatically detects and parses Xcode build errors and warnings
Debug Log Streaming: Captures and streams Xcode console output and debug logs
Project Analysis: Analyzes Swift/SwiftUI projects for common issues
File Integration: Provides tools to read project files for diagnostic context
Live Updates: Monitors DerivedData for new build results
Related MCP server: Xcode Diagnostics MCP Plugin
How It Works
DerivedData Monitoring: Watches Xcode's DerivedData directory for new build logs
Log Parsing: Extracts structured diagnostic information from build logs
Console Integration: Captures real-time debug output from Xcode's console
MCP Interface: Exposes diagnostics and file operations through MCP protocol
Cursor Integration: Allows Cursor to query errors and make fixes automatically
Architecture
Xcode Build System
↓
DerivedData Logs → MCP Server → Cursor/LLM
↓ ↑
Console Output ←--------┘Installation
Clone this repository:
git clone https://github.com/YOUR_USERNAME/xcode-errors-mcp.git # Replace YOUR_USERNAME with actual GitHub username cd xcode-errors-mcpRun the installation script:
./install.shConfigure Cursor MCP settings:
Open Cursor settings
Navigate to MCP configuration
Copy the contents of
cursor_config.jsonto your MCP configurationIMPORTANT: Replace
/path/to/your/xcode-errors-mcpwith your actual installation pathExample: If you cloned to
/Users/yourname/xcode-errors-mcp, update all paths accordingly
Restart Cursor completely (⌘+Q and reopen) to activate the MCP server connection
Usage
Once connected, Cursor can:
Query current build errors:
get_build_errors()Monitor debug output:
get_console_logs()Analyze project structure:
analyze_project()Read project files:
read_project_file()
Quick Start
Install dependencies:
./install.shTest the installation:
python3 examples/test_parser.pyConfigure Cursor:
Open Cursor Settings → Features → Model Context Protocol
Copy the contents of
cursor_config.jsonto your MCP configurationCRITICAL: Replace all instances of
/path/to/your/xcode-errors-mcpwith your actual installation pathExample configuration for installation in
/Users/yourname/xcode-errors-mcp:{ "mcpServers": { "xcode-errors": { "command": "/Users/yourname/xcode-errors-mcp/venv/bin/python", "args": [ "/Users/yourname/xcode-errors-mcp/src/xcode_mcp_server.py" ], "env": { "PYTHONPATH": "/Users/yourname/xcode-errors-mcp/src" } } } }Restart Cursor completely (⌘+Q and reopen)
Verify it's working:
Check that the MCP server shows a green indicator in Cursor settings
If you see a red indicator, check
TROUBLESHOOTING.md
Start using it:
Build a project in Xcode (to generate some logs)
In Cursor, you can now use tools like:
get_build_errors()- Get current build errorsget_console_logs()- Get debug outputlist_recent_projects()- See your projectsanalyze_project("ProjectName")- Analyze issues
Configuration Placeholders
After cloning this repository, you must update the following placeholders with your actual paths:
1. cursor_config.json
Replace /path/to/your/xcode-errors-mcp with your installation directory:
command: Path to your Python virtual environmentargs: Path to the MCP server scriptenv.PYTHONPATH: Path to the src directory
2. Finding Your Installation Path
cd xcode-errors-mcp
pwd # This shows your full installation path3. Example Configuration
If you installed to /Users/yourname/xcode-errors-mcp, your cursor_config.json should look like:
{
"mcpServers": {
"xcode-errors": {
"command": "/Users/yourname/xcode-errors-mcp/venv/bin/python",
"args": [
"/Users/yourname/xcode-errors-mcp/src/xcode_mcp_server.py"
],
"env": {
"PYTHONPATH": "/Users/yourname/xcode-errors-mcp/src"
}
}
}
}Security Considerations
This server gives an LLM read access to project files and write access for saving device logs, so access is treated like any other privilege grant:
Transport: runs locally over stdio — nothing is exposed on the network
Home-directory containment: file operations are restricted to your home directory; requests for paths outside it (e.g.,
/etc/passwd) are rejected at the server levelDotfile protection: the server refuses any path where a component starts with
., blocking access to~/.ssh,~/.aws, and similar credential storesRead-only for source:
read_project_fileis read-only; there is nowrite_filetool — the LLM cannot overwrite your source through this serverReview before committing: like any AI-assisted workflow, treat suggested edits as a diff to review, not a push-button deploy
Known gaps / roadmap:
Path scoping is currently home-directory-wide rather than scoped to a specific Xcode project root — a tighter allow-list (e.g.,
~/Developer/) or per-session project root detection would reduce the blast radius furtherNo dry-run mode for
save_device_logs; the output path is validated but not previewed before writing
Development Status
✅ Core functionality implemented and tested — WIP, things may change without notice.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nazufel/xcode-errors-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server