Class McpServerConfiguration
- Namespace
- OllamaSharp.ModelContextProtocol.Server
- Assembly
- OllamaSharp.ModelContextProtocol.dll
Represents the configuration for an MCP server.
public class McpServerConfiguration
- Inheritance
-
McpServerConfiguration
- Inherited Members
Properties
Arguments
Gets or sets the arguments used when the Command is executed.
[JsonPropertyName("args")]
public string[]? Arguments { get; set; }
Property Value
- string[]
Command
Gets or sets the command to start the MCP server.
public string Command { get; set; }
Property Value
Environment
Gets or sets the environment variables used when the Command is executed.
[JsonPropertyName("env")]
public Dictionary<string, string>? Environment { get; set; }
Property Value
Name
Gets or sets the name of the MCP server.
public string? Name { get; set; }
Property Value
Options
Gets or sets any additional options
public Dictionary<string, string>? Options { get; set; }
Property Value
TransportType
Gets or sets the type of transport used to communicate with the server.
public McpServerTransportType TransportType { get; set; }
Property Value
Methods
SetNameIfEmpty(string)
Sets the name of the configuration if empty.
public McpServerConfiguration SetNameIfEmpty(string name)
Parameters
namestringThe new name