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 分