Skip to content

Commit c524acc

Browse files
committed
PR feedback
1 parent 0121957 commit c524acc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ModelContextProtocol.Core/Server/AugmentedServiceProvider.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ public static bool IsAugmentedWith(Type serviceType) =>
2626
/// <inheritdoc />
2727
public object? GetService(Type serviceType) =>
2828
serviceType == typeof(RequestContext<TRequestParams>) ? request :
29-
serviceType == typeof(McpServer) ? request.Server :
29+
#pragma warning disable CS0618 // Type or member is obsolete
30+
serviceType == typeof(McpServer) || serviceType == typeof(IMcpServer) ? request.Server :
31+
#pragma warning restore CS0618 // Type or member is obsolete
3032
serviceType == typeof(IProgress<ProgressNotificationValue>) ?
3133
(request.Params?.ProgressToken is { } progressToken ? new TokenProgress(request.Server, progressToken) : NullProgress.Instance) :
3234
innerServices?.GetService(serviceType);

0 commit comments

Comments
 (0)