Jira Weekly Reporter MCP Server

by Jongryong

Integrations

  • Uses .env files to securely store Jira connection credentials including API tokens for authentication.

  • Integrates with Atlassian's Jira platform to access issue data and generate activity reports using the Jira API.

  • Connects to Jira Cloud or Server/Data Center to generate weekly reports based on issue activity. Supports custom JQL queries, project filtering, and result limiting.

Jira 每周报告 MCP 服务器

该项目提供了一个FastMCP服务器,可连接到您的 Jira 实例(云或服务器/数据中心),并根据问题活动生成每周报告。它利用pycontribs-jira库与 Jira 进行交互,并可选择使用所连接客户端的大型语言模型 (LLM) 来汇总生成的报告。

✨ 特点

  • **Jira 连接:**使用存储在.env文件中的 API 令牌安全地连接到 Jira。
  • **MCP 工具:**公开可通过模型上下文协议访问的generate_jira_report工具。
  • 灵活的报告:
    • 默认报告过去 7 天内更新的问题。
    • 允许指定自定义 JQL 查询。
    • 可以按特定的 Jira 项目键过滤报告。
    • 限制返回的结果数量(可配置)。
  • **(可选)LLM 摘要:**可以使用客户端的LLM(通过ctx.sample() )提供报告的简明摘要。
  • **异步处理:**使用asyncio.to_thread正确处理异步 FastMCP 服务器中的同步 Jira 库调用。

📋 先决条件

  • Python 3.10 或更高版本。
  • uv (推荐)或pip用于包管理。
  • 访问 Jira 实例(云、服务器或数据中心)。
  • Jira API 令牌(服务器/DC 的个人访问令牌)。
  • FastMCP CLI已安装并在系统的 PATH 中可用。

⚙️ 设置

  1. 克隆存储库(如果适用):
    git clone https://github.com/Jongryong/jira_reporter.git cd jira_reporter
  2. **安装依赖项:**我们建议使用uv
    uv pip install fastmcp "jira[cli]" python-dotenv httpx anyio
    或者,使用pip
    pip install fastmcp "jira[cli]" python-dotenv httpx anyio
  3. **创建.env文件:**在与jira_reporter_server.py相同的目录中创建一个名为.env的文件。添加您的 Jira 连接详细信息:
    # .env JIRA_URL=https://your-domain.atlassian.net # Your Jira Cloud URL or Self-Hosted URL JIRA_USERNAME=your_email@example.com # Your Jira login email JIRA_API_TOKEN=your_api_token_or_pat # Your generated API Token or PAT
    • 安全:
      • **永远不要将.env文件提交到版本控制!**请将.env添加到.gitignore文件中。
      • **Jira Cloud:**从您的 Atlassian 帐户设置生成 API 令牌: 管理 API 令牌
      • **Jira 服务器/数据中心:**从您的 Jira 用户配置文件设置生成个人访问令牌 (PAT): 使用个人访问令牌

▶️ 运行服务器(独立)

您可以独立运行服务器以进行测试或其他目的:

  1. 直接使用 Python:
    python jira_reporter_server.py
  2. 使用 FastMCP CLI:
    fastmcp run jira_reporter_server.py
    要使用 SSE 运行(例如,用于远程访问):
    fastmcp run jira_reporter_server.py --transport sse --port 8001

🖥️ 与 Claude Desktop 一起使用

要使此服务器作为 Claude Desktop 应用程序中的工具使用:

  1. **确保先决条件:**确保fastmcp已安装并可在系统 PATH 中访问,因为下面的配置使用fastmcp命令。
  2. **找到 Claude 配置文件:**找到claude_desktop_config.json文件。其位置取决于您的操作系统:
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json (通常为C:\Users\<YourUsername>\AppData\Roaming\Claude\claude_desktop_config.json
    • Linux: ~/.config/Claude/claude_desktop_config.json (或$XDG_CONFIG_HOME/Claude/
  3. **编辑配置文件:**在文本编辑器中打开claude_desktop_config.json
  4. 添加服务器配置:在 JSON 中找到"mcpServers"对象(如果不存在,请将其创建为空对象{} )。在mcpServers中添加以下条目,并确保将"path/to/your/jira_reporter_server.py"替换为脚本的绝对路径
    { "mcpServers": { // ... other servers might be here ... "jira_report": { "command": "fastmcp", "args": [ "run", "/path/to/your/jira_reporter_server.py" // <-- IMPORTANT: Use the full, absolute path here ] } // ... other servers might be here ... } // ... rest of your Claude config ... }
    • "jira_report" :这是 Claude 使用的内部名称。您可以根据需要更改它。
    • "command": "fastmcp" :告诉 Claude 使用fastmcp命令行工具。
    • "args": [...] :告诉 Claude 运行fastmcp run /path/to/your/jira_reporter_server.py
  5. **保存并重新启动:**保存claude_desktop_config.json文件并重新启动 Claude Desktop 应用程序。
  6. **调用工具:**现在,您应该能够在 Claude 中通过提及 Python 脚本( Jira Weekly Reporter )中定义的服务器名称来使用该工具。例如: @Jira Weekly Reporter generate jira report for project MYPROJ and summarize it

🛠️ MCP 工具详情

  • 工具名称: generate_jira_report
  • **描述:**基于 JQL 查询生成 Jira 问题报告(默认为最近更新)。可选择使用客户端的 LLM 汇总报告。

参数:

范围类型必需的默认描述
jql_querystringupdated >= -7d ORDER BY updated DESC可选的 JQL 查询。如果省略,则使用默认值。
project_keystringNone可选的 Jira 项目键(例如“PROJ”)用于限制搜索范围(添加为project = 'KEY' AND ... )。
max_resultsinteger50原始报告数据中包含的最大问题数。
summarizebooleanfalse如果为true ,服务器将通过ctx.sample()客户端的LLM 请求摘要。

📦服务器依赖项

FastMCP构造函数包含dependencies=["jira"] 。这告诉fastmcp install之类的工具,在创建隔离环境时,此服务器需要jira库才能正常运行。

🤝 贡献

欢迎贡献!请随时提交问题或拉取请求。

📄 许可证

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.

连接到 Jira 实例以根据问题活动生成每周报告,支持自定义 JQL 查询和可选的 LLM 摘要。

  1. ✨ 特点
    1. 📋 先决条件
      1. ⚙️ 设置
        1. ▶️ 运行服务器(独立)
          1. 🖥️ 与 Claude Desktop 一起使用
            1. 🛠️ MCP 工具详情
              1. 📦服务器依赖项
                1. 🤝 贡献
                  1. 📄 许可证

                    Related MCP Servers

                    • A
                      security
                      A
                      license
                      A
                      quality
                      Provides capabilities for searching Jira issues using JQL and retrieving detailed issue information.
                      Last updated -
                      2
                      114
                      17
                      JavaScript
                      MIT License
                      • Apple
                    • A
                      security
                      F
                      license
                      A
                      quality
                      Provides integration with Jira's REST API, allowing AI assistants to manage Jira issues programmatically.
                      Last updated -
                      6
                      6
                      JavaScript
                      • Apple
                    • -
                      security
                      F
                      license
                      -
                      quality
                      A server implementation that allows AI models to interact with Jira through the Model Context Protocol, enabling tasks like JQL searches and retrieving issue details.
                      Last updated -
                      Python
                    • A
                      security
                      A
                      license
                      A
                      quality
                      A TypeScript-based server that enables interaction with Jira, providing tools to execute JQL queries, manage tickets, list projects and statuses through natural language.
                      Last updated -
                      11
                      20
                      JavaScript
                      MIT License
                      • Apple

                    View all related MCP servers

                    ID: hbu6889p79