### Install MCP Jira Source: https://github.com/warzuponus/mcp-jira/blob/main/QUICKSTART.md Clone the repository, set up a virtual environment, and install the project dependencies. ```bash git clone https://github.com/your-org/mcp-jira.git cd mcp-jira python3 -m venv .venv source .venv/bin/activate pip install -e . ``` -------------------------------- ### Importing Configuration Settings and Logging Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/imports.md Shows a common import pattern for configuration settings and initializing logging. This setup is typically done at the application's start. ```python from mcp_jira.config import get_settings, initialize_logging settings = get_settings() initialize_logging(settings) ``` -------------------------------- ### Example .env File Content Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/api-reference/Settings.md An example of the content for a .env file, showing how to set configuration variables for Jira and the application. ```dotenv # Jira Configuration JIRA_URL=https://your-domain.atlassian.net JIRA_USERNAME=your.email@domain.com JIRA_API_TOKEN=your_api_token PROJECT_KEY=PROJ DEFAULT_BOARD_ID=123 # Application Settings DEBUG_MODE=false LOG_LEVEL=INFO ``` -------------------------------- ### Set Up Development Environment Source: https://github.com/warzuponus/mcp-jira/blob/main/README.md Commands to create and activate a Python virtual environment, and install development dependencies. ```bash python3 -m venv .venv source .venv/bin/activate pip install -e ".[dev]" ``` -------------------------------- ### Generate Standup Report Usage Example Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/endpoints.md Example of how to call the generate_standup_report tool with a specific board_id. ```text Tool Call: generate_standup_report Arguments: board_id: 42 ``` -------------------------------- ### Configure .env file Source: https://github.com/warzuponus/mcp-jira/blob/main/QUICKSTART.md Copy the example .env file and edit it with your Jira credentials and project details. ```bash # Copy the example cp .env.example .env # Edit with your details nano .env ``` ```env JIRA_URL=https://your-company.atlassian.net JIRA_USERNAME=your.email@company.com JIRA_API_TOKEN=your_api_token_here PROJECT_KEY=PROJ ``` -------------------------------- ### Install Development Dependencies Source: https://github.com/warzuponus/mcp-jira/blob/main/tests/README.md Install the necessary development dependencies for the project using pip. This command ensures all testing and development tools are available. ```bash pip install -e ".[dev]" ``` -------------------------------- ### Generate Standup Report Usage Response Example Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/endpoints.md Example response from the generate_standup_report tool for a specific board, showing completed and in-progress issues. ```markdown ## 🌅 Daily Standup - 2026-06-11 **Sprint**: Sprint 15 ### ✅ Completed Yesterday - **PROJ-120**: Implement user authentication (Jane Smith) ### 🔄 In Progress - **PROJ-121**: Setup CI/CD pipeline (John Doe) [8pts] - **PROJ-122**: Write API documentation (Sarah Chen) [3pts] ### 📊 Sprint Metrics - **Progress**: 13/30 points (43.3%) - **Active Issues**: 2 ``` -------------------------------- ### Team Workload Analysis Usage Example Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/endpoints.md Example of how to call the get_team_workload tool with a list of team members, including both usernames and account IDs. ```text Tool Call: get_team_workload Arguments: team_members: ["john.doe", "jane.smith", "557058:87654321-4321-4321-4321-abc123def456"] ``` -------------------------------- ### Example Success Response for Create Issue Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/endpoints.md This is an example of a successful response when creating a Jira issue. ```text ✅ Created issue PROJ-123: Fix login form ``` -------------------------------- ### Usage Example for Create Issue Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/endpoints.md Demonstrates how to call the `create_issue` tool with specific arguments and shows the expected response. ```text Tool Call: create_issue Arguments: summary: "Login form crashes on mobile" description: "When users open the login page on iOS, the form doesn't render.\n\n## Steps to Reproduce\n- Open app on iOS\n- Navigate to login\n- Observe form is broken\n\n## Expected Behavior\nForm should render correctly" issue_type: "Bug" priority: "High" story_points: 5 assignee: "557058:12345678-1234-1234-1234-123456789abc" project_key: "PROJ" Response: ✅ Created issue PROJ-456: Login form crashes on mobile ``` -------------------------------- ### Setup Configuration from .env File Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/api-reference/Settings.md Demonstrates the initial step of creating a .env file with necessary Jira configuration variables. ```python # 1. Create .env file # JIRA_URL=https://mycompany.atlassian.net # JIRA_USERNAME=user@mycompany.com # JIRA_API_TOKEN=your_secret_token # PROJECT_KEY=PROJ ``` -------------------------------- ### Team Workload Analysis Usage Response Example Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/endpoints.md Example response from the get_team_workload tool, showing workload analysis for provided team members. ```markdown ## 👥 Team Workload Analysis ### 🟢 john.doe - **Total Points**: 9 - **Active Issues**: 2 - **Total Issues**: 3 ### 🔴 jane.smith - **Total Points**: 16 - **Active Issues**: 4 - **Total Issues**: 6 ### 🟡 (Account 557058:...) - **Total Points**: 11 - **Active Issues**: 3 - **Total Issues**: 4 ``` -------------------------------- ### Configure MCP Jira Environment Variables Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/README.md Example of how to set up the .env file with required Jira credentials and project settings. ```bash # Copy template cp .env.example .env # Edit with your credentials JIRA_URL=https://your-domain.atlassian.net JIRA_USERNAME=your.email@domain.com JIRA_API_TOKEN=your_api_token PROJECT_KEY=PROJ DEFAULT_BOARD_ID=123 ``` -------------------------------- ### Example Error Response for Create Issue Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/endpoints.md This is an example of an error response when attempting to create a Jira issue. ```text Error: Failed to create issue: Project INVALID not found ``` -------------------------------- ### Jira Search No Results Response Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/endpoints.md Example response when no issues match the provided JQL query. ```text No issues found matching the query. ``` -------------------------------- ### Call MCP Tool Example Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/api-reference/MCPServer.md Example of how to internally call an MCP tool. This is typically invoked by an MCP client to execute a specific Jira operation. ```python result = await call_tool( "create_issue", { "summary": "Fix login bug", "description": "Login page is broken", "issue_type": "Bug", "priority": "High" } ) # Returns: [TextContent(type="text", text="✅ Created issue PROJ-123: Fix login bug")] ``` -------------------------------- ### Running the MCP Server Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/imports.md Provides the code to start the MCP server using asyncio. This is the entry point for the server functionality. ```python from mcp_jira.simple_mcp_server import main import asyncio # Run the MCP server asyncio.run(main()) ``` -------------------------------- ### Import Package Version Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/imports.md Import the package version string to check the installed version. ```python from mcp_jira import __version__ ``` -------------------------------- ### Initialize MCP Jira Settings and Logging Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/api-reference/Settings.md Load settings from environment variables and initialize logging. This is a common starting point for using the library. ```python # DEFAULT_BOARD_ID=42 # LOG_LEVEL=INFO # 2. Load and use settings from mcp_jira.config import get_settings, initialize_logging from mcp_jira.jira_client import JiraClient settings = get_settings() initialize_logging(settings) client = JiraClient(settings) # client is now ready to use ``` -------------------------------- ### Configure Jira Credentials Source: https://github.com/warzuponus/mcp-jira/blob/main/README.md Copy the example environment file and edit it with your Jira instance URL, username, API token, project key, and default board ID. ```env JIRA_URL=https://your-domain.atlassian.net JIRA_USERNAME=your.email@domain.com JIRA_API_TOKEN=your_api_token PROJECT_KEY=PROJ DEFAULT_BOARD_ID=123 ``` -------------------------------- ### Get Settings Instance Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/imports.md Retrieve the application's settings instance using the `get_settings` function. ```python from mcp_jira.config import get_settings settings = get_settings() # Returns Settings instance ``` -------------------------------- ### Get Python Binary Path Source: https://github.com/warzuponus/mcp-jira/blob/main/README.md Run this command from the project directory to get the absolute path to the Python binary within the virtual environment, useful for configuration. ```bash echo "$(pwd)/.venv/bin/python" ``` -------------------------------- ### Run MCP Server Entry Point Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/api-reference/MCPServer.md This is the main entry point for the MCP server. It initializes configuration, the Jira client, and starts the MCP stdio server. It runs indefinitely until interrupted. ```python import asyncio from mcp_jira.simple_mcp_server import main if __name__ == "__main__": asyncio.run(main()) ``` -------------------------------- ### Jira Search with High Priority and In Progress Issues Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/endpoints.md Example response for a search query targeting high-priority, in-progress issues. ```text Found 2 issues: 🔄 **PROJ-99**: Critical API bug 🔴 High | In Progress (👤 Mike Wilson) [8pts] 🔄 **PROJ-100**: Security patch 🔴 High | In Progress (👤 Sarah Chen) [5pts] ``` -------------------------------- ### Sprint Usage Example Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/types.md Shows how to retrieve the active sprint, calculate remaining days, and fetch sprint issues to calculate completion progress based on story points. ```python from mcp_jira.types import SprintStatus from datetime import datetime, timezone # Get active sprint sprint = await client.get_active_sprint() if sprint and sprint.status == SprintStatus.ACTIVE: print(f"Active: {sprint.name}") # Calculate days remaining if sprint.end_date: now = datetime.now(timezone.utc) days_left = (sprint.end_date - now).days print(f"Days remaining: {days_left}") # Fetch issues and calculate metrics issues = await client.get_sprint_issues(sprint.id) sprint.total_points = sum(i.story_points for i in issues if i.story_points) sprint.completed_points = sum( i.story_points for i in issues if i.story_points and i.status.value == "Done" ) completion = (sprint.completed_points / sprint.total_points * 100) if sprint.total_points > 0 else 0 print(f"Progress: {sprint.completed_points}/{sprint.total_points} points ({completion:.1f}%)") ``` -------------------------------- ### TeamMember Data Model Usage Example Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/types.md Shows how to instantiate and use the TeamMember data model to represent user information and capacity. Useful for managing team resources. ```python from mcp_jira.types import TeamMember member = TeamMember( username="john.doe", display_name="John Doe", email="john.doe@company.com", capacity=0.8 ) print(f"{member.display_name} is at {member.capacity * 100}% capacity") ``` -------------------------------- ### Get Application Settings Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/api-reference/Settings.md Retrieves the application settings by loading them from environment variables. This is the primary method for accessing configuration. ```python def get_settings() -> Settings: """Retrieves the application settings from environment variables. This is the primary way to load configuration.""" pass ``` ```python from mcp_jira.config import get_settings settings = get_settings() print(f"Jira URL: {settings.jira_url}") print(f"Project: {settings.project_key}") ``` -------------------------------- ### Issue Usage Example Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/types.md Demonstrates how to iterate through issues retrieved from the Jira client, access assignee details, status, and story points. Also shows how to check if an issue is blocked. ```python from mcp_jira.types import Issue, IssueStatus # Issues are created by JiraClient issues = await client.search_issues('project = PROJ AND status = "In Progress"') for issue in issues: if issue.assignee: print(f"{issue.key}: {issue.summary}") print(f" Assigned to: {issue.assignee.display_name}") print(f" Status: {issue.status_name}") print(f" Story Points: {issue.story_points}") if issue.status == IssueStatus.BLOCKED: print(f" Blocked by: {', '.join(issue.blocked_by)}") ``` -------------------------------- ### Jira Search Success Response Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/endpoints.md Example of a successful response from the search_issues tool, listing found issues with their details. ```text Found 3 issues: 🔄 **PROJ-123**: Fix login form 🔴 High | In Progress (👤 John Doe) [5pts] ✅ **PROJ-124**: Update documentation 🟢 Low | Done (👤 Jane Smith) 🔄 **PROJ-125**: Deploy to production 🟡 Medium | In Progress (Unassigned) ``` -------------------------------- ### Catching JiraError Example Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/types.md Demonstrates how to use a try-except block to catch JiraError exceptions when interacting with the Jira client. This allows for graceful handling of API failures. ```python from mcp_jira.types import JiraError from mcp_jira.jira_client import JiraClient client = JiraClient(settings) try: issues = await client.search_issues('invalid jql syntax') except JiraError as e: print(f"Jira API error: {e}") # Handle error appropriately ``` -------------------------------- ### Sprint Status Report for Active Sprint Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/endpoints.md Example of a successful response from get_sprint_status for an active sprint, showing progress and details. ```text ## 📊 Sprint Status: Sprint 15 **Status**: active **Goal**: Deliver core features **Duration**: 2026-06-01 to 2026-06-15 **Days Remaining**: 5 ### 📈 Progress - **Completion**: 70.0% (14/20 points) - **Total Issues**: 12 - **In Progress**: 3 - **⚠️ Blocked**: 2 ``` -------------------------------- ### Creating a Jira Issue Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/imports.md Example of creating a new Jira issue with various parameters like summary, description, type, priority, story points, assignee, and project key. ```python # Create issue_key = await client.create_issue( summary="...", description="...", issue_type=IssueType.BUG, priority=Priority.HIGH, story_points=5.0, assignee="account_id", project_key="PROJ" ) -> str ``` -------------------------------- ### Generate Standup Report Success Response Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/endpoints.md Example of a successful response from the generate_standup_report tool, detailing completed, in-progress, and blocked issues for a sprint. ```markdown ## 🌅 Daily Standup - 2026-06-11 **Sprint**: Sprint 15 ### ✅ Completed Yesterday - **PROJ-120**: Implement search feature (John Doe) - **PROJ-121**: Fix API endpoint (Jane Smith) ### 🔄 In Progress - **PROJ-122**: Update dashboard (John Doe) [5pts] - **PROJ-123**: Security audit (Jane Smith) [8pts] - **PROJ-124**: Fix performance issue (Mike Wilson) [3pts] ### ⚠️ Blocked Issues - **PROJ-125**: Deploy to production (John Doe) ### 📊 Sprint Metrics - **Progress**: 22/30 points (73.3%) - **Active Issues**: 3 - **Blocked Issues**: 1 ⚠️ ``` -------------------------------- ### Priority Enum Usage Example Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/types.md Shows how to use the Priority enum for setting priorities and iterating through all available levels. Useful for managing task urgency. ```python from mcp_jira.types import Priority priority = Priority.HIGH assert priority.value == "High" # Iterate all priorities for p in Priority: print(p.value) ``` -------------------------------- ### Importing JiraClient and Types for Usage Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/imports.md Illustrates a common pattern for importing the JiraClient and necessary types like IssueType and Priority. This setup is used for interacting with the Jira API. ```python from mcp_jira.config import get_settings from mcp_jira.jira_client import JiraClient from mcp_jira.types import IssueType, Priority settings = get_settings() client = JiraClient(settings) # Use client... ``` -------------------------------- ### Load and Create Settings Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/imports.md Demonstrates loading settings from the environment using `get_settings` or creating them manually. ```python from mcp_jira.config import Settings, get_settings # Load from environment settings = get_settings() # Or create manually settings = Settings( jira_url="https://company.atlassian.net", jira_username="user@company.com", jira_api_token="token_value", project_key="PROJ" ) ``` -------------------------------- ### Initialize Logging Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/imports.md Configure Python's logging system using the application's settings. ```python from mcp_jira.config import initialize_logging initialize_logging(settings) # Configures Python logging ``` -------------------------------- ### No Active Sprint Found Response Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/endpoints.md Example response when the get_sprint_status tool cannot find an active sprint. ```text No active sprint found. ``` -------------------------------- ### Async/Await Usage with JiraClient Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/README.md Shows the standard pattern for initializing JiraClient and using its async methods with await, including proper resource cleanup. ```python import asyncio from mcp_jira.config import get_settings from mcp_jira.jira_client import JiraClient async def main(): settings = get_settings() client = JiraClient(settings) try: # Use await with all client methods sprint = await client.get_active_sprint() issues = await client.get_sprint_issues(sprint.id) # Process results for issue in issues: print(f"{issue.key}: {issue.summary}") finally: await client.close() # Entry point if __name__ == "__main__": asyncio.run(main()) ``` -------------------------------- ### Minimal Environment Configuration Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/configuration.md The essential configuration for running the server, including Jira connection details and project settings. ```env JIRA_URL=https://mycompany.atlassian.net JIRA_USERNAME=user@mycompany.com JIRA_API_TOKEN=atAAABBBCCCDDDEEEFFF123456789abc PROJECT_KEY=PROJ DEFAULT_BOARD_ID=42 ``` -------------------------------- ### Get Assigned Issues Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/README.md Retrieves all issues assigned to a specific team member using `JiraClient.get_assigned_issues`. ```APIDOC ## get_assigned_issues ### Description Retrieves all issues currently assigned to a specific user. ### Method `get_assigned_issues(assignee_name: str)` ### Parameters #### Path Parameters None #### Query Parameters - **assignee_name** (str) - Required - The username or identifier of the assignee. ### Request Example ```python issues = await client.get_assigned_issues("john.doe") ``` ### Response #### Success Response - **issues** (List[Issue]) - A list of Issue objects assigned to the specified user. #### Response Example ```json [ { "key": "PROJ-5", "summary": "Fix UI glitch", "story_points": 3, "assignee": {"display_name": "John Doe"} } ] ``` ``` -------------------------------- ### Get Sprint Issues Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/README.md Fetches all issues associated with a specific sprint ID using `JiraClient.get_sprint_issues`. ```APIDOC ## get_sprint_issues ### Description Retrieves all issues belonging to a specific sprint. ### Method `get_sprint_issues(sprint_id: int)` ### Parameters #### Path Parameters None #### Query Parameters - **sprint_id** (int) - Required - The ID of the sprint. ### Request Example ```python issues = await client.get_sprint_issues(101) ``` ### Response #### Success Response - **issues** (List[Issue]) - A list of Issue objects within the specified sprint. #### Response Example ```json [ { "key": "PROJ-1", "summary": "Task 1", "story_points": 5, "status": {"value": "In Progress"} } ] ``` ``` -------------------------------- ### Generate Standup Report No Active Sprint Response Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/endpoints.md Example response when no active sprint is found for the generate_standup_report tool. ```markdown No active sprint found for standup report. ``` -------------------------------- ### initialize_logging Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/api-reference/Settings.md Configures Python logging based on settings. Sets up the root logger and suppresses verbose third-party loggers. ```APIDOC ## initialize_logging ### Description Configures Python logging based on settings. Sets up the root logger and suppresses verbose third-party loggers. ### Method `initialize_logging(settings: Settings)` ### Parameters #### Path Parameters - **settings** (Settings) - Required - Settings object with log_level configured ### Returns `None` - Configures logging as side effect. ### Behavior - Sets root logger to specified level - Sets aiohttp logger to WARNING - Sets urllib3 logger to WARNING - Applies standard format: `%(asctime)s - %(name)s - %(levelname)s - %(message)s` ### Example ```python from mcp_jira.config import get_settings, initialize_logging settings = get_settings() initialize_logging(settings) # Now logging is configured and ready to use ``` ``` -------------------------------- ### Initialize JiraClient Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/api-reference/JiraClient.md Initializes the Jira API client using settings obtained from get_settings. Ensure settings are properly configured before instantiation. ```python from mcp_jira.config import get_settings from mcp_jira.jira_client import JiraClient settings = get_settings() client = JiraClient(settings) ``` -------------------------------- ### Get Active Sprint Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/README.md Retrieves the currently active sprint using `JiraClient.get_active_sprint`. Returns `None` if no sprint is active. ```APIDOC ## get_active_sprint ### Description Retrieves the currently active sprint. ### Method `get_active_sprint()` ### Parameters None ### Request Example ```python sprint = await client.get_active_sprint() ``` ### Response #### Success Response - **sprint** (Optional[Sprint]) - The active Sprint object, or None if no sprint is active. #### Response Example ```json { "id": 101, "name": "Sprint 1", "state": "active" } ``` ``` -------------------------------- ### get_session Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/api-reference/JiraClient.md Gets or creates the aiohttp session for making HTTP requests. Reuses an existing session if available and not closed. ```APIDOC ## get_session ### Description Gets or creates the aiohttp session for making HTTP requests. Reuses an existing session if available and not closed. ### Parameters #### Path Parameters - **—** (—) - — - — - No parameters ### Returns aiohttp.ClientSession - An async HTTP client session configured with proper headers and timeout. ### Example ```python session = await client.get_session() # Session is automatically managed and reused ``` ``` -------------------------------- ### Discover Available Tools Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/endpoints.md This endpoint is called automatically by the MCP client on startup to discover all available tools. No direct invocation is needed. ```python list_tools() ``` -------------------------------- ### Sprint Status Report for Specific Sprint Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/endpoints.md Example of a successful response from get_sprint_status for a specific sprint, showing progress and details. ```text ## 📊 Sprint Status: Sprint 15 **Status**: active **Goal**: Deliver v2.0 release **Duration**: 2026-06-01 to 2026-06-15 **Days Remaining**: 3 ### 📈 Progress - **Completion**: 85.0% (17/20 points) - **Total Issues**: 8 - **In Progress**: 2 - **⚠️ Blocked**: 1 ``` -------------------------------- ### Test the MCP Jira Server Source: https://github.com/warzuponus/mcp-jira/blob/main/QUICKSTART.md Run the MCP Jira server using the Python virtual environment to verify its initialization. ```bash .venv/bin/python -m mcp_jira ``` -------------------------------- ### Get Team Workload Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/endpoints.md Check the capacity and current workload of team members. Provide a list of team members as input. ```python get_team_workload([team_members]) ``` -------------------------------- ### Get Sprint Status Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/endpoints.md Retrieve the current progress of a sprint. This is useful for understanding sprint velocity and identifying potential issues. ```python get_sprint_status() ``` -------------------------------- ### JiraClient Constructor Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/imports.md Instantiate the JiraClient by providing the application settings. ```APIDOC ## JiraClient Constructor ### Description Instantiate the JiraClient by providing the application settings. ### Parameters #### Request Body - **settings** (Settings) - Required - Application settings object. ### Request Example ```python from mcp_jira.jira_client import JiraClient from mcp_jira.config import get_settings settings = get_settings() client = JiraClient(settings) ``` ``` -------------------------------- ### Get Specific Sprint Status Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/endpoints.md Use the get_sprint_status tool with specific sprint_id and board_id to retrieve the status for a particular sprint. ```tool_code Tool Call: get_sprint_status Arguments: sprint_id: 123 board_id: 42 ``` -------------------------------- ### Get Assigned Issues Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/api-reference/JiraClient.md Fetches all unresolved issues assigned to a specific user. Requires the username or account ID of the assignee. ```python async def get_assigned_issues(self, username: str) -> List[Issue] Fetches all unresolved issues assigned to a specific user. | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | username | str | Yes | — | Jira username or account ID of the assignee | **Returns**: List[Issue] - Array of unresolved issues assigned to the user. **Throws**: JiraError - On API errors or if user is not found. **Example**: ```python issues = await client.get_assigned_issues("john.doe") print(f"{len(issues)} issues assigned to john.doe") ``` ``` -------------------------------- ### Verify .env File Configuration Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/errors.md These bash commands help verify that your .env file exists and contains the necessary Jira connection variables (JIRA_URL, JIRA_USERNAME, JIRA_API_TOKEN, PROJECT_KEY). ```bash # Check .env exists ls -la .env # Check required variables are set grep -E "JIRA_URL|JIRA_USERNAME|JIRA_API_TOKEN|PROJECT_KEY" .env ``` -------------------------------- ### get_settings Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/api-reference/Settings.md Retrieves the application settings from environment variables. This is the primary way to load configuration. ```APIDOC ## get_settings ### Description Retrieves the application settings from environment variables. This is the primary way to load configuration. ### Method `get_settings()` ### Parameters No parameters. ### Returns `Settings` - Settings instance with all fields populated from environment. ### Throws `ValidationError` - If required fields are missing or invalid. ### Example ```python from mcp_jira.config import get_settings settings = get_settings() print(f"Jira URL: {settings.jira_url}") print(f"Project: {settings.project_key}") ``` ``` -------------------------------- ### Get Sprint Issues Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/api-reference/JiraClient.md Fetches all issues assigned to a sprint with automatic pagination. Returns up to max_results issues. Requires a sprint_id. ```python async def get_sprint_issues(self, sprint_id: int, max_results: int = 200) -> List[Issue] Fetches all issues assigned to a sprint with automatic pagination. Returns up to max_results issues. | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | sprint_id | int | Yes | — | Sprint ID to fetch issues from | | max_results | int | No | 200 | Maximum number of issues to return (pagination stops after this) | **Returns**: List[Issue] - Array of Issue objects with full details (description, assignee, story points, etc.). **Throws**: JiraError - On API errors or if sprint does not exist. **Example**: ```python issues = await client.get_sprint_issues(123) for issue in issues: print(f"{issue.key}: {issue.summary} ({issue.status.value})") ``` ``` -------------------------------- ### Concurrent Jira Searches with asyncio Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/README.md Demonstrates how to perform multiple Jira issue searches concurrently using `asyncio.gather`. Ensure `JiraClient` and `settings` are properly initialized. ```python import asyncio async def main(): client = JiraClient(settings) # Concurrent searches results = await asyncio.gather( client.search_issues("project = PROJ1"), client.search_issues("project = PROJ2"), client.search_issues("project = PROJ3") ) await client.close() ``` -------------------------------- ### Get Issue History Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/api-reference/JiraClient.md Retrieves the change history (changelog) for a specific issue, including all status transitions. Requires the issue key. ```python async def get_issue_history(self, issue_key: str) -> List[Dict[str, Any]] Retrieves the change history (changelog) for a specific issue, including all status transitions. | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | issue_key | str | Yes | — | Issue key (e.g., "PROJ-123") | **Returns**: List[Dict[str, Any]] - Array of history entries with keys: from_status, to_status, from_date, author. **Throws**: JiraError - If issue is not found or API request fails. **Example**: ```python history = await client.get_issue_history("PROJ-123") for entry in history: print(f"{entry['author']} moved {entry['from_status']} → {entry['to_status']}") ``` ``` -------------------------------- ### Import Settings Class Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/imports.md Import the Settings class for defining Jira connection and project parameters. ```python from mcp_jira.config import Settings ``` -------------------------------- ### Get aiohttp Session Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/api-reference/JiraClient.md Retrieves the aiohttp client session used by the JiraClient. This session is automatically managed and reused if available and not closed. ```python session = await client.get_session() # Session is automatically managed and reused ``` -------------------------------- ### Discovering Tools with list_tools Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/imports.md Illustrates the use of the `list_tools` function, which is automatically called by MCP clients to discover available tools. It returns a list of Tool objects. ```python from mcp_jira.simple_mcp_server import list_tools # Called automatically by MCP clients # Returns List[Tool] ``` -------------------------------- ### SprintStatus Enum Usage Example Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/types.md Illustrates checking the status of an active sprint using the SprintStatus enum. Useful for real-time sprint monitoring. ```python from mcp_jira.types import SprintStatus sprint = await client.get_active_sprint() if sprint.status == SprintStatus.ACTIVE: print("Sprint is running") ``` -------------------------------- ### Get Backlog Issues Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/api-reference/JiraClient.md Retrieves all unassigned backlog issues for a project, sorted by priority (Rank). Uses the default project if project_key is not provided. ```python async def get_backlog_issues(self, project_key: Optional[str] = None) -> List[Issue] Retrieves all unassigned backlog issues for a project, sorted by priority (Rank). | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | project_key | str | No | None | Project key; uses default project if not provided | **Returns**: List[Issue] - Array of backlog issues sorted by rank. **Throws**: JiraError - If project is not found or API request fails. **Example**: ```python backlog = await client.get_backlog_issues("PROJ") print(f"Backlog size: {len(backlog)} issues") ``` ``` -------------------------------- ### Configure MCP Server for Claude Desktop Source: https://github.com/warzuponus/mcp-jira/blob/main/README.md Add an entry to the Claude Desktop configuration file to specify the MCP Jira server command and arguments. Ensure you use the Python binary from the virtual environment. ```json { "mcpServers": { "mcp-jira": { "command": "/path/to/mcp-jira/.venv/bin/python", "args": ["-m", "mcp_jira"] } } } ``` -------------------------------- ### Team Workload Analysis Success Response Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/endpoints.md Example of a successful response from the team workload analysis endpoint, showing workload indicators for each team member. ```markdown ## 👥 Team Workload Analysis ### 🟢 john.doe - **Total Points**: 8 - **Active Issues**: 2 - **Total Issues**: 3 ### 🔴 jane.smith - **Total Points**: 18 - **Active Issues**: 4 - **Total Issues**: 5 ### 🟡 mike.wilson - **Total Points**: 12 - **Active Issues**: 3 - **Total Issues**: 4 ``` -------------------------------- ### Configuration Module Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/imports.md Manage Jira connection settings and logging. ```APIDOC ## Configuration Module ### Settings Class ```python from mcp_jira.config import Settings ``` #### Description Represents the configuration settings for connecting to Jira. #### Fields - `jira_url` (HttpUrl) - Required - The base URL of the Jira instance. - `jira_username` (str) - Required - The username for authentication. - `jira_api_token` (SecretStr) - Required - The API token for authentication. - `project_key` (str) - Required - The key of the Jira project. - `default_board_id` (Optional[int]) - The default board ID to use. - `debug_mode` (bool) - Enables debug logging. - `log_level` (str) - Sets the logging level. - `default_sprint_length` (int) - Default length of sprints in days. - `story_points_field` (str) - The name of the field used for story points. - `max_sprint_items` (int) - Maximum number of items to fetch per sprint. - `jira_request_timeout` (int) - Timeout for Jira API requests in seconds. - `cache_ttl` (int) - Time-to-live for cached data in seconds. - `max_concurrent_requests` (int) - Maximum number of concurrent requests to Jira. #### Example ```python from mcp_jira.config import Settings, get_settings # Load from environment settings = get_settings() # Or create manually settings = Settings( jira_url="https://company.atlassian.net", jira_username="user@company.com", jira_api_token="token_value", project_key="PROJ" ) ``` ``` ```APIDOC ### Functions #### `get_settings()` ```python from mcp_jira.config import get_settings settings = get_settings() # Returns Settings instance ``` ##### Description Retrieves the application settings, typically loaded from environment variables. ##### Returns - `Settings` - An instance of the Settings class. ``` ```APIDOC #### `initialize_logging(settings)` ```python from mcp_jira.config import initialize_logging initialize_logging(settings) # Configures Python logging ``` ##### Description Initializes the Python logging system based on the provided settings. ##### Parameters - `settings` (Settings) - The configuration settings object. ``` ```APIDOC #### `generate_env_template()` ```python from mcp_jira.config import generate_env_template template = generate_env_template() # Returns str with .env template ``` ##### Description Generates a string containing a template for the `.env` file, outlining all available configuration options. ##### Returns - `str` - A string representing the `.env` file template. ``` -------------------------------- ### Using Type Hints for Jira Objects Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/imports.md Demonstrates the use of type hints with common Jira-related types such as Sprint, Issue, TeamMember, and JiraError. This improves code readability and maintainability. ```python from typing import List from mcp_jira.types import Issue, Sprint, TeamMember, JiraError def process_sprint(sprint: Sprint) -> List[Issue]: # Type-hinted function pass async def analyze_team(members: List[TeamMember]) -> dict: # Type-hinted async function pass ``` -------------------------------- ### IssueType Enum Usage Example Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/types.md Demonstrates how to create and compare IssueType enum members. Useful for setting issue types or validating API responses. ```python from mcp_jira.types import IssueType # Create issue with type issue_type = IssueType.BUG assert issue_type.value == "Bug" # Compare with API response if api_response["issuetype"]["name"] == IssueType.BUG.value: print("It's a bug") ``` -------------------------------- ### JiraClient Constructor Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/api-reference/JiraClient.md Initializes a Jira API client with configuration from a Settings object. This client handles authentication, HTTP requests, and data model conversions. ```APIDOC ## JiraClient Constructor ### Description Initializes a Jira API client with configuration from a Settings object. ### Parameters #### Path Parameters - **settings** (Settings) - Required - Configuration object containing Jira credentials and API settings ### Returns JiraClient instance ### Throws No exceptions on initialization; errors occur when making API calls. ### Example ```python from mcp_jira.config import get_settings from mcp_jira.jira_client import JiraClient settings = get_settings() client = JiraClient(settings) ``` ``` -------------------------------- ### Team Workload Analysis Partial Failure Response Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/endpoints.md Example of a response when some team members cannot be found, showing successful members and error messages for failed ones. ```markdown ## 👥 Team Workload Analysis ### 🟢 john.doe - **Total Points**: 8 - **Active Issues**: 2 - **Total Issues**: 3 ### ❌ invalid.user - **Error**: Could not fetch data (User not found) ``` -------------------------------- ### Import Configuration Symbols Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/imports.md Import necessary symbols from the configuration module for managing settings and logging. ```python from mcp_jira.config import ( Settings, get_settings, initialize_logging, generate_env_template ) ``` -------------------------------- ### Handle Daily Standup Report Generation Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/api-reference/MCPServer.md Creates a daily standup report for the active sprint, summarizing completed, in-progress, and blocked issues, along with sprint metrics. Use this for daily team synchronization. ```python async def handle_standup_report(args: Dict[str, Any]) -> List[TextContent] ``` -------------------------------- ### IssueStatus.from_name Method Example Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/types.md Demonstrates the `from_name` class method for safely converting Jira status names to IssueStatus enums, including handling custom statuses. ```python from mcp_jira.types import IssueStatus # Standard status status = IssueStatus.from_name("In Progress") assert status == IssueStatus.IN_PROGRESS # Custom status status = IssueStatus.from_name("Waiting for Client") assert status == IssueStatus.CUSTOM # Original name is preserved in status_name field of Issue ``` -------------------------------- ### Python Type Hinting with MCP Jira Types Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/types.md Demonstrates using Python's type hinting with MCP Jira types for better code readability and maintainability. Includes importing List from typing. ```python # Type hints from typing import List from mcp_jira.types import Issue, TeamMember, Sprint async def process_sprint_issues(sprint_id: int) -> List[Issue]: issues = await client.get_sprint_issues(sprint_id) return issues def find_most_loaded_member(issues: List[Issue]) -> TeamMember: # Find the team member with the most story points assigned ... ``` -------------------------------- ### Get Active Sprint Status Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/endpoints.md Use the get_sprint_status tool without arguments to retrieve the status of the currently active sprint. This relies on the DEFAULT_BOARD_ID environment variable. ```tool_code Tool Call: get_sprint_status Arguments: (no arguments - uses DEFAULT_BOARD_ID) ``` -------------------------------- ### Run MCP Jira Server Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/README.md Commands to run the MCP Jira server for development and for integration with Claude Desktop. ```bash # Development python -m mcp_jira # Claude Desktop integration # Add to claude_desktop_config.json: { "mcpServers": { "mcp-jira": { "command": "/path/to/mcp-jira/.venv/bin/python", "args": ["-m", "mcp_jira"] } } } ``` -------------------------------- ### Get Active Sprint Source: https://github.com/warzuponus/mcp-jira/blob/main/_autodocs/api-reference/JiraClient.md Retrieves the currently active sprint for a given board. Returns None if no active sprint exists. Uses the default board if board_id is not provided. ```python async def get_active_sprint(self, board_id: Optional[int] = None) -> Optional[Sprint] Retrieves the currently active sprint for a given board. If no active sprint exists, returns None. | Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | board_id | int | No | None | Board ID to search; uses default board if not provided | **Returns**: Optional[Sprint] - Sprint object if an active sprint exists; None otherwise. **Throws**: JiraError - If the board is not found or API request fails. **Example**: ```python sprint = await client.get_active_sprint() if sprint: print(f"Active sprint: {sprint.name}") else: print("No active sprint found") ``` ```