Merge branch 'main' into jsnbuchanan/fix/trouble-shooting-copy-n-paste-macos-typo
This commit is contained in:
commit
9a3ef6f68f
1 changed files with 18 additions and 8 deletions
|
|
@ -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.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue