Instalar Python y uv
Cree un proyecto de Python limpio con el gestor de paquetes uv.
Instalar Python y uv es una lección gratuita de MCP Academy en CoddyKit. Esta es la lección 1 de 4. Puedes leer la lección completa abajo gratuitamente — luego la practicas en el navegador con un editor de código integrado y un tutor de IA 24/7. Forma parte de la ruta de aprendizaje de MCP Academy, y tu progreso se sincroniza en la web y la app de CoddyKit. El curso de MCP Academy incluye 4 lecciones en total.
Partes de esta lección aún no han sido traducidas y se muestran en inglés.
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. ✅
Preguntas frecuentes
¿La lección «Instalar Python y uv» es gratis?
Sí — el texto completo de «Instalar Python y uv» es gratis para leer aquí en la web. Para practicarla de forma interactiva (editor de código integrado y tutor de IA 24/7) y desbloquear el resto del curso de MCP Academy, actualiza a CoddyKit PRO. El curso de MCP Academy incluye 4 lecciones en total.
¿Qué aprenderé en «Instalar Python y uv»?
Cree un proyecto de Python limpio con el gestor de paquetes uv. Practicas MCP Academy con código real que ejecutas directamente en el navegador, y un tutor de IA 24/7 responde tus preguntas mientras trabajas en la lección.
¿Necesito experiencia previa para empezar MCP Academy?
No se requiere experiencia previa. MCP Academy en CoddyKit está estructurado para principiantes hasta estudiantes avanzados, así que puedes empezar aquí o desde el inicio y avanzar a tu ritmo. Esta es la lección 1 de 4.
¿Cuánto tiempo toma la lección «Instalar Python y uv»?
La mayoría de las lecciones de CoddyKit toman alrededor de 5–10 minutos. Cada una es compacta e interactiva, así que avanzas constantemente y retomas exactamente por donde dejaste en la web y la app.
¿Puedo escribir y ejecutar código en esta lección de MCP Academy?
Sí. Cada lección de MCP Academy incluye un editor de código integrado, así que escribes y ejecutas código real directamente en tu navegador y obtienes retroalimentación instantánea de IA — sin configuración local necesaria.
Todas las lecciones de este curso
- Instalar Python y uv
- Añadir el SDK de MCP para Python
- Conozca la CLI de mcp
- Estructura de proyecto para un servidor