mcp-chaining skill
Research-to-implement pipeline chaining 5 MCP tools with graceful degradation
Is the mcp-chaining skill safe?
Clean: nothing in its files matched our rules. We read 1 file in the folder on 2026-09-28.
No findings.
Install the mcp-chaining skill
A skill is a folder. Copy it into your agent's skills folder and the agent loads it when the task matches its description.
git clone --depth 1 https://github.com/parcadei/Continuous-Claude-v3.git /tmp/Continuous-Claude-v3 mkdir -p ~/.claude/skills cp -r /tmp/Continuous-Claude-v3/.claude/skills/mcp-chaining ~/.claude/skills/mcp-chaining
In the Claude apps, zip the folder and upload it from the Skills settings. The folder on GitHub
The instructions your agent would load
SKILL.md as published, without the frontmatter. Read it on GitHub
MCP Chaining Pipeline
A research-to-implement pipeline that chains 5 MCP tools for end-to-end workflows.
When to Use
- Building multi-tool MCP pipelines
- Understanding how to chain MCP calls with graceful degradation
- Debugging MCP environment variable issues
- Learning the tool naming conventions for different MCP servers
What We Built
A pipeline that chains these tools:
Key Files
- scripts/researchimplementpipeline.py - Main pipeline implementation
- scripts/testresearchpipeline.py - Test harness with isolated sandbox
- workspace/pipeline-test/sample_code.py - Test sample code
Usage Examples
# Dry-run pipeline (preview plan without changes)
uv run python -m runtime.harness scripts/research_implement_pipeline.py \
--topic "async error handling python" \
--target-dir "./workspace/pipeline-test" \
--dry-run --verbose
# Run tests
uv run python -m runtime.harness scripts/test_research_pipeline.py --test all
# View the pipeline script
cat scripts/research_implement_pipeline.pyCritical Fix: Environment Variables
The MCP SDK's getdefaultenvironment() only includes basic vars (PATH, HOME, etc.), NOT os.environ. We fixed src/runtime/mcp_client.py to pass full environment:
# In _connect_stdio method:
full_env = {**os.environ, **(resolved_env or {})}This ensures API keys from ~/.claude/.env reach subprocesses.
Graceful Degradation Pattern
Each tool is optional. If unavailable (disabled, no API key, etc.), the pipeline continues:
async def check_tool_available(tool_id: str) -> bool:
"""Check if an MCP tool is available."""
server_name = tool_id.split("__")[0]
server_config = manager._config.get_server(server_name)
if not server_config or server_config.disabled:
return False
return True
# In step function:
if not await check_tool_available("nia__search"):
return StepResult(status=StepStatus.SKIPPED, message="Nia not available")Tool Name Reference
nia (Documentation Search)
nia__search - Universal documentation search
nia__nia_research - Research with sources
nia__nia_grep - Grep-style doc search
nia__nia_explore - Explore package structureast-grep (Structural Code Search)
ast-grep__find_code - Find code by AST pattern
ast-grep__find_code_by_rule - Find by YAML rule
ast-grep__scan_code - Scan with multiple patternsmorph (Fast Text Search + Edit)
morph__warpgrep_codebase_search - 20x faster grep
morph__edit_file - Smart file editingqlty (Code Quality)
qlty__qlty_check - Run quality checks
qlty__qlty_fmt - Auto-format code
qlty__qlty_metrics - Get code metrics
qlty__smells - Detect code smellsgit (Version Control)
git__git_status - Get repo status
git__git_diff - Show differences
git__git_log - View commit history
git__git_add - Stage filesPipeline Architecture
+----------------+
| CLI Args |
| (topic, dir) |
+-------+--------+
|
+-------v--------+
| PipelineContext|
| (shared state) |
+-------+--------+
|
+-------+-------+-------+-------+-------+
| | | | | |
+---v---+---v---+---v---+---v---+---v---+
| nia |ast-grp| morph | qlty | git |
|search |pattern|search |check |status |
+---+---+---+---+---+---+---+---+---+---+
| | | | |
+-------v-------v-------v-------+
|
+-------v--------+
| StepResult[] |
| (aggregated) |
+----------------+Error Handling
The pipeline captures errors without failing the entire run:
try:
result = await call_mcp_tool("nia__search", {"query": topic})
return StepResult(status=StepStatus.SUCCESS, data=result)
except Exception as e:
ctx.errors.append(f"nia: {e}")
return StepResult(status=StepStatus.FAILED, error=str(e))Creating Your Own Pipeline
- Copy the pattern from scripts/researchimplementpipeline.py
- Define your steps as async functions
- Use checktoolavailable() for graceful degradation
- Chain results through PipelineContext
- Aggregate with print_summary()
More skills from parcadei/Continuous-Claude-v3
- Aagent-context-isolationAgent Context Isolation
- Aagent-orchestrationAgent Orchestration Rules
- Aagentic-workflowAgentic Workflow Pattern
- Aagentica-claude-proxyGuide for integrating Agentica SDK with Claude Code CLI proxy
- Aagentica-infrastructureReference guide for Agentica multi-agent infrastructure APIs
- Aagentica-promptsWrite reliable prompts for Agentica/REPL agents that avoid LLM instruction ambiguity
- Aagentica-sdkBuild Python agents with Agentica SDK - @agentic decorator, spawn(), persistence, MCP integration
- Aagentica-serverAgentica server + Claude proxy setup - architecture, startup sequence, debugging
- Aagentica-spawnSpawn Agentica multi-agent patterns
- Aanalytic-functionsProblem-solving strategies for analytic functions in complex analysis
- Aast-grep-findAST-based code search and refactoring via ast-grep MCP
- Aasync-repl-protocolAsync REPL Protocol