Skip to content

Commit 07425ab

Browse files
committed
docs: add advanced MCP units from Anthropic
- 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
1 parent 45b5063 commit 07425ab

File tree

3 files changed

+156
-9
lines changed

3 files changed

+156
-9
lines changed

units/en/_toctree.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@
3535
- local: unit2/tiny-agents
3636
title: Building a Tiny Agent with TypeScript
3737

38-
- title: "3. Use Case: Advanced MCP Development"
38+
- title: "3. Advanced MCP Development: Custom Workflow Servers"
3939
sections:
4040
- local: unit3/introduction
41-
title: Coming Soon
41+
title: Building Custom Workflow Servers for Claude Code
4242

43-
- title: "Bonus Units"
43+
- title: "4. Production Deployment: Remote Servers and Authentication"
4444
sections:
4545
- local: unit4/introduction
46-
title: Coming Soon
46+
title: Remote Servers, Authentication, and Deployment

units/en/unit3/introduction.mdx

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,49 @@
1-
# Coming Soon
1+
# Advanced MCP Development: Building Custom Workflow Servers for Claude Code
22

3-
This will be another use case that dives deeper into the MCP protocol and how to use it in more complex ways.
3+
Welcome to Unit 3! In this unit, we'll build a production-ready MCP server that enhances Claude Code with custom development workflows.
4+
5+
## What You'll Build
6+
7+
**Development Workflow Server** - An MCP server that makes Claude Code team-aware and workflow-intelligent:
8+
9+
- **Smart PR Management**: Automatic PR template selection based on code changes
10+
- **Post-Actions Automation**: React to GitHub Actions completion via webhooks and orchestrate follow-up tasks
11+
- **Team Communication**: Slack notifications with intelligent summaries of workflow results
12+
- **Claude Code Integration**: Connect your server so Claude Code understands your team's specific processes
13+
14+
## Real-World Case Study
15+
16+
We'll implement a practical scenario every development team faces:
17+
18+
**Before**: Developer manually creates PRs, waits for Actions to complete, manually checks results, remembers to notify team members
19+
20+
**After**: Claude Code connected to your workflow server can intelligently:
21+
- Suggest the right PR template based on changed files
22+
- Monitor GitHub Actions runs and provide formatted summaries
23+
- Automatically notify team via Slack when deployments succeed/fail
24+
- Guide developers through team-specific review processes based on Actions results
25+
26+
## Key Learning Outcomes
27+
28+
1. **Production MCP Server Architecture**: Security, error handling, and webhook management
29+
2. **GitHub Actions Integration**: Monitoring Actions runs, parsing results, and orchestrating follow-up workflows
30+
3. **Claude Code Enhancement**: Making Claude Code team-specific and workflow-aware
31+
4. **Multi-System Coordination**: Connecting GitHub, Slack, and CI/CD monitoring through a unified MCP interface
32+
33+
## Tutorial Structure
34+
35+
1. **Server Foundation**: Build the core MCP server with proper authentication and error handling
36+
2. **PR Template Intelligence**: Implement smart template selection based on file changes
37+
3. **Actions Monitoring**: Set up webhooks to track GitHub Actions completion and parse results
38+
4. **Slack Integration**: Create formatted notifications based on workflow outcomes
39+
5. **Claude Code Connection**: Configure Claude Code to use your workflow server
40+
6. **End-to-End Testing**: Demonstrate the complete workflow from PR creation to team notification
41+
42+
## Prerequisites
43+
44+
- Completion of Units 1 and 2
45+
- Basic familiarity with GitHub Actions and webhook concepts
46+
- Claude Code installed and configured
47+
- Access to a GitHub repository for testing
48+
49+
By the end of this unit, you'll have a production-ready MCP server that transforms Claude Code into a powerful team development assistant.

units/en/unit4/introduction.mdx

Lines changed: 104 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,106 @@
1-
# Coming Soon
1+
# Remote Servers, Authentication, and Deployment
22

3-
This unit will be a collaboration with partners from the AI community.
3+
Welcome to Unit 4! In this unit, we'll build on our workflow server from Unit 3 and advance your MCP development skills by focusing on practical deployment knowledge: remote servers, authentication systems, and production deployment strategies.
44

5-
If you're building tools for MCP, please reach out to us and we'll add you to the unit. Open a [discussion](https://huggingface.co/spaces/mcp-course/README/discussions) on the hub organization.
5+
## Going Production-Ready
6+
7+
**Unit 3 Recap**: Building custom workflow servers for Claude Code in a local development environment
8+
9+
**Unit 4 Focus**: Taking your MCP applications to production with remote deployment and authentication using Cloudflare Workers
10+
11+
## What You'll Learn
12+
13+
### Cloudflare Workers Remote MCP Deployment
14+
15+
Learn how to deploy MCP workflow servers as remote services using Cloudflare Workers:
16+
17+
- **Remote MCP Architecture**: Understanding Cloudflare's remote Model Context Protocol implementation
18+
- **Durable Objects**: Using stateful server patterns with persistent storage ([pricing details](https://developers.cloudflare.com/durable-objects/platform/pricing/))
19+
- **Server-Sent Events (SSE)**: Implementing real-time communication for MCP servers
20+
- **Global Distribution**: Deploying MCP servers close to users worldwide
21+
22+
### OAuth 2.1 Authentication Implementation
23+
24+
Implement robust OAuth authentication for remote MCP applications:
25+
26+
- **OAuth 2.1 Provider**: Using Cloudflare's workers-oauth-provider library
27+
- **Dynamic Client Registration**: Allowing clients to register automatically
28+
- **Token-Based Security**: Server-issued tokens for enhanced security
29+
- **Access Control**: Managing permissions and scopes
30+
- **GitHub and Slack Integration**: OAuth support for GitHub and Slack providers
31+
- **KV Storage Considerations**: OAuth operations use KV storage ([pricing details](https://developers.cloudflare.com/kv/platform/pricing/))
32+
33+
### Cloudflare Security Best Practices
34+
35+
Ensure your remote MCP applications are secure in production:
36+
37+
- **Environment Variables**: Managing secrets with Cloudflare Workers
38+
- **HTTPS by Default**: Automatic encryption for all communications
39+
- **Built-in Protection**: Using Cloudflare's DDoS protection
40+
- **Access Logging**: Monitoring and tracking MCP usage
41+
- **Rate Limiting**: Protecting against abuse and ensuring fair usage
42+
43+
### GitHub Actions CI/CD Integration
44+
45+
Implement continuous deployment for your MCP applications:
46+
47+
- **GitHub Actions Workflow**: Setting up automated builds and deployments
48+
- **Environment Management**: Configuring different deployment environments
49+
- **Secrets Handling**: Managing sensitive information in GitHub Actions
50+
- **Testing Integration**: Running automated tests before deployment
51+
- **Deployment Automation**: Automated updates to your MCP applications
52+
53+
### mcp-remote Client Adapter
54+
55+
Enable Claude Code to connect to your remote servers:
56+
57+
- **Client Bridge**: Using mcp-remote to connect Claude Code to remote servers
58+
- **Configuration Management**: Setting up remote server connections
59+
- **Debugging Tools**: Troubleshooting remote MCP connections
60+
- **Claude Code Integration**: Connecting your remote MCP server to Claude Code
61+
62+
## Technical Deep Dive
63+
64+
1. **Cloudflare Workers Implementation**: Building stateful MCP servers with minimal code
65+
2. **OAuth Integration Code**: Step-by-step OAuth 2.1 flow with GitHub and Slack
66+
3. **Durable Objects Pattern**: Managing persistent connections and state
67+
4. **Remote Transport Configuration**: Setting up SSE communication
68+
5. **GitHub Actions Workflows**: Creating CI/CD pipelines for Cloudflare deployment
69+
6. **Client Adapter Setup**: Bridging Claude Code to remote servers
70+
71+
## Tutorial Structure
72+
73+
1. **Cloudflare Workers Setup**: Prepare your Cloudflare account and development environment
74+
2. **OAuth Provider Configuration**: Set up OAuth applications with GitHub and Slack
75+
3. **Remote MCP Server Creation**: Build your first remote MCP server (authless and authenticated)
76+
4. **Durable Objects Implementation**: Add stateful capabilities to your workflow server
77+
5. **Authentication Integration**: Implement OAuth 2.1 with GitHub and Slack providers
78+
6. **GitHub Actions Setup**: Configure CI/CD workflows for automated Cloudflare deployment
79+
7. **Client Connection Setup**: Configure mcp-remote for Claude Code
80+
8. **Testing with AI Playground**: Use Cloudflare's Workers AI Playground as a test client
81+
9. **Production Deployment**: Deploy and monitor your remote MCP server
82+
83+
## Cloudflare Free Tier and Pricing
84+
85+
This unit leverages Cloudflare's free tier, which is generous for development and testing. For production applications, you should review the current pricing and limits:
86+
87+
- **Workers**: [Pricing and Limits](https://developers.cloudflare.com/workers/platform/pricing/)
88+
- **Durable Objects**: [Pricing and Limits](https://developers.cloudflare.com/durable-objects/platform/pricing/)
89+
- **Workers KV**: [Pricing and Limits](https://developers.cloudflare.com/kv/platform/pricing/) (used by the OAuth library)
90+
91+
The free tier is ideal for learning, development, and small-scale applications. For production deployments with higher traffic, consider Cloudflare's paid plans.
92+
93+
## Prerequisites
94+
95+
- Completion of Unit 3 (we'll use the same workflow server)
96+
- Cloudflare account (free tier available - see pricing section above)
97+
- GitHub account for OAuth integration and Actions
98+
- Slack workspace for OAuth integration (optional)
99+
- Basic understanding of web authentication concepts
100+
- Node.js and npm/yarn/pnpm installed
101+
102+
## Community Contribution
103+
104+
If you've deployed remote MCP applications on Cloudflare Workers or have experience with OAuth 2.1 authentication, we'd love to hear about your experience! Open a [discussion](https://huggingface.co/spaces/mcp-course/README/discussions) on the hub organization.
105+
106+
By the end of this unit, you'll have the knowledge and hands-on experience to deploy secure, scalable remote MCP applications on Cloudflare Workers with OAuth authentication and automated GitHub Actions deployment. While we'll build production-ready architectures, note that Cloudflare's free tier is primarily suitable for development, testing, and small-scale applications. For high-traffic production use, you may need Cloudflare's paid plans. These skills will directly benefit your development work and prepare you for building AI applications with remote MCP capabilities.

0 commit comments

Comments
 (0)