Table of Contents

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

string

Environment

Gets or sets the environment variables used when the Command is executed.

[JsonPropertyName("env")]
public Dictionary<string, string>? Environment { get; set; }

Property Value

Dictionary<string, string>

Name

Gets or sets the name of the MCP server.

public string? Name { get; set; }

Property Value

string

Options

Gets or sets any additional options

public Dictionary<string, string>? Options { get; set; }

Property Value

Dictionary<string, string>

TransportType

Gets or sets the type of transport used to communicate with the server.

public McpServerTransportType TransportType { get; set; }

Property Value

McpServerTransportType

Methods

SetNameIfEmpty(string)

Sets the name of the configuration if empty.

public McpServerConfiguration SetNameIfEmpty(string name)

Parameters

name string

The new name

Returns

McpServerConfiguration