-
Notifications
You must be signed in to change notification settings - Fork 2.7k
docs: Update installation instructions for clarity #288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
tadeodonegana
wants to merge
6
commits into
modelcontextprotocol:main
from
tadeodonegana:feat/enhance-installation-instructions
Closed
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
7f6b36c
Add clearer installation instructions
tadeodonegana d9e27a8
Merge branch 'main' into feat/enhance-installation-instructions
tadeodonegana 4443cde
fix: remove unneeded instructions
tadeodonegana cc857bd
Merge branch 'feat/enhance-installation-instructions' of https://gith…
tadeodonegana 797f6ea
Merge branch 'main' into feat/enhance-installation-instructions
tadeodonegana 27e0aa0
Merge branch 'main' into feat/enhance-installation-instructions
tadeodonegana File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
|
||
| # Install MCP with CLI tools and the httpx package | ||
| uv add "mcp[cli]" httpx | ||
|
||
| ``` | ||
|
|
||
| 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 | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no need to explicitly create and activate the virtual environment,
uvtakes care of that implicitly. See https://docs.astral.sh/uv/concepts/projects/layout/#the-project-environmentThere was a problem hiding this comment.
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!