Skip to main content
Glama

workbuddy-mcp

Let any AI coding agent drive WorkBuddy as a sub-agent — install with one command, works with four clients.

让任意 AI 编程助手(Claude Code / Codex / Cursor / OpenCode)把 WorkBuddy 当「子 Agent」调用——一条命令装好,四大客户端通吃。

License: MIT Platform Node Smoke Test

English · 简体中文


What it does / 它做什么

workbuddy-mcp is a tiny MCP (Model Context Protocol) server that wraps the official WorkBuddy CLI (codebuddy). It exposes a single tool — run_workbuddy_task — so any MCP-capable agent can delegate real work to WorkBuddy without you copy-pasting between apps.

workbuddy-mcp 是一个极小的 MCP(模型上下文协议)服务器,封装了官方的 WorkBuddy 命令行(codebuddy。它只暴露一个工具 run_workbuddy_task,让任何支持 MCP 的 Agent 都能把真实任务委托给 WorkBuddy,不必在多个应用之间来回复制粘贴。

You do not need to understand MCP to use it: npx -y workbuddy-mcp --install detects your installed agents and registers the server for you.

不需要懂 MCP 就能用:一条 npx -y workbuddy-mcp --install 会自动检测你装了的 Agent 并注册好。

Related MCP server: all-agents-mcp

Table of Contents / 目录

Architecture / 架构

Architecture

Your agent (Claude Code / Codex / Cursor / OpenCode)
      │  calls MCP tool: run_workbuddy_task(prompt)
      ▼
workbuddy-mcp   (this server, stdio MCP)
      │  shells out:
      ▼
codebuddy -p --dangerously-skip-permissions   # prompt passed via stdin

      │
      ▼
WorkBuddy   (does the actual work, returns text)

Features / 特性

Feature

Why it matters

One-command install

npx -y workbuddy-mcp --install auto-registers to every detected agent — no manual JSON.

4 clients, 1 server

Claude Code, Codex, Cursor, OpenCode share the identical tool.

Wraps the official CLI

Uses codebuddy — the same engine as the WorkBuddy desktop app. Nothing proprietary.

cwd control

Each call can target a working directory so WorkBuddy writes files exactly where you want.

Configurable

WB_* env vars tune timeout, permissions, command path, default cwd.

Zero build step

Plain ESM JavaScript, Node 18+. No TypeScript compile.

特性

价值

一条命令安装

npx -y workbuddy-mcp --install 自动注册到所有检测到的 Agent,无需手改 JSON。

一个 Server,四个客户端

Claude Code、Codex、Cursor、OpenCode 共用同一个工具。

封装官方 CLI

codebuddy——和 WorkBuddy 桌面端同一套引擎,没有私有黑盒。

可控的工作目录

每次调用可指定 cwd,让 WorkBuddy 把文件写到你指定的地方。

可配置

WB_* 环境变量调节超时、权限、命令路径、默认目录。

零构建

纯 ESM JavaScript,Node 18+,无需编译 TypeScript。

Quick Start / 快速开始

Prerequisite: install and log into the WorkBuddy CLI once (interactively). 前置:先装好并登录一次 WorkBuddy 命令行(仅需一次,会打开登录流程)。

# 1. Install & log in the WorkBuddy CLI
npm install -g @tencent-ai/codebuddy-code
codebuddy -p "hello" --dangerously-skip-permissions   # first run opens a login flow

# 2. Install the MCP server into every agent you have
npx -y workbuddy-mcp --install

Then in any agent, just say e.g. "use workbuddy to read data.csv and draft a weekly report" — the agent calls run_workbuddy_task for you.

然后,在任意 Agent 里说「让 workbuddy 读取 data.csv 写一份周报」即可——Agent 会自动调用 run_workbuddy_task

Installation / 安装

Option A — one command (recommended)

npx -y workbuddy-mcp --install

Detects Claude Code / Codex / Cursor / OpenCode on your machine and registers the server. Re-run after installing a new agent.

Option B — from npm, then install

npm install -g workbuddy-mcp
workbuddy-mcp --install

Option C — manual (any MCP client) Point your client at node <path>/server.js. Examples:

Claude Code

claude mcp add -s user workbuddy -- node /abs/path/to/workbuddy-mcp/server.js

Codex

codex mcp add workbuddy -- node /abs/path/to/workbuddy-mcp/server.js

Cursor — write to ~/.cursor/mcp.json:

{ "mcpServers": { "workbuddy": { "command": "node", "args": ["/abs/path/to/workbuddy-mcp/server.js"] } } }

OpenCode — write to opencode.json (project root or ~/.config/opencode/opencode.json):

{ "mcp": { "workbuddy": { "type": "local", "command": ["node", "/abs/path/to/workbuddy-mcp/server.js"], "enabled": true } } }

See opencode.json.example for a ready-to-use template with cwd / WB_* env wired in.

Usage / 用法

The server exposes one tool. Your agent calls it for you; you can also invoke it directly.

// Tool: run_workbuddy_task
{
  prompt: "读取 ./reports 下的 CSV,生成一份中文月度总结",  // required 必填
  cwd:    "/path/to/your/project",   // optional 可选: where WorkBuddy reads/writes files
  model:  "sonnet",                  // optional 可选: model alias
  json:   true                       // optional 可选: request --output-format json
}

Things you might hand to your agent:

  • "让 workbuddy 在我仓库根目录跑测试,把失败日志整理成 Markdown"

  • "use workbuddy to refactor src/utils.ts and explain the changes"

Where do the files go? Text answers come back into the chat. Files WorkBuddy writes land in its cwd (the call's cwd → else WB_CWD → else the agent's working folder). They are not auto-added to your agent's context — read them from disk.

Configuration / 配置

All tuning is via environment variables — set them in your agent's MCP config environment block.

Variable

Default

Meaning

WB_COMMAND

codebuddy

The CLI to drive. If command not found, point to the absolute path (e.g. C:\...\codebuddy.cmd).

WB_SKIP_PERMISSIONS

true

true adds --dangerously-skip-permissions (needed for scripted file/network tools). Set false to keep interactive approval.

WB_TIMEOUT

900000

Default per-task timeout in ms (15 min). Tasks exceeding it are killed and partial output is returned. Per call you can pass timeoutMs (e.g. 1800000 for long research tasks).

| WB_CWD | (unset) | Default working directory used when a call doesn't pass cwd. | | WB_MODEL | (unset) | Default model used when a call doesn't pass model (e.g. hy3, deepseek-v4-flash, glm-5.3, kimi-k3-1, auto). | | WB_FALLBACK_MODEL | (unset) | Model to auto-switch to when the primary is overloaded/rate-limited (maps to --fallback-model, only works with --print). This is the fix for "free model rate-limited" situations. |

Switching models / 切换模型

The codebuddy CLI exposes --model <id> and --fallback-model <id> (the latter only takes effect under --print, which this server always uses). This server surfaces both:

  • Per call — pass model and/or fallbackModel to run_workbuddy_task.

  • Globally — set WB_MODEL and/or WB_FALLBACK_MODEL in the agent's MCP environment block; they apply when the call doesn't pass them.

Available models (from codebuddy --help): auto, hy3, hy3-x, glm-5.3, glm-5.2, glm-5.1, glm-5v-turbo, minimax-m3, kimi-k3-1, kimi-k2.7, kimi-k2.6, deepseek-v4-flash, deepseek-v4-pro.

Rate-limited on the free model? Don't hard-switch — add a fallback so hy3 stays primary but auto-recovers when overloaded:

// opencode.json / claude mcp config environment
{
  "WB_MODEL": "hy3",
  "WB_FALLBACK_MODEL": "deepseek-v4-flash"
}

Or per call: run_workbuddy_task({ prompt: "...", fallbackModel: "deepseek-v4-flash" }).

切换模型 / 模型切换

codebuddy 自带 --model <id>--fallback-model <id>--fallback-model 仅在 --print 下生效,而本服务始终用 -p,所以可用)。本服务把两者都暴露出来:

  • 单次调用:给 run_workbuddy_taskmodel 和/或 fallbackModel

  • 全局默认:在 Agent 的 MCP environment 里设 WB_MODEL / WB_FALLBACK_MODEL,调用未传时使用。

免费模型被限流时,建议不要硬性切走,而是加一个回退:hy3 仍是首选,过载时自动切到 deepseek-v4-flash 等,等限流恢复又自动用回 hy3。

Security note / 安全提示

By default WB_SKIP_PERMISSIONS=true, which makes codebuddy run without interactive permission prompts. That is what lets an agent drive it unattended — but it also means anything the agent requests runs automatically. For personal, trusted automation this is fine; if you prefer to keep a human in the loop, set WB_SKIP_PERMISSIONS=false in your MCP config.

默认 WB_SKIP_PERMISSIONS=true,即 codebuddy跳过交互式授权自动执行。这正是「让 Agent 无人值守地驱动它」所必需的;但也意味着 Agent 请求的任何操作都会自动执行。个人可信自动化场景下没问题;若你想保留人工确认,把 WB_SKIP_PERMISSIONS 设为 false

Why / 为什么做这个

WorkBuddy is a capable agent, but each product (Claude Code, Codex, Cursor, OpenCode…) lives in its own box. There is no official "reverse MCP" to let those products tap into WorkBuddy as a sub-agent. This project is the thin glue: it packages WorkBuddy's own CLI behind a standard MCP tool, so the four most popular coding agents can share one WorkBuddy.

WorkBuddy 本身能力很强,但 Claude Code、Codex、Cursor、OpenCode 各成孤岛,官方并没有提供「反向 MCP」让这些产品把 WorkBuddy 当子 Agent 调用。本项目就是那层薄胶水:把 WorkBuddy 自己的命令行封装成一个标准 MCP 工具,让最主流的几个编程 Agent 共用同一个 WorkBuddy。

FAQ

Does this need the WorkBuddy desktop app running? No. It drives the codebuddy CLI, which is standalone (same engine, terminal form). One desktop login is enough.

Does this work offline? The MCP server is local; the codebuddy calls reach WorkBuddy's service, so an internet connection is required for the actual task.

Will my WorkBuddy desktop chat show what the agent asked? codebuddy runs as its own session; conversations may not appear in the desktop app's history. That's expected.

Roadmap / 路线图

  • Auto-install for Claude Code / Codex / Cursor / OpenCode

  • Streaming output (show progress instead of waiting for the full result)

  • Optional structured JSON result parsing

  • codebuddy not found → guided install hint

Contributing / 贡献

PRs and ideas are welcome! Issues labeled good first issue are a good place to start. See CONTRIBUTING.md.

Every push / PR runs a smoke test (.github/workflows/smoke.yml) that checks syntax on Node 18/20/22 and verifies the server completes an MCP initializetools/list handshake. To run it locally:

每提交 / 开 PR 都会跑一个冒烟测试(.github/workflows/smoke.yml),在 Node 18/20/22 上检查语法并验证 Server 能完成 MCP initializetools/list 握手。本地自测:

npm install
node test/smoke.mjs

欢迎 PR 和想法!可以从 good first issue 标签的议题入手。

License / 许可证

MIT © LinHaiJ. See LICENSE for details.

Available Tools

1 tool
run_workbuddy_taskA

委托 WorkBuddy(codebuddy CLI)以非交互方式执行一个任务,返回结果文本。

ParametersJSON Schema
NameRequiredDescriptionDefault
cwdNo可选:codebuddy 的工作目录(它在此目录读写文件)。不传则用 WB_CWD 或当前目录
jsonNo可选:true 时追加 --output-format json(取决于 codebuddy 版本是否支持)
modelNo可选:指定本次会话模型,如 hy3 / hy3-x / deepseek-v4-flash / glm-5.3 / kimi-k3-1 / auto。不传则用 WB_MODEL 或 codebuddy 默认
promptYes交给 WorkBuddy 执行的任务描述 / 提示词。可包含多行内容(通过 stdin 传递,不会被截断)
timeoutMsNo可选:本次调用的超时毫秒数。不传则用 WB_TIMEOUT(当前 900000ms)。长调研任务建议 1800000(30 分钟)
fallbackModelNo可选:过载/限流时自动回退的模型(接到 --fallback-model,仅 --print 生效)。不传则用 WB_FALLBACK_MODEL

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

无注解,描述需承担行为披露。描述说明任务以非交互方式执行、返回结果文本,并通过 schema 提及 stdin 传 prompt 不会截断,但这些细节主要来自 schema 而非描述本身。缺少如权限、副作用、失败模式等行为信息。

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

描述只有一句话,直接说明工具做什么、如何调用(非交互)以及输出类型。信息密度高,无冗余。

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

无输出 schema,描述只提到返回结果文本,未说明返回格式/错误结构。但 6 个参数都在 schema 中充分解释了,整体对调用而言基本足够。缺少返回值细节和退出码/错误提示。

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

schema 覆盖 100%,每个参数在 schema 中已有详细中文说明,描述本身无需补充参数含义。描述未重复 schema,因此可以给予基线 3。

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

描述包含明确的动词“委托/执行”和资源“WorkBuddy(codebuddy CLI)”,并指出返回结果文本。虽然无兄弟工具,但“以非交互方式”等限定语使其与其他可能的 CLI 工具区分开。

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

描述隐含了使用场景(委托 WorkBuddy 非交互执行任务),但没有明确说明何时不使用它,也没有指出替代工具或前置条件。无兄弟工具且参数如 cwd/model/timeout 提供了运行时选择上下文。

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 1 tool updatev0.2.0
    • First observedrun_workbuddy_task

TDQS

A3.9/5.0
Disambiguation5/5

With only one tool, there is no possibility of overlapping purposes. The single action is clearly scoped to running a WorkBuddy task and cannot be confused with anything else.

Naming Consistency5/5

The tool name follows a clear verb_noun convention: run_workbuddy_task. It accurately describes the action and is easily predictable.

Tool Count3/5

A single tool is functional but feels thin for a server, even though it directly covers its stated purpose. There is no secondary surface for configuration, status, or task management, placing it at the borderline of acceptable scope.

Completeness4/5

The server covers its core workflow: executing a non-interactive WorkBuddy task and returning result text. It lacks lifecycle or management operations, but for a one-shot CLI delegation tool these are not necessarily required, so only minor gaps exist.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Enables the creation and execution of task-specific AI sub-agents defined in markdown across any MCP-compatible tool like Cursor or Claude Desktop. It integrates with execution engines such as Claude Code, Cursor CLI, and Gemini CLI to provide portable and reusable specialized agent workflows.
    1
    893
    MIT
  • A
    license
    B
    quality
    F
    maintenance
    Enables orchestrating multiple AI CLI agents (Claude Code, Codex, Gemini CLI, Copilot CLI) through a unified MCP interface for task delegation, cross-agent comparison, and specialized tools like code review and debugging.
    14
    13
    14
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/LinHaiJ/workbuddy-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server