Stephen Halter
fd38f51e27
Tighten draft protocol negotiation boundaries ( #1692 )
...
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Tarek Mahmoud Sayed <tarekms@ntdev.microsoft.com>
2026-07-12 14:30:49 -07:00
Copilot
84eb6942eb
Add DeferChangedEvents() to McpServerPrimitiveCollection for batched change notifications ( #1689 )
...
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jeffhandley <1031940+jeffhandley@users.noreply.github.com>
Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-07 15:15:45 -04:00
Stephen Halter
d6b1615988
Follow-ups to #1610 : de-draft 2026-07-28 terminology, renumber error codes, ProtocolVersion floor ( #1671 )
2026-06-25 14:07:52 -07:00
Stephen Halter
6c323e783b
Default draft protocol support: sessionless + handshake-less (SEP-2575 + SEP-2567) ( #1610 )
2026-06-23 21:24:22 -07:00
Jayaraman Venkatesan
b99d887b46
Deprecate McpErrorCode.ResourceNotFound (-32002) and use McpErrorCode.InvalidParams (-32602) per SEP-2164 ( #1558 )
2026-05-26 07:59:03 -07:00
Copilot
7dcdbafe9d
Add 3-arg RequestContext constructor and obsolete 2-arg to eliminate null-forgiving operator usage ( #1462 )
2026-03-27 12:33:23 -07:00
Copilot
53e9ed8f65
Log tool call name on success, not just failure ( #1256 )
2026-02-13 09:24:02 -08:00
Stephen Toub
4a84412331
Add McpClient/Session methods using .Protocol types ( #1063 )
2025-12-05 13:45:12 -05:00
Copilot
d76bc16bd1
Add ResourceNotFound error code (-32002) ( #1062 )
2025-12-05 10:39:30 -08:00
Mike Kistler
c447973972
Add request options bag to high level requests and include Meta ( #970 )
...
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-04 17:32:12 -05:00
Mackinnon Buck
121929da36
Audit protocol types ( #892 )
2025-11-04 15:41:10 -08:00
Copilot
8f2e21d734
Fix: Synthesize handlers for empty tool/prompt/resource collections ( #865 )
...
* Initial plan
* Allow handlers for empty tool/prompt/resource collections
Changed condition from `IsEmpty: false` to `not null` check in McpServerImpl.cs for resources (line 298), prompts (line 459), and tools (line 547). This allows handlers to be synthesized even when collections are empty, enabling dynamic addition of items after initialization.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
2025-10-16 09:57:50 -04:00
Stephen Halter
3255adb4d6
Propagate tool call exceptions through filters ( #844 )
...
* Add McpProtocolException specifically for JSON-RPC errors
2025-10-14 19:10:55 -07:00
Copilot
f28639119b
Implement SEP-973: Icons and metadata support for Implementations, Resources, Tools, and Prompts ( #802 )
...
* Initial plan
* Initial plan for SEP-973 implementation
Co-authored-by: MackinnonBuck <10456961+MackinnonBuck@users.noreply.github.com>
* Implement SEP-973: Add Icon class and icon support to Implementation, Resource, Tool, and Prompt
Co-authored-by: MackinnonBuck <10456961+MackinnonBuck@users.noreply.github.com>
* Complete SEP-973 implementation with documentation and fix property consistency
Co-authored-by: MackinnonBuck <10456961+MackinnonBuck@users.noreply.github.com>
* Address code review feedback: improve tests, remove docs, split test files
Co-authored-by: MackinnonBuck <10456961+MackinnonBuck@users.noreply.github.com>
* Fix tests to use S.T.J. source generator
* Styling fixes
* Simplify Icons property documentation as suggested in code review
Co-authored-by: MackinnonBuck <10456961+MackinnonBuck@users.noreply.github.com>
* Rename Icon.Src property to Icon.Source for more .NET-y naming
Co-authored-by: MackinnonBuck <10456961+MackinnonBuck@users.noreply.github.com>
* Add icon support to McpServerTool infrastructure and attributes
Co-authored-by: MackinnonBuck <10456961+MackinnonBuck@users.noreply.github.com>
* Cleanup
* Refactor icon tests to use Delegate overload instead of MethodInfo pattern
Co-authored-by: MackinnonBuck <10456961+MackinnonBuck@users.noreply.github.com>
* Change Icon.Sizes property from string to IList<string> per spec update
Co-authored-by: jozkee <16040868+jozkee@users.noreply.github.com>
* Add icon support to Prompts and Resources (CreateOptions and Attributes)
Co-authored-by: MackinnonBuck <10456961+MackinnonBuck@users.noreply.github.com>
* Add client-server integration tests for Icons and WebsiteUrl
Co-authored-by: MackinnonBuck <10456961+MackinnonBuck@users.noreply.github.com>
* Fix nullability warnings
* Revert "Add client-server integration tests for Icons and WebsiteUrl"
This reverts commit f37de15569e54e86a0709121c9bdf80c5045511c.
* More nullability fixes
* Add more tests
* Address code review feedback: add Theme property, fix docs, improve test patterns
Co-authored-by: jozkee <16040868+jozkee@users.noreply.github.com>
* Update Icon tests to exercise Theme property
Co-authored-by: jozkee <16040868+jozkee@users.noreply.github.com>
* Add Theme property assertions to client-server integration tests
Co-authored-by: jozkee <16040868+jozkee@users.noreply.github.com>
* Fix nullability
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: MackinnonBuck <10456961+MackinnonBuck@users.noreply.github.com>
Co-authored-by: Mackinnon Buck <mackinnon.buck@gmail.com>
Co-authored-by: jozkee <16040868+jozkee@users.noreply.github.com>
Co-authored-by: David Cantú <dacantu@microsoft.com>
2025-10-08 12:23:01 -07:00
David Cantú
5f992994c3
Decouple Handlers and Collections from protocol types ( #765 )
...
* Decouple Handlers and Collections (e.g. ToolsHandler and ToolsCollection) from Capabilities by promoting them to the options types.
Also, group all handlers in container classes, for server, I decided to move McpServerHandlers down to Mcp.Core and move the NotificationHandlers there too.
Also, Fix ListResourceTemplatesHandler issue.
* Add remarks for empty protocol capability types
* Keep JsonIgnore properties and mark them as Obsolete
* Continue supporting Obsolete members
* Update Obsolete messages to indicate the member will be removed
* Add EditorBrowsable Never to the remaining obsolete members
2025-09-24 09:42:03 -05:00
Mackinnon Buck
38b4a26998
Restructure IMcpEndpoint, IMcpClient, and IMcpServer ( #723 )
...
* Remove `McpEndpoint` & `IMcpClient`
* Revise naming, add abstract classes
* Fix missing renames
* Move extension methods to instance methods
* Add back old API, but obsoleted
* Add back obsoleted factory classes
* Move deprecation attributes
* `SseClientTransport` -> `HttpClientTransport`
* Update src/ModelContextProtocol.Core/Server/AugmentedServiceProvider.cs
Co-authored-by: Stephen Halter <halter73@gmail.com>
* PR feedback
* PR feedback
* Add back dispose lock
* Fix docs projects
* PR feedback
* Undo `docs/*.md` changes
---------
Co-authored-by: Stephen Halter <halter73@gmail.com>
2025-09-16 10:22:10 -07:00
Stephen Halter
d344c65120
Add middleware and authz support for server-side handlers ( #733 )
2025-09-10 10:07:45 -07:00
Stephen Toub
2fa658e439
Add WithXx overloads that take target instance ( #706 )
...
* Add WithXx overloads that take target instance
* Special-case enumerables
2025-08-26 09:38:53 -07:00
Stephen Toub
4411f1ce5e
Change default name casing of McpServerXx.Create tools/prompts/resources ( #568 )
2025-07-01 16:40:42 -04:00
Eirik Tsarpalis
55bda787ae
Styling: remove a few redundant parens from object initializer expressions. ( #548 )
...
* Styling: remove a few redundant parens from object initializer expressions.
* Fix build error.
2025-06-26 16:55:54 +03:00
Eirik Tsarpalis
0b26b7bf22
Fix URI template derivation and lookup ( #530 )
...
* Use lowercase host in resource URI template derivation.
* Address feedback
* Add casing testing for non-templated resource lookups.
* Fix uri primitive lookup
* Use a hardcoded mcp hostname in derived resource template URIs and ensure built-in resources work with the VS Code client.
* Address feedback
* Fix equality comparison
* Use dedicated type for resource collections.
2025-06-23 19:49:38 +03:00
Stephen Toub
2bcff315f8
Update content according to latest spec ( #513 )
...
* Update content according to latest spec
* Add Title to a bunch of types
* Add _meta to lots of types
* Address feedback, more cleanup, fix NAOT test failure
2025-06-16 19:39:41 -04:00
Stephen Toub
106ab8064f
Clean up namespaces ( #410 )
...
No meaningful code changes, just lots of namespace shuffling to have fewer namespaces and to put things in better namespaces.
2025-05-14 14:50:26 -04:00
Stephen Toub
8d4f51da50
Fix McpServerResource registration ( #411 )
...
- Add missing filling of ResourceCollection in McpServerOptionsSetup
- Remove AIFunctionMcpServerXx.ToString overrides; for resources, it was changing behavior undesirably, and for the others it was duplicate code.
- Fix notification method used for resource list changes.
- Fix type in WithResources parameter name.
2025-05-14 09:08:59 -04:00