Intelligent Agent Orchestration Using MCP: Building autonomous systems with human oversight

Published by Darshan Joshi in Engineering in AI
Table of contents
The Vision: From Manual to Intelligent Automation
The Orchestration Workflow: A Deep Dive
Key Design Principles
Implementation Considerations
Future Directions
The future: Intelligent AI agents + human wisdom
In enterprise automation, the challenge isn't just about connecting systems—it's about creating intelligent orchestration that can understand intent, make decisions, and execute complex multi-step operations while maintaining human oversight.
The Model Context Protocol (MCP) provides a foundation for this orchestration, enabling agents to interact with diverse applications through a standardized interface.
This article explores how to build an intelligent agent orchestration system using MCP, demonstrating the architecture through a practical example: closing a support ticket in Jira. While we use Jira as our example, the principles and architecture described here are flexible enough to handle any arbitrary user input and execute complex, multi-step operations across various enterprise systems.
The Vision: From Manual to Intelligent Automation
Consider a simple task: "Close ticket CUST-300." When performed manually, a human would:
- Log into Jira
- Navigate to ticket CUST-300
- Review the ticket status
- Use the GUI to update and close it. The GUI offers visual confirmation, indicating whether an operation concluded successfully or encountered an error.
While RPA (Robotic Process Automation) could mimic these GUI interactions, an intelligent agent orchestration using MCP takes a fundamentally different approach. It understands the intent, discovers available tools, creates an execution plan, and interacts directly with Jira's API—all while maintaining the flexibility to handle edge cases and request human input when needed.
Core Architecture Components
The intelligent agent orchestration system consists of following key components:
Agentic Workflow
An agentic workflow constitutes a graph of multiple agents collaborating to achieve a common objective. Upon detecting the necessity of a tool invocation, it engages the tools orchestrator.
Tools Orchestrator
The brain of the system that coordinates all operations, manages state, and ensures proper execution flow. It acts as the conductor, directing when to analyze intent, when to introspect tools, and when to engage human oversight. It is a single agent that orcehstrates interactions with multiple tools.
Access Governance
It's super important to have solid access governance in place when setting up actions that touch enterprise apps. We definitely want to make sure users can't just bypass the existing authentication and authorization rules of the system they're using.
MCP Servers
The connectors to various enterprise applications (Jira, Salesforce, ServiceNow, etc.) that expose their functionality through a standardized protocol, making it possible for the orchestrator to discover and use their capabilities dynamically.
Prompt Library
A curated collection of prompts optimized for different stages of the orchestration process—from intent analysis to parameter extraction to error handling.
LLM Servers
Large Language Models that provide the intelligence layer, enabling natural language understanding, intent analysis, and dynamic decision-making throughout the orchestration process.
HITL (Human In The Loop) GUI
A dynamically generated interface that allows humans to confirm actions, provide missing information, and maintain oversight over critical operations.
Audit and Logging
Maintaining a comprehensive audit trail is crucial for all modifications made to applications via the agentic system. This record must clearly document the end user's real identity, detailing who made which changes and when.
The Orchestration Workflow: A Deep Dive
Let's trace through the complete workflow of closing ticket CUST-300 to understand how these components work together.
Step 1: Intent Analysis
When a user says "Close ticket CUST-300," the orchestrator’s first task is understanding what this means. The LLM analyzes the natural language input to extract:
- Action: Close a ticket
- Target: A specific ticket identified as CUST-300
- System: Likely a ticketing system (to be determined through introspection)
This analysis isn't just pattern matching – LLMs can handle variations like "Mark CUST-300 as resolved" or "We can close the customer issue 300" and still understand the core intent.
Step 2: Tool Introspection and Discovery
With the intent understood, the orchestrator must determine which tools can fulfill this request. In a typical enterprise environment with 20+ integrated applications, multiple systems might have "ticketing" capabilities. The orchestrator:
- Queries available MCP servers to discover their capabilities
- Identifies that Jira is the appropriate system for this ticket
- Identifies that Jira APIs use term “Issue” for ticket and APIs for querying ticket start with “getIssue”. Discovers that Jira's MCP server exposes 27 different functions starting with getIssue(), each with different parameters
- Identifies that Jira APIs use term “transition” to make changes to ticket. There are two APIs for transitions: getTransitions() and doTransition()
This introspection is crucial—it allows the system to adapt to new tools and capabilities without hardcoding specific integrations.
Step 3: Intelligent Planning
The orchestrator now creates an execution plan. For closing a ticket, it determines:
Primary Operation: Use Jira's doTransition() API to close the ticket
Required Parameters:
- issueIdOrKey: CUST-300 (extracted from user input)
- transitionId: Unknown (needs to be obtained)
Parameter Resolution Strategy: The orchestrator realizes it needs the transition ID for "closing" a ticket. It introspects again and discovers it can call getTransitions() with the ticket ID to retrieve available transitions. This demonstrates the orchestrator’s ability to chain operations intelligently.
Step 4: Dynamic Parameter Resolution
The orchestrator executes its parameter resolution strategy:
- Calls getTransitions(issueIdOrKey: "CUST-300")
- Receives a list of available transitions
- Identifies that transition ID "31" corresponds to "Close" or "Resolve"
- Updates its execution plan with the complete parameter set
Step 5: Human In The Loop (HITL) Engagement
Intelligent orchestration, especially when using an MCP, offers a big advantage over traditional automation. This is because it can adapt dynamically to different situations without needing specific programming. For example, in Jira, it can understand various ticket states and available transitions. Similarly, for other applications, it can interpret context, user intent, and available options to pick the best course of action. If a user says something like, "I want to file for vacation for the first week of October," it can figure out the right system to send the request to, the API to use, and select the correct parameters.
Even though the orchestrator can usually determine the system, API, and parameters with high confidence, it might want to confirm them with the user, especially when making any changes.
In some cases, the orchestrator might not be able to figure out the right parameters.
For both these situations, the orchestrator needs to bring up an interactive dialog to either fill in the missing parameter values or confirm the values with the user. It's important that when it does this, the orchestrator uses the same terms the user uses, not the system's jargon. For instance, when closing ticket CUST-300, the confirmation dialog should say, "I'm about to close ticket CUST-300. Is that okay?" and not "I am calling doTransition(‘CUST-300’, ‘31’). Is that okay?”
HITL isn't a simple confirmation dialog—it's an intelligent interface that:
Dynamically Generates UI Elements:
- If a date is needed, it presents a date picker with appropriate constraints
- For selection from options, it provides dropdowns or radio buttons
- For text input, it includes validation and helpful tooltips
Presents Contextual Information:

Handles Multiple Interactions: The HITL can gather multiple missing parameters or confirmations in a single, well-designed interaction rather than a series of disruptive prompts.
Step 6: Execution and Error Handling
With human confirmation, the orchestrator:
- Submits the API call to the MCP server
- Handles any errors gracefully (retry logic, alternative approaches, or escalation to human)
- Validates the operation succeeded
- Returns confirmation to the user
Step 7: Audit Logging and Reversibility
Every operation is logged for audit purposes:

It is important that the orchestrator captures the real identity of the end user and not some system identity. Some systems provide impersonation APIs where the application runs as some super user and has access to privileged operations. When such an API is used, the orchestrator needs to ensure that the actual user identity is used for the API call and it is captured in the audit trail also.
The orchestrator should include an audit review interface. This audit trail could also capture reverse operations, allowing users or administrators to undo actions. Storing this information in the audit trail offers the benefit of not requiring the orchestrator to re-execute the entire logic to determine necessary changes.
Key Design Principles
Dynamic Adaptability
Nothing is hardcoded. The orchestrator discovers capabilities, generates interfaces, and adapts its behavior based on available tools and context.
Access Permissions Are Always Enforced
Underlying applications’ access permissions are always obeyed and cannot be bypassed when accessing through orchestrator.
Intelligent Human In The Loop
The orchestrator determines when human input is needed. Simple read operations might proceed automatically, while data modifications trigger HITL engagement.
Graceful Degradation
When optimal paths aren't available, the orchestrator finds alternatives or clearly communicates limitations to users.
Audit and Compliance
Every action is logged, traceable, and reversible when possible, ensuring compliance with enterprise requirements.
Implementation Considerations
Security and Access Control
- MCP servers should implement proper authentication and authorization
- The orchestration layer must respect and propagate user credentials
- Sensitive operations should require additional confirmation
Performance Optimization
- Use a pushdown mechanism to reduce load on agents and perform operations efficiently.
- Cache introspection results to avoid repeated discovery
- Implement parallel execution for independent operations
- Use connection pooling for MCP server communications
Error Recovery
- Implement exponential backoff for transient failures
- Maintain operation state for recovery from system failures
- Provide clear error messages that guide users toward resolution
Scaling Considerations
- Design for horizontal scaling of the orchestration layer
- Implement request queuing for resource-intensive operations
- Consider rate limiting to protect downstream systems
Future Directions
The intelligent agent orchestration pattern using MCP opens several exciting possibilities:
Autonomous Learning
Learn from successful operations to optimize future executions, reducing the need for human confirmation over time for routine operations.
Predictive Assistance
By analyzing patterns, agents could proactively suggest actions: "Based on ticket history, CUST-301 through CUST-305 are likely ready for closure. Shall I prepare a batch operation?"
Natural Language Programming
Users could define complex workflows in plain language: "Every Friday, close all resolved tickets that haven't been updated in 3 days, but first send a summary to the team lead."
Ema’s Implementation
Core aspects of Ema’s implementation:
- Ema's Generative Workflow Engine (GWE) offers an "Agentic Workflow" that enables the creation of agentic AI employees.
- Ema’s agentic platform includes Tools Orchestrator that works with MCP servers and enterprise applications. Other agentic platform components include:
- Enterprise knowledge and search
- EmaFusion
The future: Intelligent AI agents + human wisdom
Intelligent agent orchestration using MCP represents a paradigm shift in enterprise automation. By combining the flexibility of LLMs with the structure of MCP and the safety of human oversight, we can build systems that are both powerful and trustworthy.
The architecture we've explored—with its emphasis on dynamic discovery, intelligent planning, and human collaboration—provides a blueprint for building the next generation of enterprise automation tools. These aren't just systems that execute predefined scripts; they're intelligent partners that understand intent, adapt to change, and work alongside humans to achieve complex goals.
As organizations continue their digital transformation journeys, the ability to orchestrate intelligent agents across diverse systems will become a critical competitive advantage. The MCP protocol, combined with the architectural patterns discussed here, provides the foundation for making this vision a reality.
The future of enterprise automation isn't about replacing human intelligence—it's about augmenting it with intelligent agents that can handle complexity while maintaining human oversight and control.