MCP.so
登录

@modelcontextprotocol/server Terminal MCP Server

@MCP-Mirror

基本信息

分类

开发工具

传输方式

stdio

作者

MCP-Mirror

关于 @modelcontextprotocol/server Terminal MCP Server

Mirror of

#mcp-terminal#terminal-server#model-context-protocol

@modelcontextprotocol/server Terminal MCP Server 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "terminal": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-terminal"
      ]
    }
  }
}

@modelcontextprotocol/server Terminal MCP Server 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

点击上方按钮,在临时沙箱中运行此服务器并实时获取工具列表。

概览

What is @modelcontextprotocol/server-terminal?

A terminal server implementation for the Model Context Protocol (MCP). It provides secure and controlled access to shell commands and npm operations, designed for MCP integrations that need to run terminal tasks programmatically.

How to use @modelcontextprotocol/server-terminal?

Install the package via npm, then add the provided JSON configuration to your MCP config file. The configuration defines allowed commands, a default timeout, a working directory, and environment variables.

Key features of @modelcontextprotocol/server-terminal

  • Execute shell commands with full control
  • Built-in npm operations (install, run scripts)
  • Timeout handling for long-running commands
  • Security through an allowed commands list
  • Environment variables management
  • Working directory control
  • TypeScript support

Use cases of @modelcontextprotocol/server-terminal

  • Run build, dev, or test scripts in a project directory
  • Install npm packages automatically as part of an MCP workflow
  • Execute controlled shell commands (e.g., git operations) with timeouts
  • Manage development environment variables for consistent command execution

常见问题

1

What are the required configuration fields?

The `allowedCommands` list, `defaultTimeout`, and `defaultCwd` are configurable; the README shows `npm`, `node`, and `git` as examples for allowed commands and a 30-second timeout.

2

How does the server enforce security?

It restricts which commands can be run via the `allowedCommands` configuration array—only those listed (e.g., `npm`, `node`, `git`) are permitted.

3

What npm operations are built-in?

The server exposes `install()`, `runScript()`, `dev()`, and `build()` methods for common npm tasks like installing packages and running scripts.

4

Does it support custom environment variables?

Yes, you can set environment variables like `NODE_ENV` through the `environmentVariables` configuration object.

5

What runtime or dependencies does it require?

It requires Node.js and npm to be installed, and it is installed via `npm install @modelcontextprotocol/server-terminal`.

评论

开发工具 分类下的更多 MCP 服务器