home / mcp / xcode index mcp server

Xcode Index MCP Server

Give AI agents access to Xcode's index

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "block-xcode-index-mcp": {
      "command": "/Users/<USERNAME>/Development/xcode-index-mcp/.venv/bin/xcode-index-mcp",
      "args": []
    }
  }
}

You can access and navigate your Xcode project index via the Model Control Protocol (MCP) using the Xcode Index MCP. It leverages IndexStoreDB to surface exhaustive lists of function call sites, helping you refactor code and find references across Swift/Objective-C codebases efficiently.

How to use

Use the Xcode Index MCP with your MCP client to query Xcode’s index data. Install the required MCP client tooling, run the local MCP service, and connect your agent to the provided command. You will be able to locate function call sites and definitions across your project to support refactoring, navigation, and code understanding.

How to install

Prerequisites you need before installation:

- Python and virtual environment tooling (to run the local MCP service) as needed by your setup.

Step by step commands to set up the MCP server and connect it to your agent:

Install the Python package manager for the environment and install dependencies as required by the local MCP server.

# Start by ensuring Python virtual environment tooling is available
# (adjust to your system paths and how you manage Python environments)

# Example: create and activate a venv, then install dependencies
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

# Build or prepare the Swift service that interfaces with Xcode's index if required by your setup
# This step is specific to the project setup

Additional notes

The Xcode Index MCP integrates two parts: an MCP server that handles communication with your MCP clients, and a Swift service that interfaces with Xcode’s index via IndexStoreDB. Ensure you have Xcode installed on your machine because the Swift service requires Xcode to access the index data.