The Model Context Protocol (MCP) is an open standard that allows AI assistants to use external tools and access real-time information. By building an MCP server, you enable AI systems like Claude to extend their capabilities through your custom tools, creating more powerful AI agents.
In this workshop, we'll be building and deploying an MCP server with useful tools.
You can work through each step by changing branches in this repo.
Before starting this workshop, please ensure you have the following installed:
- Operating System macOS 13.5+, Windows 11, or Linux distros that support glib 2.35
- Node.js (version 18 or later) - Download
- Text Editor or IDE (VS Code recommended)
- Git If you're on Windows you might need to: Download
Optional:
- A Cloudflare account - Sign up (free tier is sufficient)
- Claude Desktop - Download - Only needed for Step 4's optional integration. The workshop can be completed using just the Cloudflare AI Playground.
This workshop is designed to be followed step-by-step by implementing the code yourself. Each step is documented in its own branch of this repository for reference.
-
Follow the steps in sequence, starting with Step 1.
-
Use this repository as reference if you get stuck:
- Browse to the corresponding step branch on GitHub to see the implementation
- Step branches are named
step1,step2, etc. - View the README.md in each branch for detailed instructions
- Check the code in each branch to see the completed implementation
-
If you fall behind during the live workshop, you can use the instructor's code as a checkpoint.
Each step includes a detailed troubleshooting section to help you overcome common issues.
Learn the fundamentals of MCP and how AI assistants can use external tools to enhance their capabilities.
Discover how to extend AI capabilities by creating your own custom tools that solve specific problems. We'll create a randomNumber tool that AI assistants can use for games, simulations, and unpredictable outcomes.
Integrate with external APIs to give AI assistants access to powerful services beyond their training data.
Make your tools accessible anywhere by deploying to the cloud and connecting to real AI assistants. We'll use the Cloudflare AI Playground for testing, with an optional section on Claude Desktop integration.
Learn how to add persistent storage to your MCP server using Cloudflare KV. We'll set up the infrastructure needed for stateful applications.
Build a complete todo list application that maintains state between conversations, allowing AI assistants to remember tasks for users.
Use AI tools like Claude Code or Cursor to create your own custom MCP tools, connecting to APIs and services that interest you. This step encourages creative exploration and showcases how AI can accelerate your development workflow.
- Model Context Protocol (MCP) Documentation
- Cloudflare Workers Documentation
- Cloudflare KV Documentation
- Cloudflare AI Playground
- Claude Documentation
We'd love to hear about what you build or help with any questions!
- Discord: Join the Cloudflare Developers Discord
- Forums: Post on the Cloudflare Community Forums
- GitHub: Report issues or contribute at Cloudflare AI GitHub
- Twitter: Follow @CloudflareDev for updates