Fall back to well-known URL in client if 401 response is missing resource_metadata parameter (#1054)
This commit is contained in:
parent
d99f882884
commit
970207989e
1 changed files with 497 additions and 134 deletions
|
|
@ -1,5 +1,6 @@
|
|||
using Microsoft.Extensions.AI;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using ModelContextProtocol.Client;
|
||||
using ModelContextProtocol.Protocol;
|
||||
using ModelContextProtocol.Server;
|
||||
|
|
@ -22,6 +23,7 @@ public abstract class ClientServerTestBase : LoggedTest, IAsyncDisposable
|
|||
ServiceCollection sc = new();
|
||||
sc.AddLogging();
|
||||
sc.AddSingleton(XunitLoggerProvider);
|
||||
sc.AddSingleton<ILoggerProvider>(MockLoggerProvider);
|
||||
_builder = sc
|
||||
.AddMcpServer()
|
||||
.WithStreamServerTransport(_clientToServerPipe.Reader.AsStream(), _serverToClientPipe.Writer.AsStream());
|
||||
|
|
|
|||
Loading…
Reference in a new issue