Installation¶
This guide explains how to install the MCP Sub-Agents system with the two-tier architecture.
Quick Install (Recommended)¶
Install all agents and workflow commands with a single command:
This will:
- Auto-download the repository to a temporary directory
- Copy agents to
~/.claude/agents/(preserving directory structure) - Copy workflow commands to
~/.claude/commands/ - Clean up temporary files
- Show installation summary
No Repository Clone Required
The installation script handles everything automatically. You don't need to clone the repository manually.
Installation Methods¶
Method 1: Remote Install (No Clone)¶
The recommended one-line installation:
Requirements:
- Git installed on your system
- Internet connection
- Bash shell
Method 2: Manual Installation (Global)¶
For more control over the installation process:
# Clone repository
git clone https://github.com/rcdelacruz/mcp-sub-agents.git
cd mcp-sub-agents
# Copy agents (preserves subdirectories)
mkdir -p ~/.claude/agents
cp -r agents/* ~/.claude/agents/
# Copy workflow commands
mkdir -p ~/.claude/commands
cp -r .claude/commands/* ~/.claude/commands/
# Verify installation
ls -R ~/.claude/agents/
ls ~/.claude/commands/
Method 3: Project-Specific Installation¶
Install agents for a specific project only:
# In your project directory
git clone https://github.com/rcdelacruz/mcp-sub-agents.git
cd mcp-sub-agents
# Copy to project's .claude directory
mkdir -p .claude/agents .claude/commands
cp -r agents/* .claude/agents/
cp -r .claude/commands/* .claude/commands/
# Verify
ls -R .claude/agents/
ls .claude/commands/
Method 4: Symlink (Development)¶
For development or to auto-sync with updates:
# Clone repository
git clone https://github.com/rcdelacruz/mcp-sub-agents.git
cd mcp-sub-agents
# Create symlinks (changes sync automatically)
mkdir -p ~/.claude
ln -s "$(pwd)/agents" ~/.claude/agents
ln -s "$(pwd)/.claude/commands" ~/.claude/commands
# Verify
ls -la ~/.claude/
Directory Structure¶
After installation, your directory structure should look like this:
~/.claude/
├── agents/
│ ├── savants/
│ │ ├── savant-fullstack-js.md
│ │ └── savant-java-spring.md
│ ├── javascript/
│ │ ├── fullstack-nextjs.md
│ │ ├── frontend-ui.md
│ │ └── backend-api.md
│ └── cross-cutting/
│ ├── architect.md
│ ├── code-reviewer.md
│ ├── database.md
│ ├── deployment.md
│ ├── monitoring.md
│ ├── performance.md
│ ├── qa-tester.md
│ ├── security.md
│ └── tech-writer.md
└── commands/
├── mcp-design-architecture.md
├── mcp-design-nextjs.md
├── mcp-implement-fullstack.md
├── mcp-implement-frontend.md
├── mcp-implement-backend.md
├── mcp-review-code.md
├── mcp-review-security.md
├── mcp-review-performance.md
├── mcp-qa-e2e.md
├── mcp-write-docs.md
└── mcp-deploy.md
Understanding Agent Discovery¶
How Agent Discovery Works
Claude Code finds agents by the name: field in their frontmatter, not by file path. It recursively searches all subdirectories in ~/.claude/agents/.
Agent frontmatter example:
The agent can be located anywhere:
agents/fullstack-js-savant.md- Worksagents/savants/savant-fullstack-js.md- Worksagents/any/nested/path/agent.md- Works
What matters is the name field in the frontmatter.
Verification¶
Run Verification Script¶
After installation, verify that all agents and commands are properly installed:
Expected output:
🔍 Verifying Agent Installation...
✅ agents/ directory exists
📊 Total agents found: 14
📋 Agent Names (from frontmatter):
✓ fullstack-js-savant
✓ java-spring-savant
✓ fullstack-nextjs
✓ frontend-ui
✓ backend-api
✓ code-reviewer
✓ qa-tester
✓ architect
✓ performance
✓ security
✓ deployment
✓ monitoring
✓ database
✓ tech-writer
✅ Found 11 workflow commands
✓ /mcp-design-architecture
✓ /mcp-design-nextjs
✓ /mcp-implement-fullstack
✓ /mcp-implement-frontend
✓ /mcp-implement-backend
✓ /mcp-review-code
✓ /mcp-review-security
✓ /mcp-review-performance
✓ /mcp-qa-e2e
✓ /mcp-write-docs
✓ /mcp-deploy
✅ Verification complete!
Manual Verification¶
Check installation manually:
# Check agents are installed
ls -R ~/.claude/agents/
# Check commands are installed
ls ~/.claude/commands/
# Count agents (should show 14)
find ~/.claude/agents -name "*.md" | wc -l
# Count commands (should show 11)
find ~/.claude/commands -name "*.md" | wc -l
Test in Claude Code¶
Test that agents and commands are accessible:
# Test agent invocation
Use fullstack-js-savant to explain the two-tier architecture
# Test workflow command
/mcp-design-nextjs
Troubleshooting¶
Agents Not Found¶
Problem: Claude Code says "Agent not found"
Solutions:
-
Check installation location:
Should show agents in subdirectories. -
Verify agent names in frontmatter:
Agent names must match what commands reference. -
Check frontmatter format:
-
Reinstall:
Commands Not Working¶
Problem: /command-name doesn't work
Solutions:
-
Check commands directory:
-
Verify command files have
.mdextension: -
Check frontmatter format:
-
Restart Claude Code (commands are loaded at startup)
Permission Issues¶
Problem: Permission denied during installation
Solutions:
# Fix permissions for Claude directory
chmod -R 755 ~/.claude/
# If using symlinks, verify source directory permissions
chmod -R 755 /path/to/mcp-sub-agents/
Subdirectory Issues¶
Problem: Agents in subdirectories not working
Solution: Claude Code DOES support subdirectories. If having issues:
-
Check file permissions:
-
Verify no broken symlinks:
-
Alternative - flatten structure (if needed):
Updating Agents¶
Update Global Installation¶
cd mcp-sub-agents
git pull origin main
cp -r agents/* ~/.claude/agents/
cp -r .claude/commands/* ~/.claude/commands/
Update with Symlinks¶
Create Update Alias¶
Add to your shell profile (~/.bashrc or ~/.zshrc):
alias update-agents='cd ~/mcp-sub-agents && git pull && cp -r agents/* ~/.claude/agents/ && cp -r .claude/commands/* ~/.claude/commands/'
Then just run:
Uninstallation¶
Remove Global Installation¶
Remove Project-Specific Installation¶
Remove Symlinks¶
Platform-Specific Notes¶
macOS¶
Default location works out of the box:
Linux¶
Same as macOS:
Windows¶
Use PowerShell:
# Installation location
$env:USERPROFILE\.claude\
# Copy agents
Copy-Item -Recurse agents\* $env:USERPROFILE\.claude\agents\
# Copy commands
Copy-Item -Recurse .claude\commands\* $env:USERPROFILE\.claude\commands\
Best Practices¶
Global vs Project-Specific¶
Use Global Installation When:
- You want agents available across all projects
- You're the only developer
- You want consistent agent versions
Use Project-Specific Installation When:
- Team needs same agent versions
- Project has custom agents
- Different projects need different agents
- Version control for agents is needed
Keeping Agents Updated¶
Regularly update to get the latest improvements:
# Weekly update
cd ~/mcp-sub-agents
git pull
cp -r agents/* ~/.claude/agents/
cp -r .claude/commands/* ~/.claude/commands/
Next Steps¶
After installation:
- Quick Start Guide - Learn basic usage
- Architecture Overview - Understand the system
- Workflow Commands - Learn guided workflows
- Best Practices - Effective usage patterns
Support¶
If you encounter issues:
- Run verification script:
./verify-agents.sh - Check FAQ for common questions
- Review troubleshooting section
- Open an issue: GitHub Issues