Pythonとuvをインストールする
uvパッケージマネージャーを使って、クリーンなPythonプロジェクトを作成します。
「Pythonとuvをインストールする」はCoddyKit上の無料MCP Academyレッスンです。 これはレッスン1/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これはMCP Academy学習パスの一部であり、ウェブとCoddyKitアプリ全体で進捗が同期されます。 MCP Academyコースには全4レッスンが含まれています。
このレッスンの一部はまだ翻訳されておらず、英語で表示されています。
A Clean Start
Before you build any MCP server, you need a tidy Python project. A clean start means fewer surprises and fewer broken installs later. Let's set the foundation. 🧱
Why a Version Matters
The MCP Python SDK needs a modern interpreter, so you want Python 3.10 or newer. Older versions miss the typing features the SDK relies on.
Meet uv
Instead of juggling pip and virtualenv, you'll use uv, a single fast tool that manages Python, packages, and environments for you in one place.
One Tool, Many Jobs
uv replaces pip, pip-tools, pyenv, and virtualenv at once. Learning one command set keeps your MCP workflow simple and consistent across every project. 🚀
Install uv
On macOS or Linux you can install uv with a single curl command. It drops a tiny binary on your path, ready to use immediately.
curl -LsSf https://astral.sh/uv/install.sh | shConfirm It Works
After installing, run a quick version check. If you see a version number, uv is on your path and ready to drive the rest of your setup.
uv --versionLet uv Manage Python
You don't even need Python installed first. With uv python install you can fetch any version uv manages, so your project is never tied to the system Python.
uv python install 3.12Start a New Project
Spin up a fresh project folder with uv init. It scaffolds the files you need so you can start adding MCP code right away.
uv init mcp-server-demoWhat uv init Creates
That command writes a pyproject.toml to declare your project and its dependencies. This file becomes the single source of truth for what your server needs.
The Hidden .venv
When you add a package, uv quietly creates a .venv folder, an isolated environment just for this project. Your global Python stays untouched and clean.
Run Without Activating
You never have to activate the venv by hand. uv run executes commands inside your project's environment automatically, so the right Python is always used.
uv run python --versionQuick Check
You're setting up a fresh MCP project from zero.
You Have a Workspace
You installed uv, let it manage Python, and scaffolded a clean project. With pyproject.toml and an isolated venv ready, you can now add the MCP SDK. ✅
よくある質問
「Pythonとuvをインストールする」レッスンは無料ですか?
はい。「Pythonとuvをインストールする」の完全なテキストはこのウェブで無料で読めます。インタラクティブに演習し(組み込みコードエディタと24時間対応のAIチューター)、MCP Academyコースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 MCP Academyコースには全4レッスンが含まれています。
「Pythonとuvをインストールする」で何を学びますか?
uvパッケージマネージャーを使って、クリーンなPythonプロジェクトを作成します。 ブラウザで直接実行するハンズオンコードでMCP Academyを演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。
MCP Academyを始めるのに経験は必要ですか?
事前経験は必要ありません。CoddyKitのMCP Academyは初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン1/4です。
「Pythonとuvをインストールする」レッスンにはどのくらい時間がかかりますか?
ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。
このMCP Academyレッスンでコードを書いて実行できますか?
はい。すべてのMCP Academyレッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。
このコースのすべてのレッスン
- Pythonとuvをインストールする
- MCP Python SDKを追加する
- mcp CLIを使う
- サーバーのプロジェクト構成