Skip to main content
Glama

@brycepelletier/agent-env-mcp

可重用的宿主机侧 MCP 控制器,用于加固的 Linux 软件工程运行时。

0.3.1 信任域划分

Compose 运行时在同一工作树上有两个执行域:

  • agent:供 Software Engineer 工具使用。真实的 .git 目录被一个 root 所有的 tmpfs 挂载所遮蔽。

  • git:仅供 git_command 使用。它能看见真实的 .git 目录,并且设置 network_mode: none。

远程 Git/GitHub 操作不属于此包;它们应由独立的 GitHub MCP 信任域处理。

Related MCP server: Secure Grid Genesis Execution

工具

  • ensure_environment

  • list_directory

  • read_file

  • search_workspace

  • workspace_edit

  • run_command

  • git_command

MCP 会在工具首次使用时,通过 MCP Roots 惰性地发现当前活动的 VS Code 工作区。无需 ${workspaceFolder} 启动时变量。

本地开发

npm run link

链接状态下的用户级 VS Code MCP 配置:

"agent-env": {
  "type": "stdio",
  "command": "agent-env-mcp"
}

要移除全局开发链接:

npm run unlink

0.3.1 验收检查

在移除项目旧的 .devcontainer 之前:

  1. ensure_environment 执行成功,并报告 /agent-env/environment/<project>。

  2. run_command 能够构建项目。

  3. 即使 run_command 通过 Python/Node 间接调用 Git,也无法获取真实的 Git 分支/历史。

  4. git_command ["status", "--short", "--branch"] 执行成功。

  5. Git 服务没有网络访问权限。

当前的 .git 遮蔽实现基于标准检出之上,其中 .git 是一个目录。对于使用 .git 文件的 Git worktree/submodule,应拒绝此类仓库形式,或由未来的挂载策略处理,之后才能将此运行时视为已针对这些仓库形式加固。

Tool Schema Changelog

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

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to safely execute Python, JavaScript, and Bash code in an isolated Docker sandbox with strict security constraints.
      1
      -
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI coding agents to safely execute commands, run tests, and modify project files inside disposable, policy-enforced Docker sandboxes that are isolated from the host machine and its credentials.
      15
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI coding agents to safely execute code, run tests, and build projects inside disposable Docker sandboxes, protecting the host machine through enforced isolation, filesystem snapshots, and network controls.
      15
      MIT