> ## Documentation Index
> Fetch the complete documentation index at: https://docs.augmentcode.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Context Engine MCP

> Plug Context Engine into any agent via the Model Context Protocol

export const GitHubLogo = () => <svg width="24" height="24" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg">
    <path fill-rule="evenodd" clip-rule="evenodd" d="M7.49933 0.25C3.49635 0.25 0.25 3.49593 0.25 7.50024C0.25 10.703 2.32715 13.4206 5.2081 14.3797C5.57084 14.446 5.70302 14.2222 5.70302 14.0299C5.70302 13.8576 5.69679 13.4019 5.69323 12.797C3.67661 13.235 3.25112 11.825 3.25112 11.825C2.92132 10.9874 2.44599 10.7644 2.44599 10.7644C1.78773 10.3149 2.49584 10.3238 2.49584 10.3238C3.22353 10.375 3.60629 11.0711 3.60629 11.0711C4.25298 12.1788 5.30335 11.8588 5.71638 11.6732C5.78225 11.205 5.96962 10.8854 6.17658 10.7043C4.56675 10.5209 2.87415 9.89918 2.87415 7.12104C2.87415 6.32925 3.15677 5.68257 3.62053 5.17563C3.54576 4.99226 3.29697 4.25521 3.69174 3.25691C3.69174 3.25691 4.30015 3.06196 5.68522 3.99973C6.26337 3.83906 6.8838 3.75895 7.50022 3.75583C8.1162 3.75895 8.73619 3.83906 9.31523 3.99973C10.6994 3.06196 11.3069 3.25691 11.3069 3.25691C11.7026 4.25521 11.4538 4.99226 11.3795 5.17563C11.8441 5.68257 12.1245 6.32925 12.1245 7.12104C12.1245 9.9063 10.4292 10.5192 8.81452 10.6985C9.07444 10.9224 9.30633 11.3648 9.30633 12.0413C9.30633 13.0102 9.29742 13.7922 9.29742 14.0299C9.29742 14.2239 9.42828 14.4496 9.79591 14.3788C12.6746 13.4179 14.75 10.7025 14.75 7.50024C14.75 3.49593 11.5036 0.25 7.49933 0.25Z" fill="currentColor" />
  </svg>;

## What is the Context Engine?

Every AI uses the same models. **Context is the difference.**

Augment's Context Engine maintains a live understanding of your entire stack:

* **Semantic understanding** — Not just grep. A full search engine for code that understands meaning, not just text.
* **Relationship awareness** — Understands how files connect across repos, services, and architectures.
* **More than code** — Indexes commit history, codebase patterns, external sources (docs, tickets), and tribal knowledge.
* **Smart curation** — Retrieves only what matters and compresses context without losing information.

## Local vs Remote Server

| Aspect             | Local Server                                   | Remote Server                                                                                       |
| ------------------ | ---------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| **Best for**       | Making edits, new features, active development | Adding to codebase, understanding/talking to code                                                   |
| **What's indexed** | Working directory in real-time                 | Selected repos' default branches (chosen during GitHub App install)                                 |
| **Setup**          | Run Auggie CLI locally                         | GitHub App + [app.augmentcode.com/mcp/configuration](https://app.augmentcode.com/mcp/configuration) |

### Local Server (Recommended for Active Development)

* Run the Auggie CLI locally as an MCP server (stdio)
* Your client accesses `codebase-retrieval` for your working directory
* Indexes in real-time as you edit — no manual sync required

### Remote Server (Best for Adding/Understanding Code)

* Connect to Augment-hosted Context Engine over HTTP
* Integrates with Augment GitHub App
* Best for:
  * Adding to an existing codebase
  * Talking to / understanding the codebase
  * Cross-repo context
  * CI/server environments without a local working tree

### Credit cost for MCP

Context Engine MCP consumes credits at different rates per query based on the underlying costs and amount of retrieval required. In our experience, we've seen the average per query cost between 40-70 credits per query.

## How Indexing Works

### Local Indexing

* Real-time indexing of your working directory
* Picks up local file changes immediately
* No manual sync required

### Remote Indexing

* Repositories connected via the Augment GitHub App are automatically indexed
* **What's indexed:** All selected repositories' default branches (selected during GitHub App installation)
* **When it updates:** Automatically when commits are pushed to the default branch

## Connect to MCP

1. **Sign up** at [augmentcode.com](https://augmentcode.com)
2. **Get your configuration** at [app.augmentcode.com/mcp/configuration](https://app.augmentcode.com/mcp/configuration)

The configuration page provides ready-to-use setup instructions for your MCP client, including authentication details for both interactive (OAuth) and non-interactive (API key) use cases.

## Quickstart Guides

Get started with Context Engine MCP in your favorite AI tool:

<CardGroup cols={2}>
  <Card title="Claude Code" icon="terminal" href="/context-services/mcp/quickstart-claude-code">
    Set up Context Engine MCP with Claude Code
  </Card>

  <Card title="Codex" icon="terminal" href="/context-services/mcp/quickstart-codex">
    Set up Context Engine MCP with OpenAI Codex CLI
  </Card>

  <Card title="Cursor" icon="code" href="/context-services/mcp/quickstart-cursor">
    Set up Context Engine MCP with Cursor
  </Card>

  <Card title="Zed" icon="code" href="/context-services/mcp/quickstart-zed">
    Set up Context Engine MCP with Zed
  </Card>

  <Card title="GitHub Copilot" icon="github" href="/context-services/mcp/quickstart-github-copilot">
    Set up Context Engine MCP with GitHub Copilot
  </Card>

  <Card title="OpenCode" icon="code" href="/context-services/mcp/quickstart-open-code">
    Set up Context Engine MCP with OpenCode
  </Card>

  <Card title="Kilo Code" icon="code" href="/context-services/mcp/quickstart-kilo">
    Set up Context Engine MCP with Kilo Code
  </Card>

  <Card title="Kiro" icon="code" href="/context-services/mcp/quickstart-kiro">
    Set up Context Engine MCP with Kiro
  </Card>

  <Card title="AntiGravity" icon="rocket" href="/context-services/mcp/quickstart-anti-gravity">
    Set up Context Engine MCP with AntiGravity
  </Card>

  <Card title="Gemini CLI" icon="terminal" href="/context-services/mcp/quickstart-gemini-cli">
    Set up Context Engine MCP with Gemini CLI
  </Card>

  <Card title="Roo Code" icon="code" href="/context-services/mcp/quickstart-roo-code">
    Set up Context Engine MCP with Roo Code
  </Card>

  <Card title="Droid (Factory.AI)" icon="robot" href="/context-services/mcp/quickstart-droid">
    Set up Context Engine MCP with Droid
  </Card>
</CardGroup>
