Skip to content

Commit 1a92853

Browse files
authored
Merge pull request #186 from huggingface/migrate-tips
migrate-tips
2 parents 06bed1f + 6eb344c commit 1a92853

38 files changed

+347
-597
lines changed

units/en/unit0/introduction.mdx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,8 @@ If you don't have any of these, don't worry! Here are some resources that can he
6868
* [LLM Course](https://huggingface.co/learn/llm-course/) will guide you through the basics of using and building with LLMs.
6969
* [Agents Course](https://huggingface.co/learn/agents-course/) will guide you through building AI agents with LLMs.
7070

71-
<Tip>
72-
73-
The above courses are not prerequisites in themselves, so if you understand the concepts of LLMs and agents, you can start the course now!
74-
75-
</Tip>
71+
> [!TIP]
72+
> The above courses are not prerequisites in themselves, so if you understand the concepts of LLMs and agents, you can start the course now!
7673
7774
## What tools do I need?
7875

units/en/unit1/architectural-components.mdx

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,8 @@ The **Server** is an external program or service that exposes capabilities to AI
4848

4949
Let's examine how these components interact in a typical MCP workflow:
5050

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.
5653
5754
1. **User Interaction**: The user interacts with the **Host** application, expressing an intent or query.
5855

@@ -70,11 +67,8 @@ In the next section, we'll dive deeper into the communication protocol that enab
7067

7168
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**.
7269

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.
7872
7973
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.
8074

units/en/unit1/capabilities.mdx

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,10 @@
22

33
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.
44

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.
129
1310
## Tools
1411

@@ -200,11 +197,8 @@ The sampling flow follows these steps:
200197
4. Client reviews the completion
201198
5. Client returns the result to the server
202199

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.
208202
209203
## How Capabilities Work Together
210204

units/en/unit1/certificate.mdx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ Below is a quiz to check your understanding of the unit.
1111
height="450"
1212
></iframe>
1313

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).
1916

units/en/unit1/communication-protocol.mdx

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,8 @@
22

33
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.
44

5-
<Tip warning={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.
107
118
## JSON-RPC: The Foundation
129

@@ -99,11 +96,8 @@ The stdio transport is used for local communication, where the Client and Server
9996

10097
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).
10198

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.
107101
108102
The main **Advantages** of this transport are that it's simple, no network configuration required, and securely sandboxed by the operating system.
109103

@@ -113,11 +107,8 @@ The HTTP+SSE transport is used for remote communication, where the Client and Se
113107

114108
Communication happens over HTTP, with the Server using Server-Sent Events (SSE) to push updates to the Client over a persistent connection.
115109

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.
121112
122113
The main **Advantages** of this transport are that it works across networks, enables integration with web services, and is compatible with serverless environments.
123114

units/en/unit1/gradio-mcp.mdx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,8 @@
22

33
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!
44

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.
107
118
## Introduction to Gradio
129

units/en/unit1/hf-mcp-server.mdx

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,8 @@
22

33
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.
44

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.
107
118
## What you can do
129

@@ -31,11 +28,8 @@ The server provides curated tools that work across supported clients:
3128

3229
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.
3330

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.
3933
4034
![MCP Settings Example](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hf-mcp-settings.png)
4135

units/en/unit1/key-concepts.mdx

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,10 @@ MCP transforms this into an M+N problem by providing a standard interface: each
3535

3636
Now that we understand the problem that MCP solves, let's dive into the core terminology and concepts that make up the MCP protocol.
3737

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.
4542
4643
### Components
4744

@@ -55,11 +52,8 @@ Just like client server relationships in HTTP, MCP has a client and a server.
5552

5653
- **Server**: An external program or service that exposes capabilities (Tools, Resources, Prompts) via the MCP protocol.
5754

58-
<Tip warning={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.
6357
6458
### Capabilities
6559

units/en/unit1/mcp-clients.mdx

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,10 @@ In this section, you will:
1212
* Discover how to connect to the Hugging Face MCP Server and built-in tools
1313
* See practical examples of MCP Client usage
1414

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.
2219
2320
## Understanding MCP Clients
2421

@@ -57,11 +54,8 @@ Now that we've covered the core of the MCP protocol, let's look at how to config
5754

5855
Effective deployment of MCP servers and clients requires proper configuration.
5956

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.
6559
6660
### MCP Configuration Files
6761

@@ -274,11 +268,8 @@ huggingface-cli login
274268

275269
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.
276270

277-
<Tip warning={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.
282273
283274
1. Go to your [Hugging Face Access Tokens page](https://huggingface.co/settings/tokens)
284275
2. Find your MCP token and click the three dots (⋮) next to it

units/en/unit2/clients.mdx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,8 @@ The standard configuration file for MCP is named `mcp.json`. Here's the basic st
3232

3333
In this example, we have a single server configured to use SSE transport, connecting to a local Gradio server running on port 7860.
3434

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.
4037
4138
#### Configuration for HTTP+SSE Transport
4239

0 commit comments

Comments
 (0)