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.
What this skill does
## 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 `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.
## Cloudflare MCP example
The Cloudflare MCP server can be configured in `mcp.registry.json` like this:
```json
{
"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:
```ts
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:
1. Discover via `list_mcp_capabilities`.
2. Inspect via `describe_mcp` to see available operations.
3. Use those operations via `execute_mcp_code`.
## How to use
1. Call `list_mcp_capabilities` with a natural language query or filters to see which MCPs exist.
2. For a chosen MCP (e.g. `cloudflare`), call `describe_mcp` to understand its operations.
3. Write TypeScript/JavaScript that imports from `mcp-clients/<id>` and calls the exported functions.
4. Run your code with `execute_mcp_code`, optionally restricting `allowedMcpIds` for safety.
## Rules
- Do not assume individual MCP tools are top-level tools.
- Always: discover → describe → generate code → `execute_mcp_code`.
- Request `detail: "schema"` in `describe_mcp` only when exact parameter shapes are required.
## Known Limitations
### Sandbox Security (CRITICAL)
⚠️ **The current sandbox implementation is NOT secure for untrusted code.**
- Uses `vm.createContext()` which is NOT a security boundary
- Can be escaped via prototype pollution, require() manipulation, etc.
- **Only enable for Claude-generated code** (trusted source)
- Requires `MCP_ORCH_ENABLE_SANDBOX=1` environment variable
- See `references/security-model.md` for complete security details
### Other Limitations
- **No TypeScript compilation**: User code in `.ts` format will fail
- **No module resolution**: Imports from `mcp-clients/*` don't resolve; use `$call()` API
- **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 `list_mcp_capabilities` (fully functional)
- Inspection via `describe_mcp` (fully functional)
- 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.
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.