Skip to content

Commit 99fbaad

Browse files
authored
Merge pull request huggingface#2 from huggingface/first-release-unit-1-2
[RELEASE] first release of units 0,1,2
2 parents c4b80fb + 5395843 commit 99fbaad

17 files changed

+2479
-25
lines changed

units/en/_toctree.yml

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -15,40 +15,30 @@
1515
title: The Communication Protocol
1616
- local: unit1/capabilities
1717
title: Understanding MCP Capabilities
18+
- local: unit1/sdk
19+
title: MCP SDK
20+
- local: unit1/mcp-clients
21+
title: MCP Clients
1822
- local: unit1/gradio-mcp
1923
title: Gradio MCP Integration
2024

21-
- title: "2. Use Case: Building with MCP"
25+
- title: "2. Use Case: End-to-End MCP Application"
2226
sections:
2327
- local: unit2/introduction
24-
title: Introduction
25-
- local: unit2/environment-setup
26-
title: Setting Up Your Development Environment & SDKs
27-
- local: unit2/building-server
28-
title: Building Your First MCP Server
29-
- local: unit2/server-capabilities
30-
title: Implementing Server Capabilities
31-
- local: unit2/developing-clients
32-
title: Developing MCP Clients
33-
- local: unit2/configuration
34-
title: Configuration, Authentication, and Debugging
35-
- local: unit2/hub-mcp-servers
36-
title: MCP Servers on Hugging Face Hub
28+
title: Introduction to Building an MCP Application
29+
- local: unit2/gradio-server
30+
title: Building the Gradio MCP Server
31+
- local: unit2/clients
32+
title: Using MCP Clients with your application
33+
- local: unit2/gradio-client
34+
title: Building an MCP Client with Gradio
35+
- local: unit2/tiny-agents
36+
title: Building a Tiny Agent with TypeScript
3737

38-
- title: "3. Use Case: Deploying with MCP"
38+
- title: "3. Use Case: Advanced MCP Development"
3939
sections:
4040
- local: unit3/introduction
4141
title: Introduction
42-
- local: unit3/advanced-features
43-
title: Exploring Advanced MCP Features
44-
- local: unit3/security
45-
title: Security Deep Dive - Threats and Mitigation Strategies
46-
- local: unit3/limitations
47-
title: Limitations, Challenges, and Comparisons
48-
- local: unit3/huggingface-ecosystem
49-
title: Hugging Face's Tiny Agents and MCP
50-
- local: unit3/final-project
51-
title: Final Project - Building a Complete MCP Application
5242

5343
- title: "Bonus Units"
5444
sections:

units/en/unit0/introduction.mdx

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
# Welcome to the 🤗 Model Context Protocol (MCP) Course
2+
3+
![MCP Course thumbnail](https://huggingface.co/datasets/mcp-course/images/resolve/main/unit0/1.png)
4+
5+
Welcome to the most exciting topic in AI today: **Model Context Protocol (MCP)**!
6+
7+
This free course will take you on a journey, **from beginner to informed**, in understanding, using, and building applications with MCP.
8+
9+
This first unit will help you onboard:
10+
11+
* Discover the **course's syllabus**.
12+
* **Get more information about the certification process and the schedule**.
13+
* Get to know the team behind the course.
14+
* Create your **account**.
15+
* **Sign-up to our Discord server**, and meet your classmates and us.
16+
17+
Let's get started!
18+
19+
## What to expect from this course?
20+
21+
In this course, you will:
22+
23+
* 📖 Study Model Context Protocol in **theory, design, and practice.**
24+
* 🧑‍💻 Learn to **use established MCP SDKs and frameworks**.
25+
* 💾 **Share your projects** and explore applications created by the community.
26+
* 🏆 Participate in challenges where you will **evaluate your MCP implementations against other students'.**
27+
* 🎓 **Earn a certificate of completion** by completing assignments.
28+
29+
And more!
30+
31+
At the end of this course, you'll understand **how MCP works and how to build your own AI applications that leverage external data and tools using the latest MCP standards**.
32+
33+
Don't forget to [**sign up to the course!**](https://huggingface.co/mcp-course)
34+
35+
## What does the course look like?
36+
37+
The course is composed of:
38+
39+
* _Foundational Units_: where you learn MCP **concepts in theory**.
40+
* _Hands-on_: where you'll learn **to use established MCP SDKs** to build your applications. These hands-on sections will have pre-configured environments.
41+
* _Use case assignments_: where you'll apply the concepts you've learned to solve a real-world problem that you'll choose.
42+
* _Collaborations_: We're collaborating with Hugging Face's partners to give you the latest MCP implementations and tools.
43+
44+
This **course is a living project, evolving with your feedback and contributions!** Feel free to open issues and PRs in GitHub, and engage in discussions in our Discord server.
45+
46+
After you have gone through the course, you can also send your feedback 👉 using this form [LINK TO FEEDBACK FORM]
47+
48+
## What's the syllabus?
49+
50+
Here is the **general syllabus for the course**. A more detailed list of topics will be released with each unit.
51+
52+
| Chapter | Topic | Description |
53+
| ------- | ------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
54+
| 0 | Onboarding | Set you up with the tools and platforms that you will use. |
55+
| 1 | MCP Fundamentals, Architecture and Core Concepts | Explain core concepts, architecture, and components of Model Context Protocol. Show a simple use case using MCP. |
56+
| 2 | End-to-end Use case: MCP in Action | Build a simple end-to-end MCP application that you can share with the community. |
57+
| 3 | Deployed Use case: MCP in Action | Build a deployed MCP application using a the Hugging Face ecosystem and partners' services. |
58+
| 4 | Bonus Units | Bonus units to help you get more out of the course, working with partners' libraries and services. |
59+
60+
## What are the prerequisites?
61+
62+
To be able to follow this course, you should have:
63+
64+
* Basic understanding of AI and LLM concepts
65+
* Familiarity with software development principles and API concepts
66+
* Experience with at least one programming language (Python or TypeScript examples will be shown)
67+
68+
If you don't have any of these, don't worry! Here are some resources that can help you:
69+
70+
* [LLM Course](https://huggingface.co/learn/llm-course/en/chapter1/10) will guide you through the basics of using and building with LLMs.
71+
* [Agents Course](https://huggingface.co/learn/agents-course/en/chapter1/10) will guide you through building AI agents with LLMs.
72+
73+
<Tip>
74+
75+
The above courses are not prerequisites in themselves, so if you understand the concepts of LLMs and agents, you can start the course now!
76+
77+
</Tip>
78+
79+
## What tools do I need?
80+
81+
You only need 2 things:
82+
83+
* _A computer_ with an internet connection.
84+
* An _Account_: to access the course resources and create projects. If you don't have an account yet, you can create one [here](https://huggingface.co/join) (it's free).
85+
86+
## The Certification Process
87+
88+
You can choose to follow this course _in audit mode_, or do the activities and _get one of the two certificates we'll issue_. If you audit the course, you can participate in all the challenges and do assignments if you want, and **you don't need to notify us**.
89+
90+
The certification process is **completely free**:
91+
92+
* _To get a certification for fundamentals_: you need to complete Unit 1 of the course. This is intended for students that want to get up to date with the latest trends in MCP, without the need to build a full application.
93+
* _To get a certificate of completion_: you need to complete the use case units (2 and 3). This is intended for students that want to build a full application and share it with the community.
94+
95+
## What is the recommended pace?
96+
97+
Each chapter in this course is designed **to be completed in 1 week, with approximately 3-4 hours of work per week**.
98+
99+
Since there's a deadline, we provide you a recommended pace:
100+
101+
![Recommended Pace](https://huggingface.co/datasets/mcp-course/images/resolve/main/unit0/2.png)
102+
103+
## How to get the most out of the course?
104+
105+
To get the most out of the course, we have some advice:
106+
107+
1. Join study groups in Discord: studying in groups is always easier. To do that, you need to join our discord server and verify your account.
108+
2. **Do the quizzes and assignments**: the best way to learn is through hands-on practice and self-assessment.
109+
3. **Define a schedule to stay in sync**: you can use our recommended pace schedule below or create yours.
110+
111+
![Course advice](https://huggingface.co/datasets/mcp-course/images/resolve/main/unit0/3.png)
112+
113+
## Who are we
114+
115+
About the authors:
116+
117+
### Ben Burtenshaw
118+
119+
Ben is a Machine Learning Engineer at Hugging Face who focuses building LLM applications, with post training and agentic approaches.
120+
121+
<!-- ## Acknowledgments -->
122+
123+
<!-- We would like to extend our gratitude to the following individuals and partners for their invaluable contributions and support: -->
124+
125+
<!-- TODO: @burtenshaw add contributors and partners -->
126+
127+
## I found a bug, or I want to improve the course
128+
129+
Contributions are **welcome** 🤗
130+
131+
* If you _found a bug 🐛 in a notebook_, please open an issue and **describe the problem**.
132+
* If you _want to improve the course_, you can open a Pull Request.
133+
* If you _want to add a full section or a new unit_, the best is to open an issue and **describe what content you want to add before starting to write it so that we can guide you**.
134+
135+
## I still have questions
136+
137+
Please ask your question in our discord server #mcp-course-questions.
138+
139+
Now that you have all the information, let's get on board
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Architectural Components of MCP
2+
3+
In the previous section, we discussed the key concepts and terminology of MCP. Now, let's dive deeper into the architectural components that make up the MCP ecosystem.
4+
5+
## Host, Client, and Server
6+
7+
The Model Context Protocol (MCP) is built on a client-server architecture that enables structured communication between AI models and external systems.
8+
9+
![MCP Architecture](https://huggingface.co/datasets/mcp-course/images/resolve/main/unit1/4.png)
10+
11+
The MCP architecture consists of three primary components, each with well-defined roles and responsibilities: Host, Client, and Server. We touched on these in the previous section, but let's dive deeper into each component and their responsibilities.
12+
13+
### Host
14+
15+
The **Host** is the user-facing AI application that end-users interact with directly.
16+
17+
Examples include:
18+
- AI Chat apps like OpenAI ChatGPT or Anthropic's Claude Desktop
19+
- AI-enhanced IDEs like Cursor, or integrations to tools like Continue.dev
20+
- Custom AI agents and applications built in libraries like LangChain or smolagents
21+
22+
The Host's responsibilities include:
23+
- Managing user interactions and permissions
24+
- Initiating connections to MCP Servers via MCP Clients
25+
- Orchestrating the overall flow between user requests, LLM processing, and external tools
26+
- Rendering results back to users in a coherent format
27+
28+
In most cases, users will select their host application based on their needs and preferences. For example, a developer may choose Cursor for its powerful code editing capabilities, while domain experts may use custom applications built in smolagents.
29+
30+
### Client
31+
32+
The **Client** is a component within the Host application that manages communication with a specific MCP Server. Key characteristics include:
33+
34+
- Each Client maintains a 1:1 connection with a single Server
35+
- Handles the protocol-level details of MCP communication
36+
- Acts as the intermediary between the Host's logic and the external Server
37+
38+
### Server
39+
40+
The **Server** is an external program or service that exposes capabilities to AI models via the MCP protocol. Servers:
41+
42+
- Provide access to specific external tools, data sources, or services
43+
- Act as lightweight wrappers around existing functionality
44+
- Can run locally (on the same machine as the Host) or remotely (over a network)
45+
- Expose their capabilities in a standardized format that Clients can discover and use
46+
47+
## Communication Flow
48+
49+
Let's examine how these components interact in a typical MCP workflow:
50+
51+
<Tip>
52+
53+
In the next section, we'll dive deeper into the communication protocol that enables these components with practical examples.
54+
55+
</Tip>
56+
57+
1. **User Interaction**: The user interacts with the **Host** application, expressing an intent or query.
58+
59+
2. **Host Processing**: The **Host** processes the user's input, potentially using an LLM to understand the request and determine which external capabilities might be needed.
60+
61+
3. **Client Connection**: The **Host** directs its **Client** component to connect to the appropriate Server(s).
62+
63+
4. **Capability Discovery**: The **Client** queries the **Server** to discover what capabilities (Tools, Resources, Prompts) it offers.
64+
65+
5. **Capability Invocation**: Based on the user's needs or the LLM's determination, the Host instructs the **Client** to invoke specific capabilities from the **Server**.
66+
67+
6. **Server Execution**: The **Server** executes the requested functionality and returns results to the **Client**.
68+
69+
7. **Result Integration**: The **Client** relays these results back to the **Host**, which incorporates them into the context for the LLM or presents them directly to the user.
70+
71+
A key advantage of this architecture is its modularity. A single **Host** can connect to multiple **Servers** simultaneously via different **Clients**. New **Servers** can be added to the ecosystem without requiring changes to existing **Hosts**. Capabilities can be easily composed across different **Servers**.
72+
73+
<Tip>
74+
75+
As we discussed in the previous section, this modularity transforms the traditional M×N integration problem (M AI applications connecting to N tools/services) into a more manageable M+N problem, where each Host and Server needs to implement the MCP standard only once.
76+
77+
</Tip>
78+
79+
The architecture might appear simple, but its power lies in the standardization of the communication protocol and the clear separation of responsibilities between components. This design allows for a cohesive ecosystem where AI models can seamlessly connect with an ever-growing array of external tools and data sources.
80+
81+
## Conclusion
82+
83+
These interaction patterns are guided by several key principles that shape the design and evolution of MCP. The protocol emphasizes **standardization** by providing a universal protocol for AI connectivity, while maintaining **simplicity** by keeping the core protocol straightforward yet enabling advanced features. **Safety** is prioritized by requiring explicit user approval for sensitive operations, and discoverability enables dynamic discovery of capabilities. The protocol is built with **extensibility** in mind, supporting evolution through versioning and capability negotiation, and ensures **interoperability** across different implementations and environments.
84+
85+
In the next section, we'll explore the communication protocol that enables these components to work together effectively.

0 commit comments

Comments
 (0)