mcp-discovery
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.
- License 许可
- MIT
- 最近更新
- 2026-11-12
- Stars
- ★ 4.1w
- Forks
- 3.6k
01 前言 Front Matter
- 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.
02 资源文件 2
- 参考文档references/deep-module-design.md5.6 KB
- 参考文档SKILL.generation-10.md3.2 KB
03 SKILL.md 正文
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
- Name the gap. State the capability you lack before searching. If you cannot name one, you do not need the Registry.
- Load and query.
registry_syncandstart_registry_mcp_serverare deferred: load one withtool_searchand use the returned schema. If a call only loads the schema without executing, retry once with that schema. Then callregistry_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. - 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.
- Install + run transactionally. Call
start_registry_mcp_server {registry_name: "<exact name>", arguments: {...}}. Supply only values listed inrequired_args; omitargumentswhen none are required. Never install or launch the package through the shell. Starting a server requires approval. - 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.
04 同仓库更多 Skills
gh-find-prs
Survey the open Codewhale PR and issue queue read-only: fetch each item, check it against current code, and produce one coverage and disposition matrix with cited evidence and credit owed.
gh-file-issue
Use when filing a new Codewhale GitHub issue: turn a bug or idea into a well-formed, actionable issue with repro, acceptance criteria, labels, and milestone.
gh-close-issues
Close resolved Codewhale issues only after verifying the landed behavior: Refs #N per landing, Fixes #N only when the reporter's scenario was reproduced, closure at the release step or on the reporter's confirmation, always with a crediting comment.
gh-assign-issues
Use to assign GitHub issues to a milestone and/or owners in bulk, verifying each.
feedback
暂无简介
cw-slice
Use before writing code for any Codewhale feature, upgrade, or refactor: find the existing owner of the behavior, bound the change to one reviewable slice, and fix the evidence bar before you start.