Linux MCP Server 扩展
本教程介绍如何将 Linux MCP Server 添加为 goose 扩展,让 AI 助手能够在 Linux 系统上运行、发现并排查复杂问题。
TLDR
- goose Desktop
- goose CLI
命令
# Using uv (recommended)
uvx linux-mcp-server
配置
信息
运行此命令需要在系统上安装 uv,因为它使用 uvx。
- goose Desktop
- goose CLI
- Launch the installer
- Click
Yesto confirm the installation - Click the button in the top-left to open the sidebar
- Navigate to the chat
- Run the
configurecommand:
goose configure
- Choose to add a
Command-line Extension.
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension
│
◆ What type of extension would you like to add?
│ ○ Built-in Extension
│ ● Command-line Extension (Run a local command or script)
│ ○ Remote Extension (Streamable HTTP)
└
- Give your extension a name.
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension
│
◇ What type of extension would you like to add?
│ Command-line Extension
│
◆ What would you like to call this extension?
│ Linux MCP Server
└
- Enter the command to run when this extension is used.
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension
│
◇ What type of extension would you like to add?
│ Command-line Extension
│
◇ What would you like to call this extension?
│ Linux MCP Server
│
◆ What command should be run?
│ uvx linux-mcp-server
└
- Enter the number of seconds goose should wait for actions to complete before timing out. Default is
300seconds.
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension
│
◇ What type of extension would you like to add?
│ Command-line Extension
│
◇ What would you like to call this extension?
│ Linux MCP Server
│
◇ What command should be run?
│ uvx linux-mcp-server
│
◆ Please set the timeout for this tool (in secs):
│ 300
└
- Enter a description for this extension.
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension
│
◇ What type of extension would you like to add?
│ Command-line Extension
│
◇ What would you like to call this extension?
│ Linux MCP Server
│
◇ What command should be run?
│ uvx linux-mcp-server
│
◇ Please set the timeout for this tool (in secs):
│ 300
│
◆ Enter a description for this extension:
│ 用于 Linux 系统发现与故障排查的工具
└
- Choose
Nowhen asked to add environment variables.
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension
│
◇ What type of extension would you like to add?
│ Command-line Extension
│
◇ What would you like to call this extension?
│ Linux MCP Server
│
◇ What command should be run?
│ uvx linux-mcp-server
│
◇ Please set the timeout for this tool (in secs):
│ 300
│
◇ Enter a description for this extension:
│ 用于 Linux 系统发现与故障排查的工具
│
◆ Would you like to add environment variables?
│ No
│
└ Added Linux MCP Server extension
使用示例
按照说明,使用 Linux MCP Server 进行系统诊断和故障排查。
goose 提示词
我的 Wi-Fi 连接不太稳定。请在系统日志中找出错误信息,诊断问题并帮我修复。
goose 输出
桌面版
🤖 LLM 输出 🤖 我来帮你诊断 Wi-Fi 连接问题。我会查看与网络接口和无线连接相关的系统日志错误信息。先收集系统信息,并检查相关日志。