Definition
Assembly: Microsoft.OData.Mcp.Core.dll Namespace: Microsoft.OData.Mcp.Core.Configuration Inheritance: System.ObjectSyntax
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
.ctor Inherited
Inherited from
objectSyntax
Properties
BuildInfo
Gets or sets the build information for the server.Syntax
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Parameters
| Name | Type | Description |
|---|---|---|
capability | string | The capability to add. |
Exceptions
| Exception | Description |
|---|---|
ArgumentException | Thrown when capability is null or whitespace. |
AddMetadata
Adds metadata to the server information.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
key | string | The metadata key. |
value | object | The metadata value. |
Exceptions
| Exception | Description |
|---|---|
ArgumentException | Thrown when key is null or whitespace. |
Clone
Creates a copy of this server information.Syntax
Returns
Type:Microsoft.OData.Mcp.Core.Configuration.McpServerInfo
A new instance with the same settings.
Equals Inherited Virtual
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
obj | object? | - |
Returns
Type:bool
Equals Inherited
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
objA | object? | - |
objB | object? | - |
Returns
Type:bool
GetHashCode Inherited Virtual
Inherited from
objectSyntax
Returns
Type:int
GetMetadata
Gets metadata value by key.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
key | string | The 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
objectSyntax
Returns
Type:System.Type
GetUptime
Gets the server uptime.Syntax
Returns
Type:System.TimeSpan
The time elapsed since the server was started.
HasCapability
Determines whether the server has the specified capability.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
capability | string | The capability to check for. |
Returns
Type:bool
true if the server has the capability; otherwise, false.
MemberwiseClone Inherited
Inherited from
objectSyntax
Returns
Type:object
MergeWith
Merges another server info into this one, with the other taking precedence.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
other | Microsoft.OData.Mcp.Core.Configuration.McpServerInfo | The server info to merge into this one. |
Exceptions
| Exception | Description |
|---|---|
ArgumentNullException | Thrown when other is null. |
ReferenceEquals Inherited
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
objA | object? | - |
objB | object? | - |
Returns
Type:bool
RemoveCapability
Removes a capability from the server.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
capability | string | The 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
Returns
Type:string
A summary of the server information.
ToString Inherited Virtual
Inherited from
objectSyntax
Returns
Type:string?
Validate
Validates the server information for completeness and correctness.Syntax
Returns
Type:System.Collections.Generic.IEnumerable<string>
A collection of validation errors, or empty if the information is valid.