From b05c8761c54fdaeb200f874968b1983c8b42f1e4 Mon Sep 17 00:00:00 2001 From: Muntazir Fadhel Date: Sat, 26 Sep 2026 16:41:00 +0300 Subject: [PATCH 1/3] Update copilot-instructions to reference McpServer.Create instead of the removed McpServerFactory --- .github/copilot-instructions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index a8bb2d9a7..cd251a0b0 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -255,7 +255,7 @@ Two primary transport implementations with different invariants: - **IMcpServerBuilder** pattern provides fluent API for configuring servers via DI - Server primitives (tools, prompts, resources) are discovered via reflection using attributes - Support both attribute-based registration (`WithTools()`) and instance-based (`WithTools(target)`) -- Use `McpServerFactory` to create server instances with configured options +- Use `McpServer.Create` to create server instances with configured options ### Tool/Prompt/Resource Discovery - Tools, prompts, and resources use attribute-based discovery: `[McpServerTool]`, `[McpServerPrompt]`, `[McpServerResource]` From 412f0f1dd0abbc94d736fbf2e9ffa6bbcbedc6d7 Mon Sep 17 00:00:00 2001 From: Muntazir Fadhel Date: Sun, 4 Oct 2026 12:03:01 +0300 Subject: [PATCH 2/3] Update copilot-instructions: drop three more removed names (McpEndpoint, AddMcpClient, CustomizableJsonStringEnumConverter) --- .github/copilot-instructions.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index cd251a0b0..05ba1ee25 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -57,14 +57,14 @@ The SDK consists of three main packages: ### Naming Conventions - Use `McpClient`, `McpServer`, `McpSession` for MCP-related classes (capitalize MCP) -- Prefix MCP-specific types with `Mcp` (e.g., `McpException`, `McpEndpoint`) +- Prefix MCP-specific types with `Mcp` (e.g., `McpException`, `McpServerOptions`) - Use descriptive names for parameters with `[Description("...")]` attributes when exposing to MCP ## Architecture Patterns ### Dependency Injection - Use Microsoft.Extensions.DependencyInjection patterns -- Register services with `.AddMcpServer()` and `.AddMcpClient()` extension methods +- Register the server with the `.AddMcpServer()` extension method - Support both builder patterns and options configuration ### JSON Serialization @@ -74,7 +74,7 @@ The SDK consists of three main packages: - Set `JsonIgnoreCondition.WhenWritingNull` for optional properties to minimize payload size - Use `JsonSerializerDefaults.Web` for camelCase property naming - Protocol types are decorated with `[JsonSerializable]` attributes for AOT support -- Custom converters: `CustomizableJsonStringEnumConverter` for flexible enum serialization +- Enums are serialized as strings with the built-in `JsonStringEnumConverter` ### Async Patterns - All I/O operations should be async @@ -246,7 +246,7 @@ Two primary transport implementations with different invariants: - Default to `McpJsonUtilities.DefaultOptions` if not specified - Can use reflection-based serialization or custom source generators -- **Enum handling**: `CustomizableJsonStringEnumConverter` for flexible enum serialization +- **Enum handling**: the built-in `JsonStringEnumConverter` serializes enums as strings ## Architecture and Design Patterns From dc86a74d0ab74b40fb6e2476c138ab14fedddb4c Mon Sep 17 00:00:00 2001 From: Tarek Mahmoud Sayed <10833894+tarekgh@users.noreply.github.com> Date: Mon, 5 Oct 2026 09:11:39 -0700 Subject: [PATCH 3/3] Apply batched suggestions from code review --- .github/copilot-instructions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 05ba1ee25..b0545a375 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -74,7 +74,7 @@ The SDK consists of three main packages: - Set `JsonIgnoreCondition.WhenWritingNull` for optional properties to minimize payload size - Use `JsonSerializerDefaults.Web` for camelCase property naming - Protocol types are decorated with `[JsonSerializable]` attributes for AOT support -- Enums are serialized as strings with the built-in `JsonStringEnumConverter` +- When reflection-based serialization is enabled, user-defined enums are serialized as strings with the built-in `JsonStringEnumConverter`; Native AOT enums require source-generated converter metadata such as `JsonStringEnumConverter`. ### Async Patterns - All I/O operations should be async @@ -246,7 +246,7 @@ Two primary transport implementations with different invariants: - Default to `McpJsonUtilities.DefaultOptions` if not specified - Can use reflection-based serialization or custom source generators -- **Enum handling**: the built-in `JsonStringEnumConverter` serializes enums as strings +- **Enum handling**: reflection-based serialization uses the built-in `JsonStringEnumConverter`; Native AOT enums require source-generated converter metadata such as `JsonStringEnumConverter` ## Architecture and Design Patterns