Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

McpClientFactory should accept an IClientTransport instead of McpServerConfig #82

Closed
eiriktsarpalis opened this issue Mar 24, 2025 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@eiriktsarpalis
Copy link
Contributor

Currently, it is not possible to use McpClientFactory with custom transports. Instead, the factory accepts a generic McpServerConfig object that the factory uses to construct the right transport. This makes it difficult to spin up custom transports such as in-memory transports for testing purposes. We should consider removing McpServerConfig replacing it bespoke factories for each of the built-in client transport implementations.

@eiriktsarpalis eiriktsarpalis self-assigned this Mar 24, 2025
@eiriktsarpalis
Copy link
Contributor Author

As a temporary workaround, the createTransportFunc delegate can be used to insert a custom transport into the client:

Func<McpServerConfig, ILoggerFactory?, IClientTransport>? createTransportFunc = null,

@stephentoub stephentoub added the enhancement New feature or request label Apr 7, 2025
@stephentoub
Copy link
Contributor

Closing as duplicate of #190

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants