Definition
Assembly: Microsoft.OData.Mcp.Core.dll Namespace: Microsoft.OData.Mcp.Core.Configuration Inheritance: System.ObjectSyntax
Summary
Unified configuration for MCP servers supporting both sidecar and middleware deployment modes.Remarks
This configuration provides a single, unified interface for configuring MCP servers regardless of deployment mode. It supports both standalone (sidecar) and embedded (middleware) deployment patterns with appropriate defaults for each scenario.Constructors
.ctor
Initializes a new instance of the McpServerConfiguration class.Syntax
.ctor Inherited
Inherited from
objectSyntax
Properties
Authentication
Gets or sets the authentication configuration.Syntax
Property Value
Type:Microsoft.OData.Mcp.Authentication.Models.McpAuthenticationOptions
Configuration for user authentication and token validation.
Remarks
Authentication configuration controls how users are authenticated and how tokens are validated and forwarded to the underlying OData service.Caching
Gets or sets the caching configuration.Syntax
Property Value
Type:Microsoft.OData.Mcp.Core.Configuration.CachingConfiguration
Configuration for metadata and tool caching behavior.
Remarks
Caching configuration controls how long metadata and generated tools are cached to improve performance and reduce load on the underlying OData service.CustomProperties
Gets or sets custom configuration properties.Syntax
Property Value
Type:System.Collections.Generic.Dictionary<string, object>
A dictionary of custom configuration values.
Remarks
Custom properties allow extending the configuration with application-specific settings that don’t fit into the standard configuration categories.DeploymentMode
Gets or sets the deployment mode for the MCP server.Syntax
Property Value
Type:Microsoft.OData.Mcp.Core.Configuration.McpDeploymentMode
The deployment mode determining how the server operates.
Remarks
The deployment mode affects how the server discovers metadata, handles authentication, and exposes endpoints. Each mode has different configuration requirements and behaviors.FeatureFlags
Gets or sets the feature flags configuration.Syntax
Property Value
Type:Microsoft.OData.Mcp.Core.Configuration.FeatureFlagsConfiguration
Configuration for enabling/disabling specific features.
Remarks
Feature flags allow selective enabling of functionality for gradual rollouts, A/B testing, or environment-specific configurations.Monitoring
Gets or sets the logging and monitoring configuration.Syntax
Property Value
Type:Microsoft.OData.Mcp.Core.Configuration.MonitoringConfiguration
Configuration for logging, metrics, and health monitoring.
Remarks
Monitoring configuration controls what information is logged, how metrics are collected, and what health checks are performed.Network
Gets or sets the network and transport configuration.Syntax
Property Value
Type:Microsoft.OData.Mcp.Core.Configuration.NetworkConfiguration
Configuration for network endpoints, ports, and transport protocols.
Remarks
Network configuration specifies how the MCP server exposes its endpoints and communicates with clients and the underlying OData service.ODataService
Gets or sets the OData service configuration.Syntax
Property Value
Type:Microsoft.OData.Mcp.Core.Configuration.ODataServiceConfiguration
Configuration for connecting to and interacting with OData services.
Remarks
This configuration specifies how the MCP server discovers and communicates with the underlying OData service, including metadata endpoints and authentication.Security
Gets or sets the security configuration.Syntax
Property Value
Type:Microsoft.OData.Mcp.Core.Configuration.SecurityConfiguration
Configuration for security policies and restrictions.
Remarks
Security configuration includes CORS policies, rate limiting, request size limits, and other security-related settings.ServerInfo
Gets or sets the server information.Syntax
Property Value
Type:Microsoft.OData.Mcp.Core.Configuration.McpServerInfo
Basic information about the MCP server instance.
Remarks
This information is exposed through the server info endpoint and helps clients understand the capabilities and version of the server.ToolGeneration
Gets or sets the tool generation configuration.Syntax
Property Value
Type:Microsoft.OData.Mcp.Core.Tools.McpToolGenerationOptions
Options controlling how MCP tools are generated from OData metadata.
Remarks
Tool generation options determine which operations are exposed as MCP tools, how they are named, and what authorization requirements they have.Methods
ApplyEnvironmentOverrides
Applies environment-specific overrides to the configuration.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
environment | string | The environment name (e.g., “Development”, “Production”). |
Clone
Creates a deep copy of this configuration.Syntax
Returns
Type:Microsoft.OData.Mcp.Core.Configuration.McpServerConfiguration
A new configuration 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
ForDevelopment
Creates a configuration optimized for development environments.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
deploymentMode | Microsoft.OData.Mcp.Core.Configuration.McpDeploymentMode | The deployment mode for development. |
Returns
Type:Microsoft.OData.Mcp.Core.Configuration.McpServerConfiguration
A configuration instance with development-friendly settings.
ForMiddleware
Creates a configuration optimized for middleware deployment.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
basePath | string | The base path for MCP endpoints within the host application. |
Returns
Type:Microsoft.OData.Mcp.Core.Configuration.McpServerConfiguration
A configuration instance optimized for middleware deployment.
ForProduction
Creates a configuration optimized for production environments.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
deploymentMode | Microsoft.OData.Mcp.Core.Configuration.McpDeploymentMode | The deployment mode for production. |
Returns
Type:Microsoft.OData.Mcp.Core.Configuration.McpServerConfiguration
A configuration instance with production-optimized settings.
ForSidecar
Creates a configuration optimized for sidecar deployment.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
odataServiceUrl | string | The URL of the OData service to integrate with. |
Returns
Type:Microsoft.OData.Mcp.Core.Configuration.McpServerConfiguration
A configuration instance optimized for sidecar deployment.
Exceptions
| Exception | Description |
|---|---|
ArgumentException | Thrown when odataServiceUrl is null or whitespace. |
GetHashCode Inherited Virtual
Inherited from
objectSyntax
Returns
Type:int
GetStatistics
Gets configuration statistics for monitoring and diagnostics.Syntax
Returns
Type:System.Collections.Generic.Dictionary<string, object>
A dictionary containing configuration statistics.
GetType Inherited
Inherited from
objectSyntax
Returns
Type:System.Type
MemberwiseClone Inherited
Inherited from
objectSyntax
Returns
Type:object
MergeWith
Merges another configuration into this one, with the other configuration taking precedence.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
other | Microsoft.OData.Mcp.Core.Configuration.McpServerConfiguration | The configuration 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
ToString Inherited Virtual
Inherited from
objectSyntax
Returns
Type:string?
Validate
Validates the configuration for completeness and consistency.Syntax
Returns
Type:System.Collections.Generic.IEnumerable<string>
A collection of validation errors, or empty if the configuration is valid.