Server Configuration
Describes the environment variables required to run the server.
Name | Required | Description | Default |
---|---|---|---|
No arguments |
Schema
Prompts
Interactive templates invoked by user choice
Name | Description |
---|---|
No prompts |
Resources
Contextual data attached and managed by the client
Name | Description |
---|---|
No resources |
Tools
Functions exposed to the LLM to take actions
Name | Description |
---|---|
collect_reports | 采集指定月份范围的日报数据 ⚠️ 重要:使用前请先确保已登录! 推荐流程:
这样可以避免采集过程被登录流程阻塞。 Args: start_month: 起始月份,格式 YYYY-MM (例如: 2025-07) end_month: 结束月份,格式 YYYY-MM (例如: 2025-09) output_file: 输出文件路径(可选,默认为 ~/.yst_mcp/output/new.md 或项目目录下 data/new.md) auto_login: 未登录时是否自动启动浏览器登录(默认 False,不推荐设为 True) Returns: 采集结果描述 |
browser_login | 启动浏览器进行登录(后台执行,不阻塞) ✅ 新版本改进:
✅ 推荐使用流程:
工作流程:
Args: use_persistent: 是否使用持久化浏览器上下文(推荐,默认 True) timeout: 登录超时时间(秒),默认 300 秒(5 分钟) Returns: 启动状态(立即返回,不等待登录完成) |
save_cookies_from_browser | 保存浏览器 Cookie(用于首次登录) 使用方法:
Args: cookie_string: Cookie 字符串,格式如 "name1=value1; name2=value2" 或者完整的 curl 命令中的 -b 参数内容 Returns: 保存结果 |
check_login_status | 检查当前登录状态(建议第一步调用) ✅ 推荐工作流程:
Returns: 登录状态信息: - "✓ 已登录,Cookie 有效" -> 可以直接采集数据 - "❌ Cookie 已过期" -> 需要调用 browser_login 重新登录 - "❌ 未找到保存的 Cookie" -> 需要调用 browser_login 首次登录 |
clear_saved_cookies | 清除已保存的 Cookie Returns: 清除结果 |