diff --git a/README.md b/README.md index 0fade991..39145690 100644 --- a/README.md +++ b/README.md @@ -187,6 +187,8 @@ Reuse saved authorization while it remains valid. If a browser reports connectio See the [self-hosted server instructions](docs/commands.md#self-hosted-server) for installation, stdio and HTTP setup, environment variables, and OAuth configuration. +HTTP mode listens on `127.0.0.1` only. To accept connections from other machines, pass `--host 0.0.0.0` or set `MCP_HOST=0.0.0.0`, and enable OAuth first if other people will connect. + > [!WARNING] > **After 0.6.0, self-hosted HTTP clients must authenticate every MCP request.** With OAuth off, configure each client to send its own Socket API token as `Authorization: Bearer `, starting with `initialize`. Requests without it return `401`, even when the server has `SOCKET_API_TOKEN` set. Local stdio setup is unchanged. diff --git a/docs/commands.md b/docs/commands.md index e37ba4fa..69920cf4 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -66,7 +66,7 @@ Without OAuth, the server still asks for `SOCKET_API_TOKEN` at startup, but it n "mcpServers": { "socket-mcp": { "type": "http", - "url": "http://localhost:3000", + "url": "http://127.0.0.1:3000", "headers": { "Authorization": "Bearer your-socket-api-token" } @@ -78,36 +78,44 @@ Without OAuth, the server still asks for `SOCKET_API_TOKEN` at startup, but it n Claude Code: ```sh -claude mcp add --transport http socket-mcp http://localhost:3000 \ +claude mcp add --transport http socket-mcp http://127.0.0.1:3000 \ --header "Authorization: Bearer your-socket-api-token" ``` To let people sign in instead of copying a token into their client, enable OAuth (below). A shared or hosted deployment should always run with OAuth. -The server listens on `http://localhost:3000/`. The MCP endpoint is `/` and the health endpoint is `/health`; every other path answers `404`. +The server listens on `http://127.0.0.1:3000/`. It binds the IPv4 loopback address only, so other machines cannot reach it. Use `127.0.0.1` rather than `localhost` in client URLs, since some clients resolve `localhost` to the IPv6 `::1` first. The MCP endpoint is `/` and the health endpoint is `/health`; every other path answers `404`. + +To accept connections from other machines, for example inside a container or behind a reverse proxy on another host, pass `--host` or set `MCP_HOST`: + +```sh +MCP_HTTP_MODE=true SOCKET_API_TOKEN=your-api-token socket-mcp --http --host 0.0.0.0 +``` + +`--host` takes precedence over `MCP_HOST`. Use `0.0.0.0` for every IPv4 interface, `::` for every IPv4 and IPv6 interface, or one interface's address. The server logs a warning at startup when it binds a non-loopback address. Enable OAuth before you expose the server to other people. The transport is stateless. Each `POST /` is self-contained, with no session to open, no `Mcp-Session-Id` header, and nothing to expire, so you can put several instances behind a load balancer without session affinity. `GET` and `DELETE` on the MCP endpoint answer `405`. Clients written against the 2025 protocol, which open with an `initialize` handshake, are still served. Environment variables for HTTP mode: -| Variable | Required | Default | Description | -| ------------------------------------------ | ------------------------------------------------- | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `MCP_HTTP_MODE` | Yes, unless you pass `--http` | `false` | Set to `true` to serve HTTP instead of stdio. The `--http` CLI flag does the same thing. | -| `MCP_HOST` | No | All interfaces | Address to bind the HTTP server to, for example `127.0.0.1` to accept loopback connections only. | -| `MCP_PORT` | No | `3000` | Port to bind the HTTP server to. | -| `SOCKET_API_TOKEN` | To skip the startup prompt when HTTP OAuth is off | None | Each HTTP caller sends its own token. Local stdio can use this variable as a fallback to `socket-mcp login`. See the aliases below. | -| `SOCKET_OAUTH_ISSUER` | With OAuth | None | OAuth issuer URL. Must be `https` on a public host. See "Enabling OAuth" below. | -| `SOCKET_OAUTH_INTROSPECTION_CLIENT_ID` | With OAuth | None | Client ID used for RFC 7662 token introspection. | -| `SOCKET_OAUTH_INTROSPECTION_CLIENT_SECRET` | With OAuth | None | Client secret used for RFC 7662 token introspection. | -| `SOCKET_OAUTH_REQUIRED_SCOPES` | No | None | Scopes this resource advertises and enforces, separated by spaces or commas. Each tool call is checked only for the listed scopes that tool needs; any active token can run `initialize` and `tools/list`. When unset, any active token passes. | -| `SOCKET_API_BASE_URL` | No | None | Override the upstream Socket API endpoint. Falls back to `https://api.socket.dev` when unset. | -| `SOCKET_MCP_OAUTH_BASE_URL` | No | API URL | Override the issuer used by local stdio OAuth. By default, OAuth follows `SOCKET_API_BASE_URL`; an `api.` hostname maps to its matching `mcp.` resource host. Non-loopback URLs must use HTTPS. | -| `SOCKET_DEBUG` | No | `false` | Turns on verbose request and cache tracing on stderr, points `depscore` at `http://localhost:8866`, and permits a local OAuth issuer. | -| `SOCKET_MCP_APPS_CHALLENGE_TOKEN` | For domain verification | None | Token the OpenAI plugin portal issues for domain verification. When set, `GET /.well-known/openai-apps-challenge` returns it as plain text; when unset, that path returns `404`. | -| `SOCKET_MCP_SENTRY_DSN` | No | None | Sentry DSN for error reporting; it must use HTTPS. When unset, reporting is off: the Sentry SDK is never loaded and nothing is sent. When set, HTTP mode sends scrubbed events for server-side failures. See [Error reporting](service.md#error-reporting). | -| `SOCKET_MCP_SENTRY_ENVIRONMENT` | No | `production` | Sentry `environment` reported events carry, such as `staging`. Read only when `SOCKET_MCP_SENTRY_DSN` is set. | -| `SOCKET_MCP_SENTRY_TRACES_SAMPLE_RATE` | No | `0` | Share of `tools/call` requests sent to Sentry as transactions, from 0 to 1. `0`, unset or out of range sends none. Read only when `SOCKET_MCP_SENTRY_DSN` is set. See [Tracing](service.md#tracing). | -| `TRUST_PROXY` | No | `false` | Trust `X-Forwarded-Host` and `X-Forwarded-Proto` when building OAuth metadata URLs. Enable only behind a reverse proxy that rewrites them. | +| Variable | Required | Default | Description | +| ------------------------------------------ | ------------------------------------------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `MCP_HTTP_MODE` | Yes, unless you pass `--http` | `false` | Set to `true` to serve HTTP instead of stdio. The `--http` CLI flag does the same thing. | +| `MCP_HOST` | No | `127.0.0.1` | Address to bind the HTTP server to. Set `0.0.0.0` or `::` to accept connections from other machines. The `--host` CLI flag overrides it. | +| `MCP_PORT` | No | `3000` | Port to bind the HTTP server to. | +| `SOCKET_API_TOKEN` | To skip the startup prompt when HTTP OAuth is off | None | Each HTTP caller sends its own token. Local stdio can use this variable as a fallback to `socket-mcp login`. See the aliases below. | +| `SOCKET_OAUTH_ISSUER` | With OAuth | None | OAuth issuer URL. Must be `https` on a public host. See "Enabling OAuth" below. | +| `SOCKET_OAUTH_INTROSPECTION_CLIENT_ID` | With OAuth | None | Client ID used for RFC 7662 token introspection. | +| `SOCKET_OAUTH_INTROSPECTION_CLIENT_SECRET` | With OAuth | None | Client secret used for RFC 7662 token introspection. | +| `SOCKET_OAUTH_REQUIRED_SCOPES` | No | None | Scopes this resource advertises and enforces, separated by spaces or commas. Each tool call is checked only for the listed scopes that tool needs; any active token can run `initialize` and `tools/list`. When unset, any active token passes. | +| `SOCKET_API_BASE_URL` | No | None | Override the upstream Socket API endpoint. Falls back to `https://api.socket.dev` when unset. | +| `SOCKET_MCP_OAUTH_BASE_URL` | No | API URL | Override the issuer used by local stdio OAuth. By default, OAuth follows `SOCKET_API_BASE_URL`; an `api.` hostname maps to its matching `mcp.` resource host. Non-loopback URLs must use HTTPS. | +| `SOCKET_DEBUG` | No | `false` | Turns on verbose request and cache tracing on stderr, points `depscore` at `http://localhost:8866`, and permits a local OAuth issuer. | +| `SOCKET_MCP_APPS_CHALLENGE_TOKEN` | For domain verification | None | Token the OpenAI plugin portal issues for domain verification. When set, `GET /.well-known/openai-apps-challenge` returns it as plain text; when unset, that path returns `404`. | +| `SOCKET_MCP_SENTRY_DSN` | No | None | Sentry DSN for error reporting; it must use HTTPS. When unset, reporting is off: the Sentry SDK is never loaded and nothing is sent. When set, HTTP mode sends scrubbed events for server-side failures. See [Error reporting](service.md#error-reporting). | +| `SOCKET_MCP_SENTRY_ENVIRONMENT` | No | `production` | Sentry `environment` reported events carry, such as `staging`. Read only when `SOCKET_MCP_SENTRY_DSN` is set. | +| `SOCKET_MCP_SENTRY_TRACES_SAMPLE_RATE` | No | `0` | Share of `tools/call` requests sent to Sentry as transactions, from 0 to 1. `0`, unset or out of range sends none. Read only when `SOCKET_MCP_SENTRY_DSN` is set. See [Tracing](service.md#tracing). | +| `TRUST_PROXY` | No | `false` | Trust `X-Forwarded-Host` and `X-Forwarded-Proto` when building OAuth metadata URLs. Enable only behind a reverse proxy that rewrites them. | The three OAuth variables are a set: configure all three or none. Setting only some of them makes the server print `Incomplete OAuth configuration for HTTP mode` and exit `1`, rather than quietly start unauthenticated. diff --git a/lib/cli.mts b/lib/cli.mts index 6bd52ca0..a66eda45 100644 --- a/lib/cli.mts +++ b/lib/cli.mts @@ -12,6 +12,7 @@ import { serveStdio } from '@modelcontextprotocol/server/stdio' import { errorMessage } from '@socketsecurity/lib/errors/message' import { + DEFAULT_MCP_HOST, getMcpHttpMode, getMcpHost, getMcpPort, @@ -47,6 +48,8 @@ export interface SocketMcpCliDeps { readonly apiToken: string | undefined readonly argv: readonly string[] readonly envHttpMode: boolean + // MCP_HOST, undefined when unset. `--host` overrides it; with neither, HTTP + // mode binds `DEFAULT_MCP_HOST` (loopback). readonly host: string | undefined readonly loadOAuthMetadata: () => Promise readonly port: number @@ -103,6 +106,32 @@ export function createSocketMcpCliDeps(): SocketMcpCliDeps { } } +export const MISSING_HOST_VALUE_MSG = + '--host needs an address, for example `--host 0.0.0.0` to listen on every interface.' + +/** + * Read `--host
` or `--host=
` from argv. Answers undefined + * when the flag is absent and null when it is present without a value. + */ +export function parseHostFlag( + argv: readonly string[], +): string | null | undefined { + for (let i = 0; i < argv.length; i += 1) { + const arg = argv[i]! + if (arg === '--host') { + const value = argv[i + 1] + return value === undefined || value === '' || value.startsWith('--') + ? null + : value + } + if (arg.startsWith('--host=')) { + const value = arg.slice('--host='.length) + return value === '' ? null : value + } + } + return undefined +} + // The stdio transport's `onerror` sink. export function logStdioTransportError(error: unknown): void { logger.error(`Socket MCP stdio error: ${errorMessage(error)}`) @@ -154,6 +183,14 @@ export async function runSocketMcpCli(deps: SocketMcpCliDeps): Promise { // it. const useHttp = deps.envHttpMode || deps.argv.includes('--http') + // `--host` beats MCP_HOST; with neither, HTTP mode binds loopback only. + const hostFlag = parseHostFlag(deps.argv) + if (useHttp && hostFlag === null) { + logger.error(MISSING_HOST_VALUE_MSG) + return 1 + } + const httpHost = hostFlag ?? deps.host ?? DEFAULT_MCP_HOST + // OAuth is an HTTP-mode-only posture, so a truthy result also means // `useHttp`. const oauthResult = useHttp ? deps.setOauthEnabled() : undefined @@ -227,7 +264,7 @@ export async function runSocketMcpCli(deps: SocketMcpCliDeps): Promise { if (!oauthResult) { logger.info(HTTP_API_TOKEN_AUTH_MSG) } - deps.startHttpServer(deps.port, deps.host) + deps.startHttpServer(deps.port, httpHost) return 0 } diff --git a/lib/env.mts b/lib/env.mts index 1dd228e0..24b65952 100644 --- a/lib/env.mts +++ b/lib/env.mts @@ -49,8 +49,13 @@ export function getMcpPort(): number { return envInt('MCP_PORT') ?? 3000 } -// Unset keeps Node's default of listening on every interface, which deployed -// servers rely on. Set it (for example to 127.0.0.1) to bind one address. +// HTTP mode binds loopback unless the operator opts in to another address, +// so a local `--http` server is not reachable from the network by default. +export const DEFAULT_MCP_HOST = '127.0.0.1' + +// The raw MCP_HOST value, undefined when unset. The CLI resolves the bind +// address from `--host`, then this, then `DEFAULT_MCP_HOST`. Set it to +// 0.0.0.0 (or ::) to listen on every interface. export function getMcpHost(): string | undefined { return envString('MCP_HOST') } diff --git a/lib/http-server.mts b/lib/http-server.mts index 73a492fe..80d91a21 100644 --- a/lib/http-server.mts +++ b/lib/http-server.mts @@ -13,6 +13,8 @@ import { import { errorMessage } from '@socketsecurity/lib/errors/message' import { createServer } from 'node:http' import type { IncomingMessage, ServerResponse } from 'node:http' +import { isIPv4, isIPv6 } from 'node:net' +import { DEFAULT_MCP_HOST } from './env.mts' import { reportServerError } from './error-reporting.mts' import type { ServerErrorReport } from './error-reporting.mts' import { createConfiguredServer } from './server.mts' @@ -386,11 +388,49 @@ export async function routeRequest( } } +// True when `host` only accepts connections from this machine: `localhost`, +// any 127.0.0.0/8 address, or ::1 (including its IPv4-mapped form). +export function isLoopbackHost(host: string): boolean { + const bare = host.replace(/^\[(.*)\]$/, '$1').toLowerCase() + if (bare === 'localhost') { + return true + } + if (isIPv4(bare)) { + return bare.startsWith('127.') + } + if (isIPv6(bare)) { + if (bare === '::1' || bare === '0:0:0:0:0:0:0:1') { + return true + } + const mapped = /^::ffff:(\d+\.\d+\.\d+\.\d+)$/.exec(bare) + return mapped !== null && mapped[1]!.startsWith('127.') + } + return false +} + +// The URL to print in the start banner. A wildcard bind is reachable on +// localhost; any other address is printed as bound, with IPv6 bracketed. +export function formatConnectUrl(host: string, port: number): string { + if (host === '0.0.0.0' || host === '::' || host === '[::]') { + return `http://localhost:${port}/` + } + const bare = host.replace(/^\[(.*)\]$/, '$1') + return isIPv6(bare) ? `http://[${bare}]:${port}/` : `http://${bare}:${port}/` +} + // Boot the HTTP MCP server: build the MCP handler, create the Node HTTP -// server, route requests through `routeRequest`, listen, and log the start -// banner. -export function startHttpServer(port: number, host?: string): void { - logger.info(`Starting HTTP server on port ${port}`) +// server, route requests through `routeRequest`, listen on `host` (loopback +// unless the operator opted in to another address), and log the start banner. +export function startHttpServer( + port: number, + host: string = DEFAULT_MCP_HOST, +): void { + logger.info(`Starting HTTP server on ${host} port ${port}`) + if (!isLoopbackHost(host)) { + logger.warn( + `Binding the HTTP server to ${host}, which accepts connections from other machines. Unset MCP_HOST and drop --host to listen on ${DEFAULT_MCP_HOST} only.`, + ) + } // One handler for the process. It calls `createConfiguredServer` per // exchange and closes the instance afterwards, so the factory — not a @@ -422,11 +462,7 @@ export function startHttpServer(port: number, host?: string): void { logger.info( `Socket MCP HTTP server version ${VERSION} started successfully on port ${listeningPort}`, ) - logger.info(`Connect to: http://localhost:${listeningPort}/`) - } - if (host === undefined) { - httpServer.listen(port, onListening) - } else { - httpServer.listen(port, host, onListening) + logger.info(`Connect to: ${formatConnectUrl(host, listeningPort)}`) } + httpServer.listen(port, host, onListening) } diff --git a/test/e2e/termless.test.mts b/test/e2e/termless.test.mts index 3225b097..f990719d 100644 --- a/test/e2e/termless.test.mts +++ b/test/e2e/termless.test.mts @@ -136,10 +136,10 @@ test('shows the HTTP startup banner and handles an empty prompt', async () => { MCP_PORT: '0', SOCKET_API_TOKEN: 'test-placeholder', }) - await http.waitFor('Connect to: http://localhost:', 5000) + await http.waitFor('Connect to: http://127.0.0.1:', 5000) const port = http.output .getText() - .match(/Connect to: http:\/\/localhost:(\d+)\//u)?.[1] + .match(/Connect to: http:\/\/127\.0\.0\.1:(\d+)\//u)?.[1] if (!port) { throw new Error('Missing listening port') } @@ -261,10 +261,10 @@ test('shows OAuth discovery success and failure in HTTP mode', async () => { SOCKET_OAUTH_ISSUER: issuer.url, } const http = await startCommand(['--http'], env) - await http.waitFor('Connect to: http://localhost:', 5000) + await http.waitFor('Connect to: http://127.0.0.1:', 5000) const port = http.output .getText() - .match(/Connect to: http:\/\/localhost:(\d+)\//u)?.[1] + .match(/Connect to: http:\/\/127\.0\.0\.1:(\d+)\//u)?.[1] if (!port) { throw new Error('Missing listening port') } diff --git a/test/repo/unit/cli.test.mts b/test/repo/unit/cli.test.mts index 469ba0ad..8ef30ca8 100644 --- a/test/repo/unit/cli.test.mts +++ b/test/repo/unit/cli.test.mts @@ -12,6 +12,8 @@ import { HTTP_API_TOKEN_AUTH_MSG, INCOMPLETE_OAUTH_CONFIG_MSG, logStdioTransportError, + MISSING_HOST_VALUE_MSG, + parseHostFlag, reportSocketMcpStartupFailure, runSocketMcpCli, } from '../../../lib/cli.mts' @@ -212,13 +214,50 @@ describe('transport selection', () => { expect(recorded.httpPorts).toEqual([8080]) }) + test('binds loopback when neither MCP_HOST nor --host is set', async () => { + const { deps, recorded } = recordingDeps({ envHttpMode: true }) + await expect(runSocketMcpCli(deps)).resolves.toBe(0) + expect(recorded.httpHosts).toEqual(['127.0.0.1']) + }) + test('passes MCP_HOST through as the bind address', async () => { const { deps, recorded } = recordingDeps({ envHttpMode: true, - host: '127.0.0.1', + host: '0.0.0.0', }) await expect(runSocketMcpCli(deps)).resolves.toBe(0) - expect(recorded.httpHosts).toEqual(['127.0.0.1']) + expect(recorded.httpHosts).toEqual(['0.0.0.0']) + }) + + test('--host overrides MCP_HOST', async () => { + const { deps, recorded } = recordingDeps({ + argv: ['node', 'socket-mcp', '--http', '--host', '0.0.0.0'], + host: '127.0.0.2', + }) + await expect(runSocketMcpCli(deps)).resolves.toBe(0) + expect(recorded.httpHosts).toEqual(['0.0.0.0']) + }) + + test('accepts --host=
', async () => { + const { deps, recorded } = recordingDeps({ + argv: ['node', 'socket-mcp', '--http', '--host=::'], + }) + await expect(runSocketMcpCli(deps)).resolves.toBe(0) + expect(recorded.httpHosts).toEqual(['::']) + }) + + test('refuses --host without an address and exits 1', async () => { + const { deps, recorded } = recordingDeps({ + argv: ['node', 'socket-mcp', '--http', '--host'], + }) + const errors = captureErrors() + try { + await expect(runSocketMcpCli(deps)).resolves.toBe(1) + expect(errors.read()).toContain(MISSING_HOST_VALUE_MSG) + expect(recorded.httpHosts).toEqual([]) + } finally { + errors.restore() + } }) test('reports the failure and exits 1 when the stdio transport throws', async () => { @@ -376,3 +415,20 @@ describe('reportSocketMcpStartupFailure', () => { } }) }) + +describe('parseHostFlag', () => { + test('answers undefined when the flag is absent', () => { + expect(parseHostFlag(['node', 'socket-mcp', '--http'])).toBeUndefined() + }) + + test('reads the separate and = forms', () => { + expect(parseHostFlag(['--host', '0.0.0.0'])).toBe('0.0.0.0') + expect(parseHostFlag(['--host=::1'])).toBe('::1') + }) + + test('answers null when the value is missing', () => { + expect(parseHostFlag(['--host'])).toBeNull() + expect(parseHostFlag(['--host='])).toBeNull() + expect(parseHostFlag(['--host', '--http'])).toBeNull() + }) +}) diff --git a/test/repo/unit/http-server-start.test.mts b/test/repo/unit/http-server-start.test.mts index 3f63c44f..b441f3ec 100644 --- a/test/repo/unit/http-server-start.test.mts +++ b/test/repo/unit/http-server-start.test.mts @@ -12,7 +12,12 @@ import type { Server } from 'node:http' import { httpRequest } from '@socketsecurity/lib-stable/http-request/request' import { afterEach, expect, test, vi } from 'vitest' -import { startHttpServer } from '../../../lib/http-server.mts' +import { + formatConnectUrl, + isLoopbackHost, + startHttpServer, +} from '../../../lib/http-server.mts' +import { logger } from '../../../lib/logger.mts' const { createdServers } = vi.hoisted(() => ({ createdServers: [] as Server[], @@ -112,3 +117,53 @@ test('startHttpServer binds only the given host when one is passed', async () => const res = await httpRequest(`http://127.0.0.1:${port}/health`) expect(res.status).toBe(200) }) + +test('startHttpServer binds loopback when no host is passed', async () => { + const { address } = await bootServerAddress() + expect(address).toBe('127.0.0.1') +}) + +test('startHttpServer binds every interface when 0.0.0.0 is passed, with a warning', async () => { + const warn = vi.spyOn(logger, 'warn').mockImplementation(() => logger) + try { + const { address, port } = await bootServerAddress('0.0.0.0') + expect(address).toBe('0.0.0.0') + expect(String(warn.mock.calls[0]?.[0])).toContain( + 'accepts connections from other machines', + ) + + const res = await httpRequest(`http://127.0.0.1:${port}/health`) + expect(res.status).toBe(200) + } finally { + warn.mockRestore() + } +}) + +test('isLoopbackHost accepts only loopback addresses', () => { + for (const host of [ + 'localhost', + '127.0.0.1', + '127.1.2.3', + '::1', + '[::1]', + '::ffff:127.0.0.1', + ]) { + expect(isLoopbackHost(host)).toBe(true) + } + for (const host of [ + '0.0.0.0', + '::', + '10.0.0.5', + '192.168.1.2', + 'example.com', + ]) { + expect(isLoopbackHost(host)).toBe(false) + } +}) + +test('formatConnectUrl prints a reachable URL for the bind address', () => { + expect(formatConnectUrl('127.0.0.1', 3000)).toBe('http://127.0.0.1:3000/') + expect(formatConnectUrl('0.0.0.0', 3000)).toBe('http://localhost:3000/') + expect(formatConnectUrl('::', 3000)).toBe('http://localhost:3000/') + expect(formatConnectUrl('::1', 3000)).toBe('http://[::1]:3000/') +}) diff --git a/test/snapshots/termless/termless.http-oauth-started.svg b/test/snapshots/termless/termless.http-oauth-started.svg index 7c32ef22..dab0afc4 100644 --- a/test/snapshots/termless/termless.http-oauth-started.svg +++ b/test/snapshots/termless/termless.http-oauth-started.svg @@ -16,13 +16,13 @@ ⓘ Enabled OAuth-backed MCP auth with issuer http://127.0.0.1:<issuer-port> -ⓘ Starting HTTP server on port 0 +ⓘ Starting HTTP server on 127.0.0.1 port 0 ⓘ Socket MCP HTTP server version <version> started successfully on port <port> -ⓘ Connect to: http://localhost:<port>/ +ⓘ Connect to: http://127.0.0.1:<port>/ diff --git a/test/snapshots/termless/termless.http-started.svg b/test/snapshots/termless/termless.http-started.svg index 04bc5180..9389320e 100644 --- a/test/snapshots/termless/termless.http-started.svg +++ b/test/snapshots/termless/termless.http-started.svg @@ -25,13 +25,13 @@ d SOCKET_OAUTH_INTROSPECTION_CLIENT_SECRET. -ⓘ Starting HTTP server on port 0 +ⓘ Starting HTTP server on 127.0.0.1 port 0 ⓘ Socket MCP HTTP server version <version> started successfully on port <port> -ⓘ Connect to: http://localhost:<port>/ +ⓘ Connect to: http://127.0.0.1:<port>/