Skip to content

Commit ed5dfb2

Browse files
Kludexfelixweinberger
authored andcommitted
Apply pre-commit
1 parent c40068e commit ed5dfb2

File tree

1 file changed

+7
-3
lines changed
  • examples/clients/simple-auth-client/mcp_simple_auth_client

1 file changed

+7
-3
lines changed

examples/clients/simple-auth-client/mcp_simple_auth_client/main.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,10 @@ async def _default_redirect_handler(authorization_url: str) -> None:
193193
# Create OAuth authentication handler using the new interface
194194
# Use client_metadata_url to enable CIMD when the server supports it
195195
oauth_auth = OAuthClientProvider(
196-
server_url=self.server_url,
197-
client_metadata=OAuthClientMetadata.model_validate(client_metadata_dict),
196+
server_url=self.server_url.replace("/mcp", ""),
197+
client_metadata=OAuthClientMetadata.model_validate(
198+
client_metadata_dict
199+
),
198200
storage=InMemoryTokenStorage(),
199201
redirect_handler=_default_redirect_handler,
200202
callback_handler=callback_handler,
@@ -327,7 +329,9 @@ async def interactive_loop(self):
327329
await self.call_tool(tool_name, arguments)
328330

329331
else:
330-
print("❌ Unknown command. Try 'list', 'call <tool_name>', or 'quit'")
332+
print(
333+
"❌ Unknown command. Try 'list', 'call <tool_name>', or 'quit'"
334+
)
331335

332336
except KeyboardInterrupt:
333337
print("\n\n👋 Goodbye!")

0 commit comments

Comments
 (0)