Skip to content

Commit 2da0934

Browse files
author
pmor
committed
fix: coordinate concurrent OAuth recovery safely
1 parent ba7f4e3 commit 2da0934

15 files changed

Lines changed: 2292 additions & 531 deletions

README.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -311,15 +311,11 @@ Know of more resources you'd like to share? Please add them to this Readme and s
311311

312312
## Troubleshooting
313313

314-
### Clear your `~/.mcp-auth` directory
314+
### OAuth recovery
315315

316-
`mcp-remote` stores all the credential information inside `~/.mcp-auth` (or wherever your `MCP_REMOTE_CONFIG_DIR` points to). If you're having persistent issues, try running:
316+
`mcp-remote` stores credentials in `~/.mcp-auth` (or `MCP_REMOTE_CONFIG_DIR`), scoped to each remote-server configuration. Expired or rejected tokens, stale dynamic client registrations, delayed callbacks, and concurrent local clients recover automatically: one process owns the browser flow while other clients receive a retryable pending response.
317317

318-
```sh
319-
rm -rf ~/.mcp-auth
320-
```
321-
322-
Then restarting your MCP client.
318+
Do not delete the whole directory for a recoverable authentication error. If recovery still fails, enable debug logging and retain the affected server's files so the failure can be diagnosed.
323319

324320
### Check your Node version
325321

@@ -387,7 +383,7 @@ Authentication Error
387383
Token exchange failed: HTTP 400
388384
```
389385

390-
You can run `rm -rf ~/.mcp-auth` to clear any locally stored state and tokens.
386+
The failed transaction is retired automatically; retry the MCP request to begin one fresh authorization flow. A repeated HTTP 400 may instead indicate a server-side or static-client configuration problem, so use debug logs rather than clearing unrelated server credentials.
391387

392388
### "Client" mode
393389

@@ -397,4 +393,4 @@ Run the following on the command line (not from an MCP server):
397393
npx -p mcp-remote@latest mcp-remote-client https://remote.mcp.server/sse
398394
```
399395

400-
This will run through the entire authorization flow and attempt to list the tools & resources at the remote URL. Try this after running `rm -rf ~/.mcp-auth` to see if stale credentials are your problem, otherwise hopefully the issue will be more obvious in these logs than those in your MCP client.
396+
This will run through the entire authorization flow and attempt to list the tools & resources at the remote URL. Use it to distinguish a remote OAuth/server error from an MCP-client integration issue.

0 commit comments

Comments
 (0)