add mcp tool

This commit is contained in:
vvincent1234
2025-04-26 23:14:40 +08:00
parent 9093106fd6
commit 3c0a089fc5
4 changed files with 138 additions and 17 deletions

31
tests/test_controller.py Normal file
View File

@@ -0,0 +1,31 @@
import asyncio
import pdb
import sys
sys.path.append(".")
from dotenv import load_dotenv
load_dotenv()
async def test_mcp_client():
from src.utils.mcp_client import setup_mcp_client_and_tools
test_server_config = {
"playwright": {
"command": "npx",
"args": [
"@playwright/mcp@latest",
],
"transport": "stdio",
}
}
mcp_tools, mcp_client = await setup_mcp_client_and_tools(test_server_config)
pdb.set_trace()
if __name__ == '__main__':
asyncio.run(test_mcp_client())