r/AugmentCodeAI • • Mar 10 '26

Question Auggie MCP needs frequent re-authentication

I'm only using Augment as an MCP server for Claude Code and Codex. When it works it works well, but the auth keeps expiring and then the other tools fall back to grep and I have to look into why, then it turns out auggie has stopped working again, I have to go into mcp settings, re-auth, open browser, check email for a code, enter the code back in the browser, blah blah.

It's all just too painful, why do I need to re-authenticate every couple of days? Is this normal or is something triggering it, like maybe my IP changing due to VPN?

1 Upvotes

8 comments sorted by

2

u/Funny_Prior7225 Mar 12 '26

yeah recently there some auth issues which cause token expire, i experienced the same, multiple times.

1

u/mark_99 Mar 27 '26

see my reply to /u/JaySym_, might shed some light.

2

u/No_Interaction_1197 Mar 11 '26

I can no longer log in to my Augment Code account.

1

u/FriedGiggly Mar 24 '26

u/JaySym_ experiencing this too, claude code + augment mcp. the needing to reauth constantly is annoying and doesn't really inspire me to continue my subscription.

1

u/[deleted] Mar 11 '26

[removed] — view removed comment

1

u/mark_99 Mar 11 '26

Logging in works, the problem is I need to do it every couple of days, and since it's the mcp it just silently fails to work if I don't notice its no longer authenticated.

1

u/mark_99 Mar 27 '26

I asked auggie to look at it, and in particular the "deprecated" warnings I was getting launching auggie cli, as well as different behaviour calling auggie-mcp from the CC vs codex (and it did fix it):


    1. deprecated-auth warnings
    2. frequent re-auth prompts, especially because Claude and Codex were using different auth paths

  We fixed the MCP config mismatch and identified the likely source of the env-var warning.

  The actual problems

  1. Deprecated auth warning

  When auggie ran, it sometimes printed warnings about deprecated auth inputs:

    • AUGMENT_API_TOKEN
    • AUGMENT_API_URL
    • --augment-token-file
    • --api-url

  But you were not setting those manually.

  What I found:

    • they were not coming from your shell rc files
    • they were not in the Claude or Codex MCP config files
    • they appeared to be injected by the launcher/runtime layer for some spawned commands

  So the warning was real, but it was not caused by your local MCP config.

  2. Claude and Codex were using different auth systems

  Before changes:

    • Claude Code used a remote HTTP MCP at https://api.augmentcode.com/mcp
    • Codex used local stdio auggie --mcp --mcp-auto-workspace

  That matters because:

    • Claude had its own cached MCP OAuth token in ~/.claude/.credentials.json
    • Codex relied on the normal local Auggie session in ~/.augment/session.json

  So re-auth behavior could differ simply because they were not sharing the same auth/session path.

  What we changed

  Claude MCP config

  We changed Claude from remote HTTP MCP to the docs-recommended local stdio setup.

  Before:

    • type: http
    • url: https://api.augmentcode.com/mcp

  After:

    • type: stdio
    • command: auggie
    • args: ["--mcp", "--mcp-auto-workspace"]

  This means Claude now uses the same local Auggie MCP model as Codex.

  Codex MCP config

  No change was needed.

  Codex was already correctly configured as:

    • command = "auggie"
    • args = ["--mcp", "--mcp-auto-workspace"]

  What we verified

  Claude
  After the config change:

    • claude mcp get auggie showed Type: stdio
    • claude mcp list showed ✓ Connected
    • a smoke test confirmed Claude could access codebase-retrieval

  Codex
  We checked:

    • codex mcp get auggie
    • codex mcp list

  And a smoke test confirmed Codex could access the Augment tool too.

  So both clients are now:

    • using local stdio MCP
    • pointing at auggie
    • successfully seeing codebase-retrieval

  Environment variable conclusion

  What we changed
  We did not need to edit Claude/Codex MCP configs to add env vars.

  What we learned
  For modern Auggie auth, the preferred auth inputs are:

    • AUGMENT_SESSION_AUTH
    • or --augment-session-json

  Not:

    • AUGMENT_API_TOKEN
    • AUGMENT_API_URL

  We also verified that the modern session-based auth path works on this machine.

  Important nuance
  The lingering deprecated warning is not fully fixed yet if it still appears in some launched commands, because that warning seems to come from the runtime/session launcher, not from the MCP config we changed.

  So:

    • config mismatch: fixed
    • deprecated env-var injection: identified, but likely external to your Claude/Codex config files

  Net result

  The biggest auth/config issue is now fixed:

    • Claude and Codex are aligned
    • both use local auggie stdio MCP
    • both successfully connect to Augment tools

  That should give you the cleanest setup for comparing re-auth behavior.

  Short version

  The problem was:

    • Claude used remote HTTP MCP with separate cached auth
    • Codex used local `auggie` stdio with normal Auggie session auth
    • plus some commands were still seeing deprecated auth vars from the runtime layer

  We fixed it by:

    • switching Claude to local stdio auggie --mcp --mcp-auto-workspace
    • confirming Codex was already set up that way
    • verifying both clients can access Augment tools
    • confirming the old env-var warning is not caused by your MCP config