This directory contains the conceptual documentation for the MCP C# SDK, built using DocFX.
When referencing types from the MCP C# SDK API in markdown documentation, always use DocFX xref syntax instead of direct URLs to API documentation pages. This ensures that:
- Links remain valid even when API documentation structure changes
- DocFX can validate that referenced types exist during build
- Links work correctly in offline documentation
- DocFX generates proper warnings if referenced types are obsolete or missing
Use the <xref:> tag to reference types, methods, and properties:
<!-- Reference a type -->
<xref:ModelContextProtocol.Client.McpClient>
<!-- Reference a method (use * for overloads) -->
<xref:ModelContextProtocol.McpSession.SendNotificationAsync*>
<!-- Reference a specific property -->
<xref:ModelContextProtocol.Client.McpClient.ServerCapabilities>
<!-- Reference a property on a different type -->
<xref:ModelContextProtocol.Protocol.ServerCapabilities.Logging>
<!-- Reference types from external libraries -->
<xref:System.Progress`1>
<xref:Microsoft.Extensions.Logging.ILogger>When updating documentation, use these type names instead of obsolete interfaces:
| Obsolete Interface | Current Type | xref |
|---|---|---|
IMcpEndpoint |
McpSession |
<xref:ModelContextProtocol.McpSession> |
IMcpClient |
McpClient |
<xref:ModelContextProtocol.Client.McpClient> |
IMcpServer |
McpServer |
<xref:ModelContextProtocol.Server.McpServer> |
Note: IMcpServerBuilder is NOT obsolete and should still be referenced.
To build the documentation locally and verify xref links:
make generate-docsThis will:
- Clean previous builds
- Build the project
- Generate API documentation
- Build the DocFX site to
artifacts/_site
To serve the documentation locally:
make serve-docsThen navigate to http://localhost:8080 to view the documentation.
For links to external documentation (e.g., Microsoft Learn, MCP specification), regular markdown links are acceptable:
[Model Context Protocol](https://modelcontextprotocol.io/)
[ILogger](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.ilogger)