You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: units/en/unit1/architectural-components.mdx
+4-10Lines changed: 4 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,11 +48,8 @@ The **Server** is an external program or service that exposes capabilities to AI
48
48
49
49
Let's examine how these components interact in a typical MCP workflow:
50
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>
51
+
> [!TIP]
52
+
> In the next section, we'll dive deeper into the communication protocol that enables these components with practical examples.
56
53
57
54
1.**User Interaction**: The user interacts with the **Host** application, expressing an intent or query.
58
55
@@ -70,11 +67,8 @@ In the next section, we'll dive deeper into the communication protocol that enab
70
67
71
68
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
69
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>
70
+
> [!TIP]
71
+
> 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.
78
72
79
73
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.
Copy file name to clipboardExpand all lines: units/en/unit1/capabilities.mdx
+6-12Lines changed: 6 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,13 +2,10 @@
2
2
3
3
MCP Servers expose a variety of capabilities to Clients through the communication protocol. These capabilities fall into four main categories, each with distinct characteristics and use cases. Let's explore these core primitives that form the foundation of MCP's functionality.
4
4
5
-
<Tip>
6
-
7
-
In this section, we'll show examples as framework agnostic functions in each language. This is to focus on the concepts and how they work together, rather than the complexities of any framework.
8
-
9
-
In the coming units, we'll show how these concepts are implemented in MCP specific code.
10
-
11
-
</Tip>
5
+
> [!TIP]
6
+
> In this section, we'll show examples as framework agnostic functions in each language. This is to focus on the concepts and how they work together, rather than the complexities of any framework.
7
+
>
8
+
> In the coming units, we'll show how these concepts are implemented in MCP specific code.
12
9
13
10
## Tools
14
11
@@ -200,11 +197,8 @@ The sampling flow follows these steps:
200
197
4. Client reviews the completion
201
198
5. Client returns the result to the server
202
199
203
-
<Tip>
204
-
205
-
This human-in-the-loop design ensures users maintain control over what the LLM sees and generates. When implementing sampling, it's important to provide clear, well-structured prompts and include relevant context.
206
-
207
-
</Tip>
200
+
> [!TIP]
201
+
> This human-in-the-loop design ensures users maintain control over what the LLM sees and generates. When implementing sampling, it's important to provide clear, well-structured prompts and include relevant context.
Copy file name to clipboardExpand all lines: units/en/unit1/certificate.mdx
+2-5Lines changed: 2 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,9 +11,6 @@ Below is a quiz to check your understanding of the unit.
11
11
height="450"
12
12
></iframe>
13
13
14
-
<Tip>
15
-
16
-
If you're struggling to use the quiz above, go to the space directly [on the Hugging Face Hub](https://huggingface.co/spaces/mcp-course/unit_1_quiz). If you find errors, you can report them in the space's [Community tab](https://huggingface.co/spaces/mcp-course/unit_1_quiz/discussions).
17
-
18
-
</Tip>
14
+
> [!TIP]
15
+
> If you're struggling to use the quiz above, go to the space directly [on the Hugging Face Hub](https://huggingface.co/spaces/mcp-course/unit_1_quiz). If you find errors, you can report them in the space's [Community tab](https://huggingface.co/spaces/mcp-course/unit_1_quiz/discussions).
Copy file name to clipboardExpand all lines: units/en/unit1/communication-protocol.mdx
+6-15Lines changed: 6 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,8 @@
2
2
3
3
MCP defines a standardized communication protocol that enables Clients and Servers to exchange messages in a consistent, predictable way. This standardization is critical for interoperability across the community. In this section, we'll explore the protocol structure and transport mechanisms used in MCP.
4
4
5
-
<Tipwarning={true}>
6
-
7
-
We're getting down to the nitty-gritty details of the MCP protocol. You won't need to know all of this to build with MCP, but it's good to know that it exists and how it works.
8
-
9
-
</Tip>
5
+
> [!WARNING]
6
+
> We're getting down to the nitty-gritty details of the MCP protocol. You won't need to know all of this to build with MCP, but it's good to know that it exists and how it works.
10
7
11
8
## JSON-RPC: The Foundation
12
9
@@ -99,11 +96,8 @@ The stdio transport is used for local communication, where the Client and Server
99
96
100
97
The Host application launches the Server as a subprocess and communicates with it by writing to its standard input (stdin) and reading from its standard output (stdout).
101
98
102
-
<Tip>
103
-
104
-
**Use cases** for this transport are local tools like file system access or running local scripts.
105
-
106
-
</Tip>
99
+
> [!TIP]
100
+
> **Use cases** for this transport are local tools like file system access or running local scripts.
107
101
108
102
The main **Advantages** of this transport are that it's simple, no network configuration required, and securely sandboxed by the operating system.
109
103
@@ -113,11 +107,8 @@ The HTTP+SSE transport is used for remote communication, where the Client and Se
113
107
114
108
Communication happens over HTTP, with the Server using Server-Sent Events (SSE) to push updates to the Client over a persistent connection.
115
109
116
-
<Tip>
117
-
118
-
**Use cases** for this transport are connecting to remote APIs, cloud services, or shared resources.
119
-
120
-
</Tip>
110
+
> [!TIP]
111
+
> **Use cases** for this transport are connecting to remote APIs, cloud services, or shared resources.
121
112
122
113
The main **Advantages** of this transport are that it works across networks, enables integration with web services, and is compatible with serverless environments.
Copy file name to clipboardExpand all lines: units/en/unit1/gradio-mcp.mdx
+2-5Lines changed: 2 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,8 @@
2
2
3
3
We've now explored the core concepts of the MCP protocol and how to implement MCP Servers and Clients. In this section, we're going to make things slightly easier by using Gradio to create an MCP Server!
4
4
5
-
<Tip>
6
-
7
-
Gradio is a popular Python library for quickly creating customizable web interfaces for machine learning models.
8
-
9
-
</Tip>
5
+
> [!TIP]
6
+
> Gradio is a popular Python library for quickly creating customizable web interfaces for machine learning models.
Copy file name to clipboardExpand all lines: units/en/unit1/hf-mcp-server.mdx
+4-10Lines changed: 4 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,8 @@
2
2
3
3
The Hugging Face MCP (Model Context Protocol) Server connects your MCP‑compatible AI assistant (for example VS Code, Cursor, Zed, or Claude Desktop) directly to the Hugging Face Hub. Once connected, your assistant can search and explore Hub resources and use community tools, all from within your editor, chat or CLI.
4
4
5
-
<Tip>
6
-
7
-
The main advanatage of the Hugging Face MCP Server is that it provides a built-in tools for the hub as well as community tools based on Gradio Spaces. As we start to build our own MCP servers, we'll see that we can use the Hugging Face MCP Server as a reference for our own MCP servers.
8
-
9
-
</Tip>
5
+
> [!TIP]
6
+
> The main advanatage of the Hugging Face MCP Server is that it provides a built-in tools for the hub as well as community tools based on Gradio Spaces. As we start to build our own MCP servers, we'll see that we can use the Hugging Face MCP Server as a reference for our own MCP servers.
10
7
11
8
## What you can do
12
9
@@ -31,11 +28,8 @@ The server provides curated tools that work across supported clients:
31
28
32
29
3. Paste and restart: copy the snippet into your client’s MCP configuration, save, and restart/reload the client. You should see “Hugging Face” (or similar) listed as a connected MCP server in your client.
33
30
34
-
<Tip>
35
-
36
-
The settings page generates the exact configuration your client expects. Use it rather than writing config by hand.
37
-
38
-
</Tip>
31
+
> [!TIP]
32
+
> The settings page generates the exact configuration your client expects. Use it rather than writing config by hand.
Copy file name to clipboardExpand all lines: units/en/unit1/key-concepts.mdx
+6-12Lines changed: 6 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,13 +35,10 @@ MCP transforms this into an M+N problem by providing a standard interface: each
35
35
36
36
Now that we understand the problem that MCP solves, let's dive into the core terminology and concepts that make up the MCP protocol.
37
37
38
-
<Tip>
39
-
40
-
MCP is a standard like HTTP or USB-C, and is a protocol for connecting AI applications to external tools and data sources. Therefore, using standard terminology is crucial to making the MCP work effectively.
41
-
42
-
When documenting our applications and communicating with the community, we should use the following terminology.
43
-
44
-
</Tip>
38
+
> [!TIP]
39
+
> MCP is a standard like HTTP or USB-C, and is a protocol for connecting AI applications to external tools and data sources. Therefore, using standard terminology is crucial to making the MCP work effectively.
40
+
>
41
+
> When documenting our applications and communicating with the community, we should use the following terminology.
45
42
46
43
### Components
47
44
@@ -55,11 +52,8 @@ Just like client server relationships in HTTP, MCP has a client and a server.
55
52
56
53
-**Server**: An external program or service that exposes capabilities (Tools, Resources, Prompts) via the MCP protocol.
57
54
58
-
<Tipwarning={true}>
59
-
60
-
A lot of content uses 'Client' and 'Host' interchangeably. Technically speaking, the host is the user-facing application, and the client is the component within the host application that manages communication with a specific MCP Server.
61
-
62
-
</Tip>
55
+
> [!WARNING]
56
+
> A lot of content uses 'Client' and 'Host' interchangeably. Technically speaking, the host is the user-facing application, and the client is the component within the host application that manages communication with a specific MCP Server.
Copy file name to clipboardExpand all lines: units/en/unit1/mcp-clients.mdx
+8-17Lines changed: 8 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,13 +12,10 @@ In this section, you will:
12
12
* Discover how to connect to the Hugging Face MCP Server and built-in tools
13
13
* See practical examples of MCP Client usage
14
14
15
-
<Tip>
16
-
17
-
In this page we're going to show examples of how to set up MCP Clients in a few different ways using the JSON notation. For now, we will use *examples* like `path/to/server.py` to represent the path to the MCP Server. In the next unit, we'll implement this with real MCP Servers.
18
-
19
-
For now, focus on understanding the MCP Client notation. We'll implement the MCP Servers in the next unit.
20
-
21
-
</Tip>
15
+
> [!TIP]
16
+
> In this page we're going to show examples of how to set up MCP Clients in a few different ways using the JSON notation. For now, we will use *examples* like `path/to/server.py` to represent the path to the MCP Server. In the next unit, we'll implement this with real MCP Servers.
17
+
>
18
+
> For now, focus on understanding the MCP Client notation. We'll implement the MCP Servers in the next unit.
22
19
23
20
## Understanding MCP Clients
24
21
@@ -57,11 +54,8 @@ Now that we've covered the core of the MCP protocol, let's look at how to config
57
54
58
55
Effective deployment of MCP servers and clients requires proper configuration.
59
56
60
-
<Tip>
61
-
62
-
The MCP specification is still evolving, so the configuration methods are subject to evolution. We'll focus on the current best practices for configuration.
63
-
64
-
</Tip>
57
+
> [!TIP]
58
+
> The MCP specification is still evolving, so the configuration methods are subject to evolution. We'll focus on the current best practices for configuration.
65
59
66
60
### MCP Configuration Files
67
61
@@ -274,11 +268,8 @@ huggingface-cli login
274
268
275
269
After creating your Hugging Face access token and logging in, you need to ensure your token has the proper permissions to work with inference providers.
276
270
277
-
<Tipwarning={true}>
278
-
279
-
**Important:** If you skip this step, you may encounter authentication errors when running tiny agents with hosted models.
280
-
281
-
</Tip>
271
+
> [!WARNING]
272
+
> **Important:** If you skip this step, you may encounter authentication errors when running tiny agents with hosted models.
282
273
283
274
1. Go to your [Hugging Face Access Tokens page](https://huggingface.co/settings/tokens)
284
275
2. Find your MCP token and click the three dots (⋮) next to it
Copy file name to clipboardExpand all lines: units/en/unit2/clients.mdx
+2-5Lines changed: 2 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,11 +32,8 @@ The standard configuration file for MCP is named `mcp.json`. Here's the basic st
32
32
33
33
In this example, we have a single server configured to use SSE transport, connecting to a local Gradio server running on port 7860.
34
34
35
-
<Tip>
36
-
37
-
We've connected to the Gradio app via SSE transport because we assume that the gradio app is running on a remote server. However, if you want to connect to a local script, `stdio` transport instead of `sse` transport is a better option.
38
-
39
-
</Tip>
35
+
> [!TIP]
36
+
> We've connected to the Gradio app via SSE transport because we assume that the gradio app is running on a remote server. However, if you want to connect to a local script, `stdio` transport instead of `sse` transport is a better option.
0 commit comments