Merge pull request #29 from modelcontextprotocol/justin/fixes
Various fixes
This commit is contained in:
commit
5b0e033c48
4 changed files with 92 additions and 90 deletions
|
|
@ -169,7 +169,7 @@ const debugWorkflow = {
|
|||
role: "user",
|
||||
content: {
|
||||
type: "text",
|
||||
text: "Here's an error I'm seeing:"
|
||||
text: `Here's an error I'm seeing: ${error}`
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -183,7 +183,7 @@ const debugWorkflow = {
|
|||
role: "user",
|
||||
content: {
|
||||
type: "text",
|
||||
text: error
|
||||
text: "I've tried restarting the service, but the error persists."
|
||||
}
|
||||
}
|
||||
];
|
||||
|
|
|
|||
|
|
@ -285,6 +285,67 @@ Let's build your first MCP server in Python! We'll create a weather server that
|
|||
</Step>
|
||||
</Steps>
|
||||
|
||||
|
||||
|
||||
|
||||
## Connect to Claude Desktop
|
||||
|
||||
<Steps>
|
||||
<Step title="Update Claude config">
|
||||
Add to `claude_desktop_config.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"weather": {
|
||||
"command": "uv",
|
||||
"args": "--directory path/to/your/project run weather-service",
|
||||
"env": {
|
||||
"OPENWEATHER_API_KEY": "your-api-key",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
</Step>
|
||||
|
||||
<Step title="Restart Claude">
|
||||
1. Quit Claude completely
|
||||
|
||||
2. Start Claude again
|
||||
|
||||
3. Look for your weather server in the 🔌 menu
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
## Try it out!
|
||||
|
||||
<AccordionGroup>
|
||||
<Accordion title="Check Current Weather" active>
|
||||
Ask Claude:
|
||||
|
||||
```
|
||||
What's the current weather in San Francisco? Can you analyze the conditions and tell me if it's a good day for outdoor activities?
|
||||
```
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="Get a Forecast">
|
||||
Ask Claude:
|
||||
|
||||
```
|
||||
Can you get me a 5-day forecast for Tokyo and help me plan what clothes to pack for my trip?
|
||||
```
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="Compare Weather">
|
||||
Ask Claude:
|
||||
|
||||
```
|
||||
Can you analyze the forecast for both Tokyo and San Francisco and tell me which city would be better for outdoor photography this week?
|
||||
```
|
||||
</Accordion>
|
||||
</AccordionGroup>
|
||||
|
||||
## Understanding the code
|
||||
|
||||
<Tabs>
|
||||
|
|
@ -445,87 +506,6 @@ import uvicorn
|
|||
uvicorn.run(app, host="0.0.0.0", port=8000)
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Installation issues
|
||||
|
||||
```bash
|
||||
# Check Python version
|
||||
python --version
|
||||
|
||||
# Reinstall dependencies
|
||||
uv sync --reinstall
|
||||
```
|
||||
|
||||
|
||||
### Type checking
|
||||
|
||||
```bash
|
||||
# Install mypy
|
||||
uv add --dev pyright
|
||||
|
||||
# Run type checker
|
||||
uv run pyright src
|
||||
```
|
||||
|
||||
## Connect to Claude Desktop
|
||||
|
||||
<Steps>
|
||||
<Step title="Update Claude config">
|
||||
Add to `claude_desktop_config.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"weather": {
|
||||
"command": "uv",
|
||||
"args": "--directory path/to/your/project run weather-service",
|
||||
"env": {
|
||||
"OPENWEATHER_API_KEY": "your-api-key",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
</Step>
|
||||
|
||||
<Step title="Restart Claude">
|
||||
1. Quit Claude completely
|
||||
|
||||
2. Start Claude again
|
||||
|
||||
3. Look for your weather server in the 🔌 menu
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
## Try it out!
|
||||
|
||||
<AccordionGroup>
|
||||
<Accordion title="Check Current Weather" active>
|
||||
Ask Claude:
|
||||
|
||||
```
|
||||
What's the current weather in San Francisco? Can you analyze the conditions and tell me if it's a good day for outdoor activities?
|
||||
```
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="Get a Forecast">
|
||||
Ask Claude:
|
||||
|
||||
```
|
||||
Can you get me a 5-day forecast for Tokyo and help me plan what clothes to pack for my trip?
|
||||
```
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="Compare Weather">
|
||||
Ask Claude:
|
||||
|
||||
```
|
||||
Can you analyze the forecast for both Tokyo and San Francisco and tell me which city would be better for outdoor photography this week?
|
||||
```
|
||||
</Accordion>
|
||||
</AccordionGroup>
|
||||
|
||||
## Advanced features
|
||||
|
||||
<Steps>
|
||||
|
|
@ -789,6 +769,28 @@ uv run pyright src
|
|||
</Step>
|
||||
</Steps>
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Installation issues
|
||||
|
||||
```bash
|
||||
# Check Python version
|
||||
python --version
|
||||
|
||||
# Reinstall dependencies
|
||||
uv sync --reinstall
|
||||
```
|
||||
|
||||
### Type checking
|
||||
|
||||
```bash
|
||||
# Install mypy
|
||||
uv add --dev pyright
|
||||
|
||||
# Run type checker
|
||||
uv run pyright src
|
||||
```
|
||||
|
||||
## Next steps
|
||||
|
||||
<CardGroup cols={2}>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ Choose the path that best fits your needs:
|
|||
icon="bolt"
|
||||
href="/quickstart"
|
||||
>
|
||||
The fastest way to see MCP in action - connect example servers to Claude Desktop
|
||||
The fastest way to see MCP in action—connect example servers to Claude Desktop
|
||||
</Card>
|
||||
<Card
|
||||
title="Build your first server (Python)"
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ brew install node git sqlite3
|
|||
|
||||
This tells Claude Desktop:
|
||||
1. There's an MCP server named "sqlite"
|
||||
2. Launch it using the `mcp-server-sqlite` command
|
||||
2. Launch it by running `uvx mcp-server-sqlite`
|
||||
3. Connect it to your test database
|
||||
|
||||
Save the file, and restart **Claude Desktop**.
|
||||
|
|
@ -237,7 +237,7 @@ brew install node git sqlite3
|
|||
|
||||
This tells Claude Desktop:
|
||||
1. There's an MCP server named "sqlite"
|
||||
2. Launch it using the `mcp-server-sqlite` command
|
||||
2. Launch it by running `uvx mcp-server-sqlite`
|
||||
3. Connect it to your test database
|
||||
|
||||
Save the file, and restart **Claude Desktop**.
|
||||
|
|
@ -325,8 +325,8 @@ Want to give Claude Desktop more local integration capabilities? Add these serve
|
|||
Add this to your config to let Claude Desktop read and analyze files:
|
||||
```json
|
||||
"filesystem": {
|
||||
"command": "mcp-server-filesystem",
|
||||
"args": ["/Users/YOUR_USERNAME/Desktop"]
|
||||
"command": "npx",
|
||||
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/YOUR_USERNAME/Desktop"]
|
||||
}
|
||||
```
|
||||
</Accordion>
|
||||
|
|
@ -335,8 +335,8 @@ Want to give Claude Desktop more local integration capabilities? Add these serve
|
|||
Connect Claude Desktop to your PostgreSQL database:
|
||||
```json
|
||||
"postgres": {
|
||||
"command": "mcp-server-postgres",
|
||||
"args": ["postgresql://localhost/mydb"]
|
||||
"command": "npx",
|
||||
"args": ["-y", "@modelcontextprotocol/server-postgres", "postgresql://localhost/mydb"]
|
||||
}
|
||||
```
|
||||
</Accordion>
|
||||
|
|
|
|||
Loading…
Reference in a new issue