Metadata-Version: 2.4
Name: personal-jira-mcp
Version: 0.1.0
Summary: JIRA MCP for querying JIRA details and lists
Project-URL: Homepage, https://github.com/yuezheng2006/mcp-server-jira
Project-URL: Bug Tracker, https://github.com/yuezheng2006/mcp-server-jira/issues
Project-URL: Documentation, https://github.com/yuezheng2006/mcp-server-jira#readme
Author-email: Your Name <your-email@example.com>
License: MIT
License-File: LICENSE
Keywords: cursor,fastmcp,jira,mcp
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: <3.11,>=3.10
Requires-Dist: fastapi>=0.110.0
Requires-Dist: jira>=3.8.0
Requires-Dist: mcp>=1.9.0
Requires-Dist: pydantic>=2.11.0
Requires-Dist: python-dotenv>=1.1.0
Requires-Dist: requests>=2.32.0
Requires-Dist: typing-extensions>=4.13.0
Requires-Dist: uvicorn>=0.34.0
Provides-Extra: dev
Requires-Dist: black>=23.0.0; extra == 'dev'
Requires-Dist: isort>=5.0.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Description-Content-Type: text/markdown

# Personal JIRA MCP

一个基于FastMCP框架的个人JIRA集成插件，用于查询JIRA问题详情、列表及进行基本操作，支持JIRA附件管理。

## 主要功能

- 查询JIRA问题详情和问题列表
- 创建和更新JIRA问题
- 获取项目列表和详情
- 管理和下载JIRA问题附件
  - 自动将附件保存到~/.jira_mcp目录
  - 按问题ID组织的子目录结构
  - 支持下载单个或所有附件

## 安装

### 前提条件

- Python 3.10 或更高版本
- 安装 uv (推荐) 或 pip

### 安装 uv

uv 是一个快速的 Python 包管理器，推荐用于安装和管理 Python 包。

#### Linux / macOS
```bash
# 使用 curl 安装
curl -sSf https://astral.sh/uv/install.sh | sh

# 或使用 pip 安装
pip install uv
```

#### Windows
```bash
# 使用 PowerShell 安装
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

# 或使用 pip 安装
pip install uv
```

#### 验证安装
```bash
uv --version
```

### 从PyPI安装

```bash
# 使用 uv (推荐)
uv pip install personal-jira-mcp

# 或使用 pip
pip install personal-jira-mcp
```

### 从GitHub安装

```bash
# 使用 uv (推荐)
uv pip install git+https://github.com/yuezheng2006/mcp-server-jira.git

# 或使用 pip
pip install git+https://github.com/yuezheng2006/mcp-server-jira.git
```

### 本地开发安装

```bash
# 克隆仓库
git clone https://github.com/yuezheng2006/mcp-server-jira.git
cd mcp-server-jira

# 使用 uv 安装依赖并开发模式安装
uv pip install -e .

# 或使用 pip
pip install -e .
```

## 配置

创建一个`.env`文件，设置以下环境变量：

```
JIRA_SERVER_URL=http://your-jira-instance.com
JIRA_USERNAME=your_username
JIRA_PASSWORD=your_password
# 或者使用API令牌
JIRA_API_TOKEN=your_api_token
```

### Cursor配置

在 `.cursor/mcp.json` 中添加以下配置：

```json
{
  "mcpServers": {
    "personal-jira-mcp": {
      "command": "personal-jira-mcp",
      "args": ["--transport", "stdio"],
      "env": {
        "JIRA_SERVER_URL": "http://your-jira-instance.com",
        "JIRA_USERNAME": "your_username",
        "JIRA_PASSWORD": "your_password"
      }
    }
  }
}
```

## 快速开始

### 启动MCP服务器

```bash
# 使用stdio传输模式
personal-jira-mcp --transport stdio

# 使用sse传输模式
personal-jira-mcp --transport sse
```

### 命令行工具

```bash
# 下载单个附件
personal-jira-extract ERP-161 example.png --output saved_file.png

# 下载问题的所有附件
personal-jira-attachments ERP-161

# 仅列出问题的所有附件，不下载
personal-jira-attachments ERP-161 --list-only

# 输出附件信息到JSON文件
personal-jira-attachments ERP-161 --output attachments.json
```

### 在Cursor中使用

配置好mcp.json后，可以在Cursor中使用以下自然语言命令：

```
查看JIRA问题ERP-161的详情
```

```
下载JIRA问题ERP-161的所有附件
```

```
搜索所有处于"进行中"状态的JIRA问题
```

## 详细文档

更详细的使用指南和API参考，请查看[使用指南](./mcp.md)。

## 开发

### 安装开发依赖

```bash
# 使用 uv
uv pip install -e ".[dev]"

# 或使用 pip
pip install -e ".[dev]"
```

## 发布

### 构建并发布到PyPI

```bash
# 确保已安装构建工具
pip install build twine

# 构建包
python -m build

# 上传到PyPI
python -m twine upload dist/*
```

## 许可证

MIT 