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
This sample demonstrates the toolset authentication feature where OAuth credentials are required for both tool listing and tool calling.
4
+
5
+
## Overview
6
+
7
+
The toolset authentication flow works in two phases:
8
+
9
+
1.**Phase 1**: When the agent tries to get tools from the MCP server without credentials, the toolset signals "authentication required" and returns an auth request event.
10
+
11
+
2.**Phase 2**: After the user provides OAuth credentials, the agent can successfully list and call tools.
12
+
13
+
## Files
14
+
15
+
-`oauth_mcp_server.py` - MCP server that requires Bearer token authentication
16
+
-`agent.py` - Agent configuration with OAuth-protected MCP toolset
17
+
-`main.py` - Test script demonstrating the two-phase auth flow
0 commit comments