Overview
This example showcases how to:- Deploy multiple medical agents as MCP tools via AOP
- Use discovery tools for dynamic agent collaboration
- Execute real tool calls with structured schemas
- Integrate with keyless APIs for enhanced context
Architecture
Medical Agents
- Chief Medical Officer: Coordination, diagnosis, triage
- Virologist: Viral disease analysis and ICD-10 coding
- Internist: Internal medicine evaluation and HCC tagging
- Medical Coder: ICD-10 code assignment and compliance
- Diagnostic Synthesizer: Final report synthesis with confidence levels
Files
Usage
1. Start the AOP Server
2. Configure Cursor MCP Integration
Add to~/.cursor/mcp.json:
3. Use in Cursor
Enable “Medical AOP” in Cursor’s MCP settings, then:Discover agents:
Execute medical coding:
Review infection control:
4. Run Python Client
Features
Structured Schemas
- Custom input/output schemas with validation
- Priority levels (low/normal/high)
- Image processing support
- Confidence scoring
Discovery Tools
Real-world Integration
- Keyless API integration (disease.sh for epidemiology data)
- Structured medical coding workflows
- Executive-level policy recommendations
- Cost estimation and implementation timelines
Response Format
All tools return consistent JSON:Configuration
Server Settings
Agent Metadata
Each agent includes:- Tags for categorization
- Capabilities for matching
- Role classification
- Model configuration
Best Practices
- Use structured inputs: Leverage the custom schemas for better results
- Chain agents: Pass results between agents for comprehensive analysis
- Monitor timeouts: Adjust based on task complexity
- Validate responses: Check the
successfield in all responses - Use discovery: Query available agents before hardcoding tool names