agent-claw: automated task changes
This commit is contained in:
14
agentclaw/app/agent_claw_main/mcp_client/client.py
Normal file
14
agentclaw/app/agent_claw_main/mcp_client/client.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import os
|
||||
import logging
|
||||
from mcp.client.streamable_http import streamablehttp_client
|
||||
from strands.tools.mcp.mcp_client import MCPClient
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# ExaAI provides information about code through web searches, crawling and code context searches through their platform. Requires no authentication
|
||||
EXAMPLE_MCP_ENDPOINT = "https://mcp.exa.ai/mcp"
|
||||
|
||||
def get_streamable_http_mcp_client() -> MCPClient:
|
||||
"""Returns an MCP Client compatible with Strands"""
|
||||
# to use an MCP server that supports bearer authentication, add headers={"Authorization": f"Bearer {access_token}"}
|
||||
return MCPClient(lambda: streamablehttp_client(EXAMPLE_MCP_ENDPOINT))
|
||||
Reference in New Issue
Block a user