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 中可用。
⚙️ 设置
- 克隆存储库(如果适用):Copy
- **安装依赖项:**我们建议使用
uv
:或者,使用Copypip
:Copy - **创建
.env
文件:**在与jira_reporter_server.py
相同的目录中创建一个名为.env
的文件。添加您的 Jira 连接详细信息:Copy
▶️ 运行服务器(独立)
您可以独立运行服务器以进行测试或其他目的:
- 直接使用 Python:Copy
- 使用 FastMCP CLI:要使用 SSE 运行(例如,用于远程访问):CopyCopy
🖥️ 与 Claude Desktop 一起使用
要使此服务器作为 Claude Desktop 应用程序中的工具使用:
- **确保先决条件:**确保
fastmcp
已安装并可在系统 PATH 中访问,因为下面的配置使用fastmcp
命令。 - **找到 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/
)
- macOS:
- **编辑配置文件:**在文本编辑器中打开
claude_desktop_config.json
。 - 添加服务器配置:在 JSON 中找到
"mcpServers"
对象(如果不存在,请将其创建为空对象{}
)。在mcpServers
中添加以下条目,并确保将"path/to/your/jira_reporter_server.py"
替换为脚本的绝对路径:Copy"jira_report"
:这是 Claude 使用的内部名称。您可以根据需要更改它。"command": "fastmcp"
:告诉 Claude 使用fastmcp
命令行工具。"args": [...]
:告诉 Claude 运行fastmcp run /path/to/your/jira_reporter_server.py
。
- **保存并重新启动:**保存
claude_desktop_config.json
文件并重新启动 Claude Desktop 应用程序。 - **调用工具:**现在,您应该能够在 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_query | string | 不 | updated >= -7d ORDER BY updated DESC | 可选的 JQL 查询。如果省略,则使用默认值。 |
project_key | string | 不 | None | 可选的 Jira 项目键(例如“PROJ”)用于限制搜索范围(添加为project = 'KEY' AND ... )。 |
max_results | integer | 不 | 50 | 原始报告数据中包含的最大问题数。 |
summarize | boolean | 不 | false | 如果为true ,服务器将通过ctx.sample() 向客户端的LLM 请求摘要。 |
📦服务器依赖项
FastMCP
构造函数包含dependencies=["jira"]
。这告诉fastmcp install
之类的工具,在创建隔离环境时,此服务器需要jira
库才能正常运行。
🤝 贡献
欢迎贡献!请随时提交问题或拉取请求。
📄 许可证
MIT 许可证
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
连接到 Jira 实例以根据问题活动生成每周报告,支持自定义 JQL 查询和可选的 LLM 摘要。
Related MCP Servers
- AsecurityAlicenseAqualityProvides capabilities for searching Jira issues using JQL and retrieving detailed issue information.Last updated -211417JavaScriptMIT License
- AsecurityFlicenseAqualityProvides integration with Jira's REST API, allowing AI assistants to manage Jira issues programmatically.Last updated -66JavaScript
- -securityFlicense-qualityA 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
- AsecurityAlicenseAqualityA 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 -1120JavaScriptMIT License