Minor tweaks to Python "first server" intro

This commit is contained in:
Justin Spahr-Summers 2024-11-21 13:14:33 +00:00
commit 30018f6ef5
No known key found for this signature in database

View file

@ -11,6 +11,10 @@ Let's build your first MCP server in Python! We'll create a weather server that
## Prerequisites ## Prerequisites
<Info>
The following steps are for macOS. Guides for other platforms are coming soon.
</Info>
<Steps> <Steps>
<Step title="Install Python"> <Step title="Install Python">
You'll need Python 3.10 or higher: You'll need Python 3.10 or higher:
@ -21,7 +25,9 @@ Let's build your first MCP server in Python! We'll create a weather server that
``` ```
</Step> </Step>
<Step title="Install uv (https://docs.astral.sh/uv/) via homebrew"> <Step title="Install uv via homebrew">
See https://docs.astral.sh/uv/ for more information.
```bash ```bash
brew install uv brew install uv
uv --version # Should be 0.4.18 or higher uv --version # Should be 0.4.18 or higher
@ -54,14 +60,8 @@ Let's build your first MCP server in Python! We'll create a weather server that
## Create your server ## Create your server
<Steps> <Steps>
<Step title="Create project structure">
```bash
touch weather_server.py
```
</Step>
<Step title="Add the base code"> <Step title="Add the base code">
In `weather_server.py`: Create a file `weather_server.py` and add the following:
```python ```python
import os import os