This commit is contained in:
Ishaan Jaff
2025-03-29 17:11:46 -07:00
parent 3e378f2bec
commit 4e106ce217
+9 -12
View File
@@ -7,21 +7,24 @@ sys.path.insert(
0, os.path.abspath("../../..")
) # Adds the parent directory to the system path
from litellm.proxy._experimental.mcp_server.mcp_client_manager import (
from litellm.proxy._experimental.mcp_server.mcp_server_manager import (
MCPServerManager,
MCPSSEServer,
)
MCP_SERVERS = [
MCPSSEServer(name="zapier_mcp_server", url=os.environ.get("ZAPIER_MCP_SERVER_URL")),
]
mcp_server_manager = MCPServerManager(mcp_servers=MCP_SERVERS)
mcp_server_manager = MCPServerManager()
@pytest.mark.asyncio
async def test_mcp_server_manager():
mcp_server_manager.load_servers_from_config(
{
"zapier_mcp_server": {
"url": os.environ.get("ZAPIER_MCP_SERVER_URL"),
}
}
)
tools = await mcp_server_manager.list_tools()
print("TOOLS FROM MCP SERVER MANAGER== ", tools)
@@ -29,9 +32,3 @@ async def test_mcp_server_manager():
name="gmail_send_email", arguments={"body": "Test"}
)
print("RESULT FROM CALLING TOOL FROM MCP SERVER MANAGER== ", result)
"""
TODO test with multiple MCP servers and calling a specific
"""