Opencode Workbench

com.ascent-partners由 ascent-partners.com 發布v5.0.1更新於 Oct 29, 2026

Provision an OpenCode workbench and MCP stack on any Linux box, local or over SSH.

發布方自己的服務:Coso Mcp

已驗證Streamable HTTP可網頁執行雲端與基礎設施開發者工具

概覽

AI 產生的概覽

在本機或可透過 SSH 連線的 Linux 機器上部署可重現的 OpenCode 開發工作站:檢查、規劃、複製、驗證,並管理元件與憑證。

可以做什麼
  • 描述內建的 Workbench 設定檔、元件分層與可選 MCP 附加項目
  • 檢查本機或 SSH 目標的作業系統、工具鏈、Docker,以及已具備哪些憑證(僅名稱)
  • 規劃並執行完整設定複製,之後逐元件驗證結果
  • 安裝、更新或移除單一元件,例如 OpenCode、pnpm、MCP 伺服器、技能與 Docker 容器
  • 列出所需憑證,並為缺少的項目提供取得指引
適用情境
當你想在全新或既有的 Linux 機器上(本機或透過 SSH)重建或統一 OpenCode 環境及其 MCP 伺服器、技能與外掛,並希望先看到唯讀計畫再動手時使用。
執行需求
可作為遠端 streamable HTTP 端點使用,也可透過 npx 從 npm 套件在本機執行(需要 Node.js)。目標機器須為 Linux,可本機存取或透過 SSH 以使用者憑證存取。設定檔引用多個服務商金鑰(例如 DEEPSEEK_API_KEY、OPENCODE_API_KEY、GitHub PAT、PERPLEXITY_API_KEY、BROWSERLESS_TOKEN),伺服器只檢查是否已設定。
安裝前請注意
apply_clone、install_component 與 update_component 會寫入目標機器:覆寫 OpenCode 設定檔、複製 AGENTS.md、將既有設定儲存庫重設到 origin/main,並執行全域安裝。apply_clone 需 confirm:true 才會執行。可能使用 SSH 存取與特權指令。README 稱從不讀取或傳輸金鑰值、只寫入空的 env 範本,但目標機器及其設定會被修改。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Opencode Workbench,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/com.ascent-partners%2Fopencode-workbench/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "opencode-workbench": {
      "type": "http",
      "url": "https://opencode-workbench.simonmak.com/mcp"
    }
  }
}

README

OpenCode Workbench

A reproducible, self-documenting, and recoverable OpenCode development workstation — configuration, agent skills, MCP stack, and an MCP server that clones the entire setup onto any Linux machine (locally or over SSH).

[Secret Scan] [MCP Tool Definition Quality] [MCP Registry] [Glama] [MCP Server] [Validate Documentation] [License: MIT]

Homepage & remote MCP: https://opencode-workbench.simonmak.com · POST https://opencode-workbench.simonmak.com/mcp

Overview

This repository is the single source of truth for a complete cloud development workstation. Everything needed to rebuild from scratch is versioned here:

  • Workstation configuration and automation
  • OpenCode configuration (model, providers, MCP servers)
  • Agent skills (76 reusable AI instructions across research, dev, data, science and ops)
  • Operational prompts (disaster recovery, backup, security)
  • Recovery procedures (playbook, checklist, gap analysis)
  • Security governance (secret management, threat model)
  • OpenCode sandbox (bubblewrap) — run the agent with a read-only system and no secret mounts
  • opencode-workbench — an MCP server that installs this profile on any Linux box

No important knowledge exists only in human memory.

Clone This Workbench to Another Linux Machine

Register the MCP server with OpenCode:

json
{  "mcp": {    "opencode-workbench": {      "type": "local",      "command": ["npx", "-y", "@simonmak-ascent/opencode-workbench"],      "enabled": true,      "timeout": 600000    }  }}

Then ask the agent to run inspect_target → plan_clone → apply_clone { confirm: true } → verify_clone, for { "mode": "local" } or { "mode": "ssh", "host": "<your-box>", "user": "<your-user>" }. apply_clone is consent-gated: without confirm:true it returns a plan (components + privileged-command preview) and changes nothing. Run list_required_credentials to see which keys the box still needs and how to acquire them, and bash scripts/selftest/run-selftest.sh to verify it works. See mcp-server/README.md and docs/architecture/clone-mcp.md.

The clone is key-resilient: with no model key it still boots on the OpenCode Zen free floor, and MCP servers whose credentials are absent are disabled and reported (not left to fail at runtime).

The connector never reads or transmits secret values; it writes an empty ~/.env.workbench template for you to fill in.

Quick Start (≤ 5 minutes)

Fastest path: no box required — register the MCP server with npx -y @simonmak-ascent/opencode-workbench (config in Clone This Workbench); or provision a fresh box:

bash
# Create a new build boxgh SWAS create --repo simonmak-ascent/opencode-workbench --machine basicLinux32gb
# Wait for postCreate (3-5 min) — installs everything automatically# Then start coding:opencode

Architecture

mermaid
flowchart TB  AGENT["OpenCode agent"] -->|"npx @simonmak-ascent/opencode-workbench"| MCP["opencode-workbench MCP<br/>inspect · plan · apply · verify"]  REPO[("Git repo — single source of truth")] --> MCP  MCP -->|"local or SSH"| BOX["Target Linux box"]  BOX --> PROF["Workstation profile<br/>OpenCode CLI · 31 MCP servers · 76 skills · Docker infra"]

Clone lifecycle

apply_clone is consent-gated: without confirm: true it returns a plan and changes nothing.

mermaid
sequenceDiagram    autonumber    participant A as OpenCode agent    participant M as opencode-workbench MCP    participant B as Target box (local or SSH)    A->>M: inspect_target    M-->>A: OS, toolchain, Docker, existing config    A->>M: plan_clone    M-->>A: components + privileged-command preview    A->>M: apply_clone { confirm: true }    M->>B: install components · write ~/.env.workbench template    B-->>M: result    A->>M: verify_clone    M-->>A: pass/fail + missing credentials

MCP tool surface

mermaid
flowchart LR    A["OpenCode agent"] --> D["Discovery<br/>describe_workbench · inspect_target"]    A --> C["Clone<br/>plan_clone · apply_clone · verify_clone"]    A --> K["Components<br/>install · remove · update_component"]    A --> S["Credentials<br/>list_required_credentials · run_auth_flow"]
opencode-workbench/├── mcp-server/                     # opencode-workbench: clone this profile onto Linux│   ├── src/                        # inspect / plan / apply / verify, local + SSH│   ├── test/                       # unit tests (vitest)│   └── README.md├── connector.json                  # MCP connector manifest / registration snippet├── plugins/                        # memory.ts + doc-tools.ts OpenCode plugins├── package.json                    # thin launcher for opencode-workbench (bin + prepare)├── .devcontainer/                  # build box definition & bootstrap│   ├── devcontainer.json           # Container image, features, ports, remoteEnv│   ├── setup.sh                    # Post-create: installs opencode, MCPs, Docker infra│   └── aliases.sh                  # Shell aliases sourced at runtime├── .opencode/│   └── skills/                     # 76 agent skills, one directory per SKILL.md├── vendor/                         # Vendored MCP source code│   ├── perplexity-agent-mcp/│   └── browserless-mcp/├── configs/                        # Reference configurations│   ├── mcp/                        # MCP server inventory & architecture│   ├── opencode/                   # OpenCode settings documentation│   ├── shell/                      # Shell configuration│   ├── git/                        # Git configuration & hooks│   └── providers/                  # AI provider configuration├── docs/                           # Complete documentation system│   ├── WORKBENCH_CHARTER.md        # Governance: mission, principles, requirements│   ├── security-model.md           # Security architecture & threat model│   ├── IMPROVEMENT_BACKLOG.md      # Tracked improvements and fixes│   ├── CHANGELOG_WORKBENCH.md      # Append-only change history│   ├── architecture/               # System documentation (incl. clone-mcp.md)│   ├── recovery/                   # Recovery procedures (4 docs)│   ├── prompts/                    # Operational prompt library (9 prompts)│   └── backup-reports/             # Dated backup snapshots├── scripts/                        # Automation scripts│   ├── backup/                     # Master backup script│   ├── inventory/                  # Auto-generate inventories (software, env, MCP, OpenCode)│   ├── security/                   # Secret pattern scanner│   ├── recovery/                   # Recovery validation│   └── maintenance/                # Config sync, routine tasks├── .github/workflows/              # CI (docs, inventory, gitleaks, mcp-server)├── opencode.json                   # OpenCode configuration (MCP servers)├── AGENTS.md                       # OpenCode agent instructions└── README.md                       # This file

What's Inside

CategoryDetails
OpenCodeOpenCode 2 CLI, installed from the v2 channel (latest 2.x at clone time; inspect_target reports the version it found) · DeepSeek V4 Pro model · LSP enabled
MCP Servers31 configured (29 enabled, 2 disabled), 8 remote + 23 local
Agent Skills76 reusable skills in .opencode/skills/
Versionsworkbench.versions.json — every MCP server, plugin and skill resolved from its real upstream, regenerated and CI-checked
InfrastructurePostgreSQL 16 (Docker), Browserless Chromium (Docker)
Toolspandoc, jq, miller, sqlite3, GitHub CLI, Playwright Chromium
Prompts9 operational prompts in docs/prompts/

Workstation Governance

This workstation operates under a formal charter. Key principles:

  • Single Source of Truth: Runtime must match repository. Drift is a bug.
  • Secrets Never Touch Disk: All secrets flow through the build box Secrets.
  • Immutable History: Changelog is append-only. Every change is traceable.
  • Documentation Lives With Code: Docs describe the system as it is, not as imagined.

Read the full charter: docs/WORKBENCH_CHARTER.md

Backup Workflow

bash
# Master backup — full inventory, security scan, commit prepbash scripts/backup/run-master-backup.sh
# Quick backup — save state before risky operationsbash scripts/maintenance/sync-runtime-config.sh && \  git diff > /tmp/quick-backup-$(date +%Y%m%d).diff

Or use OpenCode prompts:

  • docs/prompts/RUN_MASTER_BACKUP.md — execute backup via AI
  • docs/prompts/QUICK_BACKUP.md — rapid state preservation

Recovery Workflow

Assume the build box is deleted. Only Git repo + build box Secrets survive.

bash
# 1. Create new build boxgh SWAS create --repo simonmak-ascent/opencode-workbench --machine basicLinux32gb
# 2. Wait for automation (3-5 min)
# 3. If needed (usually done by setup.sh):npx playwright install chromium# Vercel MCP uses VERCEL_ACCESS_TOKEN (token auth — no OAuth step)
# 4. Validate recoverybash scripts/recovery/validate-recovery.sh

Full details: docs/recovery/RECOVERY_PLAYBOOK.md

MCP Architecture

TypeCountNotes
Remote9context7, gh_grep, vdd, exa, cloudflare, clerk, vercel (token auth), sentry, stripe
Local26npm / vendored / binary stdio servers

Totals: 31 configured (29 enabled, 2 disabled: google-search, google-workspace).

See: docs/architecture/mcp-inventory.md

Secrets Management

All secrets stored in the build box Secrets. Never in repository files.

#SecretUsed By
1DEEPSEEK_API_KEYOpenCode (primary model)
2OPENCODE_API_KEYOpenCode Zen / Console Go providers
3SIMONMAK_ASCENT_PATGitHub MCP, shadcn MCP, gh
4PERPLEXITY_API_KEYPerplexity MCP
5BRAVE_API_KEYBrave Search MCP
6BROWSERLESS_TOKENBrowserless MCP + container
7SENTRY_AUTH_TOKENSentry MCP
8VERCEL_ACCESS_TOKENVercel MCP (token auth)

Additional keys for opt-in servers (EXA_API_KEY, CLOUDFLARE_API_TOKEN, STRIPE_SECRET_KEY, SURREAL_*, ALIBABA_CLOUD_*, AZURE_*, FIRECRAWL_API_KEY, FRED_API_KEY, COMPANIES_HOUSE_API_KEY) are catalogued in docs/architecture/secrets.md — never by value.

See: docs/architecture/secrets.md

Documentation Index

DocumentPurpose
docs/WORKBENCH_CHARTER.mdMission, principles, governance
docs/security-model.mdSecurity architecture, threat model, incident response
docs/IMPROVEMENT_BACKLOG.mdTracked improvements and technical debt
docs/CHANGELOG_WORKBENCH.mdComplete change history
docs/architecture/System documentation (10 inventory docs)
docs/recovery/Recovery playbook, disaster recovery, checklist, gap analysis
docs/prompts/9 operational prompts with index
docs/backup-reports/Dated backup snapshots

Adding to the Workbench

  1. MCP Server: Add npm package to .devcontainer/setup.sh, add to opencode.json, document in docs/architecture/mcp-inventory.md
  2. Agent Skill: Create .opencode/skills/<name>/SKILL.md, follow naming convention
  3. Tool: Add to scripts/bootstrap-tools.sh
  4. Prompt: Create in docs/prompts/, update prompt-index.md
  5. After any change: Update CHANGELOG_WORKBENCH.md, run master backup

Recovery Score: 94/100

Validated disaster recovery within < 10 minutes using repository + build box Secrets alone.

Use with Context7

Up-to-date OpenCode Workbench documentation is indexed on Context7, so coding agents can pull it into context on demand. With the Context7 MCP server or ctx7 CLI installed, name the library in your prompt:

text
use library /simonmak-ascent/opencode-workbench for API and docs

License

MIT — see LICENSE.


A tool by Simon Mak.

If this saves you time, a ⭐ on GitHub helps others find it.

來源:README.md,提交 976778f

工具

10

describe_workbench

Workbench server info

Describe this MCP server from its bundled profile without contacting any target or making a network call: repository URL, the default component set, components grouped by tier (required/core/optional), and optional MCP add-ons. It takes no parameters, is always safe, and returns instantly. Use it first to resolve a component id for install_component/remove_component/update_component or to see available add-ons; use inspect_target for a machine's live state.

無需輸入參數。

inspect_target

Inspect a Linux target

Probe one Linux machine — this host (`local`) or a remote host over SSH (`ssh`) — and report its OS, kernel, architecture, package manager, Node/npm, OpenCode, Docker, and per-tool detection flags, plus the names (never values) of credentials present. Read-only: it runs one shell probe as the target user (over SSH when `mode:ssh`), installs nothing, writes nothing, contacts no external service, and can take a few seconds per hop. Parameter semantics: `target.mode` selects local vs ssh (default `local`); `target.host` is required only for ssh; `target.user` defaults to the ssh config/current user; `target.cwd` sets the directory for relative checks; `target.port`/`identityFile` pass straight to ssh. Use it to see what a clone would touch, then plan_clone to turn that into an ordered plan and apply_clone to perform it.

輸入參數target必填

plan_clone

Plan a Workbench clone

Return a read-only plan for a target: compare it against the Workbench profile and list each component as `install`, `present`, or `manual`, with the commands that would run. It still runs a detection probe on the target (same access as inspect_target) but clones nothing and writes nothing. Parameter semantics: `components` restricts the diff to those ids (default: required+core); `workspace` sets the expected profile path on the target (default `~/opencode-workbench`); `profileUrl` overrides the git remote. Use it to preview before apply_clone, which performs the changes.

輸入參數dryRuntarget必填skipRepoworkspacecomponentsprofileUrl

apply_clone

Apply a Workbench clone

Apply the Workbench profile to a target: clone the repo and install missing components (OpenCode CLI, Node/pnpm, MCP servers, skills, plugins, optional Docker). It OVERWRITES `<home>/.config/opencode/opencode.json`, copies `AGENTS.md`, resets an existing profile repo to `origin/main`, and runs global installs that need write permission (plus SSH for `mode:ssh`) and can take minutes. Writes a names-only `~/.env.workbench` (mode 600); never secret values. Consent-gated and idempotent: without `confirm:true` it returns the plan and changes nothing. Parameter semantics: `components` defaults to required+core; `workspace` defaults to `~/opencode-workbench`; `skipRepo` skips the clone/update; `profileUrl` overrides the git remote; `dryRun` returns the plan. To preview only, use plan_clone.

輸入參數dryRuntarget必填confirmskipRepoworkspacecomponentsprofileUrl

verify_clone

Verify a Workbench clone

Re-check a target after a clone: return a per-component `present`/`missing` list plus whether `opencode.json` and `~/.env.workbench` exist. Read-only and idempotent: it runs a detection probe (SSH or local) and checks files, writing nothing. `target` selects the machine (`local` or SSH) and its `home` is where the `opencode.json` and `~/.env.workbench` checks run; `components` restricts the check to those ids (omit it to check every component, the default); `workspace` sets the profile path used by component checks. Use it after apply_clone and after component changes; for a pre-clone preview use plan_clone.

輸入參數dryRuntarget必填skipRepoworkspacecomponentsprofileUrl

install_component

Install one Workbench component

Install a single Workbench component by id (e.g. `node`, `opencode`, `npm-mcps`, `skills`) on a target; `component` must be an id from describe_workbench. Overwrites that component's files when present (e.g. `skills`/`plugins` replace the copies under `<home>/.config/opencode`); global installs need write permission and can take minutes. Idempotent and consent-gated: without `confirm:true` it returns the plan. Parameter semantics: `component` is required; `workspace` defaults to `~/opencode-workbench`; `confirm` defaults to false (plan only). Use it for one targeted component; use apply_clone to install the full default set.

輸入參數target必填confirmcomponent必填workspace

remove_component

Remove one Workbench component

Uninstall one Workbench component by id from a target — the inverse of install_component — for a bounded, documented subset with an automated uninstall (e.g. `opencode`, `pnpm`, `npm-mcps`, `skills`, `docker-containers`); `component` must be an id from describe_workbench. Idempotent: an already-absent component reports `absent`; a component with no automated uninstall (system packages such as git/curl/node) reports `manual`. Destructive and consent-gated: without `confirm:true` it returns a preview and changes nothing, and it deletes only that component's files — never `opencode.json` or the profile repo. Parameter semantics: `workspace` sets the profile path some removals need; `dryRun` reports without changing. Use it to tear down one component; for several, call it per id.

輸入參數dryRuntarget必填confirmcomponent必填workspace

update_component

Update one Workbench component

Update one Workbench component in place by id: re-run its install script to fetch the current version (e.g. `opencode` re-runs the official installer; `npm-mcps` reinstalls the latest globals). It OVERWRITES the component's files, needs write permission, and can take minutes for global installs; the resolved version may change. Parameter semantics: `component` must be an id from describe_workbench; `workspace` defaults to `~/opencode-workbench`; `dryRun` previews; `confirm` defaults to false — set `confirm:true` to apply. For the whole profile use apply_clone.

輸入參數dryRuntarget必填confirmcomponent必填workspace

list_required_credentials

List required credentials

List the credentials the profile references, which the target already provides, and how to acquire each missing one. Value-blind: it reads only whether each env var is set — no values, no network, no writes — via one read-only probe. Parameter semantics: `target` selects the machine (`local` or SSH) and its `home` sets the returned `template` path and the env file the presence check reads; there are no other parameters. Returns `present`/`missing` var-name arrays plus one guidance record per credential (`var`, `purpose`, `url`, `method`, `command`). Use it after plan_clone to see what would degrade; act on one credential with run_auth_flow.

輸入參數target必填

run_auth_flow

Acquire one credential (best-effort)

Return the acquisition plan for one credential on a target: the provider URL, the exact non-interactive command when one exists (e.g. `opencode auth login`, `opencode mcp auth vercel`, `gh auth login`), and whether it is already present. Read-only and value-blind: it emits guidance and re-checks presence with one read-only probe; it does not run the commands or handle secret values. Parameter semantics: `var` must be an env var name returned by list_required_credentials (unknown names error); `target` selects the machine and its `home` is where the value should be written. Use it for a single credential; it does not replace that listing.

輸入參數var必填target必填

版本歷史

2
  1. v5.0.1最新Oct 29, 2026
  2. v4.0.2Oct 14, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Ascent-Partners 整合