.NET API
TraconMcpServerBuilderExtensions
Tracon.AspNetCore.dllExtensions that register the services needed to publish Tracon agents as MCP tools.
public static class TraconMcpServerBuilderExtensionsInheritance
Section titled “Inheritance”object ← TraconMcpServerBuilderExtensions
Inherited Members
Section titled “Inherited Members”object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Methods
Section titled “Methods”UseMcpServer(ITraconBuilder, Action<TraconMcpServerOptions>?)
Section titled “ UseMcpServer(ITraconBuilder, Action<TraconMcpServerOptions>?)”Registers the MCP server services. The HTTP endpoint must still be
connected separately with app.MapTraconMcpServer(...).
public static ITraconBuilder UseMcpServer(this ITraconBuilder builder, Action<TraconMcpServerOptions>? configure = null)Parameters
Section titled “Parameters”builder ITraconBuilder
The Tracon configuration chain.
configure Action<TraconMcpServerOptions>?
Options mutator.
Returns
Section titled “Returns”The chain, for further configuration.
Remarks
Section titled “Remarks”Registration happens HERE, not in MapTraconMcpServer: the MCP
SDK’s AddMcpServer call operates on IServiceCollection
and must happen BEFORE the application is Build-ed. The
Map... extensions only connect already-built services to HTTP.
By default no agent is exposed. Exposing one requires an explicit choice via TraconMcpServerOptions.ExposedAgents or TraconMcpServerOptions.ExposeAllAgents.
Also registers the MCP Tasks extension, gated OFF by default
through TraconMcpServerOptions.EnableTasks: the
execution-mode selector returns McpTaskExecutionMode.Synchronous
when it is off, which is the SDK’s own fast path back to today’s
behavior — CreateTaskAsync is never called. The task-provisioning
filter (Tracon.McpTaskRunProvisioningFilter) is still registered
unconditionally; it is value-transparent when tasks are off, since it
only replaces Tracon.CatalogToolCallHandler’s own id-minting with
an equivalent one handed down ambiently.
builder.AddTracon() .UseOpenAI(apiKey) .UsePostgreSql(connectionString) .UseMcpServer(o => o.ExposedAgents.Add("asistan"));// ...app.MapTracon("/tracon");app.MapTraconMcpServer();Exceptions
Section titled “Exceptions”builder is null.