Xcode 索引 MCP

by block

通过模型控制协议(MCP)和IndexStoreDB,提供对您的iOS/macOS项目索引的Goose/Cursor访问。这提供了详尽的函数调用位置列表,帮助您的工具进行重构和代码导航。

Developer toolsstdioCommunity

Repository-wide counts · Cached 2026-03-07

Overview

The Xcode 索引 MCP MCP server is a publicly available project. Review the upstream repository for installation instructions, supported tools, compatibility, permissions, and current maintenance status.

Configuration

Configuration, transport, authentication, and runtime requirements vary by project. Open the repository before connecting and use the smallest set of credentials and permissions required.

Open the Xcode 索引 MCP repository to read the latest documentation.

KEEP EXPLORING

Compare source, connection, and authentication details before choosing an implementation.

View the complete category

模型上下文协议服务器

modelcontextprotocol

Community

一组用于模型上下文协议(MCP)的参考实现,展示了对大型语言模型(LLM)工具和数据源的安全且受控的访问方式。

Context7 Platform - Up-to-date Code Docs For Any Prompt

upstash

Community

Context7 MCP server providing up-to-date, version-specific documentation and code examples for libraries, enabling coding agents to fetch accurate docs and code snippets. Requires an API key for higher rate limits, passed via CONTEXT7_API_KEY header.

Playwright MCP

Microsoft Corporation

Community

A Model Context Protocol (MCP) server that provides browser automation capabilities using Playwright. Enables LLMs to interact with web pages through structured accessibility snapshots, bypassing the need for screenshots or visually-tuned models.

AIHawk

feder-cr

Community

AIHawk is an anti detect browser and web browsing agent, open source, with an MCP server for coding agents: undetected, no captchas, no blocks. It requires an OpenRouter API key for the standalone web UI mode, which can be provided via the --openrouter-key flag or the OPENROUTER_API_KEY environment variable or a .env file in the running directory.

FROM THE SOURCE

Repository README

Build-time snapshot · Retrieved 2026-10-05

View original

Xcode Index MCP

Gives Goose/Cursor access to your iOS/macOS project index through the Model Control Protocol (MCP) and IndexStoreDB. This provides exhaustive lists of function call sites to help your agent with refactoring and code navigation.

Example prompt

"Remove myParameter from the initializer on line 48 of MyViewController.swift. Use the Xcode Index MCP to ensure all references are updated."

How to use

  1. Install uv (Python package manager) and run uv sync

    brew install uv
    cd /path/to/this/repo
    uv sync
    
  2. Build the Swift service (Xcode must be installed)

    cd swift-service
    swift build
    

    This step is required as it provides the interface to Xcode's index.

  3. Install in Agent of your choice

    Goose:

    Go to settings and add a custom extension. In the modal that pops up, under the command field, add this line:

    /Users/<USERNAME>/Development/xcode-index-mcp/.venv/bin/xcode-index-mcp
    

    Note: Replace <USERNAME> with your actual system username, or with the correct path xcode-index-mcp on your machine.

    The rest should look something like this:

    Cursor:

    Go to Settings > MCP > Add new global MCP server. Update mcp.json (typically located in your Cursor configuration directory) to look something like this:

        {
            "mcpServers": {
                "Xcode Index MCP": {
                    "command": "/Users/<USERNAME>/Development/xcode-index-mcp/.venv/bin/xcode-index-mcp"
                }
            }
        }
    

    Note: Replace <USERNAME> with your actual system username, or with the correct path xcode-index-mcp on your machine.

    Claude Code:

    Run this command in the terminal to add the mcp to Claude Code

    claude mcp add xcode-index-mcp -- /Users/<USERNAME>/Development/xcode-index-mcp/.venv/bin/xcode-index-mcp
    

    Note: Replace <USERNAME> with your actual system username, or with the correct path xcode-index-mcp on your machine.

  4. Update .gooseHints, cursorRules, or CLAUDE.MD in your project to tell your agent how to use the plugin. Replace the project name with the name of your project as it appears in the derived data folder.

    Use tool `xcode-index-mcp` if available. Use project name <Your project name here>. The tool can locate call sites of functions, and function definitions from call sites. If you need a filepath to make a request, use `rg` to find the file and `rg -n` to find the line number. Use the absolute path when requesting symbols from a file.
    

    For Cursor, you may want to add these instructions in their own rule file - at the time of writing I don't think cursor reads the MCP instructions field.

Running tests

To run tests for Swift, cd into swift-service and run swift test.

How it works

The tool consists of two main components:

  1. An MCP server in the src directory that handles communication with Goose/Cursor
  2. A Swift service in the swift-service directory that interfaces with Xcode's index using Apple's IndexStoreDB package

When the MCP server calls 'load_index', the Swift service will look through Xcode's derived data directory for a project file. When found it will attempt to load the project's index. Queries are passed from the MCP server to the index through a subset of the methods provided in IndexStoreDB.