.NET API
TraconMcpOptions
Tracon.Mcp.dllOptions for connecting to remote MCP servers.
public sealed class TraconMcpOptions- Inheritance
- object ← TraconMcpOptions
- Inherited Members
- object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
Section titled “Constructors”TraconMcpOptions()
Section titled “ TraconMcpOptions()”public TraconMcpOptions()Fields
Section titled “Fields”SectionName
Section titled “ SectionName”The default name of the configuration section.
public const string SectionName = "Tracon:Mcp"Field Value
Section titled “Field Value”Properties
Section titled “Properties”ConnectionTimeout
Section titled “ ConnectionTimeout”The upper time bound for connecting to a server and listing its tools.
public TimeSpan ConnectionTimeout { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”Must be from one millisecond to about 49.7 days; any other value fails at startup.
Enabled
Section titled “ Enabled”Whether MCP tool discovery is on. When turned off, no server is connected to and only the tools registered in code are visible.
public bool Enabled { get; set; }Property Value
Section titled “Property Value”MaxResourceBytesPerResource
Section titled “ MaxResourceBytesPerResource”In Mode A (AgentDefinition.McpResourceUris), the maximum number of bytes added to the context from a single resource. Content beyond this limit is trimmed.
public int MaxResourceBytesPerResource { get; set; }Property Value
Section titled “Property Value”MaxResourceBytesTotal
Section titled “ MaxResourceBytesTotal”In Mode A, the total byte limit across all resources of an agent definition. Resources beyond this limit are trimmed; resources beyond the total limit are skipped entirely.
public int MaxResourceBytesTotal { get; set; }Property Value
Section titled “Property Value”MaxToolsPerServer
Section titled “ MaxToolsPerServer”The maximum number of tools accepted from a single server. Tools beyond this limit are dropped and a warning is logged.
public int MaxToolsPerServer { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”The remote server is treated as untrusted. An unbounded tool list would produce uncontrolled growth both in the model context and in the UI.
OAuthCallbackBaseUri
Section titled “ OAuthCallbackBaseUri”The base URI of the OAuth Mode 1 (authorization code) callback
addresses. Example: https://myapp.example.com/. Must already be
registered with the provider. When null, no
connection is made to a server with OAuth enabled, and
/oauth/start answers that OAuth is not configured.
public Uri? OAuthCallbackBaseUri { get; set; }Property Value
Section titled “Property Value”Uri?
RefreshInterval
Section titled “ RefreshInterval”The refresh interval of the tool list. A remote server may change its tool definitions; discovery repeats at this interval.
public TimeSpan RefreshInterval { get; set; }Property Value
Section titled “Property Value”StaleToolRetention
Section titled “ StaleToolRetention”How long a server’s last good tool list is kept when a refresh cannot list its tools. The default is 15 minutes, three refreshes at the default interval.
public TimeSpan StaleToolRetention { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”A network blip on one tools/list call no longer takes a server’s
tools away: while the server stays registered with the same definition, its
connection keeps serving the tools it last listed for this long after that
listing, and agents that use them keep running. A call that reaches a server
that is really down fails as a tool error, as it would during the next refresh
interval. Once the time has passed, the next failed refresh drops the tools,
and an agent that names one is refused because the tool is not registered.
A server whose definition changes, or that is deleted or disabled, drops its tools at once; this setting only covers a failed listing of an unchanged server. TimeSpan.Zero drops them at the first failed listing. Must not be negative; a negative value fails at startup.