0Pricing
MCP Academy · 강의

MCP Python SDK 추가하기

프로젝트에 공식 mcp 패키지를 추가합니다.

MCP Python SDK 추가하기은(는) CoddyKit의 무료 MCP Academy 강의입니다. 이것은 4개 중 2번째 강의입니다. 아래에서 전체 강의를 무료로 읽을 수 있으며, 내장 코드 에디터와 24/7 AI 튜터와 함께 브라우저에서 직접 실습할 수 있습니다. 이 강의는 MCP Academy 학습 경로의 일부이며, 진행 상황이 웹과 CoddyKit 앱에 동기화됩니다. MCP Academy 강의에는 총 4개의 강의가 포함되어 있습니다.

이 강의의 일부는 아직 번역되지 않았으며 영어로 표시됩니다.

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 FastMCP

One 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. 🎯

자주 묻는 질문

“MCP Python SDK 추가하기” 강의는 무료인가요?

네 — “MCP Python SDK 추가하기” 전체 내용을 이 웹사이트에서 무료로 읽을 수 있습니다. 인터랙티브하게 실습하려면(내장 코드 에디터와 24/7 AI 튜터), CoddyKit PRO로 업그레이드하면 MCP Academy 강의 전체를 잠금 해제할 수 있습니다. MCP Academy 강의에는 총 4개의 강의가 포함되어 있습니다.

“MCP Python SDK 추가하기”에서 뭘 배우나요?

프로젝트에 공식 mcp 패키지를 추가합니다. 브라우저에서 직접 실행하는 실습 코드로 MCP Academy을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.

MCP Academy을(를) 시작하는 데 경험이 필요한가요?

사전 경험은 필요하지 않습니다. CoddyKit의 MCP Academy은(는) 초급자부터 고급 학습자까지를 위해 구성되어 있으므로, 여기서 시작하거나 처음부터 시작할 수 있으며 자신의 속도대로 진행할 수 있습니다. 이것은 4개 중 2번째 강의입니다.

“MCP Python SDK 추가하기” 강의는 얼마나 걸리나요?

대부분의 CoddyKit 강의는 약 5~10분이 소요됩니다. 각 강의는 간결하고 인터랙티브하여 꾸준한 진행이 가능하며, 웹과 앱에서 중단한 부분부터 바로 시작할 수 있습니다.

이 MCP Academy 강의에서 코드를 작성하고 실행할 수 있나요?

네. 모든 MCP Academy 강의에는 내장 코드 에디터가 포함되어 있으므로, 브라우저에서 바로 실제 코드를 작성하고 실행한 후 즉시 AI 피드백을 받을 수 있습니다 — 로컬 설정이 필요 없습니다.

이 강의의 모든 강의

  1. Python과 uv 설치하기
  2. MCP Python SDK 추가하기
  3. mcp CLI 알아보기
  4. 서버 프로젝트 구성
← MCP Academy(으)로 돌아가기