先决条件: -Python 3.10,具有所需的依赖关系 -可以访问Jira和Confluence的Atlassian帐户 -Jira和Confluence的API令牌
安装: -安装uv: -powershell-执行策略ByPass-c“irmhttps://astral.sh/uv/install.ps1|iex” -安装fastmcp: -pip安装fastmcp-httpx -安装要求: -pip安装-r要求.txt -安装boto3 -紫外线管道安装boto3
配置: -您需要添加一个.env文件,其中包含以下环境变量: -JIRA.EMAIL=“your.account@onedatascan.com" -JIRA_API_TOKEN=“您的_JIRA_API_TOKEN_here” -CONFLUENCE_API_TOKEN=“your_CONFLUENCE_API_TOKEN_here”
使用以下命令运行客户端和服务器: -cd到atlass_mcp_server目录 -uv运行路径to-atlass_client.py“run_local.py”
重构的Atlass MCP服务器结构: atlass_mcp_server/ ├── server.py#MCP服务器的入口点 ├── config.py#配置和环境变量 ├── auth.py#身份验证实用程序 ├── http_client.py#用于发出API请求的http客户端实用程序。 ├── jira_service.py#用于处理jira API操作的jira服务。n ├── jira_utils.py#用于处理jira数据的实用函数。 ├── confluence_service.py#用于处理confluence API操作的服务。 ├── run_local.py#MCP服务器的本地开发运行程序。 ├── requirements.txt#Python依赖项 ├── pyproject.toml#项目元数据 ├── uv.lock#锁定文件 └── README.md#项目文档
Notes:
- All business logic is split into focused modules for maintainability.
- Add any shared utility functions to the `utils/` folder.
- Update imports if you add new modules.可用工具: 1.获取jira_ticket -获取Jira问题的全面细节,包括儿童故事和子任务。 -参数: -issue_key(str):Jira问题密钥(例如“PROJ-123”) -返回:包含问题详细信息、状态、报告者、描述和所有子任务的格式化字符串。
2. create_confluence_page
- Creates a new page in Confluence with specified content.
- Parameters:
- space_key (str): Confluence space key
- title (str): Page title
- body (str): HTML content for the page
- Returns: Success message with page URL or error description.
3. create_test_plan_from_jira
- Creates or updates a Confluence page with a test plan based on Jira ticket data.
- Parameters:
- issue_key (str): Jira issue key for reference
- confluence_space_key (str): Confluence space key
- confluence_title (str): Title for the page
- test_plan (str): Complete test plan content in HTML
- Returns: Success message with page URL or error description.