By the end of this module, you will be able to:
In Module 1, we mastered AI Toolkit basics and created our first Python Agent.
Now we'll supercharge your agents by connecting them to external tools and services through the revolutionary Model Context Protocol (MCP).
Think of this as upgrading from a basic calculator to a full computer - your AI agents will gain the ability to:
Model Context Protocol (MCP) is the "USB-C for AI applications" - a revolutionary open standard that connects Large Language Models (LLMs) to external tools, data sources, and services.
Just as USB-C eliminated cable chaos by providing one universal connector, MCP eliminates AI integration complexity with one standardized protocol.
Before MCP:
With MCP:
MCP follows a client-server architecture that creates a secure, scalable ecosystem:
graph TB
A[AI Application/Agent] --> B[MCP Client]
B --> C[MCP Server 1: Files]
B --> D[MCP Server 2: Web APIs]
B --> E[MCP Server 3: Database]
B --> F[MCP Server N: Custom Tools]
C --> G[Local File System]
D --> H[External APIs]
E --> I[Database Systems]
F --> J[Enterprise Systems]
๐ง Core Components:
| Component | Role | Examples |
|-----------|------|----------|
| MCP Hosts | Applications that consume MCP services | Claude Desktop, VS Code, AI Toolkit |
| MCP Clients | Protocol handlers (1:1 with servers) | Built into host applications |
| MCP Servers | Expose capabilities via standard protocol | Playwright, Files, Azure, GitHub |
| Transport Layer | Communication methods | stdio, HTTP, WebSockets |
Microsoft leads the MCP ecosystem with a comprehensive suite of enterprise-grade servers that address real-world business needs.
๐ Repository: azure/azure-mcp
๐ฏ Purpose: Comprehensive Azure resource management with AI integration
โจ Key Features:
๐ Use Cases:
๐ Documentation: Microsoft Dataverse Integration
๐ฏ Purpose: Natural language interface for business data
โจ Key Features:
๐ Use Cases:
๐ Repository: microsoft/playwright-mcp
๐ฏ Purpose: Browser automation and web interaction capabilities
โจ Key Features:
๐ Use Cases:
๐ Repository: microsoft/files-mcp-server
๐ฏ Purpose: Intelligent file system operations
โจ Key Features:
๐ Use Cases:
๐ Repository: microsoft/markitdown
๐ฏ Purpose: Advanced Markdown processing and manipulation
โจ Key Features:
๐ Use Cases:
๐ฆ Package: @microsoft/clarity-mcp-server
๐ฏ Purpose: Web analytics and user behavior insights
โจ Key Features:
๐ Use Cases:
Beyond Microsoft's servers, the MCP ecosystem includes:
๐ฏ Project Goal: Create an intelligent browser automation agent using Playwright MCP server that can navigate websites, extract information, and perform complex web interactions.
1. Open AI Toolkit Agent Builder
2. Create New Agent with the following configuration:
- Name: BrowserAgent
- Model: Choose GPT-4o
1. Navigate to Tools Section in Agent Builder
2. Click "Add Tool" to open the integration menu
3. Select "MCP Server" from available options
๐ Understanding Tool Types:
1. Choose "MCP Server" option to proceed
2. Browse MCP Catalog to explore available integrations
1. Click "Use Featured MCP Servers" to access Microsoft's verified servers
2. Select "Playwright" from the featured list
3. Accept Default MCP ID or customize for your environment
๐ Critical Step: Select ALL available Playwright methods for maximum functionality
๐ ๏ธ Essential Playwright Tools:
goto, goBack, goForward, reloadclick, fill, press, hover, dragtextContent, innerHTML, getAttributeisVisible, isEnabled, waitForSelectorscreenshot, pdf, videosetExtraHTTPHeaders, route, waitForResponseโ Success Indicators:
๐ง Troubleshooting Common Issues:
Create sophisticated prompts that leverage Playwright's full capabilities:
# Web Automation Expert System Prompt
## Core Identity
You are an advanced web automation specialist with deep expertise in browser automation, web scraping, and user experience analysis. You have access to Playwright tools for comprehensive browser control.
## Capabilities & Approach
### Navigation Strategy
- Always start with screenshots to understand page layout
- Use semantic selectors (text content, labels) when possible
- Implement wait strategies for dynamic content
- Handle single-page applications (SPAs) effectively
### Error Handling
- Retry failed operations with exponential backoff
- Provide clear error descriptions and solutions
- Suggest alternative approaches when primary methods fail
- Always capture diagnostic screenshots on errors
### Data Extraction
- Extract structured data in JSON format when possible
- Provide confidence scores for extracted information
- Validate data completeness and accuracy
- Handle pagination and infinite scroll scenarios
### Reporting
- Include step-by-step execution logs
- Provide before/after screenshots for verification
- Suggest optimizations and alternative approaches
- Document any limitations or edge cases encountered
## Ethical Guidelines
- Respect robots.txt and rate limiting
- Avoid overloading target servers
- Only extract publicly available information
- Follow website terms of service
Design prompts that demonstrate various capabilities:
๐ Web Analysis Example:
Navigate to github.com/kinfey and provide a comprehensive analysis including:
1. Repository structure and organization
2. Recent activity and contribution patterns
3. Documentation quality assessment
4. Technology stack identification
5. Community engagement metrics
6. Notable projects and their purposes
Include screenshots at key steps and provide actionable insights.
1. Click "Run" to launch the automation sequence
2. Monitor Real-time Execution:
- Chrome browser launches automatically
- Agent navigates to target website
- Screenshots capture each major step
- Analysis results stream in real-time
Review comprehensive analysis in Agent Builder's interface:
Agent Builder supports multiple deployment options:
โ Skills Mastered:
๐ Congratulations! You've successfully mastered MCP integration and can now build production-ready AI agents with external tool capabilities!
Ready to take your MCP skills to the next level? Proceed to Module 3: Advanced MCP Development with AI Toolkit where you'll learn how to:
์ด ๋ชจ๋์ ๋ง์น๋ฉด ๋ค์์ ํ ์ ์์ต๋๋ค:
๋ชจ๋ 1์์๋ AI Toolkit ๊ธฐ๋ณธ๊ธฐ๋ฅผ ์ตํ๊ณ ์ฒซ Python ์์ด์ ํธ๋ฅผ ๋ง๋ค์์ต๋๋ค. ์ด์ ํ์ ์ ์ธ Model Context Protocol (MCP)์ ํตํด ์ธ๋ถ ๋๊ตฌ์ ์๋น์ค์ ์ฐ๊ฒฐํ์ฌ ์์ด์ ํธ๋ฅผ ๊ฐ๋ ฅํ๊ฒ ์ ๊ทธ๋ ์ด๋ํ ์ฐจ๋ก์ ๋๋ค.
๊ธฐ๋ณธ ๊ณ์ฐ๊ธฐ์์ ์์ ํ ์ปดํจํฐ๋ก ์ ๊ทธ๋ ์ด๋ํ๋ ๊ฒ๊ณผ ๊ฐ๋ค๊ณ ์๊ฐํ์ธ์ โ AI ์์ด์ ํธ๊ฐ ๋ค์๊ณผ ๊ฐ์ ๋ฅ๋ ฅ์ ๊ฐ์ถ๊ฒ ๋ฉ๋๋ค:
Model Context Protocol (MCP)์ AI ์ ํ๋ฆฌ์ผ์ด์ ์ ์ํ "USB-C"์ ๊ฐ์ ํ์ ์ ์ธ ์คํ ํ์ค์ ๋๋ค. ๋ํ ์ธ์ด ๋ชจ๋ธ(LLM)์ ์ธ๋ถ ๋๊ตฌ, ๋ฐ์ดํฐ ์์ค, ์๋น์ค์ ์ฐ๊ฒฐํด ์ค๋๋ค. USB-C๊ฐ ๋ณต์กํ ์ผ์ด๋ธ ๋ฌธ์ ๋ฅผ ํ๋์ ํ์ค ์ปค๋ฅํฐ๋ก ํด๊ฒฐํ๋ฏ, MCP๋ AI ํตํฉ์ ๋ณต์กํจ์ ํ๋์ ํ์ค ํ๋กํ ์ฝ๋ก ๊ฐ์ํํฉ๋๋ค.
MCP ์ด์ :
MCP ๋์ ํ:
MCP๋ ํด๋ผ์ด์ธํธ-์๋ฒ ์ํคํ ์ฒ๋ฅผ ๋ฐ๋ฅด๋ฉฐ, ์์ ํ๊ณ ํ์ฅ ๊ฐ๋ฅํ ์ํ๊ณ๋ฅผ ๋ง๋ญ๋๋ค:
graph TB
A[AI Application/Agent] --> B[MCP Client]
B --> C[MCP Server 1: Files]
B --> D[MCP Server 2: Web APIs]
B --> E[MCP Server 3: Database]
B --> F[MCP Server N: Custom Tools]
C --> G[Local File System]
D --> H[External APIs]
E --> I[Database Systems]
F --> J[Enterprise Systems]
๐ง ํต์ฌ ๊ตฌ์ฑ ์์:
| ๊ตฌ์ฑ ์์ | ์ญํ | ์์ |
|-----------|------|----------|
| MCP Hosts | MCP ์๋น์ค๋ฅผ ์ฌ์ฉํ๋ ์ ํ๋ฆฌ์ผ์ด์ | Claude Desktop, VS Code, AI Toolkit |
| MCP Clients | ํ๋กํ ์ฝ ํธ๋ค๋ฌ (์๋ฒ์ 1:1 ๋งค์นญ) | ํธ์คํธ ์ ํ๋ฆฌ์ผ์ด์ ๋ด์ฅ |
| MCP Servers | ํ์ค ํ๋กํ ์ฝ๋ก ๊ธฐ๋ฅ ์ ๊ณต | Playwright, Files, Azure, GitHub |
| ์ ์ก ๊ณ์ธต | ํต์ ๋ฐฉ์ | stdio, HTTP, WebSockets |
Microsoft๋ ์ค์ ๋น์ฆ๋์ค ์๊ตฌ๋ฅผ ์ถฉ์กฑํ๋ ์ํฐํ๋ผ์ด์ฆ๊ธ ์๋ฒ ์ ํ๊ตฐ์ผ๋ก MCP ์ํ๊ณ๋ฅผ ์ ๋ํ๊ณ ์์ต๋๋ค.
๐ ์ ์ฅ์: azure/azure-mcp
๐ฏ ๋ชฉ์ : AI ํตํฉ์ ํตํ ์ข ํฉ Azure ๋ฆฌ์์ค ๊ด๋ฆฌ
โจ ์ฃผ์ ๊ธฐ๋ฅ:
๐ ํ์ฉ ์ฌ๋ก:
๐ ๋ฌธ์: Microsoft Dataverse Integration
๐ฏ ๋ชฉ์ : ๋น์ฆ๋์ค ๋ฐ์ดํฐ๋ฅผ ์ํ ์์ฐ์ด ์ธํฐํ์ด์ค
โจ ์ฃผ์ ๊ธฐ๋ฅ:
๐ ํ์ฉ ์ฌ๋ก:
๐ ์ ์ฅ์: microsoft/playwright-mcp
๐ฏ ๋ชฉ์ : ๋ธ๋ผ์ฐ์ ์๋ํ ๋ฐ ์น ์ํธ์์ฉ ๊ธฐ๋ฅ ์ ๊ณต
โจ ์ฃผ์ ๊ธฐ๋ฅ:
๐ ํ์ฉ ์ฌ๋ก:
๐ ์ ์ฅ์: microsoft/files-mcp-server
๐ฏ ๋ชฉ์ : ์ง๋ฅํ ํ์ผ ์์คํ ์์
โจ ์ฃผ์ ๊ธฐ๋ฅ:
๐ ํ์ฉ ์ฌ๋ก:
๐ ์ ์ฅ์: microsoft/markitdown
๐ฏ ๋ชฉ์ : ๊ณ ๊ธ Markdown ์ฒ๋ฆฌ ๋ฐ ์กฐ์
โจ ์ฃผ์ ๊ธฐ๋ฅ:
๐ ํ์ฉ ์ฌ๋ก:
๐ฆ ํจํค์ง: @microsoft/clarity-mcp-server
๐ฏ ๋ชฉ์ : ์น ๋ถ์ ๋ฐ ์ฌ์ฉ์ ํ๋ ์ธ์ฌ์ดํธ ์ ๊ณต
โจ ์ฃผ์ ๊ธฐ๋ฅ:
๐ ํ์ฉ ์ฌ๋ก:
Microsoft ์๋ฒ ์ธ์๋ MCP ์ํ๊ณ์๋ ๋ค์์ด ํฌํจ๋ฉ๋๋ค:
๐ฏ ํ๋ก์ ํธ ๋ชฉํ: Playwright MCP ์๋ฒ๋ฅผ ์ฌ์ฉํด ์น์ฌ์ดํธ๋ฅผ ํ์ํ๊ณ ์ ๋ณด๋ฅผ ์ถ์ถํ๋ฉฐ ๋ณต์กํ ์น ์ํธ์์ฉ์ ์ํํ๋ ์ง๋ฅํ ๋ธ๋ผ์ฐ์ ์๋ํ ์์ด์ ํธ๋ฅผ ๋ง๋ญ๋๋ค.
1. AI Toolkit Agent Builder ์ด๊ธฐ
2. ์ ์์ด์ ํธ ์์ฑ ๋ฐ ๋ค์ ์ค์ ์ ์ฉ:
- ์ด๋ฆ: BrowserAgent
- ๋ชจ๋ธ: GPT-4o ์ ํ
1. Agent Builder์์ ๋๊ตฌ ์น์ ์ผ๋ก ์ด๋
2. "๋๊ตฌ ์ถ๊ฐ" ํด๋ฆญํ์ฌ ํตํฉ ๋ฉ๋ด ์ด๊ธฐ
3. "MCP ์๋ฒ" ์ ํ
๐ ๋๊ตฌ ์ ํ ์ดํดํ๊ธฐ:
1. "MCP ์๋ฒ" ์ต์ ์ ํํ์ฌ ์งํ
2. MCP ์นดํ๋ก๊ทธ ํ์ํ์ฌ ์ฌ์ฉ ๊ฐ๋ฅํ ํตํฉ ํ์ธ
1. "์ถ์ฒ MCP ์๋ฒ ์ฌ์ฉ" ํด๋ฆญํ์ฌ Microsoft ๊ฒ์ฆ ์๋ฒ ์ ๊ทผ
2. ์ถ์ฒ ๋ชฉ๋ก์์ "Playwright" ์ ํ
3. ๊ธฐ๋ณธ MCP ID ์๋ฝ ๋๋ ํ๊ฒฝ์ ๋ง๊ฒ ์์
๐ ์ค์ ๋จ๊ณ: ์ต๋ ๊ธฐ๋ฅ์ ์ํด Playwright์ ๋ชจ๋ ๋ฉ์๋ ์ ํ
๐ ๏ธ ํ์ Playwright ๋๊ตฌ:
goto, goBack, goForward, reloadclick, fill, press, hover, dragtextContent, innerHTML, getAttributeisVisible, isEnabled, waitForSelectorscreenshot, pdf, videosetExtraHTTPHeaders, route, waitForResponseโ ์ฑ๊ณต ์งํ:
๐ง ์ผ๋ฐ ๋ฌธ์ ํด๊ฒฐ:
Playwright์ ๋ชจ๋ ๊ธฐ๋ฅ์ ํ์ฉํ๋ ์ ๊ตํ ํ๋กฌํํธ ์์ฑ:
# Web Automation Expert System Prompt
## Core Identity
You are an advanced web automation specialist with deep expertise in browser automation, web scraping, and user experience analysis. You have access to Playwright tools for comprehensive browser control.
## Capabilities & Approach
### Navigation Strategy
- Always start with screenshots to understand page layout
- Use semantic selectors (text content, labels) when possible
- Implement wait strategies for dynamic content
- Handle single-page applications (SPAs) effectively
### Error Handling
- Retry failed operations with exponential backoff
- Provide clear error descriptions and solutions
- Suggest alternative approaches when primary methods fail
- Always capture diagnostic screenshots on errors
### Data Extraction
- Extract structured data in JSON format when possible
- Provide confidence scores for extracted information
- Validate data completeness and accuracy
- Handle pagination and infinite scroll scenarios
### Reporting
- Include step-by-step execution logs
- Provide before/after screenshots for verification
- Suggest optimizations and alternative approaches
- Document any limitations or edge cases encountered
## Ethical Guidelines
- Respect robots.txt and rate limiting
- Avoid overloading target servers
- Only extract publicly available information
- Follow website terms of service
๋ค์ํ ๊ธฐ๋ฅ์ ๋ณด์ฌ์ฃผ๋ ํ๋กฌํํธ ์ค๊ณ:
๐ ์น ๋ถ์ ์์:
Navigate to github.com/kinfey and provide a comprehensive analysis including:
1. Repository structure and organization
2. Recent activity and contribution patterns
3. Documentation quality assessment
4. Technology stack identification
5. Community engagement metrics
6. Notable projects and their purposes
Include screenshots at key steps and provide actionable insights.
1. "์คํ" ํด๋ฆญํ์ฌ ์๋ํ ์ํ์ค ์์
2. ์ค์๊ฐ ์คํ ๋ชจ๋ํฐ๋ง:
- Chrome ๋ธ๋ผ์ฐ์ ์๋ ์คํ
- ์์ด์ ํธ๊ฐ ๋์ ์น์ฌ์ดํธ ํ์
- ์ฃผ์ ๋จ๊ณ๋ง๋ค ์คํฌ๋ฆฐ์ท ์บก์ฒ
- ๋ถ์ ๊ฒฐ๊ณผ ์ค์๊ฐ ์คํธ๋ฆฌ๋ฐ
Agent Builder ์ธํฐํ์ด์ค์์ ์ข ํฉ ๋ถ์ ๊ฒํ :
Agent Builder๋ ๋ค์ํ ๋ฐฐํฌ ์ต์ ์ ์ง์ํฉ๋๋ค:
โ ์ต๋ํ ๊ธฐ์ :
๐ ์ถํํฉ๋๋ค! MCP ํตํฉ์ ์ฑ๊ณต์ ์ผ๋ก ๋ง์คํฐํ์ฌ ์ธ๋ถ ๋๊ตฌ ๊ธฐ๋ฅ์ ๊ฐ์ถ ํ๋ก๋์ ์ค๋น AI ์์ด์ ํธ๋ฅผ ๋ง๋ค ์ ์๊ฒ ๋์์ต๋๋ค!
MCP ๊ธฐ์ ์ ํ ๋จ๊ณ ๋ ๋ฐ์ ์ํค๊ณ ์ถ๋ค๋ฉด, ๋ชจ๋ 3: AI Toolkit๊ณผ ํจ๊ปํ๋ ๊ณ ๊ธ MCP ๊ฐ๋ฐ์ผ๋ก ์ด๋ํ์ธ์. ์ฌ๊ธฐ์ ๋ค์์ ๋ฐฐ์ฐ๊ฒ ๋ฉ๋๋ค:
๋ฉด์ฑ ์กฐํญ:
์ด ๋ฌธ์๋ AI ๋ฒ์ญ ์๋น์ค Co-op Translator๋ฅผ ์ฌ์ฉํ์ฌ ๋ฒ์ญ๋์์ต๋๋ค.
์ ํ์ฑ์ ์ํด ์ต์ ์ ๋คํ๊ณ ์์ผ๋, ์๋ ๋ฒ์ญ์๋ ์ค๋ฅ๋ ๋ถ์ ํํ ๋ถ๋ถ์ด ์์ ์ ์์์ ์ ์ํด ์ฃผ์๊ธฐ ๋ฐ๋๋๋ค.
์๋ฌธ์ ํด๋น ์ธ์ด์ ์๋ณธ ๋ฌธ์๊ฐ ๊ถ์ ์๋ ์ถ์ฒ๋ก ๊ฐ์ฃผ๋์ด์ผ ํฉ๋๋ค.
์ค์ํ ์ ๋ณด์ ๊ฒฝ์ฐ ์ ๋ฌธ์ ์ธ ์ธ๊ฐ ๋ฒ์ญ์ ๊ถ์ฅํฉ๋๋ค.
๋ณธ ๋ฒ์ญ์ ์ฌ์ฉ์ผ๋ก ์ธํด ๋ฐ์ํ๋ ์คํด๋ ์๋ชป๋ ํด์์ ๋ํด ๋น์ฌ๋ ์ฑ ์์ ์ง์ง ์์ต๋๋ค.