Ryan Malloy 997cf8dec4 Initial commit: Production-ready FastMCP agent selection server
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.
2025-09-09 09:28:23 -06:00

38 lines
1.1 KiB
Python

#!/usr/bin/env python3
"""
Claude Agent Selection MCP Server - Production Entry Point
Built following FastMCP best practices:
- Single entry point with proper async handling
- Clean server initialization
- Full feature set with hierarchical agent intelligence
"""
from agent_mcp_server.server import mcp, initialize_server
async def initialize_and_run():
"""Initialize services and start server"""
await initialize_server()
# Use run() in synchronous context as per FastMCP best practices
await mcp.run_async(transport="stdio")
def main():
"""
Main entry point following FastMCP best practices.
Initializes then uses mcp.run() in synchronous context.
"""
# Import here to avoid any import-time async issues
import asyncio
# Use the recommended pattern from FastMCP docs
async def init_then_run():
await initialize_server()
# Run initialization
asyncio.run(init_then_run())
# Then run the server synchronously as recommended
mcp.run(transport="stdio")
if __name__ == "__main__":
main()