Skip to content

Classes other than ServerStartCommand rely on type ServiceStartOptions #1404

@hallipr

Description

@hallipr

Pulling IOptions<ServiceStartOptions> to check the current Transport is a norm throughout the repo.

For instance, HttpClientService wants to set the UserAgent on all outbound requests. In the UserAgent string, we want to include the transport used by the current MCP server (stdio / http). To get the current transport, we don't check some internal "self" state, we pull the options object that would have been passed to ServerStartCommand and look at its Transport property. This seems incorrect. It bleeds a single command's options class into many other classes in the solution.

If we want a set of properties that reflect the current state of the server, we should register an explicit class for storing state, considering that this will need to be generic enough to support all of the repo's servers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Untriaged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions