secondsky/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.
npx skills add https://github.com/secondsky/claude-skills --skill mcp-dynamic-orchestrator
Use this skill to:
mcp-clients/* modules.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.
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:
list_mcp_capabilities will return cloudflare when queries mention Cloudflare, Workers, KV, R2, Queues, etc.describe_mcp with id: "cloudflare" will surface concise tool summaries from the Cloudflare MCP server.execute_mcp_code lets the agent write TypeScript such as: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:
list_mcp_capabilities.describe_mcp to see available operations.execute_mcp_code.list_mcp_capabilities with a natural language query or filters to see which MCPs exist.cloudflare), call describe_mcp to understand its operations.mcp-clients/<id> and calls the exported functions.execute_mcp_code, optionally restricting allowedMcpIds for safety.execute_mcp_code.detail: "schema" in describe_mcp only when exact parameter shapes are required.⚠️ The current sandbox implementation is NOT secure for untrusted code.
> ⚠️ The vm-based sandbox is NOT a security boundary. Node's vm module can be escaped (see Node docs). This setting reduces accidental damage only. For untrusted MCP entries, run them in a separate process/container with proper OS-level isolation.
vm.createContext() which is NOT a security boundaryMCP_ORCH_ENABLE_SANDBOX=1 environment variablereferences/security-model.md for complete security detailsWhen adding entries to mcp.registry.json, the orchestrator enforces:
npx, npm, pnpm, yarn, bunx, bun, node, deno, uvx, uv, python, python3, cargo, go (bare names resolved via PATH). Absolute/relative paths and shells are rejected. Set MCP_ORCH_ALLOW_RAW_COMMANDS=1 to opt out (loud stderr warning; only for fully-trusted registries).PATH, NODE_OPTIONS, LD_PRELOAD, DYLD_INSERT_LIBRARIES, PYTHONPATH, etc. are stripped from mcp.env before spawn (stderr warning per dropped key)..ts format will failmcp-clients/* don't resolve; use $call() APIFor detailed troubleshooting, see references/troubleshooting.md.
What's Working ✅:
list_mcp_capabilities (fully functional)describe_mcp (fully functional)What's Limited 🟡:
What's Planned 🔮:
For complete roadmap, see plan.md in repository root.
Take secondsky/mcp-dynamic-orchestrator from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.