Skip to main content
Glama

MCP Agent Orchestration System

by aviz85

MCP 에이전트 오케스트레이션 시스템

모델 컨텍스트 프로토콜(MCP)을 사용한 상태 기반 에이전트 오케스트레이션 시스템의 Python 구현입니다.

MCP란 무엇인가요?

모델 컨텍스트 프로토콜(MCP)을 사용하면 애플리케이션이 표준화된 방식으로 LLM에 컨텍스트를 제공할 수 있으며, 컨텍스트 제공과 실제 LLM 상호작용 간의 연관성을 분리할 수 있습니다. MCP를 사용하면 다음을 제공하는 서버를 구축할 수 있습니다.

  • 리소스 : LLM에 정보를 제공하는 데이터 소스
  • 도구 : LLM이 작업을 수행할 수 있도록 하는 기능
  • 프롬프트 : LLM 상호 작용을 위한 재사용 가능한 템플릿

설치

필수 조건

  • Python 3.10 이상
  • MCP Python SDK 1.2.0 이상

환경 설정

uv 사용(권장)

지엑스피1

pip 사용하기
# Create a new directory for our project mkdir mcp-agents-orchestra cd mcp-agents-orchestra # Create a virtual environment python -m venv venv source venv/bin/activate # On Unix/macOS venv\Scripts\activate # On Windows # Install dependencies pip install "mcp[cli]" httpx

프로젝트 파일 복제 또는 다운로드

프로젝트 파일을 디렉토리에 넣으세요:

  • orchestrator.py - 상태 머신을 구현하는 주요 MCP 서버
  • orchestrator_client.py - 오케스트레이션 흐름을 보여주는 클라이언트
  • requirements.txt - 프로젝트에 대한 종속성
  • .gitignore - Git 무시 파일

프로젝트 구조

  • orchestrator.py - 상태 머신을 구현하는 주요 MCP 서버
  • orchestrator_client.py - 오케스트레이션 흐름을 보여주는 클라이언트
  • requirements.txt - 프로젝트에 대한 종속성

오케스트레이션 시스템 실행

  1. 테스트를 위해 오케스트레이션 서버를 직접 시작합니다.
python orchestrator.py
  1. 별도의 터미널에서 클라이언트를 실행하여 오케스트레이션이 실제로 어떻게 작동하는지 확인하세요.
python orchestrator_client.py

데스크톱용 Claude와 통합

1. 데스크톱용 Claude 설치

Claude for Desktop이 설치되어 있는지 확인하세요. Anthropic 웹사이트 에서 최신 버전을 다운로드할 수 있습니다.

2. 데스크톱용 Claude 구성

  1. Claude for Desktop 구성 파일을 엽니다.macOS/Linux:
    # Create or edit the configuration file code ~/Library/Application\ Support/Claude/claude_desktop_config.json
    윈도우:
    # Path may vary depending on your Windows version code %APPDATA%\Claude\claude_desktop_config.json
  2. 오케스트레이터 서버 구성을 추가합니다.
    { "mcpServers": { "agent-orchestrator": { "command": "python", "args": [ "/ABSOLUTE/PATH/TO/YOUR/PROJECT/orchestrator.py" ] } } }
    경로를 orchestrator.py 파일의 절대 경로로 바꾸세요.
  3. 구성 파일을 저장하고 Claude for Desktop을 다시 시작합니다.

3. Claude의 Orchestrator 사용

구성이 완료되면 다음을 수행할 수 있습니다.

  1. 데스크톱용 Open Claude
  2. 사이드바에서 MCP 서버 아이콘을 클릭하세요
  3. 사용 가능한 서버 목록에서 "에이전트-오케스트레이터"를 선택하세요.
  4. 오케스트레이션 시스템과 상호 작용을 시작하세요

클로드는 다음을 할 수 있습니다.

  • 다양한 에이전트 상태 간 전환
  • 지식 기반에서 정보를 저장하고 검색합니다.
  • 상태 전환 시 대화 맥락 유지
  • 상태별 프롬프트에 액세스

대리인 주

오케스트레이션 시스템은 다음 상태를 갖는 상태 머신을 구현합니다.

  • IDLE : 지시를 기다리는 중
  • 계획 : 작업에 대한 체계적인 계획 작성
  • 조사 : 작업에 필요한 정보 수집
  • 실행 : 계획된 작업 수행
  • 검토 : 결과 평가 및 다음 단계 결정
  • ERROR : 오류나 예상치 못한 상황 처리

시스템 사용자 정의

새로운 주 추가

  1. orchestrator.pyAgentState 열거형에 상태를 추가합니다.
  2. 새로운 상태에 대한 프롬프트 함수를 만듭니다.
  3. _get_available_transitions() 에서 전환 논리를 업데이트합니다.
  4. 리소스 액세스 함수에 새 상태에 대한 핸들러를 추가합니다.

사용자 정의 도구 만들기

@mcp.tool() 로 장식된 함수를 만들어 새로운 도구를 추가합니다.

@mcp.tool() def my_custom_tool(arg1: str, arg2: int, ctx: Context) -> str: """Description of what this tool does Args: arg1: Description of arg1 arg2: Description of arg2 """ # Implementation here return "Result"

개발 및 테스트

MCP CLI 사용

MCP CLI는 개발 및 테스트를 위한 도구를 제공합니다.

# Install MCP CLI if you haven't already pip install "mcp[cli]" # Test your server with the MCP Inspector mcp dev orchestrator.py # Install in Claude Desktop mcp install orchestrator.py

Python을 사용한 수동 테스트

from mcp import ClientSession, StdioServerParameters from mcp.client.stdio import stdio_client async with stdio_client(StdioServerParameters(command="python", args=["orchestrator.py"])) as (read, write): async with ClientSession(read, write) as session: await session.initialize() # Test state transitions await session.call_tool("transition_state", arguments={"new_state": "PLANNING"})

자원

특허

이 프로젝트는 MIT 라이선스에 따라 라이선스가 부여되었습니다. 자세한 내용은 라이선스 파일을 참조하세요.

-
security - not tested
F
license - not found
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

대화 맥락을 유지하고 상태별 프롬프트를 제공하는 동시에 다양한 상태(IDLE, PLANNING, RESEARCHING, EXECUTING, REVIEWING, ERROR) 간 전환을 허용하는 상태 기반 에이전트 오케스트레이션 시스템입니다.

  1. MCP란 무엇인가요?
    1. 설치
      1. 필수 조건
      2. 환경 설정
      3. 프로젝트 파일 복제 또는 다운로드
    2. 프로젝트 구조
      1. 오케스트레이션 시스템 실행
        1. 데스크톱용 Claude와 통합
          1. 데스크톱용 Claude 설치
          2. 데스크톱용 Claude 구성
          3. Claude의 Orchestrator 사용
        2. 대리인 주
          1. 시스템 사용자 정의
            1. 새로운 주 추가
            2. 사용자 정의 도구 만들기
          2. 개발 및 테스트
            1. MCP CLI 사용
            2. Python을 사용한 수동 테스트
          3. 자원
            1. 특허

              Related MCP Servers

              • -
                security
                A
                license
                -
                quality
                A server for task orchestration and coordination, facilitating task management with dependencies, multi-instance collaboration, and persistent task tracking.
                Last updated -
                7
                17
                JavaScript
                MIT License
              • -
                security
                A
                license
                -
                quality
                A Model Context Protocol server that enables AI agents to interact with ClickUp workspaces, allowing task creation, management, and workspace organization through natural language commands.
                Last updated -
                313
                MIT License
              • -
                security
                F
                license
                -
                quality
                A Model Context Protocol server that enables role-based context management for AI agents, allowing users to establish specific instructions, maintain partitioned memory, and adapt tone for different agent roles in their system.
                Last updated -
                TypeScript
              • -
                security
                A
                license
                -
                quality
                An MCP server that extends AI agents' context window by providing tools to store, retrieve, and search memories, allowing agents to maintain history and context across long interactions.
                Last updated -
                5
                TypeScript
                MIT License

              View all related MCP servers

              MCP directory API

              We provide all the information about MCP servers via our MCP API.

              curl -X GET 'https://glama.ai/api/mcp/v1/servers/aviz85/mcp-agents-orchestra'

              If you have feedback or need assistance with the MCP directory API, please join our Discord server