Skip to content

Commit 4d6fe0a

Browse files
Remove obsolete IMcpEndpoint, IMcpClient, IMcpServer interfaces and McpClientFactory
Co-authored-by: MackinnonBuck <10456961+MackinnonBuck@users.noreply.github.com>
1 parent c7deb7f commit 4d6fe0a

File tree

13 files changed

+9
-260
lines changed

13 files changed

+9
-260
lines changed

src/ModelContextProtocol.Core/Client/IMcpClient.cs

Lines changed: 0 additions & 50 deletions
This file was deleted.

src/ModelContextProtocol.Core/Client/McpClient.Methods.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ namespace ModelContextProtocol.Client;
1010
/// <summary>
1111
/// Represents an instance of a Model Context Protocol (MCP) client session that connects to and communicates with an MCP server.
1212
/// </summary>
13-
#pragma warning disable CS0618 // Type or member is obsolete
14-
public abstract partial class McpClient : McpSession, IMcpClient
15-
#pragma warning restore CS0618 // Type or member is obsolete
13+
public abstract partial class McpClient : McpSession
1614
{
1715
/// <summary>Creates an <see cref="McpClient"/>, connecting it to the specified server.</summary>
1816
/// <param name="clientTransport">The transport instance used to communicate with the server.</param>

src/ModelContextProtocol.Core/Client/McpClient.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ namespace ModelContextProtocol.Client;
55
/// <summary>
66
/// Represents an instance of a Model Context Protocol (MCP) client session that connects to and communicates with an MCP server.
77
/// </summary>
8-
#pragma warning disable CS0618 // Type or member is obsolete
9-
public abstract partial class McpClient : McpSession, IMcpClient
10-
#pragma warning restore CS0618 // Type or member is obsolete
8+
public abstract partial class McpClient : McpSession
119
{
1210
/// <summary>
1311
/// Gets the capabilities supported by the connected server.

src/ModelContextProtocol.Core/Client/McpClientFactory.cs

Lines changed: 0 additions & 35 deletions
This file was deleted.

src/ModelContextProtocol.Core/Client/McpClientHandlers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class McpClientHandlers
3636
/// </para>
3737
/// <para>
3838
/// Handlers provided via <see cref="NotificationHandlers"/> will be registered with the client for the lifetime of the client.
39-
/// For transient handlers, <see cref="IMcpEndpoint.RegisterNotificationHandler"/> may be used to register a handler that can
39+
/// For transient handlers, <see cref="McpSession.RegisterNotificationHandler"/> may be used to register a handler that can
4040
/// then be unregistered by disposing of the <see cref="IAsyncDisposable"/> returned from the method.
4141
/// </para>
4242
/// </remarks>

src/ModelContextProtocol.Core/IMcpEndpoint.cs

Lines changed: 0 additions & 84 deletions
This file was deleted.

src/ModelContextProtocol.Core/McpSession.Methods.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55

66
namespace ModelContextProtocol;
77

8-
#pragma warning disable CS0618 // Type or member is obsolete
9-
public abstract partial class McpSession : IMcpEndpoint, IAsyncDisposable
10-
#pragma warning restore CS0618 // Type or member is obsolete
8+
public abstract partial class McpSession : IAsyncDisposable
119
{
1210
/// <summary>
1311
/// Sends a JSON-RPC request and attempts to deserialize the result to <typeparamref name="TResult"/>.

src/ModelContextProtocol.Core/McpSession.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ namespace ModelContextProtocol;
2626
/// All MCP sessions should be properly disposed after use as they implement <see cref="IAsyncDisposable"/>.
2727
/// </para>
2828
/// </remarks>
29-
#pragma warning disable CS0618 // Type or member is obsolete
30-
public abstract partial class McpSession : IMcpEndpoint, IAsyncDisposable
31-
#pragma warning restore CS0618 // Type or member is obsolete
29+
public abstract partial class McpSession : IAsyncDisposable
3230
{
3331
/// <summary>Gets an identifier associated with the current MCP session.</summary>
3432
/// <remarks>

src/ModelContextProtocol.Core/Server/IMcpServer.cs

Lines changed: 0 additions & 65 deletions
This file was deleted.

src/ModelContextProtocol.Core/Server/McpServer.Methods.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ namespace ModelContextProtocol.Server;
1414
/// <summary>
1515
/// Represents an instance of a Model Context Protocol (MCP) server that connects to and communicates with an MCP client.
1616
/// </summary>
17-
#pragma warning disable CS0618 // Type or member is obsolete
18-
public abstract partial class McpServer : McpSession, IMcpServer
19-
#pragma warning restore CS0618 // Type or member is obsolete
17+
public abstract partial class McpServer : McpSession
2018
{
2119
/// <summary>
2220
/// Caches request schemas for elicitation requests based on the type and serializer options.

0 commit comments

Comments
 (0)