OptionalauthAuthentication configuration.
Enables OAuth 2.1 or custom token verification on the server. Only effective for HTTP-based transports.
OptionalcapabilitiesServer capabilities to advertise.
OptionalhealthHealth endpoint configuration for API connectivity monitoring.
Wires a ConnectionStateManager to the /ready endpoint so
readiness probes reflect the actual API connection state.
OptionallifecycleLifecycle hooks for startup/shutdown.
OptionalnameServer name displayed to MCP clients.
OptionalonCalled before the OpenTelemetry SDK is initialized.
Power users can use this callback to configure low-level OTEL APIs before the framework creates the NodeSDK instance. Common use cases:
DiagLogger via diag.setLogger() for SDK-level
diagnostics (by default no DiagLogger is set — output is suppressed)The callback runs after framework config resolution but before
OTEL_LOG_LEVEL is consumed from process.env and SDK construction.
Important: Custom DiagLoggers must NOT write to stdout (reserved for MCP protocol data in stdio transport mode).
OptionalsessionSession management configuration.
Fine-tune session lifecycle (timeouts, cleanup, capacity). Only effective for HTTP-based transports.
OptionalshutdownShutdown configuration.
OptionaltelemetryEnable OpenTelemetry integration.
When not set, falls back to OTEL_ENABLED env var or config file.
Set explicitly to true or false to override the config.
Transport configuration (required).
Explicitly specify how the server communicates with clients.
Use { mode: 'stdio' } for CLI usage or { mode: 'http' } for network usage.
OptionalversionServer version.
Options for createServer() - simplified high-level API.
This interface provides sensible defaults while allowing customization. All fields are optional except for name and version (which have defaults).
Example