drio
Open app

@modelcontextprotocol/server-terminal

Source

Terminal server implementation for Model Context Protocol

Catalog onlyCatalog onlySTDIO

Overview

@modelcontextprotocol/server-terminal is a terminal server implementation designed for the Model Context Protocol (MCP), providing secure and controlled access to terminal commands and npm operations.

To use the terminal server, you need to install it via npm and configure it according to your MCP setup, specifying allowed commands and environment variables.

  • Execute shell commands with full control - Built-in npm operations (install, run scripts) - Timeout handling for command execution - Security through an allowed commands list - Management of environment variables - Control over working directories - Support for Typescript
  1. Controlling secure execution of terminal commands in various environments.
  2. Automating npm operations within a project.
  3. Managing command execution context with specified working directories.

Add to your AI client

Use these steps to connect @modelcontextprotocol/server-terminal in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

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

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

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

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

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

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "mcp-terminal-server-richardtheuws": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-terminal-server-richardtheuws"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

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

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

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

FAQ

What commands can be executed?

You can execute commands specified in the allowed commands list in your configuration, such as 'npm', 'node', and 'git'.

How do I install this terminal server?

You can install the terminal server by running `npm install @modelcontextprotocol/server-terminal` in your project directory.

Is there Typescript support?

Yes, the terminal server supports Typescript, making it easier to integrate into Typescript projects.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":296,"uuid":"826fa42f-da77-43dd-a6b7-981c7d1d3bc3","name":"mcp-terminal-server","title":"@modelcontextprotocol/server-terminal","description":"Terminal server implementation for Model Context Protocol","avatar_url":"https://avatars.githubusercontent.com/u/9929021?v=4","created_at":"2024-12-13T13:02:00.926Z","updated_at":"2024-12-13T15:09:10.081Z","status":"created","author_name":"RichardTheuws","author_avatar_url":"https://avatars.githubusercontent.com/u/9929021?v=4","tags":"[]","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/RichardTheuws/mcp-terminal-server","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":null,"user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]