inspector/core/mcp/node/index.ts
cliffhall 55db703196 feat: add --protocol-era launch flag for ad-hoc servers (#2208)
An ad-hoc --server-url / command launch always negotiated the legacy era,
because protocolEra was only settable per server in mcp.json. A wrapper
that mints a short-lived bearer token therefore had to write that token to
disk to exercise a server under auto or modern.

--protocol-era <legacy|auto|modern> now feeds settings.protocolEra in all
three clients through a shared parseProtocolEra coercer:

- CLI/TUI overlay it in loadServerEntries alongside --header, onto an
  ad-hoc target and onto a --catalog/--config entry for that run.
- Web stamps it on the in-memory ad-hoc entry, which the backend lifts
  into settings like headers; as with --header it is rejected alongside
  --catalog/--config, but unlike --header it applies to stdio too.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SZ4rrvH6xaCfrst75gJh7x
Signed-off-by: cliffhall <cliff@futurescale.com>
2026-09-14 00:11:56 -04:00

25 lines
687 B
TypeScript

export {
parseKeyValuePair,
parseHeaderPair,
parseProtocolEra,
withDefaultCatalogPath,
resolveServerConfigs,
getNamedServerConfigs,
resolveServerSource,
serverSourceConflict,
hasAdHocServerOptions,
readServerListFile,
type ServerConfigOptions,
type ResolveServerConfigsMode,
type ServerSourceFlags,
} from "./config.js";
export {
headersToServerSettings,
loadServerEntries,
selectServerEntry,
type ResolvedServer,
type ServerLoadOptions,
} from "./servers.js";
export { rehydrateMcpConfigFromKeychain } from "./server-secrets.js";
export { createTransportNode } from "./transport.js";
export { createProxyFetch, readProxyEnv } from "./proxyFetch.js";