内容
# 阿特拉斯 MCP 服务器
Atlassian 产品的模型上下文协议(MCP)服务器的单体仓库,基于 FastMCP 3 构建。
| 服务器 | 工具 | 包 |
|--------|-------|---------|
| [Jira](jira-mcp-server/) | 37 | `atlassian-jira-mcp` |
| [Confluence](confluence-mcp-server/) | 41 | `atlassian-confluence-mcp` |
| [Bitbucket](bitbucket-mcp-server/) | 44 | `atlassian-bitbucket-mcp` |
## 结构
```
atlassian/
├── jira-mcp-server/ # 问题、面板、冲刺、工作流
├── confluence-mcp-server/ # 页面、空间、博客、搜索
└── bitbucket-mcp-server/ # 仓库、拉取请求、分支、构建
```
## 安装
每个服务器都是一个独立的 Python 包。从服务器目录安装:
```bash
cd jira-mcp-server && pip install -e ".[dev]"
cd confluence-mcp-server && pip install -e ".[dev]"
cd bitbucket-mcp-server && pip install -e ".[dev]"
```
需要 Python 3.10+。
## 身份验证
所有三个服务器都支持多种身份验证模式,从环境变量中自动检测。
### 阿特拉斯云
使用您的电子邮件和 API 令牌进行基本身份验证。
```bash
# Jira 云
export JIRA_MCP_URL=https://yoursite.atlassian.net
export JIRA_MCP_EMAIL=you@company.com
export JIRA_MCP_TOKEN=your-api-token
# Confluence 云
export CONFLUENCE_MCP_URL=https://yoursite.atlassian.net/wiki
export CONFLUENCE_MCP_EMAIL=you@company.com
export CONFLUENCE_MCP_TOKEN=your-api-token
# Bitbucket 云
export BITBUCKET_MCP_URL=https://api.bitbucket.org
export BITBUCKET_MCP_EMAIL=you@company.com
export BITBUCKET_MCP_TOKEN=your-app-password
```
### 自托管(数据中心)
使用个人访问令牌进行 Bearer 身份验证。
```bash
# Jira 数据中心
export JIRA_MCP_URL=https://jira.company.com
export JIRA_MCP_TOKEN=your-personal-access-token
# Confluence 数据中心
export CONFLUENCE_MCP_URL=https://confluence.company.com
export CONFLUENCE_MCP_TOKEN=your-personal-access-token
# Bitbucket 数据中心
export BITBUCKET_MCP_URL=https://bitbucket.company.com
export BITBUCKET_MCP_TOKEN=your-personal-access-token
```
### 自托管(用户名 + 密码)
Jira 服务器还支持使用用户名和密码进行传统的基本身份验证,适用于较旧的服务器/数据中心实例:
```bash
export JIRA_MCP_URL=https://jira.company.com
export JIRA_MCP_USERNAME=your-username
export JIRA_MCP_PASSWORD=your-password
```
### 自动检测
- 如果设置了 `EMAIL`:云模式(使用电子邮件 + API 令牌的基本身份验证)
- 如果设置了 `USERNAME` + `PASSWORD`(仅限 Jira):基本模式(使用凭证的基本身份验证)
- 如果仅设置了 `TOKEN`:数据中心模式(使用 PAT 的 Bearer 身份验证)
- 设置 `AUTH_TYPE=cloud`、`AUTH_TYPE=pat` 或 `AUTH_TYPE=basic` 以覆盖
## MCP 客户端配置
添加到您的 `.mcp.json`(例如,对于 Claude Code):
```json
{
"mcpServers": {
"jira": {
"command": "atlassian-jira-mcp",
"env": {
"JIRA_MCP_URL": "https://yoursite.atlassian.net",
"JIRA_MCP_EMAIL": "you@company.com",
"JIRA_MCP_TOKEN": "your-api-token"
}
},
"confluence": {
"command": "atlassian-confluence-mcp",
"env": {
"CONFLUENCE_MCP_URL": "https://yoursite.atlassian.net/wiki",
"CONFLUENCE_MCP_EMAIL": "you@company.com",
"CONFLUENCE_MCP_TOKEN": "your-api-token"
}
},
"bitbucket": {
"command": "atlassian-bitbucket-mcp",
"env": {
"BITBUCKET_MCP_URL": "https://api.bitbucket.org",
"BITBUCKET_MCP_EMAIL": "you@company.com",
"BITBUCKET_MCP_TOKEN": "your-app-password"
}
}
}
}
```
## 开发
```bash
# 运行测试(从任何服务器目录)
pytest
# lint
ruff check src/ tests/
# 类型检查
mypy src/
```
所有服务器都强制执行 100% 的测试覆盖率。
## 许可证
MIT