mcp-server-restart - MCP服务,MCP服务器,MCP教程

基本能力

产品定位

mcp-server-restart 是一个专为 Claude Desktop for Mac 设计的 MCP 服务器,用于简化重启 Claude Desktop 的流程。

核心功能

  1. 状态查询
  2. 提供 claude://status 资源,返回 Claude Desktop 的当前状态(包括运行状态、PID 和时间戳)。
  3. 返回格式为 JSON,MIME 类型为 application/json

  4. 重启工具

  5. 实现 restart_claude 工具,用于安全地重启 Claude Desktop 应用程序。
  6. 功能包括终止现有进程、启动新实例,并在重启过程中提供进度通知。

适用场景

  1. 开发调试:在安装或更新 MCP 工具后,需要重启 Claude Desktop 以使更改生效。
  2. 自动化流程:通过指令或脚本触发 Claude Desktop 的重启,无需手动操作。

工具列表

  • restart_claude
  • 功能:重启 Claude Desktop 应用程序。
  • 特点:安全终止现有进程,启动新实例,并提供进度通知。

常见问题解答

  1. 如何安装?
  2. 需要编辑 Claude Desktop 的配置文件 ~/Library/Application Support/Claude/claude_desktop_config.json,添加 mcp-server-restart 的配置。
  3. 可以选择单独安装 mcp-server-restart 或与 mcp-installer 一起安装。

  4. 如何使用?

  5. 在 Claude Desktop 中发送指令如 "restart Claude" 或 "Hey Claude, install the MCP server named mcp-server-fetch then restart Claude"。

  6. 如何测试?

  7. 运行测试套件:pytest

使用教程

使用依赖

  1. 确保已安装 Node.js 和 npm(用于运行 npxuvx)。
  2. 确保已安装 Claude Desktop for Mac。

安装教程

选项 1:安装 mcp-installermcp-server-restart
  1. 编辑配置文件 ~/Library/Application Support/Claude/claude_desktop_config.json,添加以下内容:
    json
    {
    "mcpServers": {
    "mcp-installer": {
    "command": "npx",
    "args": [
    "@anaisbetts/mcp-installer"
    ]
    },
    "mcp-server-restart": {
    "command": "uvx",
    "args": [
    "mcp-server-restart"
    ]
    }
    }
    }
选项 2:仅安装 mcp-server-restart
  1. 编辑配置文件 ~/Library/Application Support/Claude/claude_desktop_config.json,添加以下内容:
    json
    {
    "mcpServers": {
    "mcp-server-restart": {
    "command": "uvx",
    "args": [
    "mcp-server-restart"
    ]
    }
    }
    }

调试方式

  1. 运行测试套件:
    bash
    pytest
  2. 在 Claude Desktop 中发送指令测试重启功能,例如:
  3. "restart Claude"
  4. "Hey Claude, install the MCP server named mcp-server-fetch then restart Claude"

点击访问

搜索工具

MCP Obsidian - MCP服务,MCP服务器,MCP教程

2025-4-29 16:40:33

搜索工具

QuickBooks Time MCP Server (V2 Update) - MCP服务,MCP服务器,MCP教程

2025-4-29 16:40:41

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索