Back to MCP directory
publicPublicdnsLocal runtime

Terminal

MCP终端服务配置说明

article

README

🚀 MCP终端使用说明

本项目是一个模型上下文协议(MCP)服务器,主要用于终端访问。该服务器的核心价值在于,它能够让Claude与您系统里的指定目录进行交互,为您的操作提供便利。

🚀 快速开始

✨ 主要特性

  • 作为MCP服务器,支持终端访问。
  • 允许Claude与系统指定目录交互。

📦 安装指南

环境变量

您可以通过以下环境变量对服务器进行配置:

  • ALLOWED_DIRECTORY:Claude被允许访问的目录路径,默认值为${HOME}/your/allowed/directory

这些变量的设置方式有以下三种:

  1. 可在项目根目录的.env文件中进行设置。
  2. 可在操作系统的环境变量中进行设置。
  3. 可直接在claude_desktop_config.json中进行配置。

Claude桌面配置

您需要将以下内容添加到claude_desktop_config.json文件中:

{
  "mcpServers": {
    "terminal": {
      "command": "node",
      "args": [
        "${HOME}/path/to/mcp-terminal-use/dist/index.js"
      ],
      "env": {
        "ALLOWED_DIRECTORY": "${HOME}/your/allowed/directory"
      }
    }
  }
}
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