MCP & Skill
Bailian CLI command reference for orchestrating MCP services and managing the skill registry.
Orchestrate MCP services and manage the skill registry from the terminal: list active MCP servers, view server details and invoke tools, register Bailian MCP servers into Agent native configurations, and search, install, update, and remove skills.
ImportantAppend --help to any command for full parameter details, e.g. bl mcp call --help. Command details on this page are verified against bl 2.14.0.
MCP orchestration
See the MCP servers for feature-page usage.
bl mcp list
List MCP servers activated under your Bailian account and their local Agent registrations. Requires API Key authentication.
Usage
bl mcp list [flags]
| Parameter | Type | Required | Description |
|---|---|---|---|
--name <text> | string | no | Filter by server name (substring match) |
--type <type> | string | no | Server type: OFFICIAL | PRIVATE (default: OFFICIAL) |
--page <n> | number | no | Page number (default: 1) |
--page-size <n> | number | no | Results per page (default: 30) |
Example: List MCP servers with name containing 'finance'
bl mcp list --name finance
bl mcp get
View an MCP server's details and tool definitions. Requires API Key authentication.
Usage
bl mcp get --server <code> [flags]
| Parameter | Type | Required | Description |
|---|---|---|---|
--server <code> | string | yes | Official or custom MCP server code |
Example: View MCP server details
bl mcp get --server mcp-example
bl mcp tools
List tools exposed by an MCP server (tools/list). Requires API Key authentication.
Usage
bl mcp tools --server <code> [--url <url>]
| Parameter | Type | Required | Description |
|---|---|---|---|
--server <code> | string | yes | Server code from mcp list (e.g. market-cmapi00073529) |
--url <url> | string | no | Override the MCP endpoint URL (non-Bailian). Tries Streamable HTTP first, then classic SSE on the same URL. |
Example: List tools from MCP server market-cmapi00073529
bl mcp tools --server market-cmapi00073529
bl mcp call
Call a tool on an MCP server (tools/call). Requires API Key authentication.
Usage
bl mcp call --target <server.tool> [--arg k=v ...] [--json '{...}'] [--url <url>]
| Parameter | Type | Required | Description |
|---|---|---|---|
--target <server.tool> | string | yes | Server code and tool name joined by a dot, e.g. market-cmapi00073529.SmartStockSelection |
--arg <kv> | array | no | Tool argument (repeatable). Values parsed as JSON if possible, else string. |
--json <obj> | string | no | Full arguments object as JSON; merged with --arg (arg wins). |
--query <text> | string | no | Shortcut for --arg query=<text> (mirrors many DashScope MCP tools). |
--url <url> | string | no | Override the MCP endpoint URL (non-Bailian). Tries Streamable HTTP first, then classic SSE on the same URL. |
Example: Call SmartStockSelection tool with query about consumer stocks
bl mcp call --target market-cmapi00073529.SmartStockSelection --query "Screen consumer stocks with ROE > 15%"
Native Agent registration
bl mcp connect
Register a Bailian MCP server in an Agent's native configuration. Requires API Key authentication. Activates required inactive MCP services by default, which may incur charges.
Usage
bl mcp connect --server <code> --transport <streamable-http|sse> --agent <agent|all> [--and-activate[=true|false]] [--dry-run]
| Parameter | Type | Required | Description |
|---|---|---|---|
--server <code> | string | yes | Bailian MCP Server Code, such as TextGenerateImage |
--transport <transport> | string | yes | MCP transport exposed by the server: streamable-http or sse |
--agent <agent> | string | yes | Target Agent: codex, claude-code, cursor, qoder, qoderwork, qwenwork, qwen-code, gemini, opencode, openclaw, deepseek-harness, zcode, workbuddy, pi, or all |
--and-activate [true|false] | boolean | no | Activate inactive services before connecting (default true, activation may incur charges). Set to false to connect only to active services. |
Example: Connect TextGenerateImage server to cursor agent via streamable-http
bl mcp connect --server TextGenerateImage --transport streamable-http --agent cursor
- This release registers the official MCP endpoint; the model API --base-url does not change the MCP endpoint.
- The resolved API key is written to the selected Agent's private local configuration. Existing unmanaged entries are never overwritten.
- qoder, qoderwork, and qwenwork are independent products. qwenwork is QwenWork (千问办公); qoderwork is Qoder Work.
- workbuddy covers CodeBuddy / WorkBuddy. deepseek-harness is DeepSeek Harness and only accepts streamable-http.
bl mcp disconnect
Remove an unchanged MCP registration previously managed by bailian-cli. No authentication required.
Usage
bl mcp disconnect --server <code> --agent <agent|all>
| Parameter | Type | Required | Description |
|---|---|---|---|
--server <code> | string | yes | Bailian MCP Server Code used during connect |
--agent <agent> | string | yes | Target Agent: codex, claude-code, cursor, qoder, qoderwork, qwenwork, qwen-code, gemini, opencode, openclaw, deepseek-harness, zcode, workbuddy, pi, or all |
Example: Disconnect TextGenerateImage server from cursor agent
bl mcp disconnect --server TextGenerateImage --agent cursor
- A registration changed after connect is left untouched and reported as a conflict.
Skill management
See the Skill for feature-page usage.
bl skill init
Install all bailian-* skills (one-shot bootstrap for new environments). No authentication required.
Usage
bl skill init
This command only supports global flags.
- Fetches the registry index and installs every skill whose name starts with
bailian-. - Equivalent to:
bl skill add --all(filtered tobailian-*skills).
bl skill add
Install skills from the Bailian skill registry into local agents. Activates required inactive MCP services by default, which may incur charges.
Usage
bl skill add (--all | --name <name,...> | --code <code,...>) [--agent <agent|all>] [--scope user|project] [--skill-version <version>] [--with-mcp <bool>]
| Parameter | Type | Required | Description |
|---|---|---|---|
--all | switch | no | Install all skills from the public OSS registry |
--name <name,...> | string | no | Public OSS registry skill names, separated by commas |
--code <code,...> | string | no | Cloud OpenAPI skill codes returned by bl skill search, separated by commas |
--source <oss|cloud> | string | no | Skill catalog: oss for the public registry or cloud for the workspace OpenAPI |
--agent <agent> | string | no | Target agent ID, or all detected agents |
--scope <user|project> | string | no | Installation scope (default user) |
--skill-version <version> | string | no | Install and pin this exact version |
--with-mcp <bool> | boolean | no | Read serverCode entries from mcp-config.json beside SKILL.md and activate inactive dependencies (default true). Set to false to install only. |
Example: Install all skills from the Bailian skill registry
bl skill add --all
bl skill search
Search cloud skills and show their local installations. Requires API Key authentication.
Usage
bl skill search [--keyword <text>] [--type official|private] [--page <n>] [--page-size <n>] [--limit <n>]
| Parameter | Type | Required | Description |
|---|---|---|---|
--keyword <text> | string | no | Search skill names and descriptions |
--type <type> | string | no | Filter by source: official, private (default: both) |
--page <n> | number | no | Starting page (default 1) |
--page-size <n> | number | no | Results per request (1–100, default 30) |
--limit <n> | number | no | Maximum results across pages (default one page) |
Example: Search official skills
bl skill search --keyword pdf --type official
bl skill list
List registry skills and diff against local installs. Defaults to the cloud catalog.
Usage
bl skill list [--source oss|cloud] [--name <name,...>] [--code <code,...>] [--agent <agent|all>] [--scope user|project] [--status <s,...>]
| Parameter | Type | Required | Description |
|---|---|---|---|
--source <oss|cloud> | string | no | Skill catalog: oss for the public registry or cloud for the workspace OpenAPI (default cloud) |
--name <name,...> | string | no | Public OSS registry skill names, separated by commas |
--code <code,...> | string | no | Cloud OpenAPI skill codes, separated by commas |
--agent <agent> | string | no | Target agent ID, or all detected agents |
--scope <user|project> | string | no | Installation scope (default user) |
--status <s,...> | string | no | Comma-separated installation states to filter by |
Example: Show registry skills and local install differences in JSON output
bl skill list --output json
- STATUS: installed | outdated | not-installed | missing (lock has it, dir deleted) | untracked (dir exists, not managed)
- Existing OSS scripts should use
bl skill list --source oss.
bl skill update
Update installed skills to the latest registry versions. Defaults to the cloud catalog.
Usage
bl skill update [--all] [--name <name,...>] [--code <code,...>] [--agent <agent|all>] [--scope user|project] [--diff]
| Parameter | Type | Required | Description |
|---|---|---|---|
--all | switch | no | Update all installed public OSS skills in the selected scope |
--name <name,...> | string | no | Public OSS registry skill names to update, separated by commas |
--code <code,...> | string | no | Cloud skill codes to update, separated by commas |
--source <oss|cloud> | string | no | Skill catalog: oss for the public registry or cloud for the workspace OpenAPI |
--agent <agent> | string | no | Target agent ID, or all detected agents |
--scope <user|project> | string | no | Installation scope (default user) |
--diff | switch | no | Show changed files, or the required download in a preview |
Example: Update all installed skills to latest registry versions
bl skill update --all
- With no selector, updates installed cloud skills in the selected scope. Existing OSS scripts should use
bl skill update --all.
bl skill remove
Remove locally installed skills (registry is untouched). No authentication required.
Usage
bl skill remove --name <all|name,...>
| Parameter | Type | Required | Description |
|---|---|---|---|
--name <all|name,...> | string | yes | Skills to remove: all or comma-separated skill names |
Example: Remove spark-video skill from local installation
bl skill remove --name spark-video