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: quickstart.mdx
+59-33Lines changed: 59 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ We'll build a server that exposes two tools: `get-alerts` and `get-forecast`. Th
19
19
</Frame>
20
20
21
21
<Note>
22
-
Servers can connect to any client. We've chosen Claude desktop here for simplicity, but we also have guides on [building your own client](/tutorials/building-a-client).
22
+
Servers can connect to any client. We've chosen Claude for Desktop here for simplicity, but we also have guides on [building your own client](/tutorials/building-a-client) as well as a [list of other clients here](/clients).
23
23
</Note>
24
24
25
25
<Accordiontitle="Why Claude for Desktop and not Claude.ai?">
@@ -34,11 +34,13 @@ MCP servers can provide three main types of capabilities:
34
34
2.**Tools**: Functions that can be called by the LLM (with user approval)
35
35
3.**Prompts**: Pre-written templates that help users accomplish specific tasks
36
36
37
-
This tutorial focuses on tools, but we have intermediate tutorials if you'd like to learn more about Resources and Prompts.
37
+
This tutorial will primarily focus on tools.
38
38
39
39
<Tabs>
40
40
<Tabtitle='Python'>
41
41
42
+
Let's get started with building our weather server! [You can find the complete code for what we'll be building here.](https://github.com/modelcontextprotocol/quickstart-resources/tree/main/weather-server-python)
43
+
42
44
### Prerequisite knowledge
43
45
44
46
This quickstart assumes you have familiarity with:
@@ -143,7 +145,7 @@ __all__ = ['main', 'server']
143
145
144
146
Now let's dive into building your server.
145
147
146
-
## Building your server
148
+
## Building your server
147
149
148
150
### Importing packages
149
151
@@ -401,9 +403,10 @@ Let's now test your server from an existing MCP host, Claude for Desktop.
401
403
Claude for Desktop is not yet available on Linux. Linux users can proceed to the [Building a client](/tutorials/building-a-client) tutorial to build an MCP client that connects to the server we just built.
402
404
</Note>
403
405
404
-
First, make sure you have Claude for Desktop installed. [You can install the latest version here.](https://claude.ai/download)
406
+
First, make sure you have Claude for Desktop installed. [You can install the latest version
407
+
here.](https://claude.ai/download) If you already have Claude for Desktop, **make sure it's updated to the latest version.**
405
408
406
-
Next, open your Claude for Desktop App configuration at `~/Library/Application Support/Claude/claude_desktop_config.json` in a text editor.
409
+
We'll need to configure Claude for Desktop for whichever MCP servers you want to use. To do this, open your Claude for Desktop App configuration at `~/Library/Application Support/Claude/claude_desktop_config.json` in a text editor. Make sure to create the file if it doesn't exist.
407
410
408
411
For example, if you have [VS Code](https://code.visualstudio.com/) installed:
You'll then add your servers in the `mcpServers` key. The MCP UI elements will only show up in Claude for Desktop if at least one server is properly configured.
423
427
424
-
Add this configuration (replace the parent folder path):
428
+
In this case, we'll add our single weather server like so:
425
429
426
430
<Tabs>
427
431
<Tabtitle="MacOS/Linux">
@@ -460,13 +464,20 @@ Add this configuration (replace the parent folder path):
460
464
</Tab>
461
465
</Tabs>
462
466
467
+
<Note>
468
+
Make sure you pass in the absolute path to your server.
469
+
</Note>
470
+
463
471
This tells Claude for Desktop:
464
472
1. There's an MCP server named "weather"
465
-
2.Launch it by running `uv --directory /ABSOLUTE/PATH/TO/PARENT/FOLDER/weather run weather`
473
+
2.To launch it by running `uv --directory /ABSOLUTE/PATH/TO/PARENT/FOLDER/weather run weather`
466
474
467
475
Save the file, and restart **Claude for Desktop**.
468
476
</Tab>
477
+
469
478
<Tabtitle="Node">
479
+
Let's get started with building our weather server! [You can find the complete code for what we'll be building here.](https://github.com/modelcontextprotocol/quickstart-resources/tree/main/weather-server-typescript)
480
+
470
481
### Prerequisite knowledge
471
482
472
483
This quickstart assumes you have familiarity with:
@@ -911,12 +922,13 @@ Let's now test your server from an existing MCP host, Claude for Desktop.
911
922
## Testing your server with Claude for Desktop
912
923
913
924
<Note>
914
-
Unfortunately, Claude for Desktop is not yet available on Linux. Linux users can proceed to the [Building a client](/tutorials/building-a-client) tutorial for a workaround.
925
+
Claude for Desktop is not yet available on Linux. Linux users can proceed to the [Building a client](/tutorials/building-a-client) tutorial to build an MCP client that connects to the server we just built.
915
926
</Note>
916
927
917
-
First, make sure you have Claude for Desktop installed. [You can install the latest version here.](https://claude.ai/download)
928
+
First, make sure you have Claude for Desktop installed. [You can install the latest version
929
+
here.](https://claude.ai/download) If you already have Claude for Desktop, **make sure it's updated to the latest version.**
918
930
919
-
Next, open your Claude for Desktop App configuration at `~/Library/Application Support/Claude/claude_desktop_config.json` in a text editor.
931
+
We'll need to configure Claude for Desktop for whichever MCP servers you want to use. To do this, open your Claude for Desktop App configuration at `~/Library/Application Support/Claude/claude_desktop_config.json` in a text editor. Make sure to create the file if it doesn't exist.
920
932
921
933
For example, if you have [VS Code](https://code.visualstudio.com/) installed:
You'll then add your servers in the `mcpServers` key. The MCP UI elements will only show up in Claude for Desktop if at least one server is properly configured.
936
949
937
-
Add this configuration (replace the parent folder path):
950
+
In this case, we'll add our single weather server like so:
938
951
939
952
<Tabs>
940
953
<Tabtitle="MacOS/Linux">
@@ -981,7 +994,7 @@ Save the file, and restart **Claude for Desktop**.
981
994
982
995
### Test with commands
983
996
984
-
First, make sure Claude for Desktop is picking up the two tools we've exposed in our `weather` server. You can do this by looking for the hammer <imgsrc="/images/claude-desktop-mcp-hammer-icon.svg"style={{display: 'inline', margin: 0, height: '1.3em'}} /> icon:
997
+
Let's make sure Claude for Desktop is picking up the two tools we've exposed in our `weather` server. You can do this by looking for the hammer <imgsrc="/images/claude-desktop-mcp-hammer-icon.svg"style={{display: 'inline', margin: 0, height: '1.3em'}} /> icon:
0 commit comments