MCP Python SDK'sını Ekleme
Projenize resmî mcp paketini ekleyin.
MCP Python SDK'sını Ekleme, CoddyKit'te ücretsiz bir MCP Academy dersidir. Bu, 4 dersinin 2. dersidir. Aşağıdan dersin tamamını ücretsiz okuyabilir, sonra tarayıcıda yerleşik kod editörü ve 7/24 yapay zeka koçu ile uygulamalı olarak pratik yapabilirsin. Bu, MCP Academy öğrenme yolunun bir parçasıdır ve ilerlemeniz web ve CoddyKit uygulaması arasında senkronize olur. MCP Academy kursu toplamda 4 dersten oluşur.
Bu dersin bazı bölümleri henüz çevrilmemiş olup İngilizce olarak gösterilmektedir.
Time to Add the SDK
Your project is scaffolded, but it can't speak MCP yet. The next step is pulling in the official library that does all the heavy lifting. 📦
The Package Is Just mcp
The official Python SDK ships as a package simply named mcp. It contains everything you need to build servers and clients in plain Python.
Add It with uv
Inside your project folder, run uv add to install the SDK and record it as a dependency. One command grabs it and updates your project files.
uv add "mcp[cli]"Why the [cli] Extra
The [cli] extra adds the command-line tools that run and inspect servers. Without it you get the library but miss the handy mcp commands.
Quote the Brackets
Always wrap the name in quotes, like "mcp[cli]". Many shells treat square brackets as special characters, and quotes keep them literal.
pip Still Works Too
If you prefer plain pip, the same package installs the same way. Either tool gives you an identical SDK, so pick whichever fits your workflow.
pip install "mcp[cli]"It Records the Dependency
uv add doesn't just install; it writes mcp into your pyproject.toml. Anyone who clones your project gets the exact same requirement.
The Lockfile Pins Versions
uv also updates a uv.lock file that pins the exact resolved versions. That makes your installs reproducible on any machine, every time.
Confirm the Import
Verify the install worked by importing the SDK inside your environment. If nothing errors out, the mcp package is ready to use.
uv run python -c "import mcp; print('ok')"Where the Server Lives
The class you'll use most is FastMCP, found under mcp.server.fastmcp. It's the high-level way to define tools without touching raw protocol details.
from mcp.server.fastmcp import FastMCPOne Import, Big Power
That single import unlocks decorators for tools, resources, and prompts. The SDK turns ordinary Python functions into capabilities an AI can call. ✨
Quick Check
You want the SDK plus its command-line helpers.
The SDK Is In
You added mcp[cli], recorded it in pyproject.toml, locked the versions, and confirmed the import. Your project can now build a real MCP server. 🎯
Sıkça Sorulan Sorular
“MCP Python SDK'sını Ekleme” dersi ücretsiz mi?
Evet — “MCP Python SDK'sını Ekleme” dersin tüm metni burada web'de ücretsiz olarak okunabilir. Etkileşimli olarak pratik yapmak (yerleşik kod editörü ve 7/24 yapay zeka koçu) ve MCP Academy kursunun geri kalanını açmak için CoddyKit PRO'ya yükselt. MCP Academy kursu toplamda 4 dersten oluşur.
“MCP Python SDK'sını Ekleme” dersinde ne öğreneceğim?
Projenize resmî mcp paketini ekleyin. MCP Academy ile uygulamalı kodu tarayıcıda doğrudan çalıştırarak pratik yaparsın ve 7/24 yapay zeka koçu dersi çalışırken sorularını yanıtlar.
MCP Academy öğrenmeye başlamak için deneyim gerekli mi?
Önceden deneyim gerekmez. CoddyKit'te MCP Academy, başlangıçtan ileri seviyeye kadar yapılandırıldığı için buradan başlayabilir veya başından başlayıp kendi hızında ilerleme yapabilirsin. Bu, 4 dersinin 2. dersidir.
“MCP Python SDK'sını Ekleme” dersi ne kadar sürer?
Çoğu CoddyKit dersi yaklaşık 5–10 dakika sürer. Her biri kısa ve etkileşimli olduğu için sabit ilerleme yaparsın ve web ile uygulama arasında tam olarak bıraktığın yerden devam edebilirsin.
Bu MCP Academy dersinde kod yazıp çalıştırabilir miyim?
Evet. Her MCP Academy dersi yerleşik bir kod editörü içerir, bu sayede tarayıcıda gerçek kod yazıp çalıştırabilir ve anlık yapay zeka geri bildirimi alırsın — yerel kurulum gerekli değildir.
Bu kursun tüm dersleri
- Python ve uv Kurulumu
- MCP Python SDK'sını Ekleme
- mcp CLI ile Tanışın
- Bir Sunucu için Proje Düzeni