Back to MCP directory
publicPublicdnsLocal runtime

mcp-server-restart

为Mac版Claude Desktop提供重启功能的MCP服务器

article

README

🚀 mcp-server-restart

mcp-server-restart 简化了在Claude Desktop上使用模型上下文协议(MCP)安装工具的流程。通过允许Claude使用MCP来帮助安装MCP工具,解决了手动安装的繁琐问题。安装完成后,该包提供的MCP服务器可用于重启Mac上的Claude Desktop应用程序。

🚀 快速开始

告诉Claude Desktop“重启Claude”,它将自动重启该应用程序。

✨ 主要特性

资源

服务器提供了以下资源:

  • claude://status - 返回Claude Desktop的当前状态
    • 包含运行状态、PID和时间戳的JSON
    • MIME类型:application/json

工具

服务器实现了一个工具:

  • restart_claude - 重启Claude Desktop应用程序
    • 安全终止现有进程(如果正在运行)
    • 启动新实例
    • 提供重启过程中的进度通知

📦 安装指南

安装需要编辑MacOS上的Claude Desktop配置文件:~/Library/Application Support/Claude/claude_desktop_config.json

选项1:安装mcp-installer和mcp-server-restart包: 在Claude Desktop的配置文件中添加以下内容:

{
  "mcpServers": {
    "mcp-installer": {
      "command": "npx",
      "args": [
        "@anaisbetts/mcp-installer"
      ]
    },
    "mcp-server-restart": {
      "command": "uvx",
      "args": [
        "mcp-server-restart"
      ]
    }
  }
}

选项2:仅安装mcp-server-restart包: 在Claude Desktop的配置文件中添加以下内容:

{
  "mcpServers": {
    "mcp-server-restart": {
      "command": "uvx",
      "args": [
        "mcp-server-restart"
      ]
    }
  }
}

示例提示

嗨,Claude,请安装名为mcp-server-fetch的MCP服务器,然后重启Claude。 请重启Claude。

💻 使用示例

基础用法

告诉Claude Desktop“重启Claude”,它将自动执行重启操作。

📚 详细文档

测试

运行测试套件:

pytest

📄 许可证

本项目采用MIT许可证,详情见LICENSE文件。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client