-
Notifications
You must be signed in to change notification settings - Fork 226
[UNIT] Unit 3: Advanced MCP Development - Custom Workflow Servers #50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[UNIT] Unit 3: Advanced MCP Development - Custom Workflow Servers #50
Conversation
- Add unit 3 covering MCP workflow servers and tool composition for Claude Code - Add unit 4 covering remote MCP deployment with Cloudflare Workers - Update table of contents to include new units with proper navigation - Include OAuth 2.1 authentication and production deployment patterns - Standardize deployment examples to use Cloudflare Workers platform
- 5-module structure with jump-in-anywhere design - Local toy to production pipeline approach - Cloudflare Tunnel integration for seamless Unit 4 transition - Specific quiz contribution areas for @burtenshaw - Free-tier compatibility throughout - Complete code examples and starter templates planned quick fix
|
@zealoushacker looks good, but I would just make these high level changes to simplify things a bit (for us and students):
This would give a propose structure like this: - title: "3. Advanced MCP Use Case: Build a Pull Request agent with Anthropic, Github, Slack, and Hugging Face"
sections:
- local: unit3/introduction
title: Introduction to the Autonomous Pull Request Use case
- local: unit3/server
title: Build your use case specific MCP server
- local: unit3/files
title: Smart File Analysis
- local: unit3/github
title: GitHub Actions Integration
- local: unit3/hub
title: Hugging Face Hub Integration
- local: unit3/slack
title: Slack Notification |
|
@burtenshaw thanks for the review.
|
That's correct. We can also make decisions based on community feedback of unit 3.
I'm not opposed to introducing the concept. Mainly just trying to simplify. But tbh, I trust your judgement of you think it works. We could also use HF spaces for remote servers.
Nice compromise. I just wasn't informed. |
• Add comprehensive 5-module structure for Unit 3 focusing on MCP server development • Implement Module 1 with PR template suggestion tool using Anthropic's Claude API • Include starter code, solution code, and manual testing guide for Module 1 • Add PR templates (bug, feature, docs, performance, refactor, security, test) • Create detailed implementation plans and module introductions • Add screenshot demonstrating MCP server in action • Structure modules with progressive complexity from basic tools to advanced deployments • Update table of contents to reflect new unit structure • Remove placeholder Unit 4 content
6413fee to
72703c2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work on this @zelouscoder! This is a great start. My only concern is around the project's structure. The current structure is not compatible with our course building CI, so we'll need to make these changes:
-
unit3has to be flat. i.e. it can only containmdormdxfile that will be converted into a static html site of the written material. - project directories cannot be within units. Therefore, I would suggest moving
module1/solutions,module1/starter, andmodule1/templatesto a directory in the repo root. i.e.{repo}/projetcs/unit3.- An alternative is that you make a separate gh repo. Then the students can just clone that. Whatever is easiest.
IMO, we should also avoid introducing new hierarchies like "module's" within "units". these have a tendency to confuse students that prefer to follow single thread through the course.
As above, great content so far. Once the structure is resolved, you can ping me and I'll review the prose and test out all the code and snippets.
✅ I implemented the above changes in a PR to your fork
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would replace this file with units/en/unit3/implementation_plan_enhancements.md for simplicity of review and delete once implemented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good structure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Useful graphic. Feel free to add more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice starter. We will need to resolve it's actual location in the project.
Restructure anthropic unit3
- Move unit3 starter and solution code to build-mcp-server subdirectory - Update documentation paths to reflect new directory structure - No functional changes to the code
- Implement MCP Resources for project context and team guidelines - Add solution with four resource types: templates, team guidelines, git history, and review process - Create starter code building on Module 1 solution - Add comprehensive documentation and solution walkthrough - Create shared team-guidelines directory with coding standards and PR guidelines - Include manual testing guide for resource validation - Update Module 1 comment to reflect templates are shared across all modules
- Update all configuration examples to use claude mcp add command - Remove references to claude_desktop_config.json - Remove import-from-desktop instructions - Simplify setup process for learners - Focus exclusively on Claude Code usage
- Add -- separator before uv command to properly pass arguments - Remove quotes around individual arguments - Fix command parsing error with --directory flag
- Removed smart-file-analysis module and all Resources references - Renumbered modules: GitHub Actions (2), HF Hub (3), Slack (4) - Updated all cross-references and documentation - Focused on Tools and Prompts as core MCP primitives The full Module 2 implementation is preserved at tag: preserve-module2-resources-full
- Implement webhook server to receive GitHub Actions events - Add tools to query workflow status and recent events - Create 4 MCP prompts for CI/CD workflows - Use file-based event storage for simplicity - Provide comprehensive testing documentation - Include starter code with clear TODOs for learners Module 2 teaches: - How to integrate external webhooks with MCP - Creating standardized workflows with prompts - Real-time CI/CD monitoring in Claude Code
- Remove Hugging Face Hub Integration module (will be in separate PR huggingface#69) - Restructure Unit 3 to 3 modules: Build MCP Server, GitHub Actions, Slack Notification - Build complete Slack Notification module demonstrating Tools + Prompts integration - Add comprehensive manual testing with curl commands for easy verification - Include security guidance for webhook URLs and environment variables - Fix Slack markdown formatting with proper <url|text> syntax - Create complete starter/solution project structure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @zealoushacker . Looking good. I worked through this and some low level comments when things didn't work. Here are some more general comments:
- Missing validation scripts in
build-mcp-server. We typically don't supply this per unit and so feel free to skip, and just add the solution code in a markdown block. - The structure of the material is excellent, but sometime the transitions are a bit blunt for less experienced devs. You might want to do these two things (claude is pretty good at them):
- add glueing statements that walk the student through the material. For example, "We've now built x, let's test that out" or "Or in order to do y, we will need to install z"
- use mdx blocks to highlight obvious things/ gotchas
- I'm always worried about integrations like Slack because so many students/ devs struggle on this. In general, the easiest thing is to thoroughly link to their docs, and reuse their material as much as possible.
- I would add an installation setup section where you install everything for the project, like Claude code, and a conclusion page where you round everything up.
| Add the path to read webhook events: | ||
|
|
||
| ```python | ||
| # File where webhook server stores events |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not clear to the reader that this should be in server.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zealoushacker I still think we clarify the file we're working on.
This commit addresses all feedback from PR huggingface#50 review ID 2887614471: ## Core Feedback Addressed ✅ ### Content & Learning Experience - Add transitional "glue" statements for less experienced developers - Implement CodeCraft Studios narrative arc connecting all modules - Use MDX blocks (<Tip>, <Tip warning>) for important concepts - Create comprehensive conclusion page summarizing unit takeaways - Add extensive external documentation linking throughout ### Technical Infrastructure - Add missing validation scripts (validate_starter.py) to all modules - Add missing test scripts (test_server.py) to all modules - Fix all scripts to work correctly with both starter and solution code - Add proper Claude Code installation instructions with troubleshooting links ### Documentation & Clarity - Simplify Slack integration with step-by-step guidance - Add context for webhook event storage and retrieval system - Link extensively to official docs (Slack API, MCP, GitHub Actions) - Update table of contents to include conclusion page ## Key Improvements ✨ ### 1. CodeCraft Studios Story Arc - Week 1: PR chaos → Module 1 (PR Agent) - Week 2: Silent failures → Module 2 (CI/CD monitoring) - Week 3: Communication gaps → Module 3 (Slack notifications) - Resolution: Complete automation transformation ### 2. Enhanced Learning Experience - Progressive complexity with clear explanations - Real-world problems that every developer faces - Before/after transformations showing concrete value - Motivational but not overstated language ### 3. Working Testing Infrastructure - Flexible tests work with both starter stubs and full implementations - Fixed validation scripts with proper import-based testing - All scripts pass validation (6/6 checks) across all modules - Instructions match actual script behavior ## Files Modified ### Unit Content - units/en/_toctree.yml (added conclusion) - units/en/unit3/introduction.mdx (CodeCraft setup + installation) - units/en/unit3/build-mcp-server.mdx (Module 1 story + transitions) - units/en/unit3/github-actions-integration.mdx (Module 2 story + context) - units/en/unit3/slack-notification.mdx (Module 3 story + Slack docs) - units/en/unit3/conclusion.mdx (NEW: comprehensive unit summary) ### Testing Infrastructure - projects/unit3/*/starter/validate_starter.py (NEW: working validation) - projects/unit3/*/starter/test_server.py (NEW: flexible async tests) - projects/unit3/*/solution/test_server.py (NEW: fixed solution tests) Result: Unit 3 now provides engaging, accessible, well-documented learning experience that guides developers of all levels through advanced MCP concepts via relatable real-world automation scenarios.
burtenshaw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really good @zealoushacker . Thanks for taking the time to make it enjoyable to students.
| # Module 1: Build MCP Server | ||
|
|
||
| ## Introduction | ||
| ## The PR Chaos at CodeCraft Studios |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😍 Love it
| Add the path to read webhook events: | ||
|
|
||
| ```python | ||
| # File where webhook server stores events |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zealoushacker I still think we clarify the file we're working on.
- Module 1: Added comprehensive lesson on handling 25k token limit - Implemented max_diff_lines parameter (default 500) - Added truncation logic with clear messaging - Included test for output limiting - Framed as important real-world learning opportunity - Modules 2 & 3: Pre-included fix so learners can focus on new concepts - Updated all starter and solution code - Added notes that output limiting is already handled - Prevents repetitive debugging of same issue This ensures learners encounter and solve the token limit problem once in Module 1 as a valuable lesson, then can focus on webhooks (Module 2) and Slack integration (Module 3) without distraction. Fixes the issue where large git diffs cause "MCP tool response exceeds maximum allowed tokens (25000)" errors.
- Add roots support to access Claude Code's working directory - Update analyze_file_changes in all modules to use correct cwd - Add documentation about working directory considerations - Include helpful comments in starter code about roots usage
Unit 3: Advanced MCP Development - Custom Workflow Servers
This PR completes Unit 3, which teaches learners to build practical MCP servers that enhance Claude Code with custom development workflows. The unit demonstrates all core MCP primitives (Tools and Prompts) through a progressive 3-module structure.
🏗️ What Learners Build
A PR Agent Workflow Server that transforms Claude Code into a team-aware development assistant:
📚 Module Overview
Module 1: Build MCP Server (45 min)
Focus: MCP Tools fundamentals
analyze_file_changes,get_pr_templates,suggest_templateModule 2: GitHub Actions Integration (45 min)
Focus: MCP Prompts and webhook integration
get_recent_actions_events,get_workflow_statusanalyze_ci_results,create_deployment_summary,troubleshoot_workflow_failureModule 3: Slack Notification (45 min)
Focus: Tools + Prompts integration
send_slack_notification(with proper error handling)format_ci_failure_alert,format_ci_success_summary🎯 Progressive Learning Design
Each module builds on the previous, demonstrating MCP primitive progression:
✨ Key Features
Real-World Applicability
Enhanced Testing Experience
Security & Best Practices
📁 Project Structure
🔄 Refinements from Original Plan
✅ Learning Outcomes
By completing Unit 3, learners will:
Total time: ~2.5 hours | Prerequisites: Units 1 & 2 | Difficulty: Intermediate
This unit provides the foundation for building sophisticated MCP servers that enhance development team workflows with intelligent automation.
🚀 Next Steps (Separate PR)
After this foundational implementation is reviewed and approved, the following enhancements will be added in a follow-up PR to prepare for launch:
Visual Learning Materials
Enhanced Learner Experience
Launch Preparation
Parallel Development