AI seeded comments from robch and then edited by stephentoub (#238)
* AI generated `///` comment updates * Fix compilation issues * Fix incorrect XML comment structure * Update all Client comments * Update all Configuration comments * Update all Messages comments * Update all Transport comments * Update all Types comments * Update all Server comments * Undo some commenting --------- Co-authored-by: Stephen Toub <stoub@microsoft.com>
This commit is contained in:
parent
07300389ee
commit
77871c5aac
1 changed files with 4017 additions and 1066 deletions
|
|
@ -1,20 +1,21 @@
|
|||
using ModelContextProtocol.Server;
|
||||
using ModelContextProtocol.Server;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
|
||||
namespace Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
/// <summary>
|
||||
/// Extension to host an MCP server
|
||||
/// Provides extension methods for configuring MCP servers with dependency injection.
|
||||
/// </summary>
|
||||
public static class McpServerServiceCollectionExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Adds the MCP server to the service collection with default options.
|
||||
/// Adds the Model Context Protocol (MCP) server to the service collection with default options.
|
||||
/// </summary>
|
||||
/// <param name="services"></param>
|
||||
/// <param name="configureOptions"></param>
|
||||
/// <returns></returns>
|
||||
/// <param name="services">The <see cref="IServiceCollection"/> to add the server to.</param>
|
||||
/// <param name="configureOptions">Optional callback to configure the <see cref="McpServerOptions"/>.</param>
|
||||
/// <returns>An <see cref="IMcpServerBuilder"/> that can be used to further configure the MCP server.</returns>
|
||||
|
||||
public static IMcpServerBuilder AddMcpServer(this IServiceCollection services, Action<McpServerOptions>? configureOptions = null)
|
||||
{
|
||||
services.AddOptions();
|
||||
|
|
|
|||
Loading…
Reference in a new issue