Taiga MCP Bridge

by talhaorak
Verified

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Integrations

  • Allows configuration through environment variables or a .env file for settings like API URLs, session expiry, and logging options

  • Used for configuration settings and validation of data structures within the bridge

  • Supports comprehensive testing capabilities including unit tests, integration tests, and test coverage reporting

타이가 MCP 다리

개요

Taiga MCP Bridge는 Taiga 프로젝트 관리 플랫폼을 MCP(Model Context Protocol)와 연결하는 강력한 통합 계층으로, AI 도구와 워크플로가 Taiga 리소스와 원활하게 상호 작용할 수 있도록 합니다.

이 브리지는 AI 에이전트에게 다음을 위한 포괄적인 도구와 리소스 세트를 제공합니다.

  • Taiga에서 프로젝트, 에픽, 사용자 스토리, 작업 및 이슈를 생성하고 관리합니다.
  • 스프린트와 이정표 추적
  • 작업 항목 할당 및 업데이트
  • 프로젝트 아티팩트에 대한 자세한 정보 쿼리
  • 프로젝트 멤버 및 권한 관리

이 브리지는 MCP 표준을 사용하여 AI 시스템이 프로젝트 상태에 대한 상황적 인식을 유지하고 복잡한 프로젝트 관리 작업을 프로그래밍 방식으로 수행할 수 있도록 합니다.

특징

포괄적인 리소스 지원

브리지는 완전한 CRUD 작업을 통해 다음 Taiga 리소스를 지원합니다.

  • 프로젝트 : 프로젝트 설정 및 메타데이터를 생성, 업데이트 및 관리합니다.
  • 에픽 : 여러 스프린트에 걸쳐 있는 대규모 기능 관리
  • 사용자 스토리 : 세부적인 요구 사항 및 승인 기준 처리
  • 작업 : 사용자 스토리 내에서 더 작은 작업 단위를 추적합니다.
  • 이슈 : 버그, 질문, 개선 요청 관리
  • 스프린트(마일스톤) : 시간 상자 간격으로 작업을 계획하고 추적합니다.

설치

이 프로젝트에서는 빠르고 안정적인 Python 패키지 관리를 위해 uv를 사용합니다.

필수 조건

  • Python 3.10 이상
  • uv 패키지 관리자

기본 설치

지엑스피1

개발 설치

개발용(테스트 및 코드 품질 도구 포함):

./install.sh --dev

수동 설치

수동으로 설치하려면 다음을 수행하세요.

# Production dependencies only uv pip install -e . # With development dependencies uv pip install -e ".[dev]"

구성

브리지는 환경 변수나 .env 파일을 통해 구성할 수 있습니다.

환경 변수설명기본
TAIGA_API_URLTaiga API의 기본 URLhttp://localhost:9000
SESSION_EXPIRY세션 만료 시간(초)28800(8시간)
TAIGA_TRANSPORT전송 모드(stdio 또는 sse)stdio
REQUEST_TIMEOUTAPI 요청 시간 초과(초)30
MAX_CONNECTIONS최대 HTTP 연결 수10
MAX_KEEPALIVE_CONNECTIONS최대 keepalive 연결5
RATE_LIMIT_REQUESTS분당 최대 요청 수100
LOG_LEVEL로깅 레벨정보
LOG_FILE로그 파일 경로taiga_mcp.log

프로젝트 루트에 .env 파일을 만들어 다음 값을 설정합니다.

TAIGA_API_URL=https://api.taiga.io/api/v1/ TAIGA_TRANSPORT=sse LOG_LEVEL=DEBUG

용법

stdio 모드로

다음 json을 Claude 앱이나 커서의 mcp 설정 섹션에 붙여넣으세요.

{ "mcpServers": { "taigaApi": { "command": "uv", "args": [ "--directory", "<path to local pyTaigaMCP folder>", "run", "src/server.py" ], "env": { "TAIGA_TRANSPORT": "<stdio|sse>", "TAIGA_API_URL": "<Taiga API Url (ex: http://localhost:9000)", "TAIGA_USERNAME": "<taiga username>", "TAIGA_PASSWORD": "<taiga password>" } } }

다리 달리기

다음을 사용하여 MCP 서버를 시작합니다.

# Default stdio transport ./run.sh # For SSE transport ./run.sh --sse

또는 수동으로:

# For stdio transport (default) uv run python src/server.py # For SSE transport uv run python src/server.py --sse

운송 모드

서버는 두 가지 전송 모드를 지원합니다.

  1. stdio(표준 입출력) - 터미널 기반 클라이언트를 위한 기본 모드
  2. SSE(Server-Sent Events) - 서버 푸시 기능을 갖춘 웹 기반 전송

운송 모드는 여러 가지 방법으로 설정할 수 있습니다.

  • run.sh 또는 server.py와 함께 --sse 플래그 사용(기본값은 stdio)
  • TAIGA_TRANSPORT 환경 변수 설정
  • .env 파일에 TAIGA_TRANSPORT=sse 추가

인증 흐름

이 MCP 브리지는 세션 기반 인증 모델을 사용합니다.

  1. 로그인 : 클라이언트는 먼저 login 도구를 사용하여 인증해야 합니다.
    session = client.call_tool("login", { "username": "your_taiga_username", "password": "your_taiga_password", "host": "https://api.taiga.io" # Optional }) # Save the session_id from the response session_id = session["session_id"]
  2. 도구 및 리소스 사용 : 모든 API 호출에 session_id 포함합니다.
    # For resources, include session_id in the URI projects = client.get_resource(f"taiga://projects?session_id={session_id}") # For project-specific resources epics = client.get_resource(f"taiga://projects/123/epics?session_id={session_id}") # For tools, include session_id as a parameter new_project = client.call_tool("create_project", { "session_id": session_id, "name": "New Project", "description": "Description" })
  3. 세션 상태 확인 : 세션이 여전히 유효한지 확인할 수 있습니다.
    status = client.call_tool("session_status", {"session_id": session_id}) # Returns information about session validity and remaining time
  4. 로그아웃 : 작업이 끝나면 로그아웃하여 세션을 종료할 수 있습니다.
    client.call_tool("logout", {"session_id": session_id})

예: 프로젝트 생성 워크플로 완료

에픽과 사용자 스토리를 사용하여 프로젝트를 만드는 전체 예는 다음과 같습니다.

from mcp.client import Client # Initialize MCP client client = Client() # Authenticate and get session ID auth_result = client.call_tool("login", { "username": "admin", "password": "password123", "host": "https://taiga.mycompany.com" }) session_id = auth_result["session_id"] # Create a new project project = client.call_tool("create_project", { "session_id": session_id, "name": "My New Project", "description": "A test project created via MCP" }) project_id = project["id"] # Create an epic epic = client.call_tool("create_epic", { "session_id": session_id, "project_id": project_id, "subject": "User Authentication", "description": "Implement user authentication features" }) epic_id = epic["id"] # Create a user story in the epic story = client.call_tool("create_user_story", { "session_id": session_id, "project_id": project_id, "subject": "User Login", "description": "As a user, I want to log in with my credentials", "epic_id": epic_id }) # Logout when done client.call_tool("logout", {"session_id": session_id})

개발

프로젝트 구조

pyTaigaMCP/ ├── src/ │ ├── server.py # MCP server implementation with tools │ ├── taiga_client.py # Taiga API client with all CRUD operations │ ├── tools.py # MCP tools definitions │ └── config.py # Configuration settings with Pydantic ├── tests/ │ ├── conftest.py # Shared pytest fixtures │ ├── unit/ # Unit tests │ └── integration/ # Integration tests ├── pyproject.toml # Project configuration and dependencies ├── install.sh # Installation script ├── run.sh # Server execution script └── README.md # Project documentation

테스트

pytest로 테스트 실행:

# Run all tests pytest # Run only unit tests pytest tests/unit/ # Run only integration tests pytest tests/integration/ # Run tests with specific markers pytest -m "auth" # Authentication tests pytest -m "core" # Core functionality tests # Run tests with coverage reporting pytest --cov=src

디버깅 및 검사

디버깅을 위해 포함된 검사기 도구를 사용하세요.

# Default stdio transport ./inspect.sh # For SSE transport ./inspect.sh --sse # For development mode ./inspect.sh --dev

오류 처리

모든 API 작업은 다음 형식으로 표준화된 오류 응답을 반환합니다.

{ "status": "error", "error_type": "ExceptionClassName", "message": "Detailed error message" }

성능 고려 사항

브리지는 여러 가지 성능 최적화를 구현합니다.

  1. 연결 풀링 : 더 나은 성능을 위해 HTTP 연결을 재사용합니다.
  2. 속도 제한 : Taiga API 과부하 방지
  3. 재시도 메커니즘 : 지수적 백오프를 통해 실패한 요청을 자동으로 재시도합니다.
  4. 세션 정리 : 만료된 세션을 정기적으로 정리하여 리소스를 확보합니다.

기여하다

기여를 환영합니다! 풀 리퀘스트를 제출해 주세요.

  1. 저장소를 포크하세요
  2. 기능 브랜치를 생성합니다( git checkout -b feature/amazing-feature )
  3. 개발 종속성 설치( ./install.sh --dev )
  4. 변경 사항을 만드세요
  5. 테스트 실행( pytest )
  6. 변경 사항을 커밋하세요( git commit -m 'Add some amazing feature' )
  7. 브랜치에 푸시( git push origin feature/amazing-feature )
  8. 풀 리퀘스트 열기

특허

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

감사의 말

  • 탁월한 프로젝트 관리 플랫폼을 제공하는 Taiga
  • 표준화된 AI 커뮤니케이션 프레임워크를 위한 모델 컨텍스트 프로토콜(MCP)
  • 이 프로젝트를 형성하는 데 도움을 준 모든 기여자
ID: bd5ajys5zl