Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/fast_agent/mcp/oauth_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,7 @@ def build_oauth_provider(

metadata_kwargs: dict[str, Any] = {
"client_name": "fast-agent",
"logo_uri": "https://fast-agent.ai/logo.png",
"redirect_uris": redirect_uris,
"grant_types": ["authorization_code", "refresh_token"],
"response_types": ["code"],
Expand Down
25 changes: 25 additions & 0 deletions tests/unit/fast_agent/mcp/test_cimd.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,31 @@ def __init__(self, **kwargs):

assert captured_kwargs.get("client_metadata_url") == "https://fast-agent.ai/oauth/client.json"

def test_build_oauth_provider_includes_logo_uri_in_client_metadata(self, monkeypatch):
"""build_oauth_provider should include logo_uri in generated client metadata."""
captured_kwargs = {}

class MockOAuthClientProvider:
def __init__(self, **kwargs):
captured_kwargs.update(kwargs)

monkeypatch.setattr(
"fast_agent.mcp.oauth_client.OAuthClientProvider",
MockOAuthClientProvider,
)

config = MCPServerSettings(
name="test",
transport="http",
url="https://example.com/mcp",
)

build_oauth_provider(config)

client_metadata = captured_kwargs.get("client_metadata")
assert client_metadata is not None
assert str(client_metadata.logo_uri) == "https://fast-agent.ai/logo.png"

def test_build_oauth_provider_can_disable_default_cimd_with_env(self, monkeypatch):
"""Setting FAST_AGENT_OAUTH_CLIENT_METADATA_URL to empty should disable default CIMD."""
captured_kwargs = {}
Expand Down
Loading