SHPlayer Controller
MCP 服务器连接配置
MCP 服务器地址: https://localhost.tv.sohu.com:7981/mcp(Streamable HTTP)
协议版本: 2024-11-05
连接前请确保:
1. 搜狐影音已启动
2. 本地 MCP 服务已运行(通常随软件启动)
3. 无需额外认证
核心能力(11 个工具)
1. 播放控制 — control_playback
执行播放/暂停/切集等指令。
| action | 说明 |
|---|---|
play |
播放 |
pause |
暂停 |
previous |
上一集 |
next |
下一集 |
restart |
从头播放 |
enable_danmaku / disable_danmaku |
弹幕开关 |
enable_auto_skip / disable_auto_skip |
自动跳过片头片尾开关 |
enable_incognito / disable_incognito |
无痕模式开关 |
2. 进度与倍速 — adjust_playback
action: "seek" | "speed"
value: 数值字符串
- seek:目标秒数(
"600"= 跳到10分钟处),支持相对值前缀"+30"/"-30" - speed:倍率,支持
0.5/0.8/1.0/1.25/1.5/2.0/2.5/3.0
3. 播放视频 — play_media
source_type: "local" | "online" | "baidu_drive" | "aliyun_drive" | "115_drive"
video_id: string # source_type 非 local 时必填
file_path: string # source_type=local 时使用
4. 搜索视频 — search_media
action: "search" | "list"
source_filter: "local" | "online" | "baidu_drive" | "aliyun_drive" | "115_drive"
keyword: string # action=search 时使用
directory_path: string # action=list 时使用
5. 字幕管理 — manage_subtitle
action: "list" | "select"
subtitle_id: number # select 时使用,-1 表示隐藏字幕
注意: list 返回的 subtitle_id 仅供后续 select 调用,不需要展示给用户。
6. 截图 — take_snapshot
无参数,截取当前视频帧。
7. 画面旋转/翻转 — transform_video
action: "reset" | "cw9" | "ccw9" | "flip_h" | "flip_v"
8. 动态壁纸 — manage_wallpaper
action: "start" | "open_main" | "set"
file_path: string # action=set 时为必填项(本地视频绝对路径)
9. 系统设置 — configure_system
action: 必填
skin_name: "black" | "white" | "new_year" # 仅 action=change_skin 时
| action | 说明 |
|---|---|
change_skin |
换肤 |
enable_auto_start |
开启开机自启 |
disable_auto_start |
关闭开机自启 |
clear_cache |
清理缓存 |
set_as_default |
设为默认播放器 |
open_settings_panel |
打开设置界面 |
10. 页面导航 — navigate_to_page
page: "history" | "favorite" | "subscribe" | "download" | "creations" | "video_library" | "movie" | "teleplay" | "feed" | "zuopinHome"
11. 观看历史 — query_user_history
limit: number # 默认 10,最大 20
常用场景
场景一:播放本地视频
play_media(source_type="local", file_path="D:/Videos/电影.mp4")
场景二:跳到 5 分 30 秒并开启 1.5 倍速
adjust_playback(action="seek", value="330")
adjust_playback(action="speed", value="1.5")
场景三:搜索搜狐在线库中的"狂飙"
search_media(action="search", keyword="狂飙", source_filter="online")
场景四:开启弹幕并切换到中文字幕
control_playback(action="enable_danmaku")
manage_subtitle(action="list") # 获取字幕 ID
manage_subtitle(action="select", subtitle_id=1)
场景五:将当前画面设为桌面动态壁纸
manage_wallpaper(action="set", file_path="C:/Videos/风景.mp4")
详细工具参数和字段约束见 references/tools.md。