MCP & Skill

Updated at:

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]
ParameterTypeRequiredDescription
--name <text>stringnoFilter by server name (substring match)
--type <type>stringnoServer type: OFFICIAL | PRIVATE (default: OFFICIAL)
--page <n>numbernoPage number (default: 1)
--page-size <n>numbernoResults 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]
ParameterTypeRequiredDescription
--server <code>stringyesOfficial 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>]
ParameterTypeRequiredDescription
--server <code>stringyesServer code from mcp list (e.g. market-cmapi00073529)
--url <url>stringnoOverride 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>]
ParameterTypeRequiredDescription
--target <server.tool>stringyesServer code and tool name joined by a dot, e.g. market-cmapi00073529.SmartStockSelection
--arg <kv>arraynoTool argument (repeatable). Values parsed as JSON if possible, else string.
--json <obj>stringnoFull arguments object as JSON; merged with --arg (arg wins).
--query <text>stringnoShortcut for --arg query=<text> (mirrors many DashScope MCP tools).
--url <url>stringnoOverride 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]
ParameterTypeRequiredDescription
--server <code>stringyesBailian MCP Server Code, such as TextGenerateImage
--transport <transport>stringyesMCP transport exposed by the server: streamable-http or sse
--agent <agent>stringyesTarget Agent: codex, claude-code, cursor, qoder, qoderwork, qwenwork, qwen-code, gemini, opencode, openclaw, deepseek-harness, zcode, workbuddy, pi, or all
--and-activate [true|false]booleannoActivate 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>
ParameterTypeRequiredDescription
--server <code>stringyesBailian MCP Server Code used during connect
--agent <agent>stringyesTarget 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 to bailian-* 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>]
ParameterTypeRequiredDescription
--allswitchnoInstall all skills from the public OSS registry
--name <name,...>stringnoPublic OSS registry skill names, separated by commas
--code <code,...>stringnoCloud OpenAPI skill codes returned by bl skill search, separated by commas
--source <oss|cloud>stringnoSkill catalog: oss for the public registry or cloud for the workspace OpenAPI
--agent <agent>stringnoTarget agent ID, or all detected agents
--scope <user|project>stringnoInstallation scope (default user)
--skill-version <version>stringnoInstall and pin this exact version
--with-mcp <bool>booleannoRead 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

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>]
ParameterTypeRequiredDescription
--keyword <text>stringnoSearch skill names and descriptions
--type <type>stringnoFilter by source: official, private (default: both)
--page <n>numbernoStarting page (default 1)
--page-size <n>numbernoResults per request (1–100, default 30)
--limit <n>numbernoMaximum 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,...>]
ParameterTypeRequiredDescription
--source <oss|cloud>stringnoSkill catalog: oss for the public registry or cloud for the workspace OpenAPI (default cloud)
--name <name,...>stringnoPublic OSS registry skill names, separated by commas
--code <code,...>stringnoCloud OpenAPI skill codes, separated by commas
--agent <agent>stringnoTarget agent ID, or all detected agents
--scope <user|project>stringnoInstallation scope (default user)
--status <s,...>stringnoComma-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]
ParameterTypeRequiredDescription
--allswitchnoUpdate all installed public OSS skills in the selected scope
--name <name,...>stringnoPublic OSS registry skill names to update, separated by commas
--code <code,...>stringnoCloud skill codes to update, separated by commas
--source <oss|cloud>stringnoSkill catalog: oss for the public registry or cloud for the workspace OpenAPI
--agent <agent>stringnoTarget agent ID, or all detected agents
--scope <user|project>stringnoInstallation scope (default user)
--diffswitchnoShow 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,...>
ParameterTypeRequiredDescription
--name <all|name,...>stringyesSkills to remove: all or comma-separated skill names

Example: Remove spark-video skill from local installation

bl skill remove --name spark-video