Overview

This guide helps troubleshoot OAuth authentication issues when configuring MCP (Model Context Protocol) servers in the Auggie CLI. MCP servers like Hex, Linear, and other OAuth-enabled services may fail to authenticate properly due to a known issue with the CLI's OAuth handling.

Symptoms

Symptom 1: Browser Does Not Open

When configuring an MCP server that requires OAuth authentication, the CLI attempts to initiate the OAuth flow but the browser never opens. The CLI may appear to hang or timeout without any authentication prompt.

Symptom 2: "No authorization code received" Error

The browser opens successfully and you complete the OAuth authentication in your browser. However, the CLI displays an error message indicating that no authorization code was received, even though authentication appeared to succeed in the browser.

Affected Configurations

This issue affects MCP servers configured using the HTTP transport type in your ~/.augment/settings.json file. For example:

{
  "mcpServers": {
    "hex": {
      "type": "http",
      "url": "https://app.hex.tech/mcp"
    }
  }
}

Root Cause

The Auggie CLI's built-in OAuth flow has a bug that prevents it from properly receiving the authorization callback from OAuth providers. This affects all MCP servers that require OAuth authentication when configured directly with HTTP transport.

Workaround Solution

Use mcp-remote as a stdio proxy instead of direct HTTP configuration. The mcp-remote package handles OAuth authentication independently and bypasses the CLI's broken OAuth flow.

Step 1: Update Your MCP Configuration

Edit your ~/.augment/settings.json file and change the problematic MCP server configuration from HTTP type to command-based:

Before (broken):

{
  "mcpServers": {
    "hex": {
      "type": "http",
      "url": "https://app.hex.tech/mcp"
    }
  }
}

After (working):

{
  "mcpServers": {
    "hex": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://app.hex.tech/mcp", "--transport", "http-only"]
    }
  }
}

Step 2: Restart the Auggie CLI

After updating the configuration, restart your CLI session:

Step 3: Authenticate via Browser

When you first use the MCP server after reconfiguration, mcp-remote will open your default browser for OAuth authentication. Complete the authentication in your browser - the token will be cached for future sessions.

Verification

To verify the MCP server is working correctly, try using one of its tools. For example, with Hex:

Important Notes

Applying to Other MCP Servers

This workaround applies to any OAuth-enabled MCP server. Simply replace the URL with your target server's MCP endpoint:

{
  "mcpServers": {
    "your-server": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://your-server.com/mcp", "--transport", "http-only"]
    }
  }
}

Need More Help?

If you continue to experience OAuth issues after applying this workaround, please contact Augment Support with the following information:

How to Collect Logs

Auggie CLI Logs

Run the CLI with debug logging enabled and save to a file:

auggie "your instruction" --log-level debug --log-file ~/augment-debug.log

The default log file location is /tmp/augment-log.txt. You can tail this file in a separate terminal to see live logs:

tail -f /tmp/augment-log.txt