Skip to content

Commit c550056

Browse files
committed
Remove authentication from MCP server and add demo video link
- Remove all authentication-related code from servers/mcpgw/server.py - Removed global auth state variables (_session_cookie, _auth_lock) - Removed Credentials class and _ensure_authenticated function - Removed username, password, session_cookie parameters from all tools - Simplified _call_registry_api to make direct API calls - Authentication now handled centrally by auth_server - Add demo video link to Agent Integration section in docs/dynamic-tool-discovery.md - Improved separation of concerns and reduced code complexity
1 parent de4cf4b commit c550056

File tree

5 files changed

+24
-225
lines changed

5 files changed

+24
-225
lines changed

agents/.env.template

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,7 @@ AWS_REGION=us-east-1
1919

2020
# Secret key for session cookie signing (must match registry SECRET_KEY), string of hex characters
2121
# To generate: python -c 'import secrets; print(secrets.token_hex(32))'
22-
SECRET_KEY=your-secret-key-here
22+
SECRET_KEY=your-secret-key-here
23+
24+
# Either http://localhost:8000 or the HTTPS URL of your deployed MCP Gateway
25+
REGISTRY_URL=your_registry_url_here

agents/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ async def main():
596596
# Initialize MCP client with the server configuration and authentication headers
597597
client = MultiServerMCPClient(
598598
{
599-
"default_server": {
599+
"mcp_registry": {
600600
"url": server_url,
601601
"transport": "sse",
602602
"headers": auth_headers

agents/cli_user_auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
script_dir = Path(__file__).parent
4343
env_file = script_dir / '.env.user'
4444
if env_file.exists():
45-
load_dotenv(env_file)
45+
load_dotenv(env_file, override=True)
4646
logger.info(f"Loaded environment variables from {env_file}")
4747
else:
4848
logger.warning(f"No .env file found at {env_file}")

docs/dynamic-tool-discovery.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ if weather_tools:
143143

144144
The more powerful approach is when AI agents themselves use dynamic tool discovery autonomously. The agent has access to both `intelligent_tool_finder` and `invoke_mcp_tool` as available tools, allowing it to discover and execute new capabilities on-demand.
145145

146+
**Demo Video**: [Watch the agent integration in action](https://github.com/user-attachments/assets/cee1847d-ecc1-406b-a83e-ebc80768430d)
147+
146148
#### System Prompt Configuration
147149

148150
Agents are configured with instructions on how to use dynamic tool discovery:

0 commit comments

Comments
 (0)