diff --git a/app.py b/app.py index 56a9ec2..0a9433a 100755 --- a/app.py +++ b/app.py @@ -12,9 +12,10 @@ logging.info("服务器启动") VNC_SERVER_HOST = "https://10.10.40.19:6080" SHELL_DIR = "/home/dgs/vnc-server" @mcp.tool() -def mail_qq_spider(account: str) -> str: +async def mail_qq_spider(account: str) -> str: """qq邮箱爬虫,第一个参数是用户名""" - return a1(account) + result = await asyncio.to_thread(a1, account) + return result @mcp.tool() async def start_vnc_server(display: int) -> str: """启动VNC服务