default to localhost

This commit is contained in:
Maxwell Gerber 2025-05-16 09:23:14 -07:00
parent 7a573be0f9
commit c0f7c49d05
No known key found for this signature in database
GPG key ID: BB9C1A99266069B0
2 changed files with 3 additions and 3 deletions

View file

@ -104,14 +104,14 @@ To bypass authentication, or to emit custom headers on all requests to your remo
] ]
``` ```
* To change which host `mcp-remote` registers as the OAuth callback URL (by default `127.0.0.1`), add the `--host` flag. * To change which host `mcp-remote` registers as the OAuth callback URL (by default `localhost`), add the `--host` flag.
```json ```json
"args": [ "args": [
"mcp-remote", "mcp-remote",
"https://remote.mcp.server/sse", "https://remote.mcp.server/sse",
"--host", "--host",
"localhost" "127.0.0.1"
] ]
``` ```

View file

@ -450,7 +450,7 @@ export async function parseCommandLineArgs(args: string[], usage: string) {
} }
// Parse host // Parse host
let host = '127.0.0.1' // Default let host = 'localhost' // Default
const hostIndex = args.indexOf('--host') const hostIndex = args.indexOf('--host')
if (hostIndex !== -1 && hostIndex < args.length - 1) { if (hostIndex !== -1 && hostIndex < args.length - 1) {
host = args[hostIndex + 1] host = args[hostIndex + 1]