Spaces:
Sleeping
Sleeping
Merge pull request #4 from huggingface/fix-tables-and-toc
Browse files
units/en/_toctree.yml
CHANGED
|
@@ -38,9 +38,9 @@
|
|
| 38 |
- title: "3. Use Case: Advanced MCP Development"
|
| 39 |
sections:
|
| 40 |
- local: unit3/introduction
|
| 41 |
-
title:
|
| 42 |
|
| 43 |
- title: "Bonus Units"
|
| 44 |
sections:
|
| 45 |
- local: unit4/introduction
|
| 46 |
-
title:
|
|
|
|
| 38 |
- title: "3. Use Case: Advanced MCP Development"
|
| 39 |
sections:
|
| 40 |
- local: unit3/introduction
|
| 41 |
+
title: Coming Soon
|
| 42 |
|
| 43 |
- title: "Bonus Units"
|
| 44 |
sections:
|
| 45 |
- local: unit4/introduction
|
| 46 |
+
title: Coming Soon
|
units/en/unit1/communication-protocol.mdx
CHANGED
|
@@ -129,73 +129,27 @@ In the previous section, we discussed the lifecycle of a single interaction betw
|
|
| 129 |
|
| 130 |
The MCP protocol defines a structured interaction lifecycle between Clients and Servers:
|
| 131 |
|
| 132 |
-
<style>
|
| 133 |
-
.diagram {
|
| 134 |
-
margin: 20px 0;
|
| 135 |
-
font-family: monospace;
|
| 136 |
-
}
|
| 137 |
-
.client {
|
| 138 |
-
background-color: lightgreen;
|
| 139 |
-
}
|
| 140 |
-
.server {
|
| 141 |
-
background-color: lightblue;
|
| 142 |
-
}
|
| 143 |
-
.client, .server {
|
| 144 |
-
display: inline-block;
|
| 145 |
-
width: 50px;
|
| 146 |
-
text-align: center;
|
| 147 |
-
padding: 10px;
|
| 148 |
-
border: 1px solid #ccc;
|
| 149 |
-
border-radius: 4px;
|
| 150 |
-
margin: 0px;
|
| 151 |
-
}
|
| 152 |
-
.arrow {
|
| 153 |
-
display: inline-block;
|
| 154 |
-
width: 100px;
|
| 155 |
-
text-align: center;
|
| 156 |
-
color: #666;
|
| 157 |
-
position: relative;
|
| 158 |
-
}
|
| 159 |
-
.arrow::before {
|
| 160 |
-
content: "β";
|
| 161 |
-
position: absolute;
|
| 162 |
-
bottom: -15px;
|
| 163 |
-
left: 50%;
|
| 164 |
-
transform: translateX(-50%);
|
| 165 |
-
}
|
| 166 |
-
.arrow.reverse::before {
|
| 167 |
-
content: "β";
|
| 168 |
-
}
|
| 169 |
-
.message {
|
| 170 |
-
display: block;
|
| 171 |
-
margin: 5px 0 20px 0;
|
| 172 |
-
color: #333;
|
| 173 |
-
}
|
| 174 |
-
</style>
|
| 175 |
-
|
| 176 |
### Initialization
|
| 177 |
|
| 178 |
The Client connects to the Server and they exchange protocol versions and capabilities, and the Server responds with its supported protocol version and capabilities.
|
| 179 |
|
| 180 |
-
<
|
| 181 |
-
|
| 182 |
-
<
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
<
|
| 188 |
-
<
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
<
|
| 193 |
-
<
|
| 194 |
-
<
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
<div class="server">π</div>
|
| 198 |
-
</div>
|
| 199 |
|
| 200 |
The Client confirms the initialization is complete via a notification message.
|
| 201 |
|
|
@@ -203,19 +157,18 @@ The Client confirms the initialization is complete via a notification message.
|
|
| 203 |
|
| 204 |
The Client requests information about available capabilities and the Server responds with a list of available tools.
|
| 205 |
|
| 206 |
-
<
|
| 207 |
-
|
| 208 |
-
<
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
<
|
| 214 |
-
<
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
</div>
|
| 219 |
|
| 220 |
This process could be repeated for each tool, resource, or prompt type.
|
| 221 |
|
|
@@ -223,49 +176,45 @@ This process could be repeated for each tool, resource, or prompt type.
|
|
| 223 |
|
| 224 |
The Client invokes capabilities based on the Host's needs.
|
| 225 |
|
| 226 |
-
<
|
| 227 |
-
|
| 228 |
-
<
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
<
|
| 234 |
-
<
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
<
|
| 239 |
-
<
|
| 240 |
-
<
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
<div class="server">π</div>
|
| 244 |
-
</div>
|
| 245 |
|
| 246 |
### Termination
|
| 247 |
|
| 248 |
The connection is gracefully closed when no longer needed and the Server acknowledges the shutdown request.
|
| 249 |
|
| 250 |
-
<
|
| 251 |
-
|
| 252 |
-
<
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
<
|
| 258 |
-
<
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
<
|
| 263 |
-
<
|
| 264 |
-
<
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
<div class="server">π</div>
|
| 268 |
-
</div>
|
| 269 |
|
| 270 |
The Client sends the final exit message to complete the termination.
|
| 271 |
|
|
|
|
| 129 |
|
| 130 |
The MCP protocol defines a structured interaction lifecycle between Clients and Servers:
|
| 131 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 132 |
### Initialization
|
| 133 |
|
| 134 |
The Client connects to the Server and they exchange protocol versions and capabilities, and the Server responds with its supported protocol version and capabilities.
|
| 135 |
|
| 136 |
+
<table style="width: 100%;">
|
| 137 |
+
<tr>
|
| 138 |
+
<td style="background-color: lightgreen; text-align: center; padding: 10px; border: 1px solid #ccc; border-radius: 4px;">π»</td>
|
| 139 |
+
<td style="text-align: center;">β<br>initialize</td>
|
| 140 |
+
<td style="background-color: lightblue; text-align: center; padding: 10px; border: 1px solid #ccc; border-radius: 4px;">π</td>
|
| 141 |
+
</tr>
|
| 142 |
+
<tr>
|
| 143 |
+
<td style="background-color: lightgreen; text-align: center; padding: 10px; border: 1px solid #ccc; border-radius: 4px;">π»</td>
|
| 144 |
+
<td style="text-align: center;">β<br>response</td>
|
| 145 |
+
<td style="background-color: lightblue; text-align: center; padding: 10px; border: 1px solid #ccc; border-radius: 4px;">π</td>
|
| 146 |
+
</tr>
|
| 147 |
+
<tr>
|
| 148 |
+
<td style="background-color: lightgreen; text-align: center; padding: 10px; border: 1px solid #ccc; border-radius: 4px;">π»</td>
|
| 149 |
+
<td style="text-align: center;">β<br>initialized</td>
|
| 150 |
+
<td style="background-color: lightblue; text-align: center; padding: 10px; border: 1px solid #ccc; border-radius: 4px;">π</td>
|
| 151 |
+
</tr>
|
| 152 |
+
</table>
|
|
|
|
|
|
|
| 153 |
|
| 154 |
The Client confirms the initialization is complete via a notification message.
|
| 155 |
|
|
|
|
| 157 |
|
| 158 |
The Client requests information about available capabilities and the Server responds with a list of available tools.
|
| 159 |
|
| 160 |
+
<table style="width: 100%;">
|
| 161 |
+
<tr>
|
| 162 |
+
<td style="background-color: lightgreen; text-align: center; padding: 10px; border: 1px solid #ccc; border-radius: 4px;">π»</td>
|
| 163 |
+
<td style="text-align: center;">β<br>tools/list</td>
|
| 164 |
+
<td style="background-color: lightblue; text-align: center; padding: 10px; border: 1px solid #ccc; border-radius: 4px;">π</td>
|
| 165 |
+
</tr>
|
| 166 |
+
<tr>
|
| 167 |
+
<td style="background-color: lightgreen; text-align: center; padding: 10px; border: 1px solid #ccc; border-radius: 4px;">π»</td>
|
| 168 |
+
<td style="text-align: center;">β<br>response</td>
|
| 169 |
+
<td style="background-color: lightblue; text-align: center; padding: 10px; border: 1px solid #ccc; border-radius: 4px;">π</td>
|
| 170 |
+
</tr>
|
| 171 |
+
</table>
|
|
|
|
| 172 |
|
| 173 |
This process could be repeated for each tool, resource, or prompt type.
|
| 174 |
|
|
|
|
| 176 |
|
| 177 |
The Client invokes capabilities based on the Host's needs.
|
| 178 |
|
| 179 |
+
<table style="width: 100%;">
|
| 180 |
+
<tr>
|
| 181 |
+
<td style="background-color: lightgreen; text-align: center; padding: 10px; border: 1px solid #ccc; border-radius: 4px;">π»</td>
|
| 182 |
+
<td style="text-align: center;">β<br>tools/call</td>
|
| 183 |
+
<td style="background-color: lightblue; text-align: center; padding: 10px; border: 1px solid #ccc; border-radius: 4px;">π</td>
|
| 184 |
+
</tr>
|
| 185 |
+
<tr>
|
| 186 |
+
<td style="background-color: lightgreen; text-align: center; padding: 10px; border: 1px solid #ccc; border-radius: 4px;">π»</td>
|
| 187 |
+
<td style="text-align: center;">β<br>notification (optional progress)</td>
|
| 188 |
+
<td style="background-color: lightblue; text-align: center; padding: 10px; border: 1px solid #ccc; border-radius: 4px;">π</td>
|
| 189 |
+
</tr>
|
| 190 |
+
<tr>
|
| 191 |
+
<td style="background-color: lightgreen; text-align: center; padding: 10px; border: 1px solid #ccc; border-radius: 4px;">π»</td>
|
| 192 |
+
<td style="text-align: center;">β<br>response</td>
|
| 193 |
+
<td style="background-color: lightblue; text-align: center; padding: 10px; border: 1px solid #ccc; border-radius: 4px;">π</td>
|
| 194 |
+
</tr>
|
| 195 |
+
</table>
|
|
|
|
|
|
|
| 196 |
|
| 197 |
### Termination
|
| 198 |
|
| 199 |
The connection is gracefully closed when no longer needed and the Server acknowledges the shutdown request.
|
| 200 |
|
| 201 |
+
<table style="width: 100%;">
|
| 202 |
+
<tr>
|
| 203 |
+
<td style="background-color: lightgreen; text-align: center; padding: 10px; border: 1px solid #ccc; border-radius: 4px;">π»</td>
|
| 204 |
+
<td style="text-align: center;">β<br>shutdown</td>
|
| 205 |
+
<td style="background-color: lightblue; text-align: center; padding: 10px; border: 1px solid #ccc; border-radius: 4px;">π</td>
|
| 206 |
+
</tr>
|
| 207 |
+
<tr>
|
| 208 |
+
<td style="background-color: lightgreen; text-align: center; padding: 10px; border: 1px solid #ccc; border-radius: 4px;">π»</td>
|
| 209 |
+
<td style="text-align: center;">β<br>response</td>
|
| 210 |
+
<td style="background-color: lightblue; text-align: center; padding: 10px; border: 1px solid #ccc; border-radius: 4px;">π</td>
|
| 211 |
+
</tr>
|
| 212 |
+
<tr>
|
| 213 |
+
<td style="background-color: lightgreen; text-align: center; padding: 10px; border: 1px solid #ccc; border-radius: 4px;">π»</td>
|
| 214 |
+
<td style="text-align: center;">β<br>exit</td>
|
| 215 |
+
<td style="background-color: lightblue; text-align: center; padding: 10px; border: 1px solid #ccc; border-radius: 4px;">π</td>
|
| 216 |
+
</tr>
|
| 217 |
+
</table>
|
|
|
|
|
|
|
| 218 |
|
| 219 |
The Client sends the final exit message to complete the termination.
|
| 220 |
|
units/en/unit3/introduction.mdx
CHANGED
|
@@ -1 +1,3 @@
|
|
| 1 |
-
#
|
|
|
|
|
|
|
|
|
| 1 |
+
# Coming Soon
|
| 2 |
+
|
| 3 |
+
This will be another use case that dives deeper into the MCP protocol and how to use it in more complex ways.
|
units/en/unit4/introduction.mdx
CHANGED
|
@@ -1 +1,5 @@
|
|
| 1 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Coming Soon
|
| 2 |
+
|
| 3 |
+
This unit will be a collaboration with partners from the AI community.
|
| 4 |
+
|
| 5 |
+
If you're building tools for MCP, please reach out to us and we'll add you to the unit. Open a [discussion](https://huggingface.co/spaces/mcp-course/README/discussions) on the hub organization.
|