Skip to content

Commit 65673e9

Browse files
authored
Merge pull request modelcontextprotocol#77 from modelcontextprotocol/zack-lee/troubleshooting-qs
Better troubleshooting guidance
2 parents 19a38b9 + 9393636 commit 65673e9

File tree

2 files changed

+60
-34
lines changed

2 files changed

+60
-34
lines changed

quickstart.mdx

Lines changed: 59 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ We'll build a server that exposes two tools: `get-alerts` and `get-forecast`. Th
1919
</Frame>
2020

2121
<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).
2323
</Note>
2424

2525
<Accordion title="Why Claude for Desktop and not Claude.ai?">
@@ -34,11 +34,13 @@ MCP servers can provide three main types of capabilities:
3434
2. **Tools**: Functions that can be called by the LLM (with user approval)
3535
3. **Prompts**: Pre-written templates that help users accomplish specific tasks
3636

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.
3838

3939
<Tabs>
4040
<Tab title='Python'>
4141

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+
4244
### Prerequisite knowledge
4345

4446
This quickstart assumes you have familiarity with:
@@ -143,7 +145,7 @@ __all__ = ['main', 'server']
143145

144146
Now let's dive into building your server.
145147

146-
## Building your server
148+
## Building your server
147149

148150
### Importing packages
149151

@@ -401,9 +403,10 @@ Let's now test your server from an existing MCP host, Claude for Desktop.
401403
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.
402404
</Note>
403405

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.**
405408

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.
407410

408411
For example, if you have [VS Code](https://code.visualstudio.com/) installed:
409412

@@ -420,8 +423,9 @@ code $env:AppData\Claude\claude_desktop_config.json
420423
</Tab>
421424
</Tabs>
422425

426+
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.
423427

424-
Add this configuration (replace the parent folder path):
428+
In this case, we'll add our single weather server like so:
425429

426430
<Tabs>
427431
<Tab title="MacOS/Linux">
@@ -460,13 +464,20 @@ Add this configuration (replace the parent folder path):
460464
</Tab>
461465
</Tabs>
462466

467+
<Note>
468+
Make sure you pass in the absolute path to your server.
469+
</Note>
470+
463471
This tells Claude for Desktop:
464472
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`
466474

467475
Save the file, and restart **Claude for Desktop**.
468476
</Tab>
477+
469478
<Tab title="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+
470481
### Prerequisite knowledge
471482

472483
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.
911922
## Testing your server with Claude for Desktop
912923

913924
<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.
915926
</Note>
916927

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.**
918930

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.
920932

921933
For example, if you have [VS Code](https://code.visualstudio.com/) installed:
922934

@@ -933,8 +945,9 @@ code $env:AppData\Claude\claude_desktop_config.json
933945
</Tab>
934946
</Tabs>
935947

948+
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.
936949

937-
Add this configuration (replace the parent folder path):
950+
In this case, we'll add our single weather server like so:
938951

939952
<Tabs>
940953
<Tab title="MacOS/Linux">
@@ -981,7 +994,7 @@ Save the file, and restart **Claude for Desktop**.
981994

982995
### Test with commands
983996

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 <img src="/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 <img src="/images/claude-desktop-mcp-hammer-icon.svg" style={{display: 'inline', margin: 0, height: '1.3em'}} /> icon:
985998

986999
<Frame>
9871000
<img src="/images/visual-indicator-mcp-tools.png" />
@@ -993,9 +1006,9 @@ After clicking on the hammer icon, you should see two tools listed:
9931006
<img src="/images/available-mcp-tools.png" />
9941007
</Frame>
9951008

996-
If your server isn't being picked up by Claude for Desktop, proceed to the [Troubleshooting](#troubleshooting) section for debugging advice.
1009+
If your server isn't being picked up by Claude for Desktop, proceed to the [Troubleshooting](#troubleshooting) section for debugging tips.
9971010

998-
You can now test your server by running the following commands in Claude for Desktop:
1011+
If the hammer icon has shown up, you can now test your server by running the following commands in Claude for Desktop:
9991012

10001013
- What's the weather in Sacramento?
10011014
- What are the active weather alerts in Texas?
@@ -1025,6 +1038,38 @@ When you ask a question:
10251038
## Troubleshooting
10261039

10271040
<AccordionGroup>
1041+
<Accordion title="Claude for Desktop Integration Issues">
1042+
**Getting logs from Claude for Desktop**
1043+
1044+
Claude.app logging related to MCP is written to log files in `~/Library/Logs/Claude`:
1045+
1046+
- `mcp.log` will contain general logging about MCP connections and connection failures.
1047+
- Files named `mcp-server-SERVERNAME.log` will contain error (stderr) logging from the named server.
1048+
1049+
You can run the following command to list recent logs and follow along with any new ones:
1050+
```bash
1051+
# Check Claude's logs for errors
1052+
tail -n 20 -f ~/Library/Logs/Claude/mcp*.log
1053+
```
1054+
1055+
**Server not showing up in Claude**
1056+
1057+
1. Check your `desktop_config.json` file syntax
1058+
2. Make sure the path to your project is absolute and not relative
1059+
3. Restart Claude for Desktop completely
1060+
1061+
**Tool calls failing silently**
1062+
1063+
If Claude attempts to use the tools but they fail:
1064+
1065+
1. Check Claude's logs for errors
1066+
2. Verify your server builds and runs without errors
1067+
3. Try restarting Claude for Desktop
1068+
1069+
**None of this is working. What do I do?**
1070+
1071+
Please refer to our [debugging guide](/docs/tools/debugging) for better debugging tools and more detailed guidance.
1072+
</Accordion>
10281073
<Accordion title="Weather API Issues">
10291074
**Error: Failed to retrieve grid point data**
10301075

@@ -1043,26 +1088,7 @@ Fix:
10431088

10441089
This isn't an error - it just means there are no current weather alerts for that state. Try a different state or check during severe weather.
10451090
</Accordion>
1046-
<Accordion title="Claude for Desktop Integration Issues">
1047-
**Server not showing up in Claude**
1048-
1. Check your configuration file syntax
1049-
2. Make sure the path to your project is correct
1050-
3. Restart Claude for Desktop completely
1051-
1052-
You can also check Claude's logs for errors like so:
1053-
```bash
1054-
# Check Claude's logs for errors
1055-
tail -n 20 -f ~/Library/Logs/Claude/mcp*.log
1056-
```
1057-
1058-
**Tool calls failing silently**
10591091

1060-
If Claude attempts to use the tools but they fail:
1061-
1062-
1. Check Claude's logs for errors
1063-
2. Verify your server runs without errors
1064-
3. Try restarting Claude for Desktop
1065-
</Accordion>
10661092
</AccordionGroup>
10671093

10681094
<Note>

tutorials/building-a-client.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ In this tutorial, you'll learn how to build a LLM-powered chatbot client that co
88
<Tabs>
99
<Tab title="Python">
1010

11-
You can find the complete code for this tutorial [here.](https://gist.github.com/zckly/f3f28ea731e096e53b39b47bf0a2d4b1)
11+
[You can find the complete code for this tutorial here.](https://github.com/modelcontextprotocol/quickstart-resources/tree/main/mcp-client)
1212

1313
## System Requirements
1414

0 commit comments

Comments
 (0)