auggie-context-mcp
Enables AI agents like Claude and Cursor to query codebases using Augment's context engine via the Auggie CLI.
README
There is now an official Augment Code Context Engine MCP:
https://docs.augmentcode.com/context-services/mcp/overview
Auggie Context MCP Server
A Model Context Protocol (MCP) server that exposes Auggie CLI for codebase context retrieval. This allows AI agents like Claude, Cursor, and others to query codebases using Augment's powerful context engine.
Quick Start
This MCP server is designed to be used with MCP clients like Claude Desktop or Cursor. It cannot be used standalone.
Prerequisites
- Install Auggie CLI: https://docs.augmentcode.com/cli/overview
- Authenticate with Auggie:
This opens a browser for authentication. Once logged in, you're ready to go!auggie login
Setup with Claude Desktop
- Edit
~/Library/Application Support/Claude/claude_desktop_config.json(macOS) or%APPDATA%\Claude\claude_desktop_config.json(Windows) - Add this configuration:
{
"mcpServers": {
"auggie-context": {
"command": "npx",
"args": ["-y", "auggie-context-mcp@latest"]
}
}
}
- Restart Claude Desktop
- You should now see the
query_codebasetool available in Claude
Note: If you need to use a specific token instead of your Auggie CLI login, you can add an env section with AUGMENT_SESSION_AUTH. See the Authentication section for details.
Setup with Cursor
- Create or edit
.cursor/mcp.jsonin your project or globally - Add the same configuration as above
- Restart Cursor
See Installation & Usage section for detailed instructions.
Features
- š Codebase Query: Intelligent Q&A over repositories using Augment's context engine
- š Simple Setup: Pure TypeScript/Node.js implementation (no Python required)
- š Read-Only: Safe context retrieval without file modification capabilities
- ā” Fast: Direct integration with Auggie CLI
- š¦ Easy Distribution: Single npm package, works with
npx
Requirements
- Node.js 18+
- Auggie CLI installed and available on PATH
- Install: See Auggie CLI installation guide
- Verify:
auggie --version
- Augment Authentication (see Authentication section below)
Authentication
The server supports two authentication methods:
Option 1: Auggie CLI Login (Recommended)
Simply log in using the Auggie CLI:
auggie login
This opens a browser for authentication. Once logged in, the MCP server will automatically use your Auggie CLI session. No additional configuration needed!
Option 2: Environment Variable (AUGMENT_SESSION_AUTH)
Alternatively, you can provide an explicit access token via the AUGMENT_SESSION_AUTH environment variable.
Get Your Token:
# 1. Ensure Auggie CLI is installed
auggie --version
# 2. Sign in to Augment (opens browser)
auggie login
# 3. Print your access token
auggie token print
This will output something like:
TOKEN={"accessToken":"your-token-here","tenantURL":"https://...","scopes":["read","write"]}
Set the Token in MCP client config:
Add the token to your MCP client configuration:
{
"mcpServers": {
"auggie-context": {
"command": "npx",
"args": ["-y", "auggie-context-mcp@latest"],
"env": {
"AUGMENT_SESSION_AUTH": "{\"accessToken\":\"your-token-here\",\"tenantURL\":\"https://...\",\"scopes\":[\"read\",\"write\"]}"
}
}
}
}
Or set in shell environment:
# Get your token
TOKEN=$(auggie token print | grep '^TOKEN=' | cut -d= -f2-)
# One-time for current session
export AUGMENT_SESSION_AUTH="$TOKEN"
# Or persist in ~/.zshrc or ~/.bashrc
echo "export AUGMENT_SESSION_AUTH='$TOKEN'" >> ~/.zshrc
source ~/.zshrc
Which Method Should I Use?
- Use Auggie CLI Login if you're the only user on your machine and want the simplest setup
- Use AUGMENT_SESSION_AUTH if you need to use a specific token or are in a shared/CI environment
ā ļø Security: Never commit tokens to source control. Use environment variables or secure config stores.
Installation & Usage
Note: This server is designed to be used with MCP clients (Claude Desktop, Cursor, etc.). It uses the MCP protocol over stdio and cannot be run standalone.
Cursor Configuration
Add to your Cursor MCP config (.cursor/mcp.json - global or per-project):
Simple setup (uses your Auggie CLI login):
{
"mcpServers": {
"auggie-context": {
"command": "npx",
"args": ["-y", "auggie-context-mcp@latest"]
}
}
}
With explicit token (optional):
{
"mcpServers": {
"auggie-context": {
"command": "npx",
"args": ["-y", "auggie-context-mcp@latest"],
"env": {
"AUGMENT_SESSION_AUTH": "{\"accessToken\":\"your-token-here\",\"tenantURL\":\"https://...\",\"scopes\":[\"read\",\"write\"]}"
}
}
}
}
Claude Desktop (macOS)
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
Simple setup (uses your Auggie CLI login):
{
"mcpServers": {
"auggie-context": {
"command": "npx",
"args": ["-y", "auggie-context-mcp@latest"]
}
}
}
With explicit token (optional):
{
"mcpServers": {
"auggie-context": {
"command": "npx",
"args": ["-y", "auggie-context-mcp@latest"],
"env": {
"AUGMENT_SESSION_AUTH": "{\"accessToken\":\"your-token-here\",\"tenantURL\":\"https://...\",\"scopes\":[\"read\",\"write\"]}"
}
}
}
}
Claude Desktop (Windows)
Edit %APPDATA%\Claude\claude_desktop_config.json:
Simple setup (uses your Auggie CLI login):
{
"mcpServers": {
"auggie-context": {
"command": "npx",
"args": ["-y", "auggie-context-mcp@latest"]
}
}
}
With explicit token (optional):
{
"mcpServers": {
"auggie-context": {
"command": "npx",
"args": ["-y", "auggie-context-mcp@latest"],
"env": {
"AUGMENT_SESSION_AUTH": "{\"accessToken\":\"your-token-here\",\"tenantURL\":\"https://...\",\"scopes\":[\"read\",\"write\"]}"
}
}
}
}
Available Tools
query_codebase
Query a codebase using Augment's context engine.
Parameters:
query(required): The question or query about the codebaseworkspace_root(optional): Absolute path to the workspace/repository root. Defaults to current directory.model(optional): Model ID to use. Example:claude-3-5-sonnet-20241022rules_path(optional): Path to additional rules filetimeout_sec(optional): Query timeout in seconds. Default: 240output_format(optional): Output format (textorjson). Default:text
Example Usage in Claude/Cursor:
What is the architecture of this codebase?
How does the authentication system work?
Where is the user registration logic implemented?
Show me how the payment processing is handled.
Development
Setup
# Clone the repository
git clone https://github.com/aj47/auggie-mcp.git
cd auggie-mcp
# Install dependencies
npm install
# Build
npm run build
Development Mode
# Watch mode (auto-rebuild on changes)
npm run watch
# Run in development
npm run dev
Testing Locally
# Build the project
npm run build
# Make sure you're logged in to Auggie
auggie login
# Test with MCP Inspector (recommended)
npx @modelcontextprotocol/inspector node dist/index.js
# Or test with a real MCP client (Claude Desktop, Cursor)
# by pointing it to your local build instead of npx
Optional: If you want to test with an explicit token instead of your Auggie CLI login:
export AUGMENT_SESSION_AUTH=$(auggie token print | grep '^TOKEN=' | cut -d= -f2-)
npx @modelcontextprotocol/inspector node dist/index.js
Architecture
āāāāāāāāāāāāāāāāāāāāāāā
ā AI Agent ā
ā (Claude, Cursor) ā
āāāāāāāāāāāā¬āāāāāāāāāāā
ā MCP Protocol (stdio)
ā¼
āāāāāāāāāāāāāāāāāāāāāāā
ā auggie-context-mcp ā
ā (TypeScript/Node) ā
ā ā
ā Tool: ā
ā - query_codebase ā
āāāāāāāāāāāā¬āāāāāāāāāāā
ā subprocess
ā¼
āāāāāāāāāāāāāāāāāāāāāāā
ā Auggie CLI ā
ā --print --quiet ā
ā ā
ā Augment Context ā
ā Engine ā
āāāāāāāāāāāāāāāāāāāāāāā
Troubleshooting
Server not showing up in Claude/Cursor
- Check config file syntax: Ensure your JSON is valid (no trailing commas, proper quotes)
- Verify authentication: Make sure you've run
auggie loginor setAUGMENT_SESSION_AUTHin the config - Restart the client: Completely quit and restart Claude Desktop or Cursor
- Check logs:
- Claude Desktop (macOS):
~/Library/Logs/Claude/mcp*.log - Claude Desktop (Windows):
%APPDATA%\Claude\logs\mcp*.log - Cursor: Check MCP logs in settings
- Claude Desktop (macOS):
"Auggie CLI not found"
The server cannot find the Auggie CLI. Ensure it's installed and on your PATH:
auggie --version
If not found, install from: https://docs.augmentcode.com/cli/overview
"Authentication required" or "not logged in"
The Auggie CLI needs authentication. You have two options:
Option 1: Use Auggie CLI login (recommended)
auggie login
Option 2: Set explicit token in MCP config
- Run
auggie token printto get your token - Copy the entire JSON value (everything after
TOKEN=) - Add it to the
envsection in your MCP config (see examples above)
"Query timed out"
For large codebases, queries may take longer. The default timeout is 240 seconds (4 minutes). If you need more time, you can't currently configure this in the MCP client config, but you can modify the source code and rebuild.
Tool not appearing in Claude/Cursor
- Verify the server is configured correctly in your MCP config
- Check that the config file is in the correct location
- Restart the client application
- Look for the
query_codebasetool in the available tools list
Security
- Read-only: This server only queries codebases; it cannot modify files
- Token safety: Never commit
AUGMENT_SESSION_AUTHto version control - Workspace isolation: Queries are scoped to the specified workspace
License
MIT
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Links
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.