diff --git a/src/ModelContextProtocol/Configuration/McpServerOptionsSetup.cs b/src/ModelContextProtocol/Configuration/McpServerOptionsSetup.cs
index f4509d5..4132140 100644
--- a/src/ModelContextProtocol/Configuration/McpServerOptionsSetup.cs
+++ b/src/ModelContextProtocol/Configuration/McpServerOptionsSetup.cs
@@ -6,19 +6,31 @@ using ModelContextProtocol.Utils;
namespace ModelContextProtocol.Configuration;
+///
+/// Configures the McpServerOptions using provided server handlers.
+///
+/// The server handlers configuration options.
internal sealed class McpServerOptionsSetup(IOptions serverHandlers) : IConfigureOptions
{
+ ///
+ /// Configures the given McpServerOptions instance by setting server information
+ /// and applying custom server handlers.
+ ///
+ /// The options instance to be configured.
public void Configure(McpServerOptions options)
{
Throw.IfNull(options);
var assemblyName = Assembly.GetEntryAssembly()?.GetName();
+
+ // Set server information based on the entry assembly
options.ServerInfo = new Implementation
{
Name = assemblyName?.Name ?? "McpServer",
Version = assemblyName?.Version?.ToString() ?? "1.0.0",
};
+ // Apply custom server handlers
serverHandlers.Value.OverwriteWithSetHandlers(options);
}
}