Added Phase 5-7 covering: - Asyncio conflict resolution and server consolidation - Hierarchical agent architecture (39 agents total) - Enhanced tool descriptions for calling LLM clarity - Final production architecture and lessons learned
MCP Agent Selection Service
Intelligent agent selection service for Claude Code. Provides context-aware agent recommendations and automated project bootstrapping with specialist teams.
Installation & Setup
1. Install Dependencies
uv sync
2. Test the Server
# Test agent library functionality
python test_agents.py
# Test production server
uv run server
3. Add to Claude Code for Local Development
Add the MCP server to your Claude Code configuration:
claude mcp add agent-selection -- uv run server
This will automatically configure the server with the correct working directory. You can also manually edit your ~/.claude/settings.json
:
{
"mcpServers": {
"agent-selection": {
"command": "uv",
"args": ["run", "server"],
"cwd": "/home/rpm/claude/mcp-agent-selection"
}
}
}
Available MCP Tools
Core Tools
set_project_roots
- Focus on specific directoriesget_current_roots
- Check current project focusclear_project_roots
- Remove project focusrecommend_agents
- Get intelligent agent recommendationsget_agent_content
- Retrieve full agent templateslist_agents
- Browse agent catalogserver_stats
- Get server statistics
Hierarchy Navigation (NEW)
get_sub_agents
- List specialists for composed agentsget_agent_hierarchy
- Show complete parent-child structureget_parent_agent
- Get parent context for sub-agents
Usage Examples
Basic Recommendations
# Through Claude Code MCP interface
recommend_agents({
"task": "I need help with Python FastAPI development",
"limit": 3
})
Project-Focused Development
# Set project roots for targeted suggestions
set_project_roots({
"directories": ["src/api", "src/backend"],
"base_path": "/path/to/project",
"description": "API development focus"
})
# Get recommendations - now context-aware
recommend_agents({
"task": "optimize database queries",
"project_context": "FastAPI backend"
})
Browse Available Specialists
# List all agents
list_agents()
# Search for specific expertise
list_agents({"search": "testing"})
Features
- 36+ Specialist Agents loaded from templates
- Composed Agent Architecture - hierarchical specialists with flat access
- Intelligent Recommendations with confidence scoring
- Project Roots Support for focused analysis
- Context-Aware Suggestions based on your work
- Hierarchical Navigation - discover related specialists
- Real-time Agent Library with automatic updates
Agent Library
Serves agents from local agent_templates/
directory including:
- 🎭-subagent-expert
- 🔮-python-mcp-expert
- 🚄-fastapi-expert
- 🐳-docker-infrastructure-expert
- 🧪-testing-integration-expert (composed agent with 2 specialists)
- 📖-readme-expert
- And 30+ more specialists...
Perfect for bootstrapping new projects with the right expert team!
Description
Production-ready FastMCP server for intelligent Claude Code agent recommendations with hierarchical architecture and LLM-optimized tools
Languages
Python
100%