Merge branch 'main' into jsnbuchanan/fix/trouble-shooting-copy-n-paste-macos-typo

This commit is contained in:
Jason Buchanan 2025-01-06 09:13:27 -07:00 • committed by GitHub
commit 9a3ef6f68f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -83,7 +83,7 @@ uv venv
source .venv/bin/activate source .venv/bin/activate
# Install dependencies # Install dependencies
uv add mcp[cli] httpx uv add "mcp[cli]" httpx
# Create our server file # Create our server file
touch weather.py touch weather.py
@ -220,6 +220,16 @@ Forecast: {period['detailedForecast']}
return "\n---\n".join(forecasts) return "\n---\n".join(forecasts)
``` ```
### Running the server
Finally, let's initialize and run the server:
```python
if __name__ == "__main__":
# Initialize and run the server
mcp.run(transport='stdio')
```
Your server is complete! Run `uv run weather.py` to confirm that everything's working. Your server is complete! Run `uv run weather.py` to confirm that everything's working.
Let's now test your server from an existing MCP host, Claude for Desktop. Let's now test your server from an existing MCP host, Claude for Desktop.