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.
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.
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.
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"
}
}
}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.
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.
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"]
}
}
}After updating the configuration, restart your CLI session:
Terminal users: Close and reopen your terminal
VS Code users: Use Command Palette → "Developer: Reload Window" or restart VS Code
JetBrains users: Restart your IDE
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.
To verify the MCP server is working correctly, try using one of its tools. For example, with Hex:
Ask Auggie to "search for projects in Hex"
The command should return results without authentication errors
The --transport http-only flag is required for some OAuth providers that have issues with SSE (Server-Sent Events) transport
If you still experience issues, try --transport sse-only as an alternative
The -y flag in the npx command automatically confirms package installation
OAuth tokens are cached locally by mcp-remote, so you only need to authenticate once per server
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"]
}
}
}If you continue to experience OAuth issues after applying this workaround, please contact Augment Support with the following information:
Your MCP server configuration (redact any sensitive tokens)
The exact error message you're seeing
Your operating system and IDE version
IDE logs (see instructions below)
Run the CLI with debug logging enabled and save to a file:
auggie "your instruction" --log-level debug --log-file ~/augment-debug.logThe 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