Agent Skills › Hmbown/Codewhale › mcp-discovery

mcp-discovery

GitHub

在会话缺失能力且本地工具无法解决时,通过 MCP Registry 搜索、安装并启动外部 stdio 服务器以扩展功能。作为最后手段的 fallback 机制,用于获取数据库、API 或协议客户端等外部服务支持。

crates/tui/assets/skills/mcp-discovery/SKILL.md Hmbown/Codewhale

Trigger Scenarios

本地工具和脚本无法满足任务需求 需要访问当前会话无权限的外部服务或协议

Install

npx skills add Hmbown/Codewhale --skill mcp-discovery -g -y
More Options

Non-standard path

npx skills add https://github.com/Hmbown/Codewhale/tree/main/crates/tui/assets/skills/mcp-discovery -g -y

Use without installing

npx skills use Hmbown/Codewhale@mcp-discovery

指定 Agent (Claude Code)

npx skills add Hmbown/Codewhale --skill mcp-discovery -a claude-code -g -y

安装 repo 全部 skill

npx skills add Hmbown/Codewhale --all -g -y

预览 repo 内 skill

npx skills add Hmbown/Codewhale --list

SKILL.md

Frontmatter
{
    "name": "mcp-discovery",
    "description": "Find and start a zero-environment local MCP server when the session lacks a capability that no available tool, project script, or ordinary local code can cover."
}

mcp-discovery

The public MCP Registry ships hundreds of ready-made stdio servers (filesystems, databases, browsers, media processing, developer utilities, cloud APIs, SaaS integrations, …). This skill is how you reach one when the session is genuinely missing a capability.

It is a fallback, not a first step. Discovery costs a tool_search to load the deferred tools, a query, an approval, and an install — spend that only when it buys a capability you do not have.

When to use

  • An available tool, a project script or test, or a few lines of local code cannot do the job.
  • The task needs an external service, database, or protocol client that this session has no access to.
  • You would otherwise install a package or reimplement a well-known converter or client by hand.

When not to use

  • Ordinary work: writing and editing files, reading fixtures, running repo commands, and checking your own output. Do those directly.
  • A capability an already-loaded tool covers, even partially — try it first.
  • A near-miss row in a result list. A scored match is a suggestion; the missing capability is what decides.

Workflow

  1. Name the gap. State the capability you lack before searching. If you cannot name one, you do not need the Registry.
  2. Load and query. registry_sync and start_registry_mcp_server are deferred: load one with tool_search and use the returned schema. If a call only loads the schema without executing, retry once with that schema. Then call registry_sync {query: "<the missing capability>"}. It scores a host-side snapshot and returns at most eight matches; the full index never enters the conversation. Packages declaring any environment variable (including API keys/tokens) are excluded and never written to the cache.
  3. Judge the matches. Take a server when it covers the gap you named. If nothing does, refine the query once, then continue with local tools.
  4. Install + run transactionally. Call start_registry_mcp_server {registry_name: "<exact name>", arguments: {...}}. Supply only values listed in required_args; omit arguments when none are required. Never install or launch the package through the shell. Starting a server requires approval.
  5. Solve the task with the new tools. Their complete schemas are added to the current turn immediately after a successful connection; call the exact names returned by the start result.

If a server fails to start

start_registry_mcp_server reports when a package exits before the handshake (often CLI help output = incomplete launch args). Verify the exact required arguments, retry once with the corrected structured values, and if it still fails move on to the next candidate or to a local approach. Failed starts are rolled back, so retrying the same Registry name is safe.

Don't

  • Don't attempt to pass env vars or secrets; this flow has no env channel.
  • Don't reconstruct or edit the Registry-provided package command.

Version History

  • 6e005de Current 2026-09-22 09:59

    修复了提供商偏好设置和审批协调的稳定性问题,优化了工具注册表查找为可选回退,并增强了运行时标识和诊断功能。

  • 0fe366b 2026-08-16 09:03

Same Skill Collection

crates/tui/assets/skills/batch/SKILL.md
crates/tui/assets/skills/best-of-n/SKILL.md
crates/tui/assets/skills/contributor-onboarding/SKILL.md
crates/tui/assets/skills/dataviz/SKILL.md
crates/tui/assets/skills/debug/SKILL.md
crates/tui/assets/skills/delegate/SKILL.md
crates/tui/assets/skills/dependency-update/SKILL.md
crates/tui/assets/skills/docx/SKILL.md
crates/tui/assets/skills/feishu/SKILL.md
crates/tui/assets/skills/fleet-manager/SKILL.md
crates/tui/assets/skills/forget/SKILL.md
crates/tui/assets/skills/frontend-design/SKILL.md
crates/tui/assets/skills/gmail/SKILL.md
crates/tui/assets/skills/google-calendar/SKILL.md
crates/tui/assets/skills/handoff/SKILL.md
crates/tui/assets/skills/help/SKILL.md
crates/tui/assets/skills/implement/SKILL.md
crates/tui/assets/skills/interview/SKILL.md
crates/tui/assets/skills/mcp-builder/SKILL.md
crates/tui/assets/skills/pdf/SKILL.md
crates/tui/assets/skills/photos/SKILL.md
crates/tui/assets/skills/plan/SKILL.md
crates/tui/assets/skills/plugin-creator/SKILL.md
crates/tui/assets/skills/pptx/SKILL.md
crates/tui/assets/skills/research/SKILL.md
crates/tui/assets/skills/review/SKILL.md
crates/tui/assets/skills/security-review/SKILL.md
crates/tui/assets/skills/simplify/SKILL.md
crates/tui/assets/skills/skill-creator/SKILL.md
crates/tui/assets/skills/skill-installer/SKILL.md
crates/tui/assets/skills/test/SKILL.md
crates/tui/assets/skills/v4-best-practices/SKILL.md
crates/tui/assets/skills/verify/SKILL.md
crates/tui/assets/skills/webapp-testing/SKILL.md
crates/tui/assets/skills/xlsx/SKILL.md
docs/skills/codew-release-qa-sweep/SKILL.md
docs/skills/contributor-onboarding/SKILL.md
docs/skills/cw-dogfood/SKILL.md
docs/skills/cw-gates/SKILL.md
docs/skills/cw-handoff/SKILL.md
docs/skills/cw-land/SKILL.md
docs/skills/cw-orient/SKILL.md
docs/skills/cw-slice/SKILL.md
docs/skills/gh-assign-issues/SKILL.md
docs/skills/gh-close-issues/SKILL.md
docs/skills/gh-compile-issues/SKILL.md
docs/skills/gh-credit-harvest/SKILL.md
docs/skills/gh-file-issue/SKILL.md
docs/skills/gh-find-prs/SKILL.md

Metadata

Files
0
Version
94130d9
Hash
39adb7d8
Indexed
2026-08-16 09:03

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-29 05:04
浙ICP备14020137号-1