โœจ From vibe coding to vibe deployment. UBOS MCP turns ideas into infra with one message.

Learn more

MCP (Model Context Protocol) Tutorial

Python Version MCP Version Documentation

๐Ÿ“š ํ•™์Šต ๋‹จ๊ณ„

Step 0: MCP ์ดํ•ดํ•˜๊ธฐ

  • MCP ๊ฐœ๋… ๋ฐ ๊ตฌ์กฐ
    • Resources, Tools, Prompts ์ดํ•ด
    • MCP Server, Host, Client์— ๋Œ€ํ•œ ์ดํ•ด
    • MCP vs ์ „ํ†ต์ ์ธ API
    • ํ†ต์‹  ํ”„๋กœํ† ์ฝœ ์ดํ•ด

Step 1: MCP Inspector ํ™œ์šฉ

  • Inspector๋ฅผ ํ†ตํ•œ ํ…Œ์ŠคํŠธ
    • ๊ธฐ๋ณธ ์„œ๋ฒ„ ๊ตฌํ˜„ (examples/country_server/country_server.py)
    • Inspector ์‚ฌ์šฉ๋ฒ•
    • ์„ธ์…˜ ๊ด€๋ฆฌ ๋ฐ ํ†ต์‹  ๋ฐฉ์‹

Step 2: ์™ธ๋ถ€ ์„œ๋น„์Šค ์—ฐ๋™

  • Google Calendar ์—ฐ๋™ (์ง„ํ–‰ ์˜ˆ์ •)
  • Slack ์—ฐ๋™ (์ง„ํ–‰ ์˜ˆ์ •)
  • Figma ์—ฐ๋™ (์ง„ํ–‰ ์˜ˆ์ •)

๐Ÿš€ ์‹œ์ž‘ํ•˜๊ธฐ

  • ์™ธ๋ถ€ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋Š” fastmcp, mcp-agent๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.

ํ™˜๊ฒฝ ์„ค์ •

# Poetry ์„ค์น˜ (ํ•„์š”ํ•œ ๊ฒฝ์šฐ)
curl -sSL https://install.python-poetry.org | python3 -

# ํ”„๋กœ์ ํŠธ ์˜์กด์„ฑ ์„ค์น˜
poetry install

# ๊ฐ€์ƒํ™˜๊ฒฝ ํ™œ์„ฑํ™”
poetry shell

๊ธฐ๋ณธ ์„œ๋ฒ„ ์‹คํ–‰

mcp dev examples/country_server/country_server.py

๐Ÿ“ ํ”„๋กœ์ ํŠธ ๊ตฌ์กฐ (์ดˆ์•ˆ)

.
โ”œโ”€โ”€ docs/
โ”‚ โ”œโ”€โ”€ 00_MCP๋ž€?.md
โ”‚ โ””โ”€โ”€ 01_MCP inspector๋ฅผ ํ™œ์šฉํ•œ ํ…Œ์ŠคํŠธ.md
โ”œโ”€โ”€ examples/country_server/country_server.py # ๊ธฐ๋ณธ MCP ์„œ๋ฒ„ ์˜ˆ์ œ
โ”œโ”€โ”€ country_client.py # Python ํด๋ผ์ด์–ธํŠธ ์˜ˆ์ œ
โ”œโ”€โ”€ pyproject.toml # ์˜์กด์„ฑ ๊ด€๋ฆฌ
โ””โ”€โ”€ README.md

๐Ÿ”— ์ฐธ๊ณ  ์ž๋ฃŒ

๊ณต์‹ ๋ฌธ์„œ

  • MCP ๊ณต์‹ ๋ฌธ์„œ
  • FastMPC ์˜ˆ์ œ
  • MCP Agent ์˜ˆ์ œ
  • Python SDK GitHub

์ปค๋ฎค๋‹ˆํ‹ฐ ์ž๋ฃŒ

  • ๊ฐ„๋‹จํ•˜๊ฒŒ ๋งŒ๋“ค๋ฉด์„œ ์ดํ•ดํ•ด๋ณด๋Š” MCP
  • Awesome MCP Servers
  • PyTorch KR Discussion
  • https://www.dailydoseofds.com/p/visual-guide-to-model-context-protocol-mcp/

์ถ”๊ฐ€ ํ•™์Šต ์ž๋ฃŒ

  • Building Effective Agents - Anthropic

Featured Templates

View More

Start your free trial

Build your solution today. No credit card required.

Sign In

Register

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.