Skip to main content
Glama
envmgr-mcp-server

envmgr-mcp-server

by KevinLvLight

envmgr-mcp-server

通过 SSH 和浏览器访问管理多套命名环境的 MCP 服务器,供 Claude 等 LLM 直接调用。

提供三个工具:

  • envmgr_list — 列出所有已配置环境(支持按 type 过滤)

  • envmgr_ssh — 在指定环境上通过 SSH 执行 shell 命令

  • envmgr_browser — 返回指定环境的浏览器 URL 和登录凭据(供 Playwright / chrome-devtools-mcp 使用)


安装

npm install -g @kikilight/envmgr-mcp-server
claude mcp add -s user envmgr-mcp-server -- envmgr-mcp-server

完成后重启 Claude Code 即可使用。

升级到新版本:npm install -g @kikilight/envmgr-mcp-server@latest


Related MCP server: MSAW

配置环境

首次运行时,若未找到配置文件,服务会自动生成一份示例配置:

  • Windows: %USERPROFILE%\.config\envmgr\envs.json

  • macOS / Linux: ~/.config/envmgr/envs.json

按需编辑该文件即可,格式如下:

{
  "envs": {
    "prod": {
      "type": "production",
      "description": "生产环境",
      "ssh": {
        "host": "10.0.0.1",
        "user": "root",
        "password": "yourpassword",
        "port": 22
      },
      "browser": {
        "url": "https://admin.example.com",
        "username": "admin",
        "password": "yourpassword"
      }
    }
  }
}

ssh 和 browser 均为可选,一个环境可同时拥有两者或只有其一。


开发 & 打包(开发者)

npm install
npm run build    # tsc 编译 → dist/
npm run dev      # tsx watch 模式,自动重载

发布到 npm:

npm run build
npm publish

Available Tools

3 tools
envmgr_browser获取环境浏览器访问信息A
Read-onlyIdempotent

返回指定环境的浏览器访问 URL 和认证凭据。

输出的结构化信息可供 Playwright、chrome-devtools-mcp 等浏览器自动化工具使用。 使用流程:

  1. 调用 envmgr_browser 获取 url / username / password

  2. 用浏览器自动化工具导航到 url

  3. 填写 username 和 password 完成登录

Inputs: env (required).

envmgr_list列出环境A
Read-onlyIdempotent

列出所有已配置的环境及其连接信息。 配置文件路径:/root/.config/envmgr/envs.json(可通过 ENVMGR_CONFIG 环境变量覆盖)。

返回每个环境的:名称、类型、描述、SSH 状态、浏览器状态。密码不返回。

Inputs: type.

envmgr_ssh在环境执行 SSH 命令A
Destructive

通过 SSH 在指定环境上执行 shell 命令,返回命令输出。

使用场景:

  • 查看服务日志:tail -100 /data/logs/hillos-core/log-error.log

  • 检查进程状态:ps aux | grep java

  • 查看磁盘空间:df -h

  • 统计日志错误:grep -c 'ERROR' /data/logs/xxx/log-error.log

注意:命令在 root 权限下执行,请谨慎使用破坏性命令。

Inputs: env (required), command (required), timeout_seconds.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool serves a distinct purpose: envmgr_list enumerates environments, envmgr_ssh executes commands, and envmgr_browser provides browser access credentials. The descriptions clearly separate these functions with no overlapping scope.

    Naming Consistency4/5

    All tools share the envmgr_ prefix, making the namespace clear. The second part mixes a verb (list) with nouns (ssh, browser), which is a minor inconsistency, but the pattern remains predictable and readable.

    Tool Count5/5

    With only three tools, the server is tightly scoped to its purpose of providing environmental access. Each tool is necessary and the count is not excessive or inadequate for the domain.

    Completeness4/5

    The server covers the primary lifecycle of listing environments and accessing them via SSH or browser. Minor gaps such as environment add/remove or update exist, but these are likely managed externally via config files, so the surface is sufficient for its intended use.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Manages multiple SSH servers through a local workspace with MCP tools, executing commands and transferring files securely with credential isolation.
      9
      1
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI coding agents and MCP clients to securely execute shell commands, manage files, and access remote devices or SSH hosts through centralized authentication, routing, and auditing.
      Apache 2.0