* Set up a root artifacts folder for all build/test/pack output
Update CI TestResults folder
* Update package Authors and Copyright
* Lower-case extension on README.md
* Move package props to src folder. Use Version prefix and suffix props.
* Set up package publishing for daily, manual, and release builds
* Only run publishing jobs to the modelcontextprotocol/csharp-sdk repo
* Fix condition on docs workflow
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update preview wording in README to apply to the package too
* Verify packaging succeeds in the CI workflow
* Allow a version suffix override in release workflow.
* De-dupe the README between the repo and the NuGet package
* New CI work
* Do not reuse the CI workflow for releases so we can build without tests.
* Add a release process doc
* Fix bug in publishing; needs checkout step. Update comment for publish.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Overhaul tool handling
- Renames [McpTool{Type}] to [McpServerTool{Type}], in order to distinguish representations of tools on the server from tools on the client.
- Enables [McpServerTool] methods to have arguments injected from DI, as well as a specific set of types from the implementation directly, like IMcpServer.
- Renames WithTools to WithToolsFromAssembly.
- All of the WithToolsXx methods now publish each individual McpServerTool into DI; other code can do so as well. The options setup code gathers all of the tools from DI and combines them into a collection which is then stored in McpServerOptions and used to construct the server.
- The server tools specified via DI as well as manually-provided handlers, using CallToolHandler as a fallback in case the requested tool doesn't exist in the tools collection, and ListToolsHandler augments the information for whatever tools exist.
- The tools are stored in McpServerOptions in a new McpServerToolCollection type, which is a thread-safe container that exposes add/removal notification. Adding/removing tools triggers a change notification that in turn sends a notification to the client about a tools update.
- The ServerOptions are exposed from the server instance.
- Removed cursor-based APIs from McpClientExtensions.
- Changed McpClientExtensions APIs to return `Task<IList<...>` rather than `IAsyncEnumerable<...>`.
I'm sure this will need to evolve further before we're "done", but it's a significant improvement from where we are now. One area I'm not super happy with is the notifying collection; that might work ok for a stdio server, where you can grab the created collection from the server's options and mutate it, but I don't know how well that's going to work for sse servers.
* Make McpServerTool{Collection} extensible
* Fix README.md example
* Add notifications test
* Address feedback
* Adding code coverage to tests in workflow
This is using the pattern from the Aspire Community Toolkit which will publish coverage results to the GitHub Actions summary, as well as a comment on the PR (if the job was run by someone with permissions to write comments).
Also added the GitHubActionsTestLogger so that it writes a nicer log out to the run.
Fixes#11
* Feedback from code review
* Slight change to structure
* Bad indentation
* Ensuring .NET SDK is installed
* Disabling fail-fast so that jobs aren't terminated if one fails
* Forgot to include coverlet.collector
* Update Directory.Packages.props
---------
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>