forked from SciSharp/BotSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMcpServerConfigModel.cs
More file actions
56 lines (46 loc) · 1.54 KB
/
McpServerConfigModel.cs
File metadata and controls
56 lines (46 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
namespace BotSharp.Abstraction.MCP.Models;
public class McpServerConfigModel
{
/// <summary>
/// Unique identifier for this server configuration.
/// </summary>
public string Id { get; set; } = null!;
/// <summary>
/// Display name for the server.
/// </summary>
public string Name { get; set; } = null!;
/// <summary>
/// Indicates whether this server is enabled.
/// </summary>
public bool Enabled { get; set; } = true;
/// <summary>
/// URL of the icon to display for this server.
/// </summary>
public string? IconUrl { get; set; }
/// <summary>
/// Short description of this server.
/// </summary>
public string? Description { get; set; }
public McpSseServerConfig? SseConfig { get; set; }
public McpHttpServerConfig? HttpConfig { get; set; }
public McpStdioServerConfig? StdioConfig { get; set; }
}
public class McpSseServerConfig : McpHttpServerConfigBase
{
}
public class McpHttpServerConfig : McpHttpServerConfigBase
{
}
public abstract class McpHttpServerConfigBase
{
public string EndPoint { get; set; } = null!;
public TimeSpan ConnectionTimeout { get; init; } = TimeSpan.FromSeconds(30);
public Dictionary<string, string>? AdditionalHeaders { get; set; }
}
public class McpStdioServerConfig
{
public string Command { get; set; } = null!;
public IList<string>? Arguments { get; set; }
public Dictionary<string, string?>? EnvironmentVariables { get; set; }
public TimeSpan ShutdownTimeout { get; set; } = TimeSpan.FromSeconds(5);
}