斯图克巴尔
   
一个简单的CLI工具和MCP服务器,用于解开恼人的Windows任务栏。
当Windows任务栏卡住时(特别是配置为自动隐藏时),此实用程序提供了一种快速重新启动的方法 explorer.exe 从命令行或通过MCP工具调用,将任务栏恢复正常。
🪟 仅限Windows:此工具专为Windows设计,不适用于macOS或Linux。
安装
使用货物(推荐)
# Basic installation (CLI only)
cargo install stuckbar
# With MCP server support (STDIO transport)
cargo install stuckbar --features mcp
# With full MCP support (STDIO + HTTP transports)
cargo install stuckbar --features mcp-full来源
git clone https://github.com/bkataru/stuckbar.git
cd stuckbar
cargo install --path .
# Or with MCP features
cargo install --path . --features mcp-full用法
CLI基本用法
# Restart explorer.exe (default action)
stuckbar
# Or explicitly use the restart command
stuckbar restart
# Just kill explorer.exe
stuckbar kill
# Just start explorer.exe
stuckbar start
# Show help
stuckbar --help
# Show version
stuckbar --version命令
| 命令 | 描述 |
|---|---|
restart | 关闭并重新启动explorer.exe(默认) |
kill | 终止explorer.exe进程 |
start | 启动explorer.exe进程 |
serve | 启动MCP服务器(需要 mcp 特征) |
MCP服务器(AI代理集成)
Stuckbar可以作为一个 模型上下文协议(MCP) 服务器,允许AI代理以编程方式控制Windows资源管理器操作。
特性
当作为MCP服务器运行时,stuckbar公开了三个工具:
| 工具 | 说明 |
|---|---|
kill_explorer | 终止explorer.exe进程 |
start_explorer | 启动explorer.exe进程 |
restart_explorer | 重新启动explorer.exe(建议用于卡住的任务栏) |
运行MCP服务器
STDIO传输(用于直接过程通信)
# Requires: cargo install stuckbar --features mcp
stuckbar serve --stdio这是大多数MCP客户端(如Claude Desktop)的推荐传输方式。
HTTP传输(基于SSE,用于网络通信)
# Requires: cargo install stuckbar --features mcp-full
stuckbar serve --http
# With custom host and port
stuckbar serve --http --host 0.0.0.0 --port 3000HTTP服务器使用服务器发送事件(SSE)并公开:
- SSE端点: `http://:
/sse`
- 消息端点: `http://:
/message`
配置示例
克劳德桌面版
添加到您的 claude_desktop_config.json:
窗户:
{
"mcpServers": {
"stuckbar": {
"command": "stuckbar",
"args": ["serve", "--stdio"]
}
}
}或者使用完整路径:
{
"mcpServers": {
"stuckbar": {
"command": "C:\\Users\\\\.cargo\\bin\\stuckbar.exe",
"args": ["serve", "--stdio"]
}
}
}其他MCP客户端
对于支持SSE传输的客户:
stuckbar serve --http --port 8080
# Connect to: http://localhost:8080/sse功能标志
| 特性 | 描述 |
|---|---|
| (默认) | 基本CLI功能 |
mcp | 带STDIO传输的MCP服务器 |
mcp-http | 带SSE HTTP传输的MCP服务器(包括 mcp) |
mcp-full | 所有MCP功能(别名 mcp-http) |
从源头构建
# Clone the repository
git clone https://github.com/bkataru/stuckbar.git
cd stuckbar
# Build with default features
cargo build --release
# Build with MCP support
cargo build --release --features mcp-full
# Run tests
cargo test
# Run tests with all features
cargo test --all-features运作原理
当Windows任务栏变得无响应或卡住时(通常在启用自动隐藏的情况下发生),典型的修复方法是重新启动Windows资源管理器。该工具通过以下方式自动化了该过程:
- 杀:强行终止
explorer.exe使用taskkill /F /IM explorer.exe - 等待:短暂暂停(500ms)以确保进程完全终止
- 开始:启动一个新的实例
explorer.exe
这将恢复任务栏、桌面图标和文件资源管理器功能。
平台支持
这个工具是 仅限Windows。在macOS或Linux上运行将显示错误消息:
stuckbar is a Windows-only tool.
Current platform 'linux' is not supported.
This tool restarts explorer.exe which only exists on Windows.许可证
MIT许可证-请参阅 许可证 了解详情。
贡献
欢迎投稿!请随时提交拉取请求:)
