diff --git a/app.py b/app.py index 302ad99..1258150 100755 --- a/app.py +++ b/app.py @@ -1,3 +1,4 @@ +import os from fastmcp import FastMCP from spider.mail_qq import start as a1 import asyncio @@ -20,6 +21,8 @@ async def mail_qq_spider(account: str,display: int) -> str: Returns: str: 爬虫结果 """ + os.environ['DISPLAY'] = f':{display}' # 改成你的 VNC 显示器编号 + result = await asyncio.to_thread(a1, account, display) return result @mcp.tool()