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 ブリッジは、 Taigaプロジェクト管理プラットフォームとモデル コンテキスト プロトコル (MCP) を接続する強力な統合レイヤーであり、AI ツールとワークフローが Taiga のリソースとシームレスに対話できるようにします。

このブリッジは、AI エージェントに次のことを行うための包括的なツールとリソースのセットを提供します。

  • Taiga でプロジェクト、エピック、ユーザーストーリー、タスク、問題を作成および管理します
  • スプリントとマイルストーンを追跡する
  • 作業項目の割り当てと更新
  • プロジェクト成果物に関する詳細情報を照会する
  • プロジェクトメンバーと権限を管理する

このブリッジでは、MCP 標準を使用することで、AI システムがプロジェクトの状態に関するコンテキスト認識を維持し、複雑なプロジェクト管理タスクをプログラムで実行できるようになります。

特徴

包括的なリソースサポート

ブリッジは、完全な CRUD 操作を備えた次の Taiga リソースをサポートします。

  • プロジェクト: プロジェクト設定とメタデータを作成、更新、管理します
  • エピック: 複数のスプリントにまたがる大規模な機能を管理します
  • ユーザーストーリー: 詳細な要件と受け入れ基準を処理する
  • タスク: ユーザーストーリー内の小さな作業単位を追跡する
  • 問題: バグ、質問、機能強化のリクエストを管理する
  • スプリント(マイルストーン) :時間枠で区切られた間隔で作業を計画し、追跡します

インストール

このプロジェクトでは、高速で信頼性の高い Python パッケージ管理のためにuvを使用します。

前提条件

  • Python 3.10以上
  • UVパッケージマネージャー

基本的なインストール

# Clone the repository git clone https://github.com/your-org/pyTaigaMCP.git cd pyTaigaMCP # Install dependencies ./install.sh

開発インストール

開発用(テストおよびコード品質ツールを含む):

./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)標準入出力
REQUEST_TIMEOUTAPIリクエストのタイムアウト(秒)30
MAX_CONNECTIONSHTTP接続の最大数10
MAX_KEEPALIVE_CONNECTIONS最大キープアライブ接続数5
RATE_LIMIT_REQUESTS1分あたりの最大リクエスト数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

輸送モード

サーバーは 2 つのトランスポート モードをサポートしています。

  1. stdio (標準入出力) - 端末ベースのクライアントのデフォルトモード
  2. SSE (Server-Sent Events) - サーバープッシュ機能を備えたWebベースのトランスポート

トランスポート モードはいくつかの方法で設定できます。

  • 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 ライセンスに基づいてライセンスされています - 詳細については LICENSE ファイルを参照してください。

謝辞

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

AI システムを Taiga プロジェクト管理プラットフォームに接続し、AI ツールがプロジェクト、エピック、ユーザー ストーリー、タスク、問題、スプリントを作成および管理できるようにするプロトコル ブリッジ。

  1. Overview
    1. Features
      1. Comprehensive Resource Support
    2. Installation
      1. Prerequisites
      2. Basic Installation
      3. Development Installation
      4. Manual Installation
    3. Configuration
      1. Usage
        1. With stdio mode
        2. Running the Bridge
        3. Transport Modes
        4. Authentication Flow
        5. Example: Complete Project Creation Workflow
      2. Development
        1. Project Structure
        2. Testing
        3. Debugging and Inspection
      3. Error Handling
        1. Performance Considerations
          1. Contributing
            1. License
              1. Acknowledgments
                ID: bd5ajys5zl