npm install -g @augmentcode/auggie@prerelease
# Method 1: Interactive login
auggie login
# Method 2: Use token (suitable for CI/CD)
export AUGMENT_API_TOKEN="your-token"
export AUGMENT_API_URL="https://i0.api.augmentcode.com/"
claude mcp add-json auggie-mcp --scope user '{
"type": "stdio",
"command": "auggie",
"args": ["--mcp"],
"env": {
"AUGMENT_API_TOKEN": "your-token",
"AUGMENT_API_URL": "https://i0.api.augmentcode.com/"
}
}'
claude mcp add-json auggie-mcp --scope project '{
"type": "stdio",
"command": "auggie",
"args": ["-w", "/path/to/project", "--mcp"],
"env": {
"AUGMENT_API_TOKEN": "your-token",
"AUGMENT_API_URL": "https://i0.api.augmentcode.com/"
}
}'
Edit ~/.codex/config.toml:
[mcp_servers."auggie-mcp"]
command = "auggie"
args = ["-w", "/path/to/project", "--mcp"]
startup_timeout_ms = 20000
# Check MCP status
claude mcp list
# Should display:
# auggie-mcp: auggie --mcp - ✓ Connected
# Test functionality
claude --print "Use codebase-retrieval to search all files in the current directory"
# Search all Python files
claude --print "Use codebase-retrieval to search *.py files"
# Search specific directory
claude --print "Use codebase-retrieval to search files in src/ directory"
# Analyze function implementation
claude --print "Use codebase-retrieval to find the implementation of the main function"
# Search API endpoints
claude --print "Use codebase-retrieval to search all API endpoint definitions"
Create ~/.augment/config file:
{
"apiToken": "your-token",
"apiUrl": "https://i0.api.augmentcode.com/",
"defaultModel": "gpt-4",
"workspaceRoot": "/path/to/project"
}
# Check token
auggie token print
# Re-login
auggie logout && auggie login
# Use absolute path
auggie -w $(pwd) --mcp
# Check if path exists
ls -la /path/to/project
# Check file permissions
ls -la ~/.augment/
# Fix permissions
chmod 600 ~/.augment/session.json
export AUGMENT_CACHE_DIR="/custom/cache/path"
export AUGMENT_RETRY_TIMEOUT=30
auggie --allow-indexing --mcp