mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
fix(mcp): listen on the OAuth loopback redirect during mcp login (#120433)
This commit is contained in:
committed by
GitHub
parent
2f1692c955
commit
2c5214f9e8
+4
-4
@@ -423,7 +423,7 @@ Notes:
|
||||
- `set` expects one JSON object value on the command line.
|
||||
- `configure` updates enablement, tool filters, timeouts, OAuth, TLS, and parallel-tool-call hints without replacing the whole server definition. Add `--probe` to verify the updated server before saving.
|
||||
- `tools` updates per-server tool filters. Include/exclude entries are MCP tool names and simple `*` globs.
|
||||
- `login` runs the OAuth flow for HTTP servers configured with `auth: "oauth"`. The first run prints an authorization URL; rerun with `--code` after approval.
|
||||
- `login` runs the OAuth flow for HTTP servers configured with `auth: "oauth"`. It listens for the registered loopback redirect and completes the exchange automatically; `--code` remains the manual fallback.
|
||||
- `logout` clears stored OAuth credentials for the named server without removing the saved server definition.
|
||||
- `reload` disposes cached in-process MCP runtimes for the current CLI process only. Gateway or agent processes in another process still need their own reload or restart path.
|
||||
- Use `transport: "streamable-http"` for Streamable HTTP MCP servers. `openclaw mcp set` also normalizes CLI-native `type: "http"` to the same canonical config shape for compatibility.
|
||||
@@ -731,11 +731,11 @@ When a remote MCP service is already backed by a separate OpenClaw refresh-capab
|
||||
openclaw mcp login docs
|
||||
```
|
||||
|
||||
OpenClaw prints the authorization URL and stores temporary OAuth verifier state in shared SQLite.
|
||||
OpenClaw starts the registered loopback callback listener before printing the authorization URL. After browser approval, it validates the returned state, exchanges the code, saves the credentials, and closes the listener automatically.
|
||||
|
||||
</Step>
|
||||
<Step title="Finish with the code">
|
||||
After approving in the browser, pass the returned code back to OpenClaw.
|
||||
<Step title="Use the manual fallback when needed">
|
||||
The login output also prints a manual command for headless, remote, busy-port, or timed-out callback flows. After browser approval, copy the returned code into that command.
|
||||
|
||||
```bash
|
||||
openclaw mcp login docs --code abc123
|
||||
|
||||
Reference in New Issue
Block a user