* Add AspNetCoreSseMcpTransport sample
* Fix build errors after rebase
* React to McpServerFactory changes
* Make Utf8JsonWriter non thread static
* Fix test errors caused by not rebasing the HttpLister changes on factory overhaul commit
* Integrate Microsoft.Extensions.AI as a foundational building block
As with logging abstractions coming from M.E.Logging and DI abstractions coming from M.E.DependencyInjection, M.E.AI provides the relevant AI abstractions.
- Adds AsAIFunction and GetAIFunctionsAsync methods for getting functions for tools via a client.
- Uses AIFunctionFactory to implement McpServerBuilderExtensions.WithTools.
- Adds a RequestSamplingAsync overload that accepts ChatMessages/Options.
- Adds an AsSamplingChatClient method that provides an IChatClient usable on the server to request sampling of the client.
- Adds a CreateSamplingHandler method to enable an IChatClient to be easily used to satisfy sampling requests on the client.
- Deprecate McpDotNet.Extensions.AI.
* Address PR feedback
Handlers are now specified before connecting the client/server. Otherwise, race conditions exist. Handlers move into being a part of the McpClientOptions/McpServerOptions, so that they're provided to the factories. Where relevant, the handlers are specified as part of the capability descriptors, so that they go hand in hand.
The factories are no longer stateful. Instead of allocating a factory and then calling a create method on it, you just call a static factory method.
- There doesn't appear to be a meaningful scenario for injecting different readers/writers than stdin/stdout, and having InputOutputStreams complicates the API.
- Logically folks talk about "input and output", "readers and writers", etc., and "stdio" is "standard input and output", so having input specified first is less likely to be a source of bugs.
- Logger should be optional, not required, to simplify the common and getting-started cases.
* Add more tests
* Fix some code smells
* Remove more code smells
* Combine "ServerIntegrationTests" and "ClientIntegrationTests" because both are client integration tests just using different servers
* Clean up resources after test
* Improve kill logic for spawned child processes
* Improved testability for Stdio
* Fix SseIntegration tests
We try hard to avoid creating unnecessary JsonSerializerOptions, as each can have a non-trivial overhead due to how reflection is used by JsonSerializer and the JSO instance serving as a cache. Rather than creating a new JSO for each transport / endpoint, this can just use a singleton. The only thing it loses is logging when the converter fails, but all of those paths are also throwing an exception, which can be logged higher in the call stack.
* Improve tool handling
* Rework stuff with new hosting options
* Update readme
* Fix build
* Try run client tests
* Fix build
* Fix issues on linux
* Try to run testserver on linux
* Fix test issue
* Fix code smells
- Modified `GetCommand` to return OS-specific commands and changed return type to `string?`.
- Improved `InitializeCommand` for better command initialization and logging.
- Cleaned up using directives in `Log.cs` and `SseClientTransport.cs`.
- Updated `CreateNoWindow` property in `StdioClientTransport` to be OS-dependent.
- Bumped version number in `mcpdotnet.csproj` to 1.0.1.1.
* Server support (stdio)
* TestServer project
* Refactored McpClient class to extract shared endpoint logic (with McpServer) to a base class, McpJsonRpcEndpoint.
* Improved xmldoc comments for protocol types, mirroring specification schema comments.
* Update README.MD