From 3b256a8bc16e3de8e2f67883e48a98bfd3b440df Mon Sep 17 00:00:00 2001 From: Felix Weinberger Date: Tue, 12 May 2026 11:29:54 +0000 Subject: [PATCH] docs: @deprecated roots/sampling/logging (advisory; SEP-2577) --- packages/client/src/client/client.ts | 12 ++++++++++-- packages/core/src/shared/protocol.ts | 5 +++++ packages/server/src/server/mcp.ts | 1 + packages/server/src/server/server.ts | 15 +++++++++++++++ 4 files changed, 31 insertions(+), 2 deletions(-) diff --git a/packages/client/src/client/client.ts b/packages/client/src/client/client.ts index 5fa2e14d9..0194c4c39 100644 --- a/packages/client/src/client/client.ts +++ b/packages/client/src/client/client.ts @@ -718,7 +718,11 @@ export class Client extends Protocol { return this._requestWithSchema({ method: 'completion/complete', params }, CompleteResultSchema, options); } - /** Sets the minimum severity level for log messages sent by the server. */ + /** + * Sets the minimum severity level for log messages sent by the server. + * + * @deprecated SEP-2577 deprecates the MCP Logging feature (advisory; no wire change). + */ async setLoggingLevel(level: LoggingLevel, options?: RequestOptions) { return this._requestWithSchema({ method: 'logging/setLevel', params: { level } }, EmptyResultSchema, options); } @@ -1053,7 +1057,11 @@ export class Client extends Protocol { this.setNotificationHandler(notificationMethod, handler); } - /** Notifies the server that the client's root list has changed. Requires the `roots.listChanged` capability. */ + /** + * Notifies the server that the client's root list has changed. Requires the `roots.listChanged` capability. + * + * @deprecated SEP-2577 deprecates the MCP Roots feature (advisory; no wire change). + */ async sendRootsListChanged() { return this.notification({ method: 'notifications/roots/list_changed' }); } diff --git a/packages/core/src/shared/protocol.ts b/packages/core/src/shared/protocol.ts index 361bd6fc7..a7cdd1e26 100644 --- a/packages/core/src/shared/protocol.ts +++ b/packages/core/src/shared/protocol.ts @@ -247,6 +247,9 @@ export type ServerContext = BaseContext & { /** * Send a log message notification to the client. * Respects the client's log level filter set via logging/setLevel. + * + * @deprecated SEP-2577 deprecates the MCP Logging feature (advisory; no wire change). + * Prefer stderr or OpenTelemetry for server diagnostics. */ log: (level: LoggingLevel, data: unknown, logger?: string) => Promise; @@ -257,6 +260,8 @@ export type ServerContext = BaseContext & { /** * Request LLM sampling from the client. + * + * @deprecated SEP-2577 deprecates the MCP Sampling feature (advisory; no wire change). */ requestSampling: ( params: CreateMessageRequest['params'], diff --git a/packages/server/src/server/mcp.ts b/packages/server/src/server/mcp.ts index fb45fd5db..a84029ae9 100644 --- a/packages/server/src/server/mcp.ts +++ b/packages/server/src/server/mcp.ts @@ -1010,6 +1010,7 @@ export class McpServer { * Sends a logging message to the client, if connected. * Note: You only need to send the parameters object, not the entire JSON-RPC message. * @see {@linkcode LoggingMessageNotification} + * @deprecated SEP-2577 deprecates the MCP Logging feature (advisory; no wire change). * @param params * @param sessionId Optional for stateless transports and backward compatibility. * diff --git a/packages/server/src/server/server.ts b/packages/server/src/server/server.ts index f6a34f02d..c869bafad 100644 --- a/packages/server/src/server/server.ts +++ b/packages/server/src/server/server.ts @@ -466,18 +466,24 @@ export class Server extends Protocol { /** * Request LLM sampling from the client (without tools). * Returns single content block for backwards compatibility. + * + * @deprecated SEP-2577 deprecates the MCP Sampling feature (advisory; no wire change). */ async createMessage(params: CreateMessageRequestParamsBase, options?: RequestOptions): Promise; /** * Request LLM sampling from the client with tool support. * Returns content that may be a single block or array (for parallel tool calls). + * + * @deprecated SEP-2577 deprecates the MCP Sampling feature (advisory; no wire change). */ async createMessage(params: CreateMessageRequestParamsWithTools, options?: RequestOptions): Promise; /** * Request LLM sampling from the client. * When tools may or may not be present, returns the union type. + * + * @deprecated SEP-2577 deprecates the MCP Sampling feature (advisory; no wire change). */ async createMessage( params: CreateMessageRequest['params'], @@ -632,6 +638,12 @@ export class Server extends Protocol { ); } + /** + * Request the client's filesystem roots. + * + * @deprecated SEP-2577 deprecates the MCP Roots feature (advisory; no wire change). + * Prefer passing scope via tool parameters or server configuration. + */ async listRoots(params?: ListRootsRequest['params'], options?: RequestOptions) { return this._requestWithSchema({ method: 'roots/list', params }, ListRootsResultSchema, options); } @@ -642,6 +654,9 @@ export class Server extends Protocol { * @see {@linkcode LoggingMessageNotification} * @param params * @param sessionId Optional for stateless transports and backward compatibility. + * + * @deprecated SEP-2577 deprecates the MCP Logging feature (advisory; no wire change). + * Prefer stderr or OpenTelemetry for server diagnostics. */ async sendLoggingMessage(params: LoggingMessageNotification['params'], sessionId?: string) { if (this._capabilities.logging && !this.isMessageIgnored(params.level, sessionId)) {