| Session Sheet | Recording | Slides | Repo | Homework | Feedback |
|---|---|---|---|---|---|
| MCP Servers & A2A | Recording! passcode: fJ9tx4h. |
Session 17 Slides | You are here! | (Optional) Session 17 Assignment: MCP Servers & A2A | Feedback 3/12 |
MCP (Model Context Protocol)
- MCP Official Docs — Spec, tutorials, and guides
- MCP-UI — Official standard for interactive UI in MCP
- MCP Auth Guide (Auth0) — Deep dive into MCP auth spec updates
A2A (Agent-to-Agent Protocol)
- A2A Official Docs — Spec and guides
- A2A GitHub Repo — Protocol spec and implementations
- Announcing A2A (Google Blog) — Protocol vision and motivation
MCP vs A2A
- A2A and MCP (Official) — How they complement each other
uv syncCopy the example env file and fill in your OpenAI API key:
cp .env.example .envuv run server.pyThe server will start on http://localhost:8000.
In a separate terminal, start an ngrok tunnel:
ngrok http 8000Copy the ngrok forwarding URL (e.g. https://xxxx-xx-xx-xx-xx.ngrok-free.app) and restart the server with it:
ISSUER_URL=https://xxxx-xx-xx-xx-xx.ngrok-free.app uv run server.pyNote: The
ISSUER_URLmust match the public URL clients use to reach the server, otherwise OAuth authentication will fail.
In today's assignment, we'll be building an MCP server with OAuth authentication — a cat shop application that exposes tools for browsing products, managing a cart, and checking out.
-
🤝 Breakout Room #1
- Set up the MCP server with OAuth and the product database
- Explore the MCP tools:
list_products,get_product,add_to_cart,view_cart,remove_from_cart,checkout
-
🤝 Breakout Room #2
- Connect an MCP client to the server
- Build an end-to-end interaction flow using the MCP tools
The completed MCP server and client integration!
- A short Loom of either:
- the MCP server you built and a demo of the client interacting with it; or
- the notebook you created for the Advanced Build
Make a social media post about your final application!
- Make a post on any social media platform about what you built!
Here's a template to get you started:
🚀 Exciting News! 🚀
I am thrilled to announce that I have just built and shipped an MCP server with OAuth authentication! 🎉🤖
🔍 Three Key Takeaways:
1️⃣
2️⃣
3️⃣
Let's continue pushing the boundaries of what's possible in the world of AI and tool integration. Here's to many more innovations! 🚀
Shout out to @AIMakerspace !
#MCP #ModelContextProtocol #OAuth #Innovation #AI #TechMilestone
Feel free to reach out if you're curious or would like to collaborate on similar projects! 🤝🔥
Follow these steps to prepare and submit your homework assignment:
- Review the MCP server code in
server.pyand theapp/directory - Run the MCP server locally using
uv run server.py - Connect to the server using an MCP client (e.g., Claude Desktop, or a custom client)
- Test all available tools: browsing products, adding to cart, viewing cart, removing items, and checkout
- Record a Loom video reviewing what you have learned from this session
Why is OAuth important for MCP servers, and what security considerations should you keep in mind when exposing tools to AI clients?
(insert your answer here)
What is the Agent-to-Agent (A2A) protocol, and how does it differ from MCP in terms of purpose and architecture? When would you choose A2A over MCP?
(insert your answer here)
Add at least one new tool to the cat shop MCP server (e.g., search_products, update_cart_quantity, or get_order_history). Ensure the new tool integrates properly with the existing database and OAuth authentication. Demo the new tool through an MCP client and include it in your Loom video.
Build a custom MCP client that connects to the cat shop server over Streamable HTTP, authenticates via OAuth, and orchestrates a multi-step shopping flow (browse → add to cart → checkout). Compare the developer experience of MCP-based tool integration vs. traditional REST API calls.
Include your findings and a demo in your Loom video.
