Skip to content
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 21 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,38 @@ The Model Context Protocol allows applications to provide context for LLMs in a

### Adding MCP to your python project

We recommend using [uv](https://docs.astral.sh/uv/) to manage your Python projects. In a uv managed python project, add mcp to dependencies by:
We recommend using [uv](https://docs.astral.sh/uv/) to manage your Python projects. To get started with a new project:

```bash
uv add "mcp[cli]"
# Create a new directory for your project
uv init my-mcp-project
cd my-mcp-project

# Create virtual environment and activate it
uv venv
source .venv/bin/activate # On Windows use: .venv\Scripts\activate

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Create virtual environment and activate it
uv venv
source .venv/bin/activate # On Windows use: .venv\Scripts\activate

There's no need to explicitly create and activate the virtual environment, uv takes care of that implicitly. See https://docs.astral.sh/uv/concepts/projects/layout/#the-project-environment

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your comment, @taha-yassine. I added it because the official MCP docs explicitly mention the virtual environment. It might be a good idea to review those docs as well.

I have removed the explicit creation of the virtual environment in this PR in order to proceed. Thanks!


# Install MCP with CLI tools and the httpx package
uv add "mcp[cli]" httpx
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would you need httpx? It's a dependency of mcp already.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your comment, @Kludex.

I originally added it because the official MCP docs explicitly mention it—likely due to the example provided in the documentation.

Since, as you mentioned, the dependency isn’t needed to run the python-sdk, I’ve removed it from this PR. Gracias!

```

Alternatively, for projects using pip for dependencies:
For pip-based projects:
```bash
pip install mcp
mcp --help
```

### Running the standalone MCP development tools

To run the mcp command with uv:
### Running an MCP server

```bash
# Running the standalone MCP development tools
uv run mcp

# See available commands
uv run mcp --help

# Run a specific server
uv run mcp dev server.py
```

## Quickstart
Expand Down