You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary: Add a discovery client and related support for mounted application resource metadata to enable discovery of mounted app resources by clients. This change implements the client-side helper utilities and wiring needed to query and surface metadata for mounted app resources, plus accompanying tests and examples demonstrating usage.
Motivation and Context
Motivation: Consumers of the SDK need a reliable way to discover metadata for mounted application resources so they can enumerate, inspect, and interact with resources provided by mounted apps. Previously this metadata was not discoverable through the client surface in a consistent way, which made building integrations and tooling harder.
Unit tests: Updated unit tests covering the new discovery client behavior, response parsing, and error handling.
CI: Updated tests are compatible with the existing CI; all tests pass locally prior to this PR.
Breaking Changes
Breaking changes: None — this is an additive change. Existing client APIs are preserved; the discovery client and helpers are new additions and do not change existing method signatures or runtime behavior for current consumers.
Types of changes
Bug fix (non-breaking change which fixes an issue)
New feature (non-breaking change which adds functionality)
Breaking change (fix or feature that would cause existing functionality to change)
Implementation notes: The change adds a small, focused client API for discovery and keeps response models typed and validated to help downstream code rely on stable shapes. Error cases are surfaced as specific exceptions to make retry and fallback strategies easier for integrators.
Thanks for the PR! I don't think this is the right fix though - the issue is actually on the server side, not the client.
Per RFC 9728, the .well-known URI should be inserted between the host and the path - so for https://example.com/hr-policy/mcp the metadata should be at https://example.com/.well-known/oauth-protected-resource/hr-policy/mcp, not https://example.com/hr-policy/.well-known/oauth-protected-resource.
The problem is that when you mount a Starlette app, it prefixes all routes including the .well-known ones, which puts them in the wrong place. That's a server-side issue we'd need to fix there rather than having the client guess at non-spec-compliant URLs.
Going to close this but happy to discuss further on #1751 if you want to explore server-side fixes!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary: Add a discovery client and related support for mounted application resource metadata to enable discovery of mounted app resources by clients. This change implements the client-side helper utilities and wiring needed to query and surface metadata for mounted app resources, plus accompanying tests and examples demonstrating usage.
Motivation and Context
How Has This Been Tested?
Breaking Changes
Types of changes
Checklist
Additional context