KA

khshanovskyi/ai-general-mcp-advanced

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

10 stars 10 forks 품질 50 트렌드 8

MCP와 고급 연습 (스크래치에서 발효)

개요

MCP(Model Context Protocol) 도구 및 MCP 서버/클라이언트 아키텍처를 갖춘 AI Agent 구축을 위한 Python 구현. 사용자 정의 도구로 MCP 서버를 만들고 실행하고, 만든 서버에서 도구를 사용하는 MCP 클라이언트와 AI Agent를 구현합니다. 이 작업은 서버 구현에서 클라이언트 통합으로 전체 MCP 워크플로우를 보여줍니다. 이 프로젝트를 완료함으로써, 당신은 배울 것이다: - : Model Context Protocol 사양 및 JSON-RPC 통신에 대한 이해 - : MCP 표준을 따르는 사용자 정의 도구 만들기 - : MCP 서버에 AI 에이전트를 연결하고 도구 실행을 처리 - : 적절한 세션 처리 및 상태 관리 구현 - : 실시간 통신을위한 Server-Sent Events (SSE) 작업 - : 분산 시스템에서 강력한 오류 처리 구현 - : 3.11 이상 - : requirements.txt 상장 - : API 테스트를 위한 Postman 1. 가상 환경 만들기 2. 설치 Dependencies 0. UMS 1를 가진 도커 desctop를 실행하십시오.

개요(AI 번역)

MCP(Model Context Protocol) 도구 및 MCP 서버/클라이언트 아키텍처를 갖춘 AI Agent 구축을 위한 Python 구현.

작업 개요

사용자 정의 도구로 MCP 서버를 만들고 실행하고, 만든 서버에서 도구를 사용하는 MCP 클라이언트와 AI Agent를 구현합니다. 이 작업은 서버 구현에서 클라이언트 통합으로 전체 MCP 워크플로우를 보여줍니다.

학습 목표

이 프로젝트를 완료함으로써, 당신은 배울 것이다:

  • MCP 프로토콜 구현: 모형 Context 의정서 명세 및 JSON-RPC 커뮤니케이션의 밑에
  • Server-Side Tool 개발: MCP 표준을 따르는 사용자 정의 도구 만들기
  • **클라이언트 통합 **: MCP 서버에 AI 에이전트를 연결하고 도구 실행을 처리
  • Session Management: 적절한 세션 처리 및 상태 관리 구현 -Streaming Responses: 실시간 통신을 위한 Server-Sent Events(SSE) 작업
  • 처리: 분산 시스템에서 강력한 오류 처리 구현

️ 건축

요구사항

-Python: 3.11 이상

  • ** 통화**: requirements.txt에 나열
  • ** 옵션 **: API 테스트를 위한 Postman

炉端串up 지침

  1. 가상 환경 만들기

  2. 명세.

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

Advanced MCP (Server & Client) Practice Task

Python implementation for building AI Agent with MCP (Model Context Protocol) tools and MCP server/client architecture.

🎯 Task Overview

Create and run an MCP server with custom tools, then implement an AI Agent with MCP Client that utilizes tools from the created server. This task demonstrates the full MCP workflow from server implementation to client integration.

🎓 Learning Goals

By completing this project, you will learn:

  • MCP Protocol Implementation: Understand the Model Context Protocol specification and JSON-RPC communication
  • Server-Side Tool Development: Create custom tools that follow MCP standards
  • Client Integration: Connect AI agents to MCP servers and handle tool execution
  • Session Management: Implement proper session handling and state management
  • Streaming Responses: Work with Server-Sent Events (SSE) for real-time communication
  • Error Handling: Implement robust error handling in distributed systems

🏗️ Architecture

├── agent/                        # MCP Client Implementation
│   ├── clients/
│   │   ├── custom_mcp_client.py    🚧 TODO: Pure Python MCP client
│   │   ├── mcp_client.py           ✅ Complete: Framework-based client
│   │   └── openai_client.py          ✅ Complete: AI model integration
│   ├── models/           
│   │   └── message.py              ✅ Complete: Message structures
│   └── app.py                      🚧 TODO: Test it with MCPClient and CustomMCPClient
└── mcp_server/                   # MCP Server Implementation
    ├── models/
    │   ├── request.py              ✅ Complete: Request model
    │   └── response.py             ✅ Complete: Response model
    ├── services/
    │   └── mcp_server.py           🚧 TODO: Implement core server logic
    ├── tools/
    │   ├── base.py                 ✅ Complete: Abstract tool interface
    │   ├── create_user_tool.py     🚧 TODO: Implement web search tool
    │   ├── delete_user_tool.py     🚧 TODO: Implement web search tool
    │   ├── update_user_tool.py     🚧 TODO: Implement web search tool
    │   ├── get_user_by_id_tool.py  🚧 TODO: Implement web search tool
    │   └── search_users.py         🚧 TODO: Implement web search tool
    └── server.py                   🚧 TODO: Implement FastAPI server

📋 Requirements

  • Python: 3.11 or higher
  • Dependencies: Listed in requirements.txt
  • Optional: Postman for API testing

🔧 Setup Instructions

  1. Create virtual environment
    python -m venv .venv
    
  2. Install Dependencies
    pip install -r requirements.txt
    

🚀 Task:

If the task in the main branch is hard for you, then switch to the with-detailed-description branch

Create MCP Server:

  1. Run docker desctop with UMS
  2. Open mcp_server and review mcp server structure:
GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →