docs: add server initialization instructions to quickstart guide

This commit is contained in:
David Soria Parra 2025-01-06 10:34:59 +00:00
commit d4285d0e25
No known key found for this signature in database

View file

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