Merge branch 'main' into main
This commit is contained in:
commit
4b5b8dc431
1 changed files with 18 additions and 8 deletions
|
|
@ -83,7 +83,7 @@ uv venv
|
|||
source .venv/bin/activate
|
||||
|
||||
# Install dependencies
|
||||
uv add mcp[cli] httpx
|
||||
uv add "mcp[cli]" httpx
|
||||
|
||||
# Create our server file
|
||||
touch weather.py
|
||||
|
|
@ -220,6 +220,16 @@ Forecast: {period['detailedForecast']}
|
|||
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.
|
||||
|
||||
Let's now test your server from an existing MCP host, Claude for Desktop.
|
||||
|
|
|
|||
Loading…
Reference in a new issue