Merge pull request #17 from modelcontextprotocol/davidsp/create
Update Python guide to use create-mcp-server
This commit is contained in:
commit
8f91236627
1 changed files with 5 additions and 13 deletions
|
|
@ -33,17 +33,16 @@ Let's build your first MCP server in Python! We'll create a weather server that
|
||||||
```
|
```
|
||||||
</Step>
|
</Step>
|
||||||
|
|
||||||
<Step title="Create a new project">
|
<Step title="Create a new project using the MCP project creator">
|
||||||
```bash
|
```bash
|
||||||
mkdir weather-service
|
uvx create-mcp-server --path weather_service
|
||||||
cd weather-service
|
cd weather_service
|
||||||
uv init --package --app --name weather-service
|
|
||||||
```
|
```
|
||||||
</Step>
|
</Step>
|
||||||
|
|
||||||
<Step title="Install dependencies">
|
<Step title="Install additional dependencies">
|
||||||
```bash
|
```bash
|
||||||
uv add mcp requests python-dotenv
|
uv add requests python-dotenv
|
||||||
```
|
```
|
||||||
</Step>
|
</Step>
|
||||||
|
|
||||||
|
|
@ -59,13 +58,6 @@ 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
|
|
||||||
mkdir -p weather_service/src/weather_service
|
|
||||||
touch weather_service/src/weather_service/server.py
|
|
||||||
```
|
|
||||||
</Step>
|
|
||||||
|
|
||||||
<Step title="Add the base imports and setup">
|
<Step title="Add the base imports and setup">
|
||||||
In `weather_service/src/weather_service/server.py`
|
In `weather_service/src/weather_service/server.py`
|
||||||
```python
|
```python
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue