Claude-skills mcp-dynamic-orchestrator
Dynamic MCP server discovery and code-mode execution via central registry. Use for multiple MCP integrations, tool discovery, progressive disclosure, or encountering MCP context bloat, changing server sets, large tool sets.
install
source · Clone the upstream repo
git clone https://github.com/secondsky/claude-skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/secondsky/claude-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/plugins/mcp-dynamic-orchestrator/skills/mcp-dynamic-orchestrator" ~/.claude/skills/secondsky-claude-skills-mcp-dynamic-orchestrator && rm -rf "$T"
manifest:
plugins/mcp-dynamic-orchestrator/skills/mcp-dynamic-orchestrator/SKILL.mdsource content
Overview
Use this skill to:
- Discover which MCP servers are available and what they are for.
- Inspect a specific MCP's capabilities without loading all tool schemas.
- Execute TypeScript/JavaScript that calls MCP tools via generated
modules.mcp-clients/*
If no MCP servers are configured,
list_mcp_capabilities will respond with an empty list
and a message pointing to skills/mcp-dynamic-orchestrator/mcp.registry.json so the user
can add MCP entries.
This skill reads from
mcp.registry.json, so adding an MCP entry there (for example the
Cloudflare MCP) automatically makes it discoverable without changing tool wiring.
Cloudflare MCP example
The Cloudflare MCP server can be configured in
mcp.registry.json like this:
{ "id": "cloudflare", "title": "Cloudflare platform MCP", "summary": "Interact with Cloudflare's MCP endpoint for documentation, examples, and platform operations exposed via the official Cloudflare MCP server.", "mcp": { "transport": "stdio", "command": "npx", "args": [ "mcp-remote", "https://docs.mcp.cloudflare.com/sse" ] }, "domains": ["cloudflare", "workers", "kv", "r2", "queues", "zero_trust", "networking", "security", "observability"], "tags": ["cloudflare", "platform", "infra", "docs", "workers", "mcp"], "examples": [ "Fetch Cloudflare Workers documentation for a specific API.", "Search Cloudflare platform docs for queues or KV usage patterns.", "Look up configuration guidance for Zero Trust or networking features." ], "sensitivity": "low", "visibility": "default", "priority": 10, "autoDiscoverTools": true }
With this entry present:
will returnlist_mcp_capabilities
when queries mention Cloudflare, Workers, KV, R2, Queues, etc.cloudflare
withdescribe_mcp
will surface concise tool summaries from the Cloudflare MCP server.id: "cloudflare"
lets the agent write TypeScript such as:execute_mcp_code
import * as cloudflare from "mcp-clients/cloudflare"; async function main() { const docs = await cloudflare.search_docs({ query: "Workers KV" }); console.log(docs.summary); }
The actual available functions under
mcp-clients/cloudflare are generated dynamically
from the MCP tool definitions; the agent should always:
- Discover via
.list_mcp_capabilities - Inspect via
to see available operations.describe_mcp - Use those operations via
.execute_mcp_code
How to use
- Call
with a natural language query or filters to see which MCPs exist.list_mcp_capabilities - For a chosen MCP (e.g.
), callcloudflare
to understand its operations.describe_mcp - Write TypeScript/JavaScript that imports from
and calls the exported functions.mcp-clients/<id> - Run your code with
, optionally restrictingexecute_mcp_code
for safety.allowedMcpIds
Rules
- Do not assume individual MCP tools are top-level tools.
- Always: discover → describe → generate code →
.execute_mcp_code - Request
indetail: "schema"
only when exact parameter shapes are required.describe_mcp
Known Limitations
Sandbox Security (CRITICAL)
⚠️ The current sandbox implementation is NOT secure for untrusted code.
- Uses
which is NOT a security boundaryvm.createContext() - Can be escaped via prototype pollution, require() manipulation, etc.
- Only enable for Claude-generated code (trusted source)
- Requires
environment variableMCP_ORCH_ENABLE_SANDBOX=1 - See
for complete security detailsreferences/security-model.md
Other Limitations
- No TypeScript compilation: User code in
format will fail.ts - No module resolution: Imports from
don't resolve; usemcp-clients/*
API$call() - Static registry: Adding/removing MCPs requires restart
- Limited error handling: Generic errors for MCP connection failures
For detailed troubleshooting, see
references/troubleshooting.md.
Production Status
What's Working ✅:
- Discovery via
(fully functional)list_mcp_capabilities - Inspection via
(fully functional)describe_mcp - Registry management (16 MCPs configured)
- MCP clients (stdio + HTTP transports)
- Safety controls (visibility, sensitivity, policies)
What's Limited 🟡:
- Code execution (requires env flag, sandbox not secure)
- Testing (basic smoke tests only)
What's Planned 🔮:
- Secure sandbox with Worker threads (v1.1)
- TypeScript compilation support (v1.1)
- Module resolution (v1.1)
- Dynamic registry updates (v1.2)
For complete roadmap, see
plan.md in repository root.