Skip to content

Commit f8a8dd3

Browse files
committed
add install instructions
1 parent 7c51590 commit f8a8dd3

File tree

1 file changed

+24
-13
lines changed

1 file changed

+24
-13
lines changed

units/en/unit2/tiny-agents.mdx

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Tiny Agents: an MCP-powered agent in 50 lines of code
1+
# Building Tiny Agents with MCP and the Hugging Face Hub
22

33
Now that we've built MCP servers in Gradio and learned about creating MCP clients, let's complete our end-to-end application by building an agent that can seamlessly interact with our sentiment analysis tool. This section builds on the project [Tiny Agents](https://huggingface.co/blog/tiny-agents), which demonstrates a super simple way of deploying MCP clients that can connect to services like our Gradio sentiment analysis server.
44

@@ -9,6 +9,14 @@ In this final exercise of Unit 2, we will walk you through how to implement both
99

1010
## Installation
1111

12+
Let's install the necessary packages to build our Tiny Agents.
13+
14+
<Tip>
15+
16+
Some MCP Clients, notably Claude Desktop, do not yet support SSE-based MCP Servers. In those cases, you can use a tool such as [mcp-remote](https://github.com/geelen/mcp-remote). First install Node.js. Then, add the following to your own MCP Client config:
17+
18+
</Tip>
19+
1220
<hfoptions id="installation">
1321
<hfoption id="typescript">
1422

@@ -23,9 +31,9 @@ pnpm add @huggingface/tiny-agents
2331
Then, we need to install the `mcp-remote` package.
2432

2533
```bash
26-
npm install @mcpjs/mcp-remote
34+
npm install mcp-remote
2735
# or
28-
pnpm add @mcpjs/mcp-remote
36+
pnpm add mcp-remote
2937
```
3038

3139
</hfoption>
@@ -40,7 +48,13 @@ pip install "huggingface_hub[mcp]>=0.32.0"
4048
Then, we need to install the `mcp-remote` package.
4149

4250
```bash
43-
pip install mcp-remote
51+
npm install mcp-remote
52+
```
53+
54+
And we'll need to install `npx` to run the `mcp-remote` command.
55+
56+
```bash
57+
npm install -g npx
4458
```
4559

4660
</hfoption>
@@ -107,10 +121,9 @@ The JSON file will look like this:
107121
{
108122
"type": "stdio",
109123
"config": {
110-
"command": "python",
124+
"command": "npx",
111125
"args": [
112-
"-m",
113-
"mcp_remote",
126+
"mcp-remote",
114127
"http://localhost:7860/gradio_api/mcp/sse"
115128
]
116129
}
@@ -171,10 +184,9 @@ We could also use an open source model running locally with Tiny Agents.
171184
{
172185
"type": "stdio",
173186
"config": {
174-
"command": "python",
187+
"command": "npx",
175188
"args": [
176-
"-m",
177-
"mcp_remote",
189+
"mcp-remote",
178190
"http://localhost:1234/v1/mcp/sse"
179191
]
180192
}
@@ -230,10 +242,9 @@ agent = Agent(
230242
provider="nebius",
231243
servers=[
232244
{
233-
"command": "python",
245+
"command": "npx",
234246
"args": [
235-
"-m",
236-
"mcp_remote",
247+
"mcp-remote",
237248
"http://localhost:7860/gradio_api/mcp/sse" # Your Gradio MCP server
238249
]
239250
}

0 commit comments

Comments
 (0)