Merge pull request #17 from modelcontextprotocol/davidsp/create

Update Python guide to use create-mcp-server
This commit is contained in:
David Soria Parra 2024-11-21 15:15:38 +00:00 • committed by GitHub
commit 8f91236627
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -33,17 +33,16 @@ Let's build your first MCP server in Python! We'll create a weather server that
```
</Step>
<Step title="Create a new project">
<Step title="Create a new project using the MCP project creator">
```bash
mkdir weather-service
cd weather-service
uv init --package --app --name weather-service
uvx create-mcp-server --path weather_service
cd weather_service
```
</Step>
<Step title="Install dependencies">
<Step title="Install additional dependencies">
```bash
uv add mcp requests python-dotenv
uv add requests python-dotenv
```
</Step>
@ -59,13 +58,6 @@ Let's build your first MCP server in Python! We'll create a weather server that
## Create your server
<Steps>
<Step title="Create project structure">
```bash
mkdir -p weather_service/src/weather_service
touch weather_service/src/weather_service/server.py
```
</Step>
<Step title="Add the base imports and setup">
In `weather_service/src/weather_service/server.py`
```python