Model Context Protocol Workshop
Welcome to the Model Context Protocol (MCP) Workshop! This 6-hour intensive workshop teaches you how to safely use, build, and contribute MCP servers - the emerging standard for connecting AI applications to external tools and data sources.
Workshop Overview
Duration: 6 hours (2 parts × 3 hours)
Format: ~80% hands-on labs, ~20% lecture
Structure: Two independently promotable parts - take one or both!
Part 1: MCP Foundations & Secure Usage
Target Audience: All employees who want to use AI tools with MCP
Prerequisites: Basic familiarity with AI assistants and development tools
Part 2: Building & Contributing Secure MCP Servers
Target Audience: Developers who want to create and contribute MCP servers
Prerequisites: Python experience (1-3 years), Part 1 OR equivalent MCP understanding
What You'll Learn
Part 1: Use MCP Securely
- Understand MCP architecture: servers, clients, hosts, and transports
- Discover and use MCP servers from the Visa MCP Hub
- Evaluate MCP servers for security risks using Visa's security framework
- Apply security best practices: consent, authorization, data privacy
Part 2: Build & Contribute
- Build custom MCP servers using FastMCP (Python SDK)
- Implement tools, resources, and prompts with security controls
- Apply RBAC, audit logging, and input validation
- Contribute production-ready servers to the Visa MCP Hub
What You'll Build
Part 1: Security evaluation skills and a checklist for evaluating any MCP server
Part 2: A fully functional Secure Document Assistant MCP Server with:
- Search and retrieval tools with input validation
- Document resources with RBAC controls
- Comprehensive audit logging
- Production-ready error handling
Agenda
Part 1: MCP Foundations & Secure Usage (3 hours)
"Discover, evaluate, and safely use MCP servers at Visa"
| Time | Activity | Description |
|---|---|---|
| 0:00-0:25 | Introduction to MCP | Architecture, concepts, comparison to REST APIs |
| 0:25-0:45 | Visa MCP Hub Overview | Discover prebuilt servers, benefits, how to enable |
| 0:45-1:15 | Lab 1: Using MCP Servers | Configure VS Code + GitHub Copilot with MCP servers |
| 1:15-1:30 | Break | - |
| 1:30-2:15 | MCP Security Deep Dive | Consent, authorization, data privacy, tool safety |
| 2:15-2:45 | Lab 2: Security Evaluation | Evaluate MCP servers against Visa security criteria |
| 2:45-3:00 | Wrap-up & Q&A | Key takeaways, security discussion |
Part 2: Building & Contributing Secure MCP Servers (3 hours)
"Build production-ready MCP servers and contribute to the Visa Hub"
| Time | Activity | Description |
|---|---|---|
| 0:00-0:15 | Recap: MCP & Security | Quick review for standalone attendees |
| 0:15-0:30 | Building Your First Server | FastMCP basics, decorators, testing |
| 0:30-1:15 | Lab 3: Your First MCP Server | Build a server with FastMCP decorators |
| 1:15-1:30 | Break | - |
| 1:30-2:00 | Advanced Patterns & Security | Async tools, resources, RBAC, audit logging |
| 2:00-2:45 | Lab 4: Secure Document Assistant | Build complete server with security controls |
| 2:45-3:00 | Contributing to Visa MCP Hub | Best practices, submission process, wrap-up |
Repository Structure```
MCP-Workshop/
├── README.md # This file
├── requirements.txt # Python dependencies
├── .env.example # Optional env template
├── check_environment.py # Setup verification script
├── Labs/
│ ├── Part_1/
│ │ ├── README_Part_1.md # Part 1 guide
│ │ ├── Lab_1_Using_MCP_Servers.ipynb
│ │ └── Lab_2_Security_Evaluation.ipynb
│ └── Part_2/
│ ├── README_Part_2.md # Part 2 guide
│ ├── text_utility_server_starter.py
│ ├── Lab_3_Your_First_MCP_Server.ipynb
│ └── Lab_4_Secure_Document_Assistant.ipynb
├── Solutions/ # Reference implementations
├── Slides/ # Presentation decks
│ ├── Part_1_MCP_Foundations_Secure_Usage.html
│ └── Part_2_Building_Contributing.html
└── Supporting_Materials/
├── Environment_Setup_Guide.md
├── STUDENT_GUIDE.md
├── INSTRUCTOR_GUIDE.md
├── 04-MCP-Security.pdf
└── 08-MCP Hub.pdf
---
## Getting Started
### 1. Prerequisites
- **Python 3.10+** (required for MCP SDK)
- **VS Code** with GitHub Copilot extension
- **Git** for version control
- **Node.js / npx** (for running MCP servers with `npx`)
### 2. Clone the Repository```bash
git clone https://github.com/your-org/MCP-Workshop.git
cd MCP-Workshop
3. Create Virtual Environment```bash
python -m venv .venv
macOS/Linux
source .venv/bin/activate
Windows
..venv\Scripts\Activate.ps1
### 4. Install Dependencies```bash
pip install --upgrade pip
pip install -r requirements.txt
5. Verify Installation```bash
Test MCP CLI is installed
mcp version
Run the full environment check
python check_environment.py
```
Labs Overview
Part 1 Labs
Lab 1: Using MCP Servers
Learn to discover and use MCP servers from the Visa MCP Hub with VS Code and GitHub Copilot. Understand server configuration and capabilities.
Lab 2: Security Evaluation
Apply Visa's security framework to evaluate MCP servers. Practice identifying risks, assessing consent/authorization flows, and creating mitigation strategies.
Part 2 Labs
Lab 3: Your First MCP Server
Build your first MCP server using FastMCP. Create tools with the @mcp.tool() decorator, run with mcp dev, and test with MCP Inspector.
Lab 4: Secure Document Assistant
Build a complete, production-ready MCP server with security controls including RBAC, audit logging, input validation, and error handling.
Key Resources
- MCP Official Documentation
- FastMCP Python SDK
- MCP Server Registry
- VS Code MCP Extension Guide
API Cost Estimates
This workshop uses AI APIs. Estimated costs per lab:
| Lab | API Calls | Estimated Cost |
|---|---|---|
| Lab 1 | 5-10 tool calls | $0.01 - $0.05 |
| Lab 2 | Minimal (evaluation exercises) | $0.00 - $0.02 |
| Lab 3 | Minimal (local testing) | $0.00 - $0.02 |
| Lab 4 | 10-15 tool calls | $0.02 - $0.10 |
| Total Workshop | ~30-40 calls | $0.05 - $0.20 |
> Note: Costs may vary based on model choice and input/output lengths.
Troubleshooting
Common Issues
Issue:
ModuleNotFoundError: No module named 'mcp'
- Solution: Ensure your virtual environment is activated and run pip install "mcp[cli]"
Issue: MCP server won't start
- Solution: Check that you're using Python 3.10+ with python --version
Issue: VS Code doesn't recognize MCP server
- Solution: Restart VS Code after configuring MCP in .vscode/mcp.json
See Supporting_Materials/Environment_Setup_Guide.md for detailed troubleshooting.
License
This project is licensed under the MIT License - see the LICENSE file for details.
