Skip to content

Conversation

@halter73
Copy link
Contributor

@halter73 halter73 commented Nov 24, 2025

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

@PederHP
Copy link
Member

PederHP commented Nov 24, 2025

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.

@halter73
Copy link
Contributor Author

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.

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
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
@halter73 halter73 merged commit ae17ba0 into main Dec 5, 2025
17 of 18 checks passed
@halter73 halter73 deleted the halter73/750 branch December 5, 2025 08:03
halter73 added a commit that referenced this pull request Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SEP-1036: Add support for URL Mode Elicitation for secure out-of-band interactions

4 participants