Skip to content

Commit 091d465

Browse files
committed
Fixes
1 parent 614a7d9 commit 091d465

File tree

2 files changed

+22
-28
lines changed

2 files changed

+22
-28
lines changed

quickstart.mdx

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,15 @@ Now, let's create and set up our project:
9494
<CodeGroup>
9595
```bash MacOS/Linux
9696
# Create a new directory for our project
97-
uv init mcp-quickstart
98-
cd mcp-quickstart
97+
uv init weather
98+
cd weather
9999

100100
# Create virtual environment and activate it
101101
uv venv
102102
source .venv/bin/activate
103103

104104
# Install dependencies
105-
uv pip install mcp httpx
105+
uv add mcp httpx
106106

107107
# Remove template file
108108
rm hello.py
@@ -115,15 +115,15 @@ touch src/weather/server.py
115115

116116
```powershell Windows
117117
# Create a new directory for our project
118-
uv init mcp-quickstart
119-
cd mcp-quickstart
118+
uv init weather
119+
cd weather
120120
121121
# Create virtual environment and activate it
122122
uv venv
123123
.venv\Scripts\activate
124124
125125
# Install dependencies
126-
uv pip install mcp httpx
126+
uv add mcp httpx
127127
128128
# Clean up boilerplate code
129129
rm hello.py
@@ -169,8 +169,8 @@ __all__ = ['main', 'server']
169169
<CodeGroup>
170170
```bash MacOS/Linux
171171
# Create a new directory for our project
172-
mkdir mcp-quickstart
173-
cd mcp-quickstart
172+
mkdir weather
173+
cd weather
174174

175175
# Initialize a new npm project
176176
npm init -y
@@ -186,8 +186,8 @@ touch src/index.ts
186186

187187
```powershell Windows
188188
# Create a new directory for our project
189-
md mcp-quickstart
190-
cd mcp-quickstart
189+
md weather
190+
cd weather
191191
192192
# Initialize a new npm project
193193
npm init -y
@@ -566,7 +566,7 @@ async def handle_call_tool(
566566
return [types.TextContent(type="text", text=f"No active alerts for {state}")]
567567

568568
# Format each alert into a concise string
569-
formatted_alerts = [format_alert(feature) for feature in features]
569+
formatted_alerts = [format_alert(feature) for feature in features[:20]] # only take the first 20 alerts
570570
alerts_text = f"Active alerts for {state}:\n\n" + "\n".join(formatted_alerts)
571571

572572
return [
@@ -680,7 +680,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
680680
};
681681
}
682682

683-
const formattedAlerts = features.map(formatAlert);
683+
const formattedAlerts = features.map(formatAlert).slice(0, 20) // only take the first 20 alerts;
684684
const alertsText = `Active alerts for ${stateCode}:\n\n${formattedAlerts.join(
685685
"\n"
686686
)}`;
@@ -838,7 +838,9 @@ Make sure to run `npm run build` to build your server! This is a very important
838838
</Tab>
839839
</Tabs>
840840

841-
Your server is complete! Let's now test your server from an existing MCP host, Claude for Desktop.
841+
Your server is complete! Run `uv run src/weather/server.py` to confirm that everything's working.
842+
843+
Let's now test your server from an existing MCP host, Claude for Desktop.
842844

843845
## Testing your server with Claude for Desktop
844846

@@ -878,7 +880,7 @@ Add this configuration (replace the parent folder path):
878880
"command": "uv",
879881
"args": [
880882
"--directory",
881-
"/PATH/TO/PARENT/FOLDER/mcp-quickstart",
883+
"/PATH/TO/PARENT/FOLDER/weather",
882884
"run",
883885
"weather"
884886
]
@@ -893,7 +895,7 @@ Add this configuration (replace the parent folder path):
893895
"weather": {
894896
"command": "node",
895897
"args": [
896-
"/PATH/TO/PARENT/FOLDER/mcp-quickstart/build/index.js"
898+
"/PATH/TO/PARENT/FOLDER/weather/build/index.js"
897899
]
898900
}
899901
}
@@ -911,7 +913,7 @@ Add this configuration (replace the parent folder path):
911913
"command": "uv",
912914
"args": [
913915
"--directory",
914-
"C:\\PATH\TO\PARENT\FOLDER\mcp-quickstart",
916+
"C:\\PATH\TO\PARENT\FOLDER\weather",
915917
"run",
916918
"weather"
917919
]
@@ -926,7 +928,7 @@ Add this configuration (replace the parent folder path):
926928
"weather": {
927929
"command": "node",
928930
"args": [
929-
"C:\\PATH\TO\PARENT\FOLDER\mcp-quickstart\build\index.ts"
931+
"C:\\PATH\TO\PARENT\FOLDER\weather\build\index.ts"
930932
]
931933
}
932934
}
@@ -939,7 +941,7 @@ Add this configuration (replace the parent folder path):
939941

940942
This tells Claude Desktop:
941943
1. There's an MCP server named "weather"
942-
2. Launch it by running `uv --directory /PATH/TO/PARENT/FOLDER/mcp-quickstart run weather` if using Python or `node /PATH/TO/PARENT/FOLDER/mcp-quickstart/build/index.js` if using Node
944+
2. Launch it by running `uv --directory /PATH/TO/PARENT/FOLDER/weather run weather` if using Python or `node /PATH/TO/PARENT/FOLDER/weather/build/index.js` if using Node
943945

944946
Save the file, and restart **Claude Desktop**.
945947

tutorials/building-a-client.mdx

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,9 @@
11
---
2-
title: "Building a MCP client"
2+
title: "Building MCP clients"
33
description: "Learn how to build your first client in MCP"
44
---
55

6-
In this tutorial, you'll learn how to build a client application that connects to MCP servers.
7-
8-
## Prerequisite Knowledge
9-
10-
This tutorial assumes familiarity with:
11-
- Python
12-
- LLMs like Claude
13-
14-
It helps to understand [tool use (aka function calling)](https://docs.anthropic.com/en/docs/build-with-claude/tool-use), but it's not required.
6+
In this tutorial, you'll learn how to build a client application that connects to MCP servers. It helps to have gone through the [Quickstart tutorial](/quickstart) that guides you through the basic of building your first server.
157

168
## System Requirements
179

0 commit comments

Comments
 (0)