Xcode Errors MCP Server

Xcode Errors MCP Server

Bridges Xcode and Cursor to provide real-time access to build errors, warnings, and debug output from Xcode's DerivedData, enabling automated error analysis and fixes directly within Cursor.

Category
访问服务器

README

Xcode Errors MCP Server (WIP)

An MLOps pipeline using MCP (Model Context Protocol) server that bridges Xcode and Cursor, enabling real-time access to Xcode build errors, warnings, and debug output directly within Cursor.

⚠️ 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 and modify project files based on diagnostics
  • Live Updates: Monitors DerivedData for new build results

How It Works

  1. DerivedData Monitoring: Watches Xcode's DerivedData directory for new build logs
  2. Log Parsing: Extracts structured diagnostic information from build logs
  3. Console Integration: Captures real-time debug output from Xcode's console
  4. MCP Interface: Exposes diagnostics and file operations through MCP protocol
  5. Cursor Integration: Allows Cursor to query errors and make fixes automatically

Architecture

Xcode Build System
       ↓
DerivedData Logs → MCP Server → Cursor/LLM
       ↓                ↑
Console Output ←--------┘

Installation

  1. Clone this repository:

    git clone https://github.com/YOUR_USERNAME/xcode-errors-mcp.git  # Replace YOUR_USERNAME with actual GitHub username
    cd xcode-errors-mcp
    
  2. Run the installation script:

    ./install.sh
    
  3. Configure Cursor MCP settings:

    • Open Cursor settings
    • Navigate to MCP configuration
    • Copy the contents of cursor_config.json to your MCP configuration
    • IMPORTANT: Replace /path/to/your/xcode-errors-mcp with your actual installation path
    • Example: If you cloned to /Users/yourname/xcode-errors-mcp, update all paths accordingly
  4. 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/write project files: read_file(), write_file()

Quick Start

  1. Install dependencies:

    ./install.sh
    
  2. Test the installation:

    python3 examples/test_parser.py
    
  3. Configure Cursor:

    • Open Cursor Settings → Features → Model Context Protocol
    • Copy the contents of cursor_config.json to your MCP configuration
    • CRITICAL: Replace all instances of /path/to/your/xcode-errors-mcp with your actual installation path
    • Example 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)
  4. 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
  5. 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 errors
      • get_console_logs() - Get debug output
      • list_recent_projects() - See your projects
      • analyze_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 environment
  • args: Path to the MCP server script
  • env.PYTHONPATH: Path to the src directory

2. Finding Your Installation Path

cd xcode-errors-mcp
pwd  # This shows your full installation path

3. 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"
      }
    }
  }
}

For Publishers

Before publishing this repository, update the following placeholders:

  1. README.md: Replace YOUR_USERNAME with your actual GitHub username in the clone URL
  2. cursor_config.json: Already contains placeholder paths that users will need to update
  3. TROUBLESHOOTING.md: Already uses placeholder paths

Development Status

Ready for Testing - Core functionality implemented and tested!

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选