Skip to content

Commit 3338e88

Browse files
Zir0-93tarekgh
andauthored
Update copilot-instructions.md: McpServerFactory was removed (#1892)
Co-authored-by: Tarek Mahmoud Sayed <[email protected]>
1 parent c40ee04 commit 3338e88

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎.github/copilot-instructions.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,14 @@ The SDK consists of three main packages:
5757

5858
### Naming Conventions
5959
- Use `McpClient`, `McpServer`, `McpSession` for MCP-related classes (capitalize MCP)
60-
- Prefix MCP-specific types with `Mcp` (e.g., `McpException`, `McpEndpoint`)
60+
- Prefix MCP-specific types with `Mcp` (e.g., `McpException`, `McpServerOptions`)
6161
- Use descriptive names for parameters with `[Description("...")]` attributes when exposing to MCP
6262

6363
## Architecture Patterns
6464

6565
### Dependency Injection
6666
- Use Microsoft.Extensions.DependencyInjection patterns
67-
- Register services with `.AddMcpServer()` and `.AddMcpClient()` extension methods
67+
- Register the server with the `.AddMcpServer()` extension method
6868
- Support both builder patterns and options configuration
6969

7070
### JSON Serialization
@@ -74,7 +74,7 @@ The SDK consists of three main packages:
7474
- Set `JsonIgnoreCondition.WhenWritingNull` for optional properties to minimize payload size
7575
- Use `JsonSerializerDefaults.Web` for camelCase property naming
7676
- Protocol types are decorated with `[JsonSerializable]` attributes for AOT support
77-
- Custom converters: `CustomizableJsonStringEnumConverter` for flexible enum serialization
77+
- 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<TEnum>`.
7878

7979
### Async Patterns
8080
- All I/O operations should be async
@@ -246,7 +246,7 @@ Two primary transport implementations with different invariants:
246246
- Default to `McpJsonUtilities.DefaultOptions` if not specified
247247
- Can use reflection-based serialization or custom source generators
248248

249-
- **Enum handling**: `CustomizableJsonStringEnumConverter` for flexible enum serialization
249+
- **Enum handling**: reflection-based serialization uses the built-in `JsonStringEnumConverter`; Native AOT enums require source-generated converter metadata such as `JsonStringEnumConverter<TEnum>`
250250

251251
## Architecture and Design Patterns
252252

@@ -255,7 +255,7 @@ Two primary transport implementations with different invariants:
255255
- **IMcpServerBuilder** pattern provides fluent API for configuring servers via DI
256256
- Server primitives (tools, prompts, resources) are discovered via reflection using attributes
257257
- Support both attribute-based registration (`WithTools<T>()`) and instance-based (`WithTools(target)`)
258-
- Use `McpServerFactory` to create server instances with configured options
258+
- Use `McpServer.Create` to create server instances with configured options
259259

260260
### Tool/Prompt/Resource Discovery
261261
- Tools, prompts, and resources use attribute-based discovery: `[McpServerTool]`, `[McpServerPrompt]`, `[McpServerResource]`

0 commit comments

Comments
 (0)