Skip to main content
Glama

šŸš€ MCP Lab Workshop

Learn Model Context Protocol (MCP) with Cloudflare Workers

Deploy to Cloudflare Workers


šŸŽÆ What is This?

An interactive workshop for SE interns to learn about Model Context Protocol (MCP) servers. Deploy a live dashboard app that can be controlled in real-time via MCP tools.

What You'll Build

  1. šŸŽØ Interactive Dashboard - A beautiful dark-themed web app with real-time stats

  2. šŸ”§ MCP Server - A fully functional MCP server with 8 tools to control the dashboard

  3. šŸ“” Real-time Connection - Watch the dashboard update live as you call MCP tools


Related MCP server: Remote MCP Server (Authless)

✨ Features

Demo App

  • šŸŒ™ Dark-themed beautiful UI with Cloudflare branding

  • šŸ“Š Live statistics that update in real-time

  • šŸŽ›ļø Feature toggles (Analytics, Notifications, Dark Mode, Animations)

  • šŸ“” Activity feed showing all MCP actions

  • ⚔ Server-Sent Events for instant updates

MCP Server

  • šŸ› ļø 8 MCP Tools for controlling the dashboard

  • šŸ”“ No authentication required - perfect for learning

  • šŸŒ Edge deployed - runs on Cloudflare's global network

  • šŸ“¦ KV storage for state management


šŸš€ Quick Deploy

One-Click Deploy

Click the button above to deploy to your Cloudflare account:

Deploy to Cloudflare Workers

The deploy process will:

  1. āœ… Clone the repo to your GitHub

  2. āœ… Create a KV namespace automatically

  3. āœ… Deploy TWO workers: mcp-demo-app (dashboard) and mcp-server (MCP tools)

  4. āœ… Give you live URLs instantly

Important: The deployment creates two separate workers. Make sure both are deployed successfully!

Manual Deploy

If you prefer to deploy manually:

# Clone the repo
git clone https://github.com/MattDMitch/mcp-lab-workshop.git
cd mcp-lab-workshop

# Install dependencies
npm install

# Login to Cloudflare
npx wrangler login

# Run deploy script (creates KV namespace and deploys both workers)
npm run deploy

This will deploy:

  • āœ… mcp-demo-app - The monitoring dashboard UI

  • āœ… mcp-server - The MCP tools server


šŸŽ® Using the MCP Server

Once deployed, you'll get ONE worker with multiple endpoints:

  • Dashboard: https://YOUR-WORKER-NAME.YOUR-SUBDOMAIN.workers.dev/

  • MCP Server: https://YOUR-WORKER-NAME.YOUR-SUBDOMAIN.workers.dev/mcp

Both the dashboard and MCP server run in the same worker using path-based routing

Connect to MCP Server

Add the MCP server to your OpenCode or MCP client:

{
  "mcpServers": {
    "demo": {
      "url": "https://REPO-NAME-mcp.YOUR-SUBDOMAIN.workers.dev"
    }
  }
}

Available Tools

Tool

Description

Example

toggle_feature

Toggle features on/off

Toggle dark mode

update_stats

Change dashboard numbers

Set visitors to 9999

set_message

Update banner message

"Hello Interns! šŸ‘‹"

get_state

View current app state

Get all settings

reset_demo

Reset to defaults

Clean slate

simulate_traffic

Generate fake activity

Simulate high traffic

enable_all_features

Turn on all features

Enable everything

disable_all_features

Turn off all features

Disable everything


šŸ’” Try These Examples

Toggle Dark Mode

curl -X POST https://mcp-server.YOUR-SUBDOMAIN.workers.dev/mcp/tools/call \
  -H "Content-Type: application/json" \
  -d '{
    "tool": "toggle_feature",
    "arguments": {"feature": "darkMode"}
  }'

Set Custom Message

curl -X POST https://mcp-server.YOUR-SUBDOMAIN.workers.dev/mcp/tools/call \
  -H "Content-Type: application/json" \
  -d '{
    "tool": "set_message",
    "arguments": {"message": "Welcome SE Interns! šŸŽ‰"}
  }'

Simulate High Traffic

curl -X POST https://mcp-server.YOUR-SUBDOMAIN.workers.dev/mcp/tools/call \
  -H "Content-Type: application/json" \
  -d '{
    "tool": "simulate_traffic",
    "arguments": {"amount": "high"}
  }'

Update Stats

curl -X POST https://mcp-server.YOUR-SUBDOMAIN.workers.dev/mcp/tools/call \
  -H "Content-Type: application/json" \
  -d '{
    "tool": "update_stats",
    "arguments": {"stat": "visitors", "value": 9999}
  }'

šŸ—ļø Architecture

ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
│  Demo App Worker                │
│  - Dark-themed dashboard        │
│  - Server-Sent Events           │
│  - Real-time updates            │
ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
             │
             ↓
ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
│  Cloudflare KV Namespace        │
│  - App state storage            │
│  - Activity logs                │
ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
             │
             ↓
ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
│  MCP Server Worker              │
│  - 8 MCP tools                  │
│  - Tool execution               │
│  - State management             │
ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜

šŸ“š Workshop Guide

Part 1: Deploy (10 min)

  1. Click "Deploy to Cloudflare"

  2. Authorize GitHub and Cloudflare

  3. Get your live URLs

Part 2: Explore the Dashboard (10 min)

  1. Open the dashboard URL

  2. See the dark-themed interface

  3. Observe the stats and features

Part 3: Connect MCP Client (10 min)

  1. Add MCP server to OpenCode

  2. List available tools

  3. Verify connection

Part 4: Control the Dashboard (15 min)

  1. Toggle dark mode

  2. Update statistics

  3. Change the message

  4. Simulate traffic

  5. Watch real-time updates!

Part 5: Explore the Code (15 min)

  1. Review MCP server implementation

  2. Understand tool schemas

  3. See KV storage in action

  4. Learn about SSE for real-time updates


šŸŽ“ Learning Objectives

After this workshop, you'll understand:

  • āœ… What MCP is and why it's useful

  • āœ… How to build an MCP server

  • āœ… Tool schemas and execution

  • āœ… Real-time web applications with SSE

  • āœ… Cloudflare Workers and KV storage

  • āœ… Edge computing concepts


šŸ› ļø Tech Stack


šŸ“‚ Project Structure

mcp-lab-complete/
ā”œā”€ā”€ README.md              # This file
ā”œā”€ā”€ wrangler.toml          # Cloudflare config
ā”œā”€ā”€ package.json           # Project metadata
ā”œā”€ā”€ demo-app/
│   └── index.js          # Dashboard worker
└── mcp-server/
    └── index.js          # MCP server worker

šŸŽØ Customization Ideas

For Students:

  • Add new MCP tools

  • Create custom themes

  • Add more statistics

  • Build a notification system

  • Add WebSocket support

For Instructors:

  • Create coding challenges

  • Add quiz questions

  • Build team competitions

  • Create extension exercises


šŸ”— Resources


šŸ“„ License

MIT License - Free to use for educational purposes


šŸ™Œ Credits

Built for Cloudflare SE Intern Workshops

Made with ā¤ļø and ā˜•


Ready to learn MCP?

Deploy to Cloudflare Workers

F
license - not found
-
quality - not tested
C
maintenance

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Cloudflare Workers MCP server: crypto-signal

  • MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MattDMitch/4mcp-lab-workshop'

If you have feedback or need assistance with the MCP directory API, please join our Discord server