Property InitialAccept
InitialAccept
Gets or sets the initial Accept header profile for HTTP requests.
public McpAcceptProfile InitialAccept { get; set; }
Property Value
- McpAcceptProfile
An McpAcceptProfile value specifying the preferred content types for responses. Default is JsonOrEventStream.
Remarks
The MCP client uses content negotiation to handle different server capabilities. If a server responds with HTTP 406 (Not Acceptable), the client automatically falls back through these profiles:
- JsonOrEventStream - Accepts both JSON and Server-Sent Events
- JsonOnly - Accepts only JSON responses
- Wildcard - Accepts any content type
- Omit - Sends no Accept header
You typically don't need to change this unless you're working with a server that has specific content negotiation requirements.