Update Python guide to use create-mcp-server

The guide now uses the official MCP project creator tool instead of manual project setup. This simplifies the initial setup process and ensures a consistent project structure, while still maintaining the same functionality.
This commit is contained in:
David Soria Parra 2024-11-21 14:59:51 +00:00
commit 12737871ad
No known key found for this signature in database

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