Skip to main content
A real-world demonstration of the Agent Orchestration Protocol (AOP) using medical agents deployed as MCP tools.

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

  1. Use structured inputs: Leverage the custom schemas for better results
  2. Chain agents: Pass results between agents for comprehensive analysis
  3. Monitor timeouts: Adjust based on task complexity
  4. Validate responses: Check the success field in all responses
  5. Use discovery: Query available agents before hardcoding tool names

Troubleshooting

References