Features: - FastMCP-based MCP server for Claude Code agent recommendations - Hierarchical agent architecture with 39 specialized agents - 10 MCP tools with enhanced LLM-friendly descriptions - Composed agent support with parent-child relationships - Project root configuration for focused recommendations - Smart agent recommendation engine with confidence scoring Server includes: - Core recommendation tools (recommend_agents, get_agent_content) - Project management tools (set/get/clear project roots) - Discovery tools (list_agents, server_stats) - Hierarchy navigation (get_sub_agents, get_parent_agent, get_agent_hierarchy) All tools properly annotated for calling LLM clarity with detailed arguments, return values, and usage examples.
117 lines
2.9 KiB
Markdown
117 lines
2.9 KiB
Markdown
# 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
|
|
```bash
|
|
uv sync
|
|
```
|
|
|
|
### 2. Test the Server
|
|
```bash
|
|
# 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:
|
|
|
|
```bash
|
|
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`:
|
|
|
|
```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 directories
|
|
- `get_current_roots` - Check current project focus
|
|
- `clear_project_roots` - Remove project focus
|
|
- `recommend_agents` - Get intelligent agent recommendations
|
|
- `get_agent_content` - Retrieve full agent templates
|
|
- `list_agents` - Browse agent catalog
|
|
- `server_stats` - Get server statistics
|
|
|
|
### Hierarchy Navigation (NEW)
|
|
- `get_sub_agents` - List specialists for composed agents
|
|
- `get_agent_hierarchy` - Show complete parent-child structure
|
|
- `get_parent_agent` - Get parent context for sub-agents
|
|
|
|
## Usage Examples
|
|
|
|
### Basic Recommendations
|
|
```bash
|
|
# Through Claude Code MCP interface
|
|
recommend_agents({
|
|
"task": "I need help with Python FastAPI development",
|
|
"limit": 3
|
|
})
|
|
```
|
|
|
|
### Project-Focused Development
|
|
```bash
|
|
# 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
|
|
```bash
|
|
# 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! |