# MCP and Agentic AI Day 2 Lab

> In this lab, Zach dives into middleware and MCP servers, focusing on logging and adding new features. He introduces new middleware files for tracing, PII detection, and cost analytics, emphasizing the importance of creating an audit trail for their runs. He explores how to generate unique run IDs a…

- Web page: https://www.dataexpert.io/lesson/mcp-and-agentic-ai-day2lab-oct2025-p737-l1609
- Program: [AIExpert](https://www.dataexpert.io/program/ai-expert)
- Module: Week 3: Agentic AI, MCP & Automation
- Access: Requires enrollment in AIExpert
- Length: 56 min video
- Academy: DataExpert.io Academy

## About this lesson

In this lab, Zach dives into middleware and MCP servers, focusing on logging and adding new features. He introduces new middleware files for tracing, PII detection, and cost analytics, emphasizing the importance of creating an audit trail for their runs. He explores how to generate unique run IDs and improves their tracing middleware to better log tool calls and errors. He demonstrates how to implement a new function for querying RAG content, which successfully retrieves resumes from their system.

## Navigation

- Previous lesson: [MCP and Agentic AI Day 2 Lecture](https://www.dataexpert.io/lesson/mcp-and-agentic-ai-day2-lecture-oct2025-p737-l1608.md)
- Next lesson: [OpenClaw and Automating business processes Day1 Lecture](https://www.dataexpert.io/lesson/openclawandautomatingbusinessprocessesday1lecture-mar26-p737-l2145.md)
