-
Notifications
You must be signed in to change notification settings - Fork 590
Add support for URL mode elicitation #1021
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
Conversation
0debdd5 to
8ee8b5b
Compare
|
Really like the example. Only downside is it might distract from the fact url mode will usually point at an url that is distinct from the mcp server. I think an ideal sample should be MCP server and separate blazor server with some communication mechanism between them. Just to show it's out of band and the security pattern of the sensitive information never passing through the mcp server. But that's something that can be done later. |
31c3125 to
66a0c7e
Compare
I accidently pushed the sample. I removed it from this PR. It wasn't fully functional yet, and it didn't use auth for the Blazor form. Later we can add a sample that leverages AddOpenIdConnect and AddCookie pointing to the same OAuth provider as AddMcp, possibly in a different project to show that the URL doesn't need to be hosted by the MCP server. I don't think it's really a problem to have the MCP server host the elicitation URL though. It still serves a purpose of collecting sensitive information from the user without exposing it to the host or client. |
# Conflicts: # docs/concepts/elicitation/elicitation.md # src/ModelContextProtocol.Core/McpSessionHandler.cs # src/ModelContextProtocol.Core/Protocol/ElicitRequestParams.cs # src/ModelContextProtocol.Core/Protocol/ElicitationCapability.cs # src/ModelContextProtocol.Core/Protocol/NotificationMethods.cs # tests/ModelContextProtocol.Tests/Protocol/ElicitationDefaultValuesTests.cs # tests/ModelContextProtocol.Tests/Server/McpServerExtensionsTests.cs
…emoteProtocolException method
The client Streamable HTTP transport does not wait on the SSE GET request to complete ConnectAsync, so there's a test-only race that the server might shutdown before HttpClient even creates a connection for the parallel GET request that results in a IOException with the message "The KestrelInMemoryTransport has been shut down." Regardless, as with the DELETE request, it's not helpful to throw from DisposeAsync just because there were problems with the optional GET request
This PR adds support URL mode elicitation requests defined by SEP-1036 which is for out-of-band server-to-client elicitations that may involve sensitive data the MCP server doesn't want to give to the MCP client or host.
Fixes #750