Skip to main content
Glama

MCP Terminal Server

MCP 终端服务器

一个简单的 MCP 服务器,它公开了一个用于运行终端命令的工具。

安装

  1. 安装 MCP Python SDK:
pip install mcp

用法

  1. 启动服务器:
python server.py
  1. 在兼容 MCP 的客户端(例如 Claude Desktop)中连接到服务器:
mcp install server.py

或者使用 MCP 检查器来测试它:

mcp dev server.py

工具概述

该服务器公开一个工具:

终端命令

运行终端命令并返回其输出。

参数:

  • command :在终端中运行的命令

返回:

  • 一本包含以下内容的字典:
    • stdout :命令的标准输出
    • stderr :命令的标准错误输出
    • return_code :命令的返回代码(0 通常表示成功)

Claude 中的用法示例:

Can you list the files in the current directory using the terminal tool?

安全注意事项

此工具直接在您的系统上执行命令。请谨慎使用,因为它可以以与运行服务器的用户相同的权限运行任何命令。

限制

  • 命令在 30 秒后超时
  • 出于安全原因,请考虑对可以执行的命令实施额外的验证和限制
-
security - not tested
F
license - not found
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

一个简单的 MCP 服务器,允许运行带有输出捕获的终端命令,从而能够从与 MCP 兼容的客户端(如 Claude Desktop)在主机系统上执行命令。

  1. 安装
    1. 用法
      1. 工具概述
        1. 终端命令
      2. 安全注意事项
        1. 限制

          Related MCP Servers

          • A
            security
            A
            license
            A
            quality
            An MCP server to run commands.
            Last updated -
            2
            946
            183
            TypeScript
            MIT License
            • Apple
          • -
            security
            F
            license
            -
            quality
            A simple MCP server that allows accessing and executing shell commands on a VM machine through a web-based terminal interface, with automatic tunneling to make the VM accessible from anywhere.
            Last updated -
            817
            3
            JavaScript
          • -
            security
            F
            license
            -
            quality
            An MCP server that allows AI assistants like Claude to execute terminal commands on the user's computer and return the output, functioning like a terminal through AI.
            Last updated -
            48
            Python
            • Apple
          • -
            security
            F
            license
            -
            quality
            A simple MCP server that provides a terminal tool for executing shell commands with safety features like timeouts and error handling.
            Last updated -
            Python

          View all related MCP servers

          MCP directory API

          We provide all the information about MCP servers via our MCP API.

          curl -X GET 'https://glama.ai/api/mcp/v1/servers/ivannafigueroa/mcp-shell-server'

          If you have feedback or need assistance with the MCP directory API, please join our Discord server