β‘ Lab 3: AgentCore + MCP Server
Pattern: AgentCore Runtime + MCP
Duration: 20 minutes
Objective: Explore AWS Bedrock AgentCore with Coveo Model Context Protocol (MCP) Server for advanced tool orchestration.
Throughput Notice
If Bedrock doesn't respond immediately, wait 30-60 seconds and retry. This is normal during peak workshop usage.
π― Lab GoalsΒΆ
By the end of this lab, you will:
- β Understand AgentCore Runtime and Coveo MCP Server architecture
- β Explore AgentCore Console
- β Test multi-tool orchestration with Coveo MCP Server
- β View CloudWatch Logs for observability
- β Compare MCP with previous integration patterns
- β Identify when to use AgentCore with Coveo MCP
ποΈ Architecture OverviewΒΆ
In this lab, you'll explore the AgentCore with MCP pattern:
React Application] end subgraph "AWS Infrastructure" API[API Gateway] Lambda[AgentCore Runtime
Lambda] end subgraph "AWS Bedrock AgentCore" Runtime[Agent Runtime
Container
Nova Lite Model] Memory[AgentCore Memory
Cross-session Storage] end subgraph "MCP Server" MCP[Coveo MCP Server
Container
3 Tools] T1[search_coveo] T2[passage_retrieval] T3[answer_question] end subgraph "External Services" COVEO[Coveo Platform
Search + Passages + Answer] end UI --> API API --> Lambda Lambda --> Runtime Runtime --> MCP MCP --> T1 MCP --> T2 MCP --> T3 T1 --> COVEO T2 --> COVEO T3 --> COVEO Runtime <--> Memory style UI fill:#e1f5fe style Runtime fill:#f3e5f5 style MCP fill:#fff3e0 style COVEO fill:#e8f5e9
π Pattern 3 Sequence DiagramΒΆ
(search_coveo) MCP->>+Coveo: Search API Coveo-->>-MCP: Search results MCP-->>-Runtime: Tool response Runtime->>+MCP: Call MCP tool 2
(passage_retrieval) MCP->>+Coveo: Passages API Coveo-->>-MCP: Relevant passages MCP-->>-Runtime: Tool response Runtime->>+MCP: Call MCP tool 3
(answer_question) MCP->>+Coveo: Answer API Coveo-->>-MCP: AI answer MCP-->>-Runtime: Tool response Runtime->>Runtime: Synthesize response Runtime->>+Memory: Store conversation Memory-->>-Runtime: Context saved Runtime-->>-UI: Comprehensive response UI-->>-User: Answer + citations Note over User,Memory: Pattern 3: AgentCore + MCP Note over Runtime,MCP: Multi-Tool Orchestration
π Lab ExercisesΒΆ
Exercise 3.1: AgentCore Architecture Overview (5 minutes)ΒΆ
Type: Instructor-led + Hands on
Agentcore architecture with Coveo MCP

Key Concepts
Containerized agent orchestrator
Model Context Protocol server with tools
Search, passages, and answer tools
Cross-session memory support
Why Two Runtimes in AgentCore?
AgentCore uses a separation of concerns architecture with two distinct runtime components:
π― Agent Runtime (Orchestrator)ΒΆ
- Purpose: Decision-making and conversation management
- Contains: Foundation model (Nova Lite), memory system, conversation logic
- Responsibilities:
- Analyze user questions and determine intent
- Decide which tools to call and in what order
- Manage conversation context and memory
- Synthesize responses from multiple tool outputs
- Handle session management and user interactions
π§ Coveo MCP Server RuntimeΒΆ
- Purpose: Tool execution and external service integration
- Contains: Coveo API integrations, tool implementations
- Responsibilities:
- Execute specific Coveo API calls (search, passages, answer)
- Handle API authentication and error handling
- Format and validate tool parameters
- Return structured responses to the Agent Runtime
Benefits of This Architecture:
| Benefit | Description | Example |
|---|---|---|
| π Scalability | Each runtime can scale independently | MCP server handles high API load while agent manages conversations |
| π‘οΈ Security | Isolate sensitive operations | Coveo API keys only in MCP server, not in agent |
| π§ Maintainability | Update tools without affecting agent logic | Add new Coveo features without changing conversation flow |
| π Observability | Separate logging and monitoring | Track tool performance vs. conversation quality separately |
| π Reusability | MCP server can serve multiple agents | Same Coveo tools used by different agent personalities |
Communication Flow:
User Question β Agent Runtime β MCP Server β Coveo APIs
β β β
User Response β Agent Runtime β MCP Server β API Response
The Agent Runtime acts as the "brain" making decisions, while the MCP Server acts as the "hands" executing specific tasks.
What is Model Context Protocol (MCP)?
MCP is a standardized protocol for AI agents to interact with tools and services:
- π Standardized Interface: Common protocol for tool integration
- π§ Tool Discovery: Agents can discover available tools
- π Enhanced Observability: Better logging and tracing
- π Scalability: Easy to add new tools
AgentCore vs Bedrock Agent
| Aspect | Bedrock Agent (Lab 2) | AgentCore (Lab 3) |
|---|---|---|
| Deployment | Managed service | Containerized runtime |
| Protocol | Proprietary | MCP (standardized) |
| Tools | 1 tool (supports multiple) | Multiple tools |
| Orchestration | Agent-driven via action groups | Agent-driven via MCP |
| Observability | Good | Excellent |
| Flexibility | Limited | High |
Exercise 3.2: Explore AgentCore Console (5 minutes)ΒΆ
Type: Hands-on
Step 1: Navigate to Bedrock AgentCore
- Login to AWS Console
- Navigate to Amazon Bedrock AgentCore
- Click "Agent Runtime" in the left navigation
- Click "workshop_CoveoAgent" to view the orchestration runtime details
AWS Console - Bedrock AgentCore Navigation

Key Information:
| Field | Value | Purpose |
|---|---|---|
| Runtime Name | workshop_CoveoAgent | Orchestrator Identifier |
| Type | Orchestration Agent | Protocol type |
| Status | Ready | Ready to use |
| Runtime ID | workshop_CoveoAgent-<....> | Used to Invoke Runtime |
Step 2: Review Coveo MCP Server Runtime
- Go back to the Agent Runtime page and Find
workshop_Coveo_MCPServer_Tools - Click on it to view details
AgentCore Console - Coveo MCP Server Runtime Details

Key Information:
| Field | Value | Purpose |
|---|---|---|
| Runtime Name | workshop_Coveo_MCPServer_Tools | Identifier |
| Type | MCP Server | Protocol type |
| Status | Ready | Ready to use |
| Runtime ID | workshop_Coveo_MCPServer_Tools-<....> | Used to Invoke Runtime |
Step 3: Review Memory Configuration
- Go back to the BedrockAgentCore service page, and Find Memory, click on "Memory"
- Click on the memory workshop_CoveoAgent_Memory-<....> to view details
AgentCore Console - Memory Configuration

- Review the details of the memory configuration
AgentCore Console - Memory Details

Key Information:
- Event Expiration: 7 Days
- Long-term memory strategy Type: Summarization (built-in)
- Namespace: /summaries/{actorId}/{sessionId}
Exercise 3.3: Test in Workshop UI (5 minutes)ΒΆ
Type: Hands-on
Step 1: Switch Backend ModeΒΆ
- Return to Workshop UI
- Click backend selector (top right)
- Select "Coveo MCP Server Agent"
Workshop UI - Coveo MCP Backend Selected

Step 2: Run Sample QueriesΒΆ
Test these queries and observe the responses:
Query 1: Basic Question
Expected: Single Shot Answer response with answer tool selection ( we can verify the tool selection in AWS Cloud watch logs)
Query 2: Multi-part Question
Expected: Agent Orchestrator uses the answer tool, fails to get a single answer and falls back to Passage tool to retrive the relevant passage and sumamrizes and present the answer.Query 3: Procedural Question
Expected: Agent Orchestrator uses the answer tool for this queryExercise 3.4: View CloudWatch Logs (5 minutes)ΒΆ
Type: Hands On
The instructor will demonstrate how to view CloudWatch Logs for observability.
Step 1: Navigate to CloudWatchΒΆ
1. Open CloudWatch in a new tab
2. Click "Logs" β "Log groups"
3. Find log groups: expand the log to look at the Agent runtime tool selection and reasoning and how it responded back
/aws/bedrock/modelinvocations/StackSet-workshop-layer3-ai-services-<some random number>
4. Select the log stream aws/bedrock/modelinvocations: expand the latest log based on the timestamp to view the details of the model invocation
CloudWatch - Log Groups List

Step 2: View Agent Runtime LogsΒΆ
1. Go back to Log groups
2. Click on /aws/bedrock-agentcore/runtimes/workshop_CoveoAgent-<randomnumber>-DEFAULT
3. Click on the latest log stream
4. Observe agent logs:
- Model Used
- MCP Runtime ARN
- Memory usage by the Coveo Agent
- Unique memory_id
CloudWatch - Agent Runtime Logs

π Key ObservationsΒΆ
AgentCore + MCP StrengthsΒΆ
π§ Multi-Tool Orchestration
Agent can use multiple tools in sequence for comprehensive answers
π Enhanced Observability
Detailed logs show tool selection and execution
π Standardized Protocol
MCP provides consistent tool interface
π Scalable Architecture
Easy to add new tools and capabilities
Comparison with Previous LabsΒΆ
| Aspect | Coveo Direct (Lab 1) | Bedrock Agent (Lab 2) | AgentCore MCP (Lab 3) |
|---|---|---|---|
| Tools Available | N/A | 1 tool (in this workshop) | 3 tools |
| Tool Selection | Manual | Automatic | Intelligent |
| Multi-tool Use | No | Yes (capable) | Yes |
| Observability | Basic | Good | Excellent |
| Complexity | Low | Medium | High |
| Flexibility | Limited | Moderate | High |
| Response Quality | Good | Better | Best |
π‘ When to Use AgentCore + MCPΒΆ
Ideal Use CasesΒΆ
π¬ Complex Research
Multi-step research requiring different types of information
Example: "Compare investment options, analyze risks, and recommend a strategy"
πΌ Consultation Services
Expert advice requiring multiple data sources and analysis
Example: Financial planning with tax implications and investment strategies
π Data Analysis
Combining search, retrieval, and analysis tools
Example: Market research with trend analysis and recommendations
π Advanced Education
Teaching complex topics with multiple perspectives
Example: Explaining financial concepts with examples and comparisons
β Validation ChecklistΒΆ
Before proceeding to Lab 4, verify:
- Viewed AgentCore Runtimes in AWS Console
- Reviewed MCP Server Runtime configuration
- Reviewed Agent Runtime configuration
- Tested in Workshop UI with Coveo MCP backend
- Viewed CloudWatch Logs for both runtimes
- Observed tool orchestration in logs
- Understand multi-tool capabilities
- Understand when to use AgentCore + MCP
π Lab 3 Complete!ΒΆ
You've successfully:
- β Explored AgentCore Runtime with Coveo MCP Server architecture
- β Reviewed runtime configurations in AWS Console
- β Viewed CloudWatch Logs for observability
- β Tested multi-tool orchestration
- β Understood when AgentCore + MCP is the optimal choice
Key TakeawaysΒΆ
- AgentCore provides containerized agent runtime with advanced capabilities
- Coveo MCP server can be used in Agentcore to call Coveo APIs as tools
- MCP standardizes tool integration for better interoperability
- Multiple tools enable comprehensive responses through orchestration
- Enhanced observability through detailed CloudWatch Logs
- Scalable architecture makes it easy to add new capabilities
π Next StepsΒΆ
Ready to see all three backends in action with multi-turn conversations?
In Lab 4, you'll test multi-turn conversations and compare all three integration patterns!