Skip to main content

Definition

Assembly: Microsoft.OData.Mcp.Core.dll Namespace: Microsoft.OData.Mcp.Core.Configuration Inheritance: System.Object

Syntax

Microsoft.OData.Mcp.Core.Configuration.McpServerInfo

Summary

Basic information about an MCP server instance.

Remarks

This information is used for identification, documentation, and client discovery. It’s exposed through the server info endpoint and helps clients understand the capabilities and characteristics of the MCP server.

Constructors

.ctor

Initializes a new instance of the McpServerInfo class.

Syntax

public McpServerInfo()

.ctor Inherited

Inherited from object

Syntax

public Object()

Properties

BuildInfo

Gets or sets the build information for the server.

Syntax

public Microsoft.OData.Mcp.Core.Configuration.BuildInfo BuildInfo { get; set; }

Property Value

Type: Microsoft.OData.Mcp.Core.Configuration.BuildInfo? Information about the build that created this server instance.

Remarks

Build information helps with troubleshooting and ensures the correct version is deployed in different environments.

Capabilities

Gets or sets the server capabilities.

Syntax

public System.Collections.Generic.List<string> Capabilities { get; set; }

Property Value

Type: System.Collections.Generic.List<string> A list of capabilities supported by the server.

Remarks

Capabilities help clients understand what features are available and how they can interact with the server.

Contact

Gets or sets the contact information for support.

Syntax

public string Contact { get; set; }

Property Value

Type: string? Contact information such as email, URL, or phone number.

Remarks

Contact information provides users with a way to get help or report issues with the MCP server.

Description

Gets or sets the description of the MCP server.

Syntax

public string Description { get; set; }

Property Value

Type: string A detailed description of the server’s purpose and capabilities.

Remarks

The description helps users understand what the server provides and how it can be used in their applications.

DocumentationUrl

Gets or sets the URL to the server’s documentation.

Syntax

public string DocumentationUrl { get; set; }

Property Value

Type: string? A URL pointing to comprehensive documentation.

Remarks

Documentation URL provides users with detailed information about how to use and configure the MCP server.

InstanceId

Gets or sets the server instance identifier.

Syntax

public string InstanceId { get; set; }

Property Value

Type: string A unique identifier for this server instance.

Remarks

Instance ID helps distinguish between multiple instances of the same server type and is useful for monitoring and debugging.

License

Gets or sets the license under which the server is distributed.

Syntax

public string License { get; set; }

Property Value

Type: string? The license identifier or description.

Remarks

License information helps users understand the terms under which they can use the MCP server.

McpProtocolVersion

Gets or sets the supported MCP protocol version.

Syntax

public string McpProtocolVersion { get; set; }

Property Value

Type: string The version of the MCP protocol supported by this server.

Remarks

Protocol version information helps clients determine if they are compatible with the server’s implementation.

Metadata

Gets or sets additional metadata about the server.

Syntax

public System.Collections.Generic.Dictionary<string, object> Metadata { get; set; }

Property Value

Type: System.Collections.Generic.Dictionary<string, object> A dictionary of custom metadata key-value pairs.

Remarks

Custom metadata allows extending the server information with application-specific details that don’t fit into standard properties.

Name

Gets or sets the display name of the MCP server.

Syntax

public string Name { get; set; }

Property Value

Type: string A human-readable name for the server.

Remarks

This name is displayed in client interfaces and should clearly identify the purpose or domain of the MCP server.

RepositoryUrl

Gets or sets the URL to the server’s source code repository.

Syntax

public string RepositoryUrl { get; set; }

Property Value

Type: string? A URL pointing to the source code repository.

Remarks

Repository URL allows users to examine the source code, report issues, or contribute to the development of the MCP server.

StartedAt

Gets or sets the timestamp when the server was started.

Syntax

public System.DateTime StartedAt { get; set; }

Property Value

Type: System.DateTime The UTC timestamp when the server instance was created.

Remarks

Start time provides information about server uptime and can be useful for monitoring and diagnostics.

Vendor

Gets or sets the vendor or organization that created the server.

Syntax

public string Vendor { get; set; }

Property Value

Type: string? The name of the vendor or organization.

Remarks

Vendor information helps with support and identification of the server implementation.

Version

Gets or sets the version of the MCP server.

Syntax

public string Version { get; set; }

Property Value

Type: string The semantic version of the server instance.

Remarks

Version information helps clients determine compatibility and should follow semantic versioning principles.

Methods

AddCapability

Adds a capability to the server.

Syntax

public void AddCapability(string capability)

Parameters

NameTypeDescription
capabilitystringThe capability to add.

Exceptions

ExceptionDescription
ArgumentExceptionThrown when capability is null or whitespace.

AddMetadata

Adds metadata to the server information.

Syntax

public void AddMetadata(string key, object value)

Parameters

NameTypeDescription
keystringThe metadata key.
valueobjectThe metadata value.

Exceptions

ExceptionDescription
ArgumentExceptionThrown when key is null or whitespace.

Clone

Creates a copy of this server information.

Syntax

public Microsoft.OData.Mcp.Core.Configuration.McpServerInfo Clone()

Returns

Type: Microsoft.OData.Mcp.Core.Configuration.McpServerInfo A new instance with the same settings.

Equals Inherited Virtual

Inherited from object

Syntax

public virtual bool Equals(object obj)

Parameters

NameTypeDescription
objobject?-

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

public static bool Equals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

GetHashCode Inherited Virtual

Inherited from object

Syntax

public virtual int GetHashCode()

Returns

Type: int

GetMetadata

Gets metadata value by key.

Syntax

public T GetMetadata<T>(string key)

Parameters

NameTypeDescription
keystringThe metadata key.

Returns

Type: T? The metadata value if found and of the correct type; otherwise, the default value.

Type Parameters

  • T - The type of the metadata value.

GetType Inherited

Inherited from object

Syntax

public System.Type GetType()

Returns

Type: System.Type

GetUptime

Gets the server uptime.

Syntax

public System.TimeSpan GetUptime()

Returns

Type: System.TimeSpan The time elapsed since the server was started.

HasCapability

Determines whether the server has the specified capability.

Syntax

public bool HasCapability(string capability)

Parameters

NameTypeDescription
capabilitystringThe capability to check for.

Returns

Type: bool true if the server has the capability; otherwise, false.

MemberwiseClone Inherited

Inherited from object

Syntax

protected internal object MemberwiseClone()

Returns

Type: object

MergeWith

Merges another server info into this one, with the other taking precedence.

Syntax

public void MergeWith(Microsoft.OData.Mcp.Core.Configuration.McpServerInfo other)

Parameters

NameTypeDescription
otherMicrosoft.OData.Mcp.Core.Configuration.McpServerInfoThe server info to merge into this one.

Exceptions

ExceptionDescription
ArgumentNullExceptionThrown when other is null.

ReferenceEquals Inherited

Inherited from object

Syntax

public static bool ReferenceEquals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

RemoveCapability

Removes a capability from the server.

Syntax

public bool RemoveCapability(string capability)

Parameters

NameTypeDescription
capabilitystringThe capability to remove.

Returns

Type: bool true if the capability was removed; otherwise, false.

ToString Override

Returns a string representation of the server information.

Syntax

public override string ToString()

Returns

Type: string A summary of the server information.

ToString Inherited Virtual

Inherited from object

Syntax

public virtual string ToString()

Returns

Type: string?

Validate

Validates the server information for completeness and correctness.

Syntax

public System.Collections.Generic.IEnumerable<string> Validate()

Returns

Type: System.Collections.Generic.IEnumerable<string> A collection of validation errors, or empty if the information is valid.