How to Install and Use Augment Context Engine MCP
How to Install and Use Augment Context Engine MCP
Augment's Context Engine MCP plugs enterprise-grade code search into modern AI agents. Once the Model Context Protocol (MCP) server is running locally, tools such as Cursor, Claude Code, Zed, or GitHub Copilot can ask Augment for precise code retrieval, keeping your assistant grounded in the real project. This guide walks through installation, configuration, and everyday usage so you can start shipping features faster.
Why Choose the Augment Context Engine MCP?
- Deep project awareness – Augment builds a multi-repo search index, so queries like "Where do we init Stripe?" return the right files instantly.
- MCP compatibility – Any MCP-capable client (Cursor, Claude Desktop, Gemini CLI, etc.) can call the same server. No new plugins required.
- Secure auth flow – You can rely on the Auggie CLI login session or inject a scoped access token via
AUGMENT_SESSION_AUTH. - Cross-platform tooling – Works on macOS, Windows, and Linux. The server communicates via stdio, making it editor-agnostic.
Prerequisites
- Node.js 18+ so you can install the Auggie CLI (
npmornpx). - Augment account with access to Context Engine. Sign up at Augment and verify your workspace.
- Supported MCP client such as Cursor, Claude Code/Desktop, Zed, or GitHub Copilot.
Step 1: Install the Auggie CLI
Augment ships the MCP server as part of the Auggie CLI. Install the pre-release package globally:
npm install -g @augmentcode/auggie@prereleaseVerify the installation:
auggie --versionKeeping the CLI updated ensures you receive protocol improvements and new retrieval tools.
Step 2: Authenticate with Augment
Log in with your browser so the CLI can issue signed requests:
auggie loginThis command opens an Augment OAuth window. Once authenticated, the CLI stores a local session that the MCP server will reuse. If you need a CI-friendly setup, export a token instead:
auggie token print
export AUGMENT_SESSION_AUTH='{"accessToken":"...","tenantURL":"https://tenant.augmentcode.com","scopes":["read","write"]}'Tip: Never commit tokens to git. Prefer terminal exports,
.envfiles in.gitignore, or secret managers.
Step 3: Run the MCP Server
The Auggie CLI exposes a context engine mode:
auggie --mcp -m default -w "${WORKSPACE_FOLDER_PATHS%%,*}"-m defaultselects your Augment model profile.-wpoints to the first workspace folder so the server can mirror your project tree.
When a client connects via MCP, Auggie indexes files incrementally and offers tools like codebase-retrieval or query_codebase.
Step 4: Configure Your MCP Client
Cursor IDE
- Open Settings › Tools & MCP → New MCP Server.
- Paste the JSON snippet matching your OS:
macOS / Linux (bash):
{
"mcpServers": {
"augment-context-engine": {
"type": "local",
"command": "bash",
"args": ["-c", "auggie --mcp -m default -w \"${WORKSPACE_FOLDER_PATHS%%,*}\""] ,
"enabled": true
}
}
}Windows (PowerShell):
{
"mcpServers": {
"augment-context-engine": {
"type": "local",
"command": "powershell",
"args": ["-Command", "auggie --mcp -m default -w \"($env:WORKSPACE_FOLDER_PATHS -split ',')[0]\""],
"enabled": true
}
}
}- Restart Cursor. You should now see
codebase-retrievalin the MCP tool palette.
Claude Code / Claude Desktop
- Edit the Claude config (macOS:
~/Library/Application Support/Claude/claude_desktop_config.json, Windows:%APPDATA%/Claude/claude_desktop_config.json). - Add the Augment server entry:
{
"mcpServers": {
"augment-context-engine": {
"command": "npx",
"args": ["-y", "auggie-context-mcp@latest"],
"env": {
"AUGMENT_SESSION_AUTH": "{\"accessToken\":\"your-token\",\"tenantURL\":\"https://...\"}"
}
}
}
}- Restart Claude Desktop to load the new MCP toolset.
Workspace root: Claude Code needs the repo root path so the server indexes the correct files. Configure it under Claude Code Settings › Workspace Root inside the IDE.
Step 5: Test the Integration
In your MCP-enabled IDE, run a simple retrieval prompt:
"What does this project do? Please use the codebase retrieval tool."You should see the agent call codebase-retrieval, stream context-rich snippets, and answer with citations. If the tool is missing, check the CLI output for errors such as:
Auggie CLI not found→ ensure the binary is on PATH.Authentication required→ rerunauggie loginor refresh your token.Query timed out→ the first index build can take longer on large monorepos; retry once the indexing completes.
Everyday Usage Tips
- Ask precise questions. Instead of "Where is auth?" ask "Show me the middleware that validates JWTs" to minimize noise.
- Chain tools. Cursor and Claude can invoke
codebase-retrieval,codebase-search, and other MCP tools sequentially, giving you iterative answers. - Multi-repo projects. Use multiple
-wflags or workspace folders when developing microservices so Augment maps cross-service references. - Offline fallback. If you lose connectivity, the CLI continues serving cached indexes, but responses may miss recent remote changes. Run
git pulland restart the server when you're back online.
How Good Is the Augment Context Engine MCP?
- Precision: Augment focuses on developer workflows, so ranking prioritizes call graphs, tests, and documentation relevant to your query.
- Speed: The MCP server streams tokens to the client almost immediately, and subsequent queries reuse the warmed cache.
- Security: Auth tokens stay local, and stdio transport means you control the runtime environment. For teams, Augment Enterprise supports organization-wide policies and audit logs.
- Weaknesses: The engine depends on Augment's managed backend, so you need an active subscription and network access. Additionally, because it indexes locally, your first run on giant monorepos can take several minutes.
Compared to DIY embeddings or open-source retrievers, Augment saves setup time and integrates with major IDE agents out of the box. If you already live in Cursor or Claude, the MCP path feels native.
Troubleshooting Checklist
| Symptom | Likely Cause | Fix |
|---|---|---|
| MCP server not visible | JSON misconfigured | Validate commas/quotes, restart client |
Auggie CLI not found | PATH issue | Reinstall CLI or add npm global bin to PATH |
| Authentication error | Expired session | auggie login or refresh AUGMENT_SESSION_AUTH |
| Tool missing inside IDE | Workspace mismatch | Confirm -w points to the active repo |
| Slow queries | First-time indexing | Leave the CLI running until indexing completes |
Conclusion
Augment's Context Engine MCP gives AI coding agents trustworthy access to your real codebase. With a few terminal commands—installing Auggie, logging in, and pasting the MCP config—you gain precise retrieval, faster reviews, and less hallucinated code. Keep the server running alongside your IDE and treat it like any other development service: update regularly, monitor logs, and secure your tokens.
Need dependable infrastructure to host your MCP experiments, auxiliary services, or demo environments? Explore affordable global nodes from LightNode at this link and spin up a VPS in minutes.