Remove McpServerConfig and have McpClientFactory accept IClientTransport instances directly. (#230)
* Remove McpServerConfig and have McpClientFactory accept IClientTransport instances directly. * Address feedback and use lists when representing stdio arguments. * Use "Name" for transport descriptors and "EndpointName" for MCP clients and servers. * Update code samples. * Fix source file naming
This commit is contained in:
parent
8bd9ee81c0
commit
3e21f3594a
1 changed files with 315 additions and 527 deletions
|
|
@ -1,34 +0,0 @@
|
|||
namespace ModelContextProtocol;
|
||||
|
||||
/// <summary>
|
||||
/// Configuration for an MCP server connection.
|
||||
/// This is passed to the client factory to create a client for a specific server.
|
||||
/// </summary>
|
||||
public record McpServerConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// Unique identifier for this server configuration.
|
||||
/// </summary>
|
||||
public required string Id { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Display name for the server.
|
||||
/// </summary>
|
||||
public required string Name { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// The type of transport to use.
|
||||
/// </summary>
|
||||
public required string TransportType { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// For stdio transport: path to the executable
|
||||
/// For HTTP transport: base URL of the server
|
||||
/// </summary>
|
||||
public string? Location { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Additional transport-specific configuration.
|
||||
/// </summary>
|
||||
public Dictionary<string, string>? TransportOptions { get; init; }
|
||||
}
|
||||
Loading…
Reference in a new issue