Connector
Overview
What is a Connector
A Connector is WorkBuddy's capability extension interface. It lets a third-party application connect its own service to the WorkBuddy AI assistant. Once a user installs a Connector, they can interact with your application through natural language.
For example:
- A user says to the AI "Find all emails from <hr@company.com> in the last two weeks", and the AI completes the task through the email Connector
- A user says to the AI "Create a bug ticket for me in the project management tool", and the AI completes the task through the project management Connector
- A user says to the AI "Schedule a meeting for me at 3 PM tomorrow", and the AI calls a CLI through the meeting Connector
Choose an integration approach
WorkBuddy offers two integration approaches, and a Connector can use only one of them:
| Dimension | MCP + Skill | CLI + Skill |
|---|---|---|
| Best for | Connecting an API service, building private tools | Connecting an existing CLI tool |
| Connection | MCP protocol (HTTP / SSE / stdio) | Command-line execution |
| Installation | No extra installation | WorkBuddy installs the CLI automatically; once you declare runtime, it can host Node.js / Python and isolate npm / pip install locations |
| Auth | Cloud-hosted OAuth is recommended (auth_mode: "server-side"): authorization and credentials are hosted by the WorkBuddy cloud and configured through the server_auth field of connector-meta.json — see "Choose an authentication method"; the token mode collects user credentials through a form and injects them | WorkBuddy schedules auth / status / unAuth; the CLI persists, reads, and cleans up its own credential / authorization files |
| Config files | connector-meta.json + mcp.json (with auth_mode: "server-side", server_auth goes inside connector-meta.json) | connector-meta.json + cli.json |
| Skill needed | Optional (MCP provides standard tool descriptions) | Strongly recommended (CLI has no standard description) |
| Recommendation | ⭐⭐⭐ Recommended | ⭐⭐ Good when you already have a CLI |
If your application exposes an HTTP API, the MCP + Skill approach is recommended. If your application already has a mature CLI tool (such as
ghortmeet), you can use the CLI + Skill approach to integrate quickly.💡 Under the MCP approach, if the service asks users to fill in long-lived credentials such as an Access Token or API Key (rather than OAuth), you can use its "user-supplied credentials" mode.
Integration process
- Choose an integration approach (MCP + Skill or CLI + Skill)
- Build an MCP Server or prepare a CLI tool
- Prepare the Connector package according to the spec (metadata / connection config / Skill / icon)
- Self-check against the "Pre-submission checklist", then submit to WorkBuddy for review
- After approval the Connector moves to pending release; click publish to list it in the Connector Marketplace
Common specifications
The specifications in this section apply to both the MCP approach and the CLI approach.
Connector package structure
Prepare each Connector with the following directory structure; choose one connection config according to the integration approach:
your-connector/
├── connector-meta.json
├── mcp.json 或 cli.json
├── icon.svg
└── skills/
└── {skill-name}/
└── SKILL.md
| File | Responsibility | MCP approach | CLI approach |
|---|---|---|---|
connector-meta.json | Registers Connector metadata such as name, description, and examples; also holds server_auth when MCP uses auth_mode: "server-side" | Yes | Yes |
mcp.json | Connection parameters of the MCP Server | Yes | — |
cli.json | Install, auth, and status-check config of the CLI tool | — | Yes |
token-schema.json | Form description for user-supplied credentials; only needed with auth_mode: "token" | As needed | — |
icon.svg / icon.png | Icon displayed for the Connector in the Marketplace | Yes | Yes |
skills/{skill-name}/SKILL.md | Tells the AI how to understand and use your tools or commands | Optional | Recommended |
Write connector metadata (connector-meta.json)
This file describes the basic information of your Connector and is used to display it in the WorkBuddy Connector Marketplace.
Filling in and exporting it online with the open platform Connector Meta tool is recommended to reduce manual errors; the table below remains the authoritative reference for field semantics.
Example (MCP approach; for the CLI approach, see "Complete example: Tencent Meeting"):
{
"name": "QQ邮箱",
"name_zh": "QQ邮箱",
"name_en": "QQ Mail",
"description": "Send, search, and organize your QQ Mail inbox.",
"description_zh": "收发、搜索和整理 QQ 邮件。",
"description_en": "Send, search, and organize your QQ Mail inbox.",
"source": "qq-mail",
"examples_zh": ["找出最近两周来自 hr@company.com 的所有邮件"],
"examples_en": ["Find all emails from hr@company.com in the last two weeks"]
}Field details:
| Field | Required | Type | Minimum version | Description |
|---|---|---|---|---|
name | Yes | string | Base | Connector display name (default / Chinese fallback) |
name_zh | Optional | string | Base | Chinese display name, shown first |
name_en | Yes | string | Base | English display name |
description | Yes | string | Base | Default description (fallback when the Chinese / English descriptions are missing) |
description_zh | Yes | string | Base | Chinese description, shown first |
description_en | Yes | string | Base | English description |
source | Yes | string | Base | Unique Connector identifier, English kebab-case (for example qq-mail, my-app) |
type | Optional | string | Base | Integration type: "mcp" (default) / "cli"; the CLI approach must set "cli" |
auth_mode | Optional | string | Base | Auth method used only by the MCP approach: omit (means no auth is needed, or the client completes OAuth authorization per the MCP protocol standard), "server-side", or "token"; see "Choose an authentication method" |
version | Recommended | string | Base | Semantic version number (for example "1.0.0"), incremented on every update |
examples_zh | Yes | string[] | Base | Chinese usage examples, shown on the Connector detail page |
examples_en | Yes | string[] | Base | English usage examples |
server_auth | Optional | object | v4.24.0 | Server-side authorization config. Only needed with auth_mode: "server-side"; leave it out for other auth_mode values, see "Server-side authorization config" |
name_map | Optional | object | v5.2.0 | Overrides the display name by environment / account type; the value is { "zh": "...", "en": "..." } |
description_map | Optional | object | v5.2.0 | Overrides the description by environment / account type; the value follows the same shape |
minWorkbuddyVersion | Optional | string | v4.22.12 | Minimum WorkBuddy version required by this Connector; see "Version compatibility" |
maxWorkbuddyVersion | Optional | string | v4.22.12 | Maximum WorkBuddy version supported by this Connector (used for emergency delisting); see "Version compatibility" |
The "Minimum version" column indicates the WorkBuddy version from which a field takes effect; "Base" means a long-term supported basic field. If you use a version-marked field, also declare
minWorkbuddyVersion(see "Version compatibility").
Spec requirements:
sourceis the unique ID of the Connector and must be globally unique; only lowercase letters, digits, and hyphens (-) are allowednameshould be 2–20 characters, concise and to the pointdescription_zh/description_enshould be 20–100 characters, describing the core capabilityexamples_zh/examples_enshould provide 2–5 examples to help users understand what the Connector can do
Name display priority:
name_map(when the environment matches) >name_zh>name_en>name
Description display priority:description_map(when the environment matches) >description_zh>description_en>description
Write the Skill file
File path: skills/{skill-name}/SKILL.md. When there are multiple Skills, put each one in its own subdirectory under skills/; WorkBuddy loads all of them.
A Skill is a Markdown + YAML Frontmatter document that guides the AI to understand and use your Connector:
- MCP approach: optional. MCP already provides standard tool descriptions, so write a Skill only when the AI needs extra usage guidance
- CLI approach: strongly recommended. A CLI has no standard tool-description protocol, so the AI relies on the Skill to learn the available commands and arguments
Frontmatter fields
| Field | Required | Description |
|---|---|---|
name | Yes | Skill name, kebab-case |
description | Yes | Capability description, briefly summarizing the scope |
version | Optional | Semantic version number |
author | Optional | Author / organization name |
Writing a Skill for MCP tools
Describe the purpose and parameters of each MCP Tool one by one:
---
name: qq-mail-skill
description: QQ 邮箱操作技能 - 收发、搜索、整理邮件
---
# QQ Mail Skill
## 可用工具
### search_emails - 搜索邮件
搜索指定条件的邮件。
| 参数 | 类型 | 必填 | 说明 |
| ----- | ------ | :--: | --------------------- |
| query | string | 是 | 搜索关键词 |
| limit | number | - | 返回数量上限,默认 20 |
## 注意事项
- 需用户先完成授权后使用
- Describe the purpose, parameters, and return value of each Tool one by one, presenting parameters as a table
- Give concrete usage scenarios as examples
- Explain common errors, edge cases, and auth requirements
- Keep it concise — the AI understands short, structured instructions more easily
Writing a Skill for CLI commands
A Skill for a CLI describes command usage rather than tool calls — list the available commands, give reusable command-line examples, and explain arguments and output formats:
---
name: tmeet-skill
description: 腾讯会议操作技能 - 通过 tmeet CLI 创建、查询、管理会议
---
# 腾讯会议 Skill
所有操作通过 `tmeet` 命令行工具执行:
## 可用命令
```bash
## 查看即将开始的会议列表
tmeet meeting list
## 创建会议(duration 单位为分钟)
tmeet meeting create --subject "周报评审" --start "2026-04-11 15:00" --duration 60
## 取消会议
tmeet meeting cancel --meeting-id <meeting_id>
```
## 使用说明
- tmeet CLI 已通过连接器安装和认证
- 所有命令通过 Bash 工具执行
- Describe the purpose, arguments, and default values of each command one by one
- Give runnable command-line examples the AI can reuse directly
- Explain the output format, common errors, and how to handle them
Prepare the icon
File path: icon.svg or icon.png
| Requirement | Description |
|---|---|
| Format | .svg, .png, and .jpg are supported |
| Size | 64×64 px recommended (PNG/JPG); SVG has no size limit |
| Background | Transparent background recommended |
| Style | Simple and clear; recognizable at small sizes |
Naming conventions
| Item | Convention | Example |
|---|---|---|
source (Connector ID) | English kebab-case, globally unique | qq-mail, tmeet, github-issues |
| Skill file name | Fixed as SKILL.md, placed in the skills/{skill-name}/ subdirectory; one subdirectory per Skill | skills/qq-mail-skill/SKILL.md, skills/search/SKILL.md |
| MCP Server key | kebab-case, recommended to match source | "qq-mail": { ... } |
| CLI config file name | Fixed as cli.json | cli.json |
| Icon file name | Fixed as icon + extension | icon.svg, icon.png |
Security requirements
- Do not hard-code real tokens or secrets in
connector-meta.json,mcp.json,cli.json, a Skill, or examples - Request only the minimum permissions required by the business
- Use HTTPS for remote MCP
- Use the
passwordtype for sensitive credential fields; never print full credentials in logs or error messages - When authorization expires, return a recognizable error and guide the user to reconnect
MCP + Skill integration
This approach connects external services and APIs over the MCP protocol, so users do not need to install anything extra. Complete the steps in this order: build an MCP Server → write mcp.json → choose an authentication method and finish the matching configuration.
Develop an MCP Server
What is MCP
MCP (Model Context Protocol) is an open protocol that standardizes the communication between AI models and external tools. Your MCP Server is the bridge through which the AI calls your application's capabilities.
Supported transports
| Transport | Description | Use case |
|---|---|---|
sse | Server-Sent Events, streaming | Remote HTTP services |
streamableHttp | Streamable HTTP responses | Remote HTTP services |
stdio | Standard input and output | Local processes (such as via npx) |
Development resources
- MCP protocol specification: https://modelcontextprotocol.io
- Python SDK: <https://github.com/modelcontextprotocol/python-sdk>
- Node.js SDK: <https://github.com/modelcontextprotocol/typescript-sdk>
MCP Server development requirements
| Requirement | Description |
|---|---|
| Protocol version | Follow the latest stable MCP version |
| Availability | The service must stay stably reachable; an SLA of at least 99.9% is recommended |
| Response timeout | A single request should respond within 30 seconds |
| Error handling | Return standard error codes and readable error messages |
| Security | Auth is required when user data is involved (for example OAuth or Token); see "Choose an authentication method" |
Write the MCP config (mcp.json)
This file defines how WorkBuddy connects to your MCP Server (address, transport type, timeout, and so on).
SSE remote service example
{
"mcpServers": {
"qq-mail": {
"url": "https://mcp.your-domain.com/sse",
"type": "sse",
"timeout": 30000
}
}
}streamableHttp remote service example
{
"mcpServers": {
"your-service": {
"type": "streamableHttp",
"url": "https://mcp.your-domain.com/mcp"
}
}
}Field details:
| Field | Required when | Type | Minimum version | Description |
|---|---|---|---|---|
mcpServers | Yes | object | Base | Top-level field containing the Server config |
*.type | Required for sse / streamableHttp | string | Base | Transport type: sse / streamableHttp / stdio (can be omitted for stdio, inferred from command) |
*.url | Required for sse / streamableHttp | string | Base | MCP Server address |
*.command | Required for stdio | string | Base | Command to execute (such as npx, uvx, node) |
*.args | Optional | string[] | Base | Command argument array |
*.headers | Optional | object | Base | HTTP request headers (used for auth and similar) |
*.env | Optional | object | Base | Environment variables, supporting ${VAR_NAME} references |
*.timeout | Optional | number | Base | Connection timeout in milliseconds, default 30000 |
*.cwd | Optional | string | v4.22.15 | Working directory of the stdio child process |
*.disabledTools | Optional | string[] | v4.22.15 | Disabled-tool blocklist; listed tools are not exposed to the AI |
*.runtime | Optional | object | v5.0.0 | Runtime declaration for the stdio child process, only { "type": "node", "version"?: string }; see below |
*.npmRegistry | Optional | string | v5.0.0 | npm registry mirror (takes effect only when runtime.type='node') |
*.npmRegistries | Optional | string[] | v5.0.0 | npm registry mirror list, falling back in order (takes priority over npmRegistry) |
*.staticEnv | Optional | object | v5.0.0 | Fixed environment variables; not shown to the user and not editable (takes priority over user-supplied env) |
*.staticHeaders | Optional | object | v5.0.0 | Fixed request headers; not shown to the user and not editable (HTTP-type MCP only) |
"Base" in the Minimum version column means long-term support. When you use a version-numbered field, declare the matching
minWorkbuddyVersioninconnector-meta.json(see "Version compatibility").
Important rules:
- Only one Server can be configured under
mcpServers(the system takes the first one); one Connector corresponds to one MCP Server - Environment variables are referenced with the
${VAR_NAME}syntax, and WorkBuddy replaces them with the user's actual configured values at connect time *.urlmust be an HTTPS address (in production)
Variable references: headers, env, and url can reference variables through ${VAR_NAME}; WorkBuddy replaces them with the actual values at connect time:
{
"headers": {
"Authorization": "Bearer ${USER_ACCESS_TOKEN}"
},
"env": {
"API_KEY": "${MY_SERVICE_API_KEY}"
}
}Hosted stdio runtime (runtime, v5.0.0):
When a stdio MCP is started through npx / node / npm and depends on a Node.js runtime, you can declare runtime so WorkBuddy prepares Node automatically (it runs even when the user's system has no Node):
{
"mcpServers": {
"my-service": {
"type": "stdio",
"command": "npx",
"args": ["my-mcp-package"],
"runtime": { "type": "node", "version": ">=18.0.0" },
"npmRegistry": "https://registry.npmmirror.com"
}
}
}runtime.typecurrently supports only"node";versionis a semver range (such as>=18.0.0/20/*; omitting it is equivalent to*)npmRegistry/npmRegistriestake effect only whenruntime.type='node'is declared; if not specified, WorkBuddy's built-in default mirror is used
Choose an authentication method
Determine the authentication method used by your MCP Server and declare it in auth_mode in connector-meta.json:
| Method | auth_mode | Use case | Experience when the user connects |
|---|---|---|---|
| No auth or client-side auth | Omit (do not set) | No auth is needed, or the client can complete OAuth authorization per the MCP protocol standard. | Clicking Connect is enough; when authorization is needed, WorkBuddy uses standard MCP OAuth and opens the browser |
| User-supplied credentials | "token" | The service accepts only static credentials (API Key / Access Token and so on) and provides no OAuth | A form described by token-schema.json pops up; the user fills it in and connects; the browser is not opened |
| OAuth authorization (recommended) | "server-side" | The service provides standard OAuth authorization | The browser opens for authorization on first use or when authorization expires; the token is hosted by the WorkBuddy cloud and injected into MCP requests; local and cloud share one set of authorization data after a single authorization |
⭐ Services that need auth should use OAuth authorization (auth_mode: "server-side"): authorization and credential management are handled by the WorkBuddy cloud, the client side holds no third-party token, and both the integration experience and security are better. Use user-supplied credentials when the service does not support OAuth.
- Omitting
auth_modeapplies to MCP Servers that need no auth, or where the client can complete OAuth authorization per the MCP protocol standard - With
"server-side"you must also provideserver_authinconnector-meta.json(see "Server-side authorization config") and coordinate the integration with the WorkBuddy team - When auth is required, explain the authorization scope, expiration handling, and common errors in the Skill
User-supplied credentials (auth_mode: "token")
Use this mode when the MCP Server does not go through OAuth and asks users to obtain long-lived credentials such as an Access Token or API Key: you provide a token-schema.json describing the form, WorkBuddy generates the form from it, and the credentials the user fills in are stored locally and injected when connecting to MCP. The browser is never opened, and no OAuth endpoints need to be implemented.
- Inputs are not limited to tokens: API Base URL, workspace ID, and similar values can all be form fields; private deployments rely on such fields so users can enter their own service address
- "token" is only a name: the credential may actually be called an API Key, Access Token, or Secret; field names and copy are defined by you in
token-schema.json - Independent of transport type:
stdio/sse/streamableHttpare all supported; the only difference is where the value is injected - Supported since v4.23.0; declare
minWorkbuddyVersion: "4.23.0"inconnector-meta.json
The only file this mode adds is token-schema.json; the rest (connector-meta.json, mcp.json, icon.svg, skills/) is the same as the regular MCP approach.
Write mcp.json
Reference the credentials the user must fill in with ${VAR} placeholders, where VAR corresponds to a fields[].key in token-schema.json. Placeholders may appear in url / headers / env:
| MCP transport | Injection point | Syntax |
|---|---|---|
stdio | env | "env": { "API_KEY": "${API_KEY}" } |
sse / streamableHttp | headers or url | "headers": { "Authorization": "Bearer ${API_KEY}" } |
{
"mcpServers": {
"my-api": {
"type": "streamableHttp",
"url": "${API_BASE_URL}/mcp",
"headers": { "Authorization": "Bearer ${API_KEY}" },
"timeout": 30000
}
}
}- The
VARin${VAR}must matchfields[].key(case-sensitive) - The value actually injected is whatever the user submits;
defaultValueapplies only when the user does not change it - Under stdio, values the user fills in are flattened into the child process environment variables automatically; in HTTP mode they must be written explicitly into
headers/url
Write token-schema.json
{
"title": "服务对接配置",
"title_en": "Service Configuration",
"description": "连接您的账号以调用服务。凭证仅存储在本机 ~/.workbuddy 目录下。",
"description_en": "Connect your account. Credentials are stored locally only.",
"docUrl": "https://example.com/docs/api-token",
"docLabel": "如何获取 Access Token?",
"fields": [
{
"key": "API_KEY",
"label": "Access Token",
"type": "password",
"required": true,
"placeholder": "在个人中心 → 开放平台 → API 中生成",
"description": "用于访问服务 OpenAPI 的个人访问令牌。"
},
{
"key": "API_BASE_URL",
"label": "API 基础地址",
"label_en": "API Base URL",
"type": "text",
"required": true,
"defaultValue": "https://api.example.com",
"description": "私有部署可改为内网地址。"
}
]
}Top-level fields
| Field | Required | Description |
|---|---|---|
title | Yes | Form title |
description | Yes | Form description; stating where credentials are stored is recommended to address user concerns |
docUrl | Optional | Link to the credential-obtaining docs, rendered as a clickable link in the form |
docLabel | Optional | Display text of docUrl |
fields | Yes | Field list, at least one entry |
fields[] subfields
| Field | Required | Description |
|---|---|---|
key | Yes | Field key, that is the ${VAR} name used in mcp.json (case-sensitive) |
label | Yes | Input label |
type | Yes | "text" / "password" |
required | Yes | Whether the field is required |
placeholder | Optional | Placeholder hint; pointing to the credential path or an example value is recommended |
defaultValue | Optional | Initial value, editable by the user |
description | Optional | Helper text below the field |
Multiple languages: the original field holds the default copy (Chinese), and the matching _en field holds the English copy (such as title_en / label_en); when the _en field is missing, it falls back to the original field.
Write connector-meta.json
Follows the same spec as "Write connector metadata (connector-meta.json)", with these additional requirements:
| Field | Value |
|---|---|
type | "mcp" |
auth_mode | "token" |
minWorkbuddyVersion | "4.23.0" or higher |
If the same service needs to offer both an OAuth version and a Token version, use two different source values (such as tapd and tapd-token) — they are two independent connectors from the user's point of view.
OAuth authorization (auth_mode: "server-side")
OAuth authorization is always initiated by the WorkBuddy cloud, and auth_mode is always "server-side". There are two forms, distinguished by how the client is registered:
| Form | Client registration | server_auth.auth_type |
|---|---|---|
| Dynamic registration ⭐ | The WorkBuddy cloud dynamically registers a client with your authorization service (DCR) | "mcp_oauth" |
| Pre-registration ⭐ | You provide the client information of an OAuth app first, and the WorkBuddy cloud pre-registers it | "oauth2_code" |
In both forms, user authorization happens in the browser; the token is managed by the WorkBuddy cloud and injected when calling MCP, and the client side holds no third-party token.
Allowlisting on your authorization server
Allowlisting is required for both dynamic registration and pre-registration.
On your authorization server, add the following client_name and domains (hosts) to the allowlist; otherwise client registration and the authorization callback cannot complete:
| Item | Allowlist content |
|---|---|
client_name | WorkBuddy Connector and CodeBuddy |
| Domain (host) | *.workbuddy.cn*.codebuddy.cn*.workbuddy.aicopilot.tencent.comstaging-codebuddy.tencent.com |
*is a wildcard and must support multi-level subdomain matching (for example*.workbuddy.cnmust match botha.workbuddy.cnanda.b.workbuddy.cn)- The callback URL is generated automatically by the system; you do not need to fill it in, only to make sure its domain matches the allowlist above
- If your authorization service does not support wildcard domains, contact the WorkBuddy team
Dynamic registration (auth_type: "mcp_oauth")
The WorkBuddy cloud performs the following in order: metadata discovery → dynamic client registration → open the browser for authorization → exchange and host the token. You need to implement these server endpoints:
| Endpoint | Method | Description |
|---|---|---|
/.well-known/oauth-protected-resource | GET | Returns the resource URL and authorization_servers |
/.well-known/oauth-authorization-server | GET | Returns the OAuth metadata |
/oauth/register | POST | Dynamic client registration (RFC 7591) |
/oauth/authorize | GET | Authorization endpoint, supporting PKCE (S256) |
/oauth/token | POST | Token endpoint, issuing access_token + refresh_token |
Unauthenticated requests return 401 with resource_metadata in WWW-Authenticate; HTTPS is mandatory on all endpoints.
Pre-registration (auth_type: "oauth2_code")
The difference from dynamic registration is that the client is not registered dynamically: you first create an OAuth app in your own authorization service and provide WorkBuddy with the client_id, client_secret, authorization endpoint, and token endpoint; the WorkBuddy cloud pre-registers it before use. When creating the OAuth app, the domain of the callback URL must also match the allowlist above.
For how the server carries client information, see provider_config.token_auth_method in "Server-side authorization config (server_auth)".
Server-side authorization config (server_auth)
With auth_mode: "server-side", fill in server_auth in connector-meta.json. This field is not needed when auth_mode is omitted or set to "token".
Generating
connector-meta.jsonwith the open platform Connector Meta tool is recommended, so you do not have to write it by hand. Choose the type and auth method, fill in the fields, and export;mcp.json,cli.json,token-schema.json, the icon, and the Skill are still prepared according to their own sections.
{
"name": "您的服务",
"source": "your-service",
"type": "mcp",
"auth_mode": "server-side",
"server_auth": {
"auth_type": "mcp_oauth",
"data": {}
}
}server_auth contains only the fields the service provider needs to fill in. scope, owner_id, status, capabilities, and version are maintained by WorkBuddy; do not fill them in.
server_auth fields
| Field | Required | Description |
|---|---|---|
auth_type | Yes | "mcp_oauth" for dynamic registration; "oauth2_code" for pre-registration |
data | Yes | Authorization and delivery config, see below |
The cloud registration name and callback URL are generated by the system from the
sourceinconnector-meta.json, soserver_authneeds no name-type fields.sourcemust consist of lowercase letters, digits,-, and_(see "Write connector metadata (connector-meta.json)"). Display name and description use the top-levelname/description*fields; do not write them intoserver_auth.data.
Dynamic registration: auth_type: "mcp_oauth"
The client is registered dynamically by the WorkBuddy cloud (RFC 7591) and the registration result is written back by the system; you need to provide the OAuth resource URL and optional scopes.
{
"auth_type": "mcp_oauth",
"data": {
"mcp_oauth": {
"server_url": "https://mcp.example.com/your-service",
"scopes": "taskflow.read taskflow.write"
}
}
}| Field | Required | Description |
|---|---|---|
data.mcp_oauth.server_url | Yes | OAuth protected resource URL, used for metadata discovery (RFC 9728); usually the same as the public URL of the MCP Server |
data.mcp_oauth.scopes | Optional | Requested scopes; separate multiple scopes with spaces |
client_id, client_secret, and redirect_uri are written back by the system after dynamic registration; do not fill them in. The authorization server address is discovered from the resource metadata, so there is no separate field for it.
Pre-registration: auth_type: "oauth2_code"
The client is not registered dynamically, so you need to provide the client information of the OAuth app.
{
"auth_type": "oauth2_code",
"data": {
"oauth2": {
"client_id": "your_client_id",
"client_secret": "your_client_secret",
"auth_url": "https://auth.example.com/oidc/authorize",
"token_url": "https://auth.example.com/oidc/token",
"scopes": "openid offline_access"
},
"provider_config": {
"auth_type": "oauth2_code",
"authorize_url": "https://auth.example.com/oidc/authorize",
"token_endpoint": "https://auth.example.com/oidc/token",
"scopes": ["openid", "offline_access"],
"pkce_enabled": false,
"token_auth_method": "body",
"token_content_type": "application/x-www-form-urlencoded",
"token_response_map": {},
"refresh_enabled": true,
"refresh_endpoint": "https://auth.example.com/oidc/token",
"refresh_auth_method": "body"
}
}
}| Field | Required | Description |
|---|---|---|
data.oauth2.client_id | Yes | Client ID of the OAuth app |
data.oauth2.client_secret | Yes | Client Secret; encrypted at rest on the server and masked in queries |
data.oauth2.auth_url | Yes | Authorization endpoint |
data.oauth2.token_url | Yes | Token exchange endpoint |
data.oauth2.scopes | Optional | Requested scopes; separate multiple scopes with spaces |
redirect_url is generated uniformly by the system from the Connector's source and cannot be filled in manually.
provider_config controls how authorization codes are exchanged and refreshed:
| Field | Required | Description |
|---|---|---|
data.provider_config.auth_type | Yes | Fixed to "oauth2_code" |
data.provider_config.authorize_url | Yes | Authorization endpoint, kept consistent with oauth2.auth_url |
data.provider_config.token_endpoint | Yes | Token endpoint, kept consistent with oauth2.token_url |
data.provider_config.scopes | Optional | Scope array; when present it takes priority over oauth2.scopes |
data.provider_config.pkce_enabled | Optional | PKCE switch, default false |
data.provider_config.token_auth_method | Optional | How client information is carried when exchanging the code: body (default, in the request body) / basic_auth (in the Authorization header) |
data.provider_config.token_content_type | Optional | Encoding of the exchange request body: application/x-www-form-urlencoded (default) or application/json |
data.provider_config.token_response_map | Optional | Token response field mapping: standard field name → actual response field name, for example {"access_token":"mcp_token"} |
data.provider_config.refresh_enabled | Optional | Whether refresh is enabled, default true |
data.provider_config.refresh_endpoint | Optional | Refresh endpoint, defaults to oauth2.token_url |
data.provider_config.refresh_auth_method | Optional | How client information is carried in refresh requests: body (default) / basic_auth |
data.provider_config.authorize_extra_params | Optional | Extra query parameters appended to the authorization request, as string key-value pairs; fixed parameters (such as response_type) take priority and are not overridden |
data.provider_config.token_extra_params | Optional | Extra parameters appended to the exchange request, as string key-value pairs; fixed fields (such as grant_type) take priority |
data.provider_config.refresh_extra_params | Optional | Extra parameters appended to the refresh request, as string key-value pairs |
Complete example: TaskFlow task management
This example uses the fictional TaskFlow task management service and the recommended OAuth authorization (dynamic registration).
Directory structure
taskflow/
├── connector-meta.json
├── mcp.json
├── icon.svg
└── skills/
└── taskflow-skill/
└── SKILL.md
connector-meta.json
{
"name": "TaskFlow",
"name_zh": "TaskFlow",
"name_en": "TaskFlow",
"description": "用自然语言管理你的任务:创建、查询、更新任务,生成进度报告。",
"description_zh": "用自然语言管理你的任务:创建、查询、更新任务,生成进度报告。",
"description_en": "Manage your tasks with natural language: create, query, update tasks and generate progress reports.",
"source": "taskflow",
"type": "mcp",
"auth_mode": "server-side",
"examples_zh": ["创建一个下周一截止的高优先级任务"],
"examples_en": ["Create a high-priority task due next Monday"],
"minWorkbuddyVersion": "4.24.0",
"server_auth": {
"auth_type": "mcp_oauth",
"data": {
"mcp_oauth": {
"server_url": "https://mcp.taskflow.io/mcp",
"scopes": "taskflow.read taskflow.write"
}
}
}
}mcp.json
{
"mcpServers": {
"taskflow": {
"type": "streamableHttp",
"url": "https://mcp.taskflow.io/mcp",
"timeout": 30000
}
}
}For how to write skills/taskflow-skill/SKILL.md, see "Writing a Skill for MCP tools" under "Write the Skill file".
CLI + Skill integration
This approach integrates an existing command-line tool; WorkBuddy automatically installs the CLI, schedules auth, and invokes commands.
Introduction and development requirements
If your application already has a mature CLI (command-line) tool, you can integrate it with WorkBuddy quickly through this approach. After a user installs the Connector, WorkBuddy installs the CLI tool and schedules commands automatically, and the AI interacts with your application by executing CLI commands.
WorkBuddy can host the Node.js / Python runtime the CLI needs and isolate npm / pip installations and caches into directories managed by WorkBuddy itself; however, the CLI's login state, tokens, config files, and authorization files must still be stored, read, refreshed, and cleaned up by the CLI itself. See "WorkBuddy-hosted runtime, install location, and credential ownership" for details.
Use cases:
- Your application already has an official CLI tool (such as
gh,tmeet,jira-cli) - The CLI tool supports completing core operations from the command line
- You want users to get started immediately without caring about installation and auth flows
CLI tool development requirements:
| Requirement | Description |
|---|---|
| Cross-platform | Support at least macOS (darwin) and Linux; support for Windows is also recommended |
| Installation | Provide a standard package-manager installation or an official install script; if npm / pip is used, declaring runtime is recommended so WorkBuddy hosts the runtime and isolates install locations |
| Auth flow | Support command-line auth (OAuth browser redirect or token input), with the CLI itself persisting and managing credential / authorization files |
| Status check | Provide a status command that determines state from the CLI's own persisted login state and prints a recognizable result; the command must have no side effects |
| Command output | Structured output is recommended (JSON preferred) so the AI can parse and understand it |
| Error handling | Return clear error messages and exit codes |
Write the CLI config (cli.json)
This file defines how WorkBuddy installs, authenticates, and manages your CLI tool.
Complete example:
{
"init": {
"darwin": "npm install -g tmeet",
"linux": "npm install -g tmeet",
"win32": "npm install -g tmeet"
},
"auth": {
"darwin": "tmeet auth login",
"linux": "tmeet auth login",
"win32": "tmeet.cmd auth login"
},
"unAuth": {
"darwin": "tmeet auth logout",
"linux": "tmeet auth logout",
"win32": "tmeet.cmd auth logout"
},
"status": {
"darwin": "tmeet auth status",
"linux": "tmeet auth status",
"win32": "tmeet.cmd auth status"
},
"statusMatch": "Logged in as",
"authUrlDomain": "meeting.tencent.com"
}Field details:
| Field | Required | Type | Minimum version | Description |
|---|---|---|---|---|
init.{platform} | Yes | string | Base | Install command per platform. platform values: darwin (macOS), linux, win32 (Windows) |
auth | Optional | object / array | Base | Auth command. A single step is a platform command object; multiple steps form an array (see "Multi-step auth (auth array syntax, v4.24.0)" below) |
unAuth.{platform} | Yes | string | Base | Command per platform for removing authorization (logout) |
status.{platform} | Yes | string | Base | Command per platform for checking auth status |
statusMatch | Optional | string | Base | Text (regex) that the status output must contain when auth succeeds. Mutually exclusive with statusMatchJson |
statusMatchJson | Optional | object | v4.24.0 | JSON matching against the status output; all key-value pairs must match to count as connected (takes priority over statusMatch) |
authUrlDomain | Optional | string | Base | Domain involved in the auth flow. When the CLI opens a browser for auth, WorkBuddy extracts only URLs on that domain |
env | Optional | object | v4.22.0 | Environment variables injected when running commands, supporting $HOME / ${HOME} placeholders (see "Credential injection: passing config through env (v4.22.0)" below) |
runtime | Optional | object | Node: v4.22.0; Python: v5.0.0 | Runtime dependency declaration: { "type": "node" | "python", "version"?: string }. Once declared, WorkBuddy prepares the runtime automatically and adds it to the CLI command environment |
npmRegistry | Optional | string | v4.22.0 | npm registry mirror (takes effect only when runtime.type='node') |
npmRegistries | Optional | string[] | v4.24.0 | npm registry mirror list, falling back in order (takes priority over npmRegistry) |
versionCheck | Optional | object | v4.24.0 | CLI version check; re-runs init to upgrade when the version is too low (see "Version check (versionCheck, v4.24.0)" below) |
authWaitForExit | Optional | boolean | v4.22.0 | Do not kill the child process after a URL is detected; wait for the CLI to exit on its own (default false, see "auth behavior variants" below) |
authQrModal | Optional | boolean | v4.22.0 | Show the auth URL in a WorkBuddy embedded modal instead of the system browser (default false, mutually exclusive with authDeviceFlow) |
authSuppressBrowser | Optional | boolean | v4.22.8 | Suppress WorkBuddy's automatic browser opening and let the CLI handle it (default false) |
authDeviceFlow | Optional | object | v5.0.0 | OAuth 2.0 Device Flow (RFC 8628) config (see "Device Flow (authDeviceFlow, v5.0.0)" below, mutually exclusive with authQrModal) |
"Base" in the Minimum version column means long-term support. When you use a version-numbered field, declare the matching
minWorkbuddyVersioninconnector-meta.json(see "Version compatibility").
WorkBuddy-hosted runtime, install location, and credential ownership
For a CLI that depends on Node.js or Python, declaring runtime in cli.json is recommended. WorkBuddy prepares a usable runtime according to the declaration and injects the matching environment when running init / auth / status / unAuth and other commands; users do not need to install Node.js or Python on their system beforehand.
{
"runtime": { "type": "node", "version": "20" },
"init": {
"darwin": "npm install -g example-cli",
"linux": "npm install -g example-cli",
"win32": "npm install -g example-cli"
}
}| Scenario | WorkBuddy behavior | CLI developer requirements |
|---|---|---|
runtime.type: "node" | Prepares and prefers the Node.js hosted by WorkBuddy; points the npm install -g prefix and npm cache at WorkBuddy-managed directories, and adds the matching bin directory to PATH | init can use npm install -g <package> directly; do not assume it writes to the user's system global npm directory, and do not depend on the user's ~/.npmrc or global Node installation |
runtime.type: "python" | Prepares and prefers the Python hosted by WorkBuddy and activates the WorkBuddy-managed virtual environment; pip uses that virtual environment, and the pip cache is isolated from the user's system cache | Using python -m pip install <package> is recommended so packages land in the current hosted virtual environment; do not use pip install --user, and do not depend on the user's system Python |
runtime not declared | Reuses the user's system environment and PATH | Use only when the CLI does not depend on Node/Python, or when you explicitly require users to install the runtime themselves; you must ensure the dependencies are available |
Install locations are not the user's global locations: both the npm global install directory for Node CLIs and the virtual environment for Python CLIs are hosted by WorkBuddy under WorkBuddy-managed directories, not the user's system global locations. These paths are managed by WorkBuddy and change across versions, so developers should not hard-code any concrete path in commands; subsequent
auth/status/unAuthcommands receive the already configuredPATH/VIRTUAL_ENVand other environment variables.
Credential and authorization files are managed by the CLI itself: WorkBuddy only executes
auth/status/unAuth; it does not dictate, migrate, or automatically clean up the CLI's credential files. The CLI should choose a secure, restart-survivable location for config / token storage and ensure that:
authpersists the login state itself after success;statusdetermines login state from the CLI's own persisted state and has no side effects;unAuthrevokes or deletes the CLI's tokens, sessions, and authorization files itself;- do not assume the npm / pip install directory can be used to store user credentials. Unless the CLI explicitly designs and manages that location itself, keep credentials separate from the WorkBuddy runtime install directory.
Credential injection: passing config through env (v4.22.0)
If the CLI tool needs a preset config directory or environment variables, inject them with the env field, which supports $HOME / ${HOME} placeholders (expanded to the user's home directory on the client side).
Typical use: pass the CLI a config directory it defines itself or runtime parameters, and let auth / status / unAuth read and manage credentials from the same location. Whether to set that directory, its structure, and the lifecycle of the authorization files in it are all the CLI's own responsibility; do not mix it with the WorkBuddy Node/Python install directories.
⚠️ Do not hard-code WorkBuddy client directory paths in
env. The WorkBuddy cache and install directory structure changes across versions, and a hard-coded absolute path breaks after an upgrade. Let the CLI decide its own config directory location, or build a path managed by the CLI itself based on$HOME.
⚠️ If your CLI requires users to fill in credentials manually (such as an API Token), the CLI approach itself does not provide a user form. Use
token-schema.jsonfrom "User-supplied credentials (auth_mode: "token")" instead, or let the CLI complete interactive / browser auth through theauthcommand.
Multi-step auth (auth array syntax, v4.24.0)
When auth requires several commands in sequence (for example lark-cli needs config init before auth login), auth can be written as an array; each step is spawned independently, captures URLs independently, and waits for exit independently:
{
"auth": [
{
"command": {
"darwin": "lark-cli config init --new",
"linux": "lark-cli config init --new",
"win32": "lark-cli.exe config init --new"
},
"skipIf": {
"darwin": "lark-cli config check",
"linux": "lark-cli config check",
"win32": "lark-cli.exe config check"
}
},
{
"command": {
"darwin": "lark-cli auth login",
"linux": "lark-cli auth login",
"win32": "lark-cli.exe auth login"
},
"authWaitForExit": true
}
]
}| Subfield | Required | Type | Description |
|---|---|---|---|
command | Yes | object | Platform commands for this step (darwin / linux / win32) |
skipIf | Optional | object | Skip-check command: run it first, and if it exits 0 skip this step (avoids re-running non-idempotent steps) |
authWaitForExit / authUrlDomain / authSuppressBrowser / authDeviceFlow | Optional | — | Per-step overrides of the same-named top-level fields; inherit from the top level when omitted |
Multi-step mode does not support
authQrModal.
auth behavior variants
After the auth command detects a URL, the default behavior is "open the system browser + kill the child process immediately". The following fields change this behavior to fit different CLIs:
| Field | Behavior | Use case |
|---|---|---|
authWaitForExit: true | After opening the browser, do not kill the child process; wait for the CLI to exit on its own (timeout extended to 5 minutes) | The CLI keeps blocking after printing the URL to wait for the scan result, and writes credentials and exits only after a successful scan (such as wecom-cli) |
authQrModal: true | Do not open the system browser; show the URL in a WorkBuddy embedded iframe modal instead | The URL itself is a complete QR-code authorization page (such as WeCom QR) |
authSuppressBrowser: true | WorkBuddy does not open the browser; the CLI handles the browser redirect itself | The CLI actively calls the system open when running auth (such as the notion CLI), avoiding two browser tabs |
Device Flow (authDeviceFlow, v5.0.0)
For CLIs that log in with the OAuth 2.0 Device Authorization Grant (RFC 8628): the CLI prints a verification URL on stdout (possibly with the user_code embedded), WorkBuddy pops up a Device Code Modal to send the user to the browser, and the CLI itself polls the token endpoint to complete authorization.
{
"auth": {
"darwin": "cnb login --woa",
"linux": "cnb login --woa",
"win32": "cnb.exe login --woa"
},
"authDeviceFlow": {
"uriPattern": "(https?://[^\\s]*/oauth2/device[^\\s]*)",
"defaultExpiresInSeconds": 600,
"codeEmbeddedInUri": true
}
}| Subfield | Required | Type | Description |
|---|---|---|---|
uriPattern | Yes | string | Regex for extracting the verification URL from stdout (the whole match or the first capture group is used as the URL) |
codePattern | Optional | string | Regex for extracting the user_code (can be omitted when the code is already embedded in the URL) |
defaultExpiresInSeconds | Optional | number | Countdown seconds shown in the modal, used when stdout has no explicit expiry information (for example 600) |
codeEmbeddedInUri | Optional | boolean | Whether the URL already embeds the user_code: true (cnb style, clicking the link fills in the code automatically) / false (GitHub CLI style, the code must be copied manually), default false |
Device Flow is mutually exclusive with
authQrModal. See "Authorization and authentication mechanism" for more details of the auth flow.
Version check (versionCheck, v4.24.0)
Checks the CLI version at connect time and automatically re-runs init to upgrade when it is below minVersion:
{
"versionCheck": {
"command": {
"darwin": "tmeet --version",
"linux": "tmeet --version",
"win32": "tmeet.exe --version"
},
"minVersion": "1.0.20",
"versionPattern": "(\\d+\\.\\d+\\.\\d+)"
}
}| Subfield | Required | Type | Description |
|---|---|---|---|
command | Yes | object | Platform command that prints the version number |
minVersion | Yes | string | Minimum required version (semver) |
versionPattern | Optional | string | Regex for extracting the version number from stdout (first capture group), default (\d+\.\d+\.\d+) |
Authorization and authentication mechanism
CLI auth is entirely the responsibility of the CLI tool itself; WorkBuddy only schedules commands and checks state.
Scheduling flow: init installs → auth prints the auth URL (WorkBuddy opens the browser and kills the child process) → poll status until auth completes → unAuth logs out.
auth command
WorkBuddy listens to the stdout / stderr of the auth child process in real time and extracts the auth URL with the regex /https?:\/\/[^\s\n\r"'<>]+/g. When authUrlDomain is configured, only URLs on that domain are extracted; otherwise the first https:// URL is used.
| Item | Requirement |
|---|---|
| Timeout | The URL must be printed within 10 seconds; once a URL is detected the browser opens and the child process is killed immediately |
| URL format | Must be separated by whitespace on both sides, and must not be wrapped in quotes or angle brackets (which would truncate it) |
| Not allowed | Opening the browser yourself without printing the URL; waiting for interactive input (there is no TTY, so it hangs); relying on the child process staying alive to receive the callback |
URL terminators are whitespace or " ' < >; query parameters are not truncated.
Callback receiving options
The auth child process is killed once the URL is extracted, so it cannot itself be the receiver of the OAuth callback. Choose one of the following:
| Option | Approach | Use case |
|---|---|---|
| A Background daemon | auth starts a resident process to listen for the callback and exits immediately | The CLI can stay resident in the background |
| B Device Code Flow | Follow RFC 8628 and let the CLI poll the token endpoint itself. Configuring authDeviceFlow (v5.0.0+) makes WorkBuddy show a Device Code Modal and not kill the child process | Recommended, standard Device Flow |
| C Server-side storage | The callback hits your server, and the CLI polls the server to fetch the token | You already have a server that can receive callbacks |
status / unAuth commands
Determination: exit code 0 means authenticated; if statusMatch is configured, stdout + stderr must also match that regex.
| Command | Requirement |
|---|---|
status | Returns 0 when authenticated and non-zero when not; returns within 10 seconds; side-effect-free and safe to call every 3 seconds; must read the persisted token to reflect the latest state |
unAuth | Clears the local token and the remote session; returns 0 on success; 30-second timeout; idempotent (returns normally even when not logged in) |
{ "status": { "darwin": "tmeet auth status" }, "statusMatch": "Logged in as" }Timeout summary
| Command | Timeout | Description |
|---|---|---|
init | 5 minutes | Installation may involve downloading large files |
auth | 10 seconds | Only needs to print the URL; it does not wait for auth to finish |
status | 10 seconds | Lightweight check |
unAuth | 30 seconds | May need to call a remote API to revoke the token |
| Auth polling | 5 minutes | Poll interval 3 seconds; the total time waiting for the user to finish browser authorization |
After a WorkBuddy restart only status is checked; auth is not run — the CLI's token persistence must survive restarts.
Complete example: Tencent Meeting
This example uses the Tencent Meeting CLI Connector.
Directory structure
tmeet/
├── connector-meta.json
├── cli.json
├── icon.svg
└── skills/
└── tmeet-skill/
└── SKILL.md
connector-meta.json
{
"name": "腾讯会议",
"description": "Manage Tencent Meeting via CLI.",
"description_zh": "通过自然语言管理腾讯会议:创建会议、查看日程、邀请参会人、取消会议。",
"description_en": "Manage Tencent Meeting with natural language: create meetings, view schedules, invite attendees, cancel meetings.",
"source": "tmeet",
"type": "cli",
"examples_zh": [
"帮我创建一个明天下午 3 点的项目评审会议",
"查看我今天的会议安排",
"取消会议 ID 为 123456 的会议"
],
"examples_en": [
"Create a project review meeting for 3 PM tomorrow",
"Show my meeting schedule for today",
"Cancel meeting with ID 123456"
]
}cli.json
{
"init": {
"darwin": "npm install -g tmeet",
"linux": "npm install -g tmeet",
"win32": "npm install -g tmeet"
},
"auth": {
"darwin": "tmeet auth login",
"linux": "tmeet auth login",
"win32": "tmeet.cmd auth login"
},
"unAuth": {
"darwin": "tmeet auth logout",
"linux": "tmeet auth logout",
"win32": "tmeet.cmd auth logout"
},
"status": {
"darwin": "tmeet auth status",
"linux": "tmeet auth status",
"win32": "tmeet.cmd auth status"
},
"statusMatch": "Logged in as",
"authUrlDomain": "meeting.tencent.com"
}For the content of skills/tmeet-skill/SKILL.md, see "Writing a Skill for CLI commands" under "Write the Skill file".
Submission and publishing
Pre-submission checklist
General
-
connector-meta.jsonis filled in completely,sourceis kebab-case and globally unique; for the CLI approachtypeis"cli" - Chinese and English descriptions and usage examples are provided
-
icon.svgoricon.pngis provided and clearly recognizable - No real tokens or secrets are written in any file
- If version-marked fields are used,
minWorkbuddyVersionis declared (see "Version compatibility")
MCP approach
- The MCP Server is deployed, stably reachable over the public network (or the agreed network), and implements the standard MCP protocol
-
mcp.jsonis configured correctly and contains only one Server config; remote addresses use HTTPS -
skills/{skill-name}/SKILL.mdis written (optional), including Frontmatter and the purpose and parameters of every MCP Tool - Omitting
auth_modeapplies to MCP Servers that need no auth, or where the client can authenticate per the MCP protocol standard - If auth is needed, the Skill explains the authorization scope, expiration handling, and common errors
- With
auth_mode: "server-side",server_authis filled in and its fields match "Server-side authorization config (server_auth)" - With
auth_mode: "server-side", allowlisting is done on your authorization server:client_name(WorkBuddy ConnectorandCodeBuddy) and the 5 domains (including wildcards, with multi-level subdomain matching, see "OAuth authorization (auth_mode: "server-side")") - With OAuth dynamic registration, the server-side OAuth endpoints are implemented (see "OAuth authorization (auth_mode: "server-side")")
- With
auth_mode: "token", credential injection points inmcp.jsonuse${VAR}placeholders and everyVARmatches afields[].keyintoken-schema.json; stdio writes them intoenv, HTTP intoheadersorurl - With
auth_mode: "token",token-schema.jsonincludes the three required itemstitle,description, andfields, sensitive fields use"password"as theirtype, anddocUrlis configured - With
auth_mode: "token",minWorkbuddyVersionis declared as at least4.23.0, and you have verified with real credentials that the MCP Server connects and calls tools normally
CLI approach
Config and installation
- The CLI tool is published and supports at least macOS and Linux
- The CLI tool supports command-line installation; if npm / pip is used,
runtimeis declared and you have verified that installation does not write into the user's system global npm / Python environment -
cli.jsoncontains completeinit/auth/unAuth/statusconfig, and the commands for every platform (darwin / linux / win32) have been tested -
skills/{skill-name}/SKILL.mdis written, covering the usage and examples of all CLI commands
CLI tool behavior (see "Authorization and authentication mechanism")
-
authprints a completehttps://URL within 10 seconds, separated by whitespace and without quotes or angle brackets -
authdoes not rely on the child process staying alive to receive the callback; a callback option (Daemon / Device Code / server-side storage) is chosen and verified -
statusreturns the right exit code (0 = authenticated) and its output containsstatusMatch(if configured); it returns within 10 seconds, has no side effects, and reads the persisted token -
unAuthclears the local token and the remote session, and is idempotent
Integration tests
- Fresh environment: init → auth → browser authorization → status authenticated (within 5 minutes)
- Already authenticated: status returns authenticated directly and auth is skipped
- After logout: unAuth → status not authenticated
- After restarting WorkBuddy: the token is still valid and status is authenticated
- Token expired: status is not authenticated, and re-running auth completes successfully
Review, publishing, and updates
After completing the self-checks above, package the connector directory and submit it to the WorkBuddy team for review. Once approved, the Connector moves to pending release; click publish to list it in the Connector Marketplace.
To update a Connector that is already live, modify the files, increment version, and submit it for review again.
Reference
Version compatibility (minWorkbuddyVersion)
Different WorkBuddy client versions support different config fields. If your Connector uses newer fields, you must declare the minimum required client version with minWorkbuddyVersion, so old clients do not pull an incompatible config.
Field semantics
| Field | Description |
|---|---|
minWorkbuddyVersion | Minimum WorkBuddy version this Connector works with (semver, for example "5.0.0"). On clients below this version: if never enabled, it is not shown; if already enabled or previously connected, it is grayed out with an upgrade prompt |
maxWorkbuddyVersion | Maximum version this Connector supports (inclusive). Used for emergency delisting on the operations side (when a server-side change is temporarily unavailable); clients above this version see it grayed out as "temporarily unavailable" |
Missing values are equivalent to "no lower bound / no upper bound" respectively.
Feature → minimum version quick reference
When you use any of the following fields or capabilities, declare at least the matching version in minWorkbuddyVersion:
| Field / capability | Minimum version |
|---|---|
type: "cli", auth_mode: "server-side", CliConfig.unAuth / statusMatch / authUrlDomain, description_zh / description_en | Base (≤4.20.0) |
CliConfig.runtime / npmRegistry / env, authWaitForExit / authQrModal | 4.22.0 |
CliConfig.authSuppressBrowser | 4.22.8 |
minWorkbuddyVersion / maxWorkbuddyVersion | 4.22.12 |
mcpServers[].cwd / disabledTools | 4.22.15 |
auth_mode: "token" + the full token-schema.json set | 4.23.0 |
name_zh / name_en, examples_zh / examples_en, CliConfig.statusMatchJson / versionCheck / npmRegistries, auth: CliAuthStep[] (multi-step) + skipIf | 4.24.0 |
server_auth (cloud OAuth server-side authorization config inside connector-meta.json, only with auth_mode: "server-side") | 4.24.0 |
CliConfig.authDeviceFlow, CliConfig.runtime.type: "python", mcpServers[].runtime / npmRegistry / npmRegistries / staticEnv / staticHeaders | 5.0.0 |
name_map / description_map environment-specific copy | 5.2.0 |
Use the highest version among the features you use as
minWorkbuddyVersion. For example, if you use bothauth_mode: "token"(4.23.0) andauthDeviceFlow(5.0.0), declare"minWorkbuddyVersion": "5.0.0".
Config example
{
"name": "TaskFlow",
"source": "taskflow",
"auth_mode": "token",
"minWorkbuddyVersion": "4.23.0"
}FAQ
Integration approach
Q: Can the MCP approach and the CLI approach be mixed?
No. A Connector can use only one integration approach. If your application provides both an API and a CLI, the MCP + Skill approach is recommended.
Q: Can I configure multiple Servers in mcp.json?
No. The system reads only the first config under mcpServers. One Connector corresponds to one MCP Server. If you have multiple services, create multiple Connectors.
Q: Can the MCP Server be deployed on an internal network?
You need to make sure the WorkBuddy client can reach your MCP Server. If it targets only users inside your company, you can deploy it on the company intranet; if it targets public users, it must be publicly reachable.
Q: Under the CLI approach, do users need to install the CLI tool manually?
No. WorkBuddy installs the CLI tool on the user's device automatically based on the init config in cli.json. The user only needs to click Connect.
Authentication and credentials
Q: Does the MCP approach have to implement OAuth?
No. When the MCP Server needs no auth, simply omit auth_mode. When you need to access the user's private data (mail, calendar, tasks, and so on) and the service provides OAuth, use auth_mode: "server-side" and provide the server-side authorization config in the server_auth field of connector-meta.json; see "Choose an authentication method" for details. If the service accepts only a static API Key / Access Token, use auth_mode: "token", provide token-schema.json, and inject the user-supplied credential through ${VAR_NAME} in mcp.json; this mode requires no OAuth endpoints and does not open the browser.
Q: Can one Connector support both OAuth and Token?
No, a Connector has only one auth_mode. If you need to offer both, use two different source values and submit them separately.
Q: What happens when the OAuth refresh_token expires?
When the refresh_token expires, WorkBuddy cannot renew it automatically and prompts the user to authorize again. With cloud OAuth the refresh is performed by the WorkBuddy server, configured through refresh_enabled / refresh_endpoint in server_auth (see "Server-side authorization config (server_auth)"). Setting the refresh_token lifetime to 30 days or more is recommended to reduce how often users must re-authorize.
