Skip to main content

Overview

The easiest way to get started with FAS is to expose the subagent as a tool to your main agent via the Relace MCP. For personal use, you can integrate with any coding agent that has a custom MCP feature (e.g. Cursor, Claude Code). Using MCP is also the fastest way to test FAS in your production coding agent.

Prerequisites

  • Sign up for a Relace account.
  • Create an API key.
  • Install uv. This makes it possible to run relace-mcp-server without any additional Python environment setup via uvx.

Installation

Most MCP-compatible clients use a standard JSON configuration format. To use Relace, add the following to your client’s MCP settings file:
{
  "mcpServers": {
    "Relace": {
      "command": "uvx",
      "args": ["relace-mcp-server"],
      "env": {
        "RELACE_API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}
See below for client-specific instructions on where to place this configuration.
1

Add MCP Server

Run the following command:
claude mcp add Relace --scope user --env RELACE_API_KEY=YOUR_API_KEY_HERE -- uvx relace-mcp-server
2

Configure CLAUDE.md

Add the following to your CLAUDE.md file:
Always use relace_search for codebase exploration. Do not call it in parallel with other tools.
1

Add MCP Server

Open Cursor Settings and navigate to Tools & MCP > New MCP Server.Add the following JSON:
{
  "mcpServers": {
    "Relace": {
      "command": "uvx",
      "args": ["relace-mcp-server"],
      "env": {
        "RELACE_API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}
2

Configure User Rules

Navigate to Rules and Commands > User Rules > Add Rule.Add the following text:
Always use relace_search for codebase exploration. Do not call it in parallel with other tools.
1

Add MCP Server

Use MCP: Open User Configuration in the command palette to open your MCP config, then add the following:
{
  "servers": {
    "Relace": {
      "command": "uvx",
      "args": ["relace-mcp-server"],
      "env": {
        "RELACE_API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}
2

Configure Copilot Instructions

Add the following to your .github/copilot-instructions.md file:
Always use relace_search for codebase exploration. Do not call it in parallel with other tools.

How It Works

Once installed, the Relace MCP exposes a relace_search tool that your agent can invoke. The relace-mcp-server package includes our agentic search harness optimized to execute parallel view_file and grep commands in your local filesystem. When your agent invokes relace-search with a query, the FAS subagent sifts through the codebase and returns a formatted list of relevant files with line ranges—the same report_back output from the FAS API.

Next Steps

To build out a custom FAS agent, see the Overview section for a full code sample of the agent harness.