jira_analytics_processor
Facilitates the creation of comprehensive, periodic reports detailing Jira artifact activity, drawing data from specified Jira endpoints via customized JQL predicates, and optionally enriches these digests using a generative language model for enhanced executive summaries.
Author

Jongryong
Quick Info
Actions
Tags
Enterprise Jira Artifact Aggregator (FastMCP Service)
This service implements a specialized FastMCP Server, establishing secure conduits to user-defined Jira instances (covering both Atlassian Cloud and self-hosted Server/Data Center deployments). Its primary function is to compile granular weekly status digests centered on issue lifecycle events. Furthermore, it integrates an optional post-processing step utilizing the connected client's Large Language Model (LLM) to condense the detailed findings into readily digestible executive summaries.
Core Capabilities
- Secure Access: Establishes authenticated links to Jira environments utilizing credentials (API tokens or PATs) securely sourced from environment variables (
.env). - MCP Exposure: Exports a callable tool named
generate_jira_reportconforming to the Model Context Protocol specification. - Data Retrieval Flexibility:
- By default, focuses on artifacts modified within the preceding 168 hours (7 days).
- Accepts arbitrary, user-defined JQL strings for precise data filtering.
- Allows scoping the data retrieval to a particular Jira project identifier.
- Includes rate limiting controls for the volume of records processed.
- Intelligent Synthesis: If configured, employs the host LLM context (via
ctx.sample()) to synthesize the raw issue data into a high-level narrative summary. - Concurrency Management: Adeptly manages inherently synchronous calls to the underlying Jira API client within the asynchronous FastMCP execution environment using
asyncio.to_thread.
🔩 Initial Requirements
- Python version 3.10 or newer.
- Package management via
uv(recommended) orpip. - Valid network access credentials for the target Jira deployment.
- A valid Jira API Key or Personal Access Token (PAT).
- The FastMCP Command Line Interface, installed and executable globally.
🚀 Deployment Sequence
-
Source Acquisition (If from repository): bash git clone [Repository URL] cd [Project Directory]
-
Dependency Installation: Using
uv(preferred): bash uv pip install fastmcp "jira[cli]" python-dotenv httpx anyio -
Configuration File Generation: Create a file named
.envin the same directory as the main server script (jira_reporter_server.py). Populate it with connection specifics: dotenv # .env Configuration JIRA_URL=https://your-organization.atlassian.net JIRA_USERNAME=security_principal@corp.com JIRA_API_TOKEN=your_secret_key_hereCrucial Security Note: This
.envfile must be explicitly excluded from source control (add it to.gitignore). Tokens must be acquired via documented Atlassian procedures (API token for Cloud; PAT for Server).
▶️ Service Activation
Initiate the FastMCP listener:
-
Direct Python Invocation: bash python jira_reporter_server.py
-
Via FastMCP CLI Utility: bash fastmcp run jira_reporter_server.py
For remote interaction requiring Server-Sent Events (SSE): bash fastmcp run jira_reporter_server.py --transport sse --port 8001
🖥️ Integration with Local AI Desktop Client
To expose this utility to the Claude Desktop environment, follow these steps:
-
Verify Prerequisite: Confirm
fastmcpis globally accessible. -
Locate Configuration File: Identify the location of
claude_desktop_config.jsonbased on your OS:- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
- macOS:
-
Modify Configuration: Open the JSON file.
-
Register the Server: Within the top-level
mcpServersobject (create it if missing), insert the following configuration block. Replace the placeholder path with the actual, absolute file system location ofjira_reporter_server.py:{ "mcpServers": { // ... other existing configurations ...
"jira_artifact_fetcher": { "command": "fastmcp", "args": [ "run", "/absolute/path/to/your/jira_reporter_server.py" // <--- Full absolute path required ] } // ... other configurations ...} // ... rest of the file ... }
-
Finalize: Save the configuration file and relaunch the Claude Desktop application.
-
Tool Invocation Example: Interact with the service using the server name defined in the script (e.g., 'Jira Artifact Aggregator'):
@Jira Artifact Aggregator compile report for project 'FINANCE' and generate a summary.
🛠️ Interface Specification (MCP Tool Schema)
- Exposed Method Name:
generate_jira_report - Purpose: Fetches Jira artifacts based on query parameters and optionally passes the result set to the client LLM for narrative synthesis.
Parameters Schema:
| Field Name | Data Type | Mandatory | Default Value | Function Description |
|---|---|---|---|---|
jql_query |
string |
False | updated >= -7d ORDER BY updated DESC |
The specific Jira Query Language string to execute. |
project_key |
string |
False | null |
A project identifier (e.g., 'ENG') used to prepend project = 'KEY' AND ... to the JQL. |
max_results |
integer |
False | 50 |
The upper bound on the quantity of artifact records to return in the initial payload. |
summarize |
boolean |
False | false |
If set to true, triggers the invocation of ctx.sample() for LLM-driven abstract generation. |
📦 Deployment Manifest
The FastMCP registration process recognizes the explicit dependency on the jira library via the dependencies=["jira"] declaration within the server initialization, ensuring proper environment isolation during package installation.
🤝 Contribution Policy
We encourage community engagement via bug reports and feature enhancement proposals (Issues and Pull Requests).
📄 Legal
Distributed under the terms of the MIT License.
