From d721aad3e454e416bdf3895633095b2d23c09f6f Mon Sep 17 00:00:00 2001 From: Clawdbot Date: Sat, 11 Apr 2026 04:35:55 +0200 Subject: [PATCH 1/2] fix: include logo_uri in oauth client metadata Fixes #710 Co-Authored-By: Claude --- src/fast_agent/mcp/oauth_client.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/fast_agent/mcp/oauth_client.py b/src/fast_agent/mcp/oauth_client.py index 4118a502b..2a942837b 100644 --- a/src/fast_agent/mcp/oauth_client.py +++ b/src/fast_agent/mcp/oauth_client.py @@ -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"], From 38faea5d0c3266925be93849e95353742eaeb14c Mon Sep 17 00:00:00 2001 From: evalstate <1936278+evalstate@users.noreply.github.com> Date: Mon, 13 Apr 2026 11:59:56 +0100 Subject: [PATCH 2/2] test: cover oauth client logo metadata --- tests/unit/fast_agent/mcp/test_cimd.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tests/unit/fast_agent/mcp/test_cimd.py b/tests/unit/fast_agent/mcp/test_cimd.py index 8514fe20b..a99eb3f3f 100644 --- a/tests/unit/fast_agent/mcp/test_cimd.py +++ b/tests/unit/fast_agent/mcp/test_cimd.py @@ -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 = {}