mirror of
https://github.com/browser-use/web-ui.git
synced 2026-03-22 11:17:17 +08:00
add mcp tool
This commit is contained in:
31
tests/test_controller.py
Normal file
31
tests/test_controller.py
Normal 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())
|
||||
Reference in New Issue
Block a user