MCP for beginners: build your first MCP server
Learn the Model Context Protocol (MCP) in seven days.
- Claude API
- 7 days
- beginner
- 7 lessons
- about 3 hours
Free and self-paced. Every lesson is open to everyone.
Start with lesson 1What you will do
Build a small MCP server in Python, test it, and use it in Claude Desktop and Claude Code. For people who finished Tool use with the Claude API. You learn hosts, clients and servers, build tools, a resource and a prompt with the official SDK, test them with the MCP Inspector, connect the same server to two hosts and check servers before you trust them. Building and testing the server needs no API key; Claude Code needs a paid Claude plan or a Claude Console account.
How this course works
The course is free and you go at your own pace. Each lesson is short: a bit of reading and a few small tasks you do in the tool itself, so you learn by using it. Every lesson is open to everyone, no account needed. A free account saves your progress, so you can pick up where you left off on any device. What the account stores and how to get it removed is on the privacy page.
Syllabus
- Day 1, 25 minutes What is the Model Context Protocol (MCP) and why use it? Explain how MCP hosts, clients and servers work together and set up a Python project with the official MCP SDK for Romy's shop.
- Day 2, 25 minutes Build your first MCP server with one tool in Python Write an MCP server with one stock check tool in Python and call that tool with the MCP Inspector, without any AI in between.
- Day 3, 25 minutes Add an MCP tool that writes data and returns clear errors Add a wish list tool that writes to a local file, make it refuse a wrong request with a ToolError, and test both paths with the MCP Inspector.
- Day 4, 25 minutes Add a resource and a prompt to your MCP server Add an opening hours resource and a customer reply prompt to Romy's MCP server and read both with the MCP Inspector.
- Day 5, 25 minutes Connect your MCP server to Claude Desktop Add Romy's MCP server to the Claude Desktop configuration file, restart the app and get an answer that uses your own stock tool.
- Day 6, 20 minutes How do I use my MCP server in Claude Code? Add Romy's unchanged MCP server to Claude Code with one command and use its tool, its resource and its prompt in a session.
- Day 7, 25 minutes Use MCP servers safely on your own computer Check a published MCP server before you trust it, read its tool list with the Inspector and fill in a safety check for every server you use.