-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Description: I'm encountering an issue where MCP tools by external server fail with the error ValueError: "No MCP client available to use" (in agent.py line 1647) when used in a group chat, even though the MCP server is connected and tools are properly attached to the agent. With the same agent and mcp configuration, in a single agent setup, access to MCP server is running correctly.
Steps to Reproduce:
Connect to MCP server:
python
mcp_config = StreamableHttpServerConfig(
server_name="mcp_local_1",
type="streamable_http",
server_url="http://localhost:8931/mcp"
)
client.tools.connect_mcp_server(request=mcp_config)
Create an agent with MCP tools:
python
mcp_tools = [tool.id for tool in client.tools.list_mcp_tools_by_server('mcp_local_1')]
agent = client.agents.create(
name="Test Agent",
tool_ids=mcp_tools,
# ... other parameters
)
Use the agent in a group chat - the MCP tools fail with the error.
Additional Context:
The MCP server is running and accessible.
The tools work fine in individual agent interactions.
The issue only occurs in group chat mode.
The agent is created with mcp_tools but seems to lose MCP client context in group chat.
Environment:
Letta Python SDK Last version
Python version: 3.11
Let me know if you need any additional information to help debug this issue or there is a fault in my configurations
Thanks