
khshanovskyi/ai-general-mcp-basics
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
연습을 위한 MCP 기반 에이전트와 샘플
개요
MCP 도구 및 MCP 서버로 사용자 관리 에이전트 구축을위한 Python 구현 간단한 도구로 MCP 서버를 만들고 실행합니다. MCP 클라이언트와 간단한 사용자 관리 에이전트를 구현하여 만든 서버에서 MCP 도구를 사용할 수 있습니다. 이 프로젝트와 함께 탐구하고 일함으로써, 당신은 배울 것이다: - 간단한 MCP 서버를 구성하는 방법 - 클라이언트를 구성하고 MCP 서버에 연결하는 방법 - MCP 서버의 도구와 간단한 에이전트를 만드는 방법 - MCP의 주요 기능 - : 3.11 이상 - : requirements.txt - Docker 및 Docker Compose - Postman 목록 주요 지점에서 작업이 당신을 위해 열심히하면, 다음과 관련된 지점으로 전환 사용자 관리 에이전트를 구현해야 합니다. User Management Service 내에서 CRUD 작업을 수행할 수 있습니다. 1. 루트 docker-compose 실행 (이전 작업에서 가지고있는 경우 선택 단계) 2. mcp server 3. 모든 *** 4. 실행 mcp server
개요(AI 번역)
MCP 도구 및 MCP 서버로 사용자 관리 에이전트 구축을위한 Python 구현
작업 개요
간단한 도구로 MCP 서버를 만들고 실행합니다. MCP 클라이언트와 간단한 사용자 관리 에이전트를 구현하여 만든 서버에서 MCP 도구를 사용할 수 있습니다.
학습 목표
이 프로젝트와 함께 탐구하고 일함으로써, 당신은 배울 것이다:
- 간단한 MCP 서버를 구성하는 방법
- 클라이언트를 구성하고 MCP 서버에 연결하는 방법
- MCP 서버에서 도구로 간단한 에이전트를 만드는 방법
- MCP의 주요 특징
️ 건축
₢ 킹
요구사항
-Python: 3.11 이상
- ** 통화**:
requirements.txt에 나열 - 도커 및 도커 컴스
- 포스트맨
❤️ 작업:
주요 지점에서 작업이 당신을 위해 열심히하면, 다음으로 전환 with-detailed-description 지점
사용자 관리 에이전트를 구현해야 합니다. User Management Service 내에서 CRUD 작업을 수행할 수 있습니다.
만들기 및 실행 MCP 서버:
- 루트 docker-compose 실행 (이전 작업에서 가지고있는 경우 선택 단계)
- mcp server 열기
- 모든 *** TODO *** 구현
- mcp server 실행
OPTIONAL: Postman에서 MCP 서버 작업
- Postman에 mcp.postman collection 가져 오기
- 명세.
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
Framework-based MCP (Server & Client)
Python implementation for building Users Management Agent with MCP tools and MCP server
🎯 Task Overview
Create and run MCP server with simple tools. Implement simple Users Management Agent with MCP Client that will use MCP tools from created server.
🎓 Learning Goals
By exploring and working with this project, you will learn:
- How to configure simple MCP server
- How to configure client and connect to MCP server
- How to create simple Agent with tools from MCP server
- Key features of MCP
🏗️ Architecture
task/
├── agent/
│ ├── models/
│ │ └──message.py ✅ Complete
│ ├── app.py 🚧 TODO: implement logic
│ ├── openai_client.py 🚧 TODO: implement logic
│ └── mcp_cleint.py 🚧 TODO: implement logic
└── mcp_server/
├── server.py 🚧 TODO: implement logic
├── user_client.py ✅ Complete
└── Dockerfile ✅ Complete
📋 Requirements
- Python: 3.11 or higher
- Dependencies: Listed in
requirements.txt - Docker and Docker Compose
- Postman
✍️ Tasks:
If the task in the main branch is hard for you, then switch to the with-detailed-description branch
You need to implement the Users Management Agent, that will be able to perform CRUD operations within User Management Service.
Create and run MCP server:
- Run root docker-compose (Optional step in case if you have it from previous tasks)
- Open mcp_server
- Implement all TODO
- Run mcp_server
OPTIONAL: Work with MCP server in Postman
- Import mcp.postman_collection to Postman
- Make
initcall and getmcp-session-idin response headers - Make
init-notification. Pay attention that you need to usemcp-session-idretrieved frominitrequest. it should return 202 status - Get tools (don’t forget about
mcp-session-id). It should return stream with tools. - Call calculator (don’t forget about
mcp-session-id). It should return stream tool execution result.
Create and run Agent:
- Open mcp_client and implement all TODO
- Open openai_client and implement all TODO
- Open prompts and write System prompt
- Open app and implement all TODO
- Run application mcp_client and test that it is connecting to MCP Server and works properly
- Try with your solution with
fetch MCPhttps://remote.mcpservers.org/fetch/mcpand check the differences on theinitstep (what they have and don’t)
OPTIONAL: Support both (users-management and fetch) MCP servers:
- Remember that we have 1-to-1 connection between MCP client and MCP server!
- You need to think of the way how to change current flow to support tools from different MCP servers and implement it
설치
This server does not publish a one-line install command.
Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →