Enoch

io.github.alias8818由 GitHub 账号 alias8818 发布v0.1.1更新于 Oct 24, 2026

Operate an Enoch control plane through MCP tools

概览

AI 生成的概览

本地 MCP 服务器,让助手通过类型化 API 工具查看和操作已配置的 Enoch 控制平面。

可以做什么
注册封装 Enoch 控制平面、Dashboard V1 和核心端点的 MCP 工具,向配置的 Enoch API 地址发送带 Bearer 令牌的请求,并把 API 响应返回给客户端。只读工具带有只读标注,变更类工具标记为非只读并附带审批元数据,且默认保留 dry-run 安全设置。配置了 worker 探测后,还可提供 CPU/GPU worker 的命名诊断,如 API 健康、仪表板状态、进程标记、有界日志尾部、磁盘空间和产物存在性。
适用场景
当你运行 Enoch 控制平面,并希望 MCP 客户端在不暴露原始 shell、也不重新实现 Enoch 业务逻辑的情况下查询和操作它时使用。适合需要从助手获取状态与诊断(含可选 worker 健康检查)的运维人员。
运行要求
需要 Python 3.11 或更高版本,通过 uvx 从 PyPI 运行,以及一个运行中的 Enoch API(通常为 ENOCH_API_TOKEN 提供的 Enoch API Bearer 令牌。还需要能运行本地 stdio 服务器的 MCP 客户端;ENOCH_API_URL 设置基础地址。可选 worker 探测需要 ENOCH_WORKER_PROBES_JSON 或 ENOCH_WORKER_PROBES_FILE。
安装前请注意
ENOCH_API_TOKEN 是必需的机密,缺少时工具调用会失败,请勿放入共享配置。变更类工具标记为非只读并带审批元数据,允许写入前应先行审查。可选 worker 探测可能包含 worker API 令牌和 SSH 目标,SSH 诊断应使用只读用户或强制命令策略。示例中不得出现私有主机名、局域网 IP、运维路径或真实令牌。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Enoch,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

enoch-mcp

[enoch-mcp bridge diagram]

enoch-mcp is a local Model Context Protocol stdio server for a configured Enoch FastAPI control-plane API. It lets MCP clients inspect and operate Enoch through typed tools without exposing a raw shell or reimplementing Enoch business logic.

Enoch system repo · Docs · MCP

What it does

  • Registers MCP tools for Enoch control-plane, Dashboard V1, and core endpoints.
  • Sends requests to a configured Enoch API URL.
  • Adds Authorization: Bearer <token> to API requests using the configured token.
  • Returns Enoch API responses to the MCP client.
  • Marks read-only tools with MCP read-only annotations.
  • Marks mutating tools as non-read-only and adds approval metadata.
  • Keeps safe defaults for dry-run operations.
  • Optionally probes configured CPU/GPU workers directly through worker APIs or allowlisted SSH diagnostics.

What it does not do

  • It does not expose a raw shell tool.
  • It does not accept arbitrary SSH commands.
  • It does not read or write local artifact files directly.
  • It does not call language models.
  • It does not cache, retry, queue, or schedule work.
  • It does not bypass Enoch authentication or authorization.

Requirements

  • Python 3.11 or newer
  • A running Enoch API, normally at http://localhost:8787
  • An Enoch API bearer token
  • An MCP client that can run local stdio servers

Installation

Run from PyPI with uvx:

bash
uvx enoch-mcp --api-url http://localhost:8787 --api-token '<token>'

Or configure with environment variables:

bash
export ENOCH_API_URL='http://localhost:8787'export ENOCH_API_TOKEN='<token>'uvx enoch-mcp

For local development from a checkout:

bash
git clone https://github.com/alias8818/enoch-mcp.gitcd enoch-mcpuv sync --devuv run enoch-mcp --api-url http://localhost:8787 --api-token '<token>'

Configuration

OptionEnvironment variableDefaultDescription
--api-urlENOCH_API_URLhttp://localhost:8787Base URL for the Enoch API.
--api-tokenENOCH_API_TOKENnoneBearer token for the Enoch API.
--worker-probes-jsonENOCH_WORKER_PROBES_JSONnoneOptional JSON map for direct worker diagnostics.
--worker-probes-fileENOCH_WORKER_PROBES_FILEnoneOptional path to a JSON map for direct worker diagnostics.

The token is required. If it is missing, tool calls fail before making an HTTP request.

Optional worker probes

Worker probes are disabled unless ENOCH_WORKER_PROBES_JSON or ENOCH_WORKER_PROBES_FILE is configured. This keeps the default package a thin control-plane bridge. When configured, the MCP exposes named diagnostics for worker truth: API health, worker-gate dashboard status, active process markers, bounded log tails, disk space, and expected artifact presence.

Example:

json
{  "cpu": {    "api_url": "http://127.0.0.1:18788",    "api_token": "worker-api-token",    "service_name": "enoch-control-plane",    "project_root": "/srv/enoch/projects"  },  "gpu": {    "api_url": "http://127.0.0.1:18789",    "api_token": "worker-api-token",    "ssh_host": "worker-gpu.example.internal",    "ssh_user": "enoch",    "service_name": "enoch-control-plane",    "project_root": "/srv/enoch/projects",    "log_paths": ["/var/log/enoch-control-plane.log"]  }}

Supported fields per lane:

  • api_url: worker-gate base URL. Used first for /healthz, /dashboard/api, /dashboard/api/run/{run_id}, and /project-status/{project_id}.
  • api_token: worker bearer token. Treated as secret.
  • ssh_host, ssh_user, ssh_port: optional SSH fallback/debug target.
  • service_name: systemd unit name for service checks and journal tails.
  • project_root, state_dir: fixed worker roots used for disk and artifact checks.
  • log_paths: fixed worker-gate log paths that may be tailed.

SSH probes only run fixed diagnostic commands. They do not accept arbitrary shell input from the MCP client. User-supplied IDs are limited to safe run/project identifier characters, log output is bounded, SSH uses batch mode and no stdin, and the recommended deployment is a read-only worker user or forced-command policy.

MCP client setup

Claude Desktop

json
{  "mcpServers": {    "enoch": {      "command": "uvx",      "args": ["enoch-mcp"],      "env": {        "ENOCH_API_URL": "http://localhost:8787",        "ENOCH_API_TOKEN": "replace-with-token"      }    }  }}

For local development, point the MCP client at the checkout:

json
{  "mcpServers": {    "enoch": {      "command": "uv",      "args": ["--directory", "/path/to/enoch-mcp", "run", "enoch-mcp"],      "env": {        "ENOCH_API_URL": "http://localhost:8787",        "ENOCH_API_TOKEN": "replace-with-token"      }    }  }}

Use the equivalent local stdio-server settings for Cursor, Copilot, Windsurf, or other MCP clients.

Development

bash
uv sync --devuv run pytest -qgitleaks detect --no-git --redact

Public-safety note

This package is public. Examples must use placeholders and local URLs only. Do not publish private hostnames, LAN/Tailscale IPs, operator paths, or live tokens.

来源:README.md,提交 57c923f

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.1最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分