Atlassian MCP 服务器套件

一套基于Model Context Protocol(MCP)构建的Atlassian产品服务器套件,支持Jira、Confluence和Bitbucket的集成开发与管理。

  • by troylar
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 troylar/atlassian-mcp-servers

使用说明

Atlassian MCP服务器

一个monorepo 模型上下文协议 Atlassian产品的(MCP)服务器,基于 FastMCP 3.

服务器 工具 包
Jira 37 atlassian-jira-mcp
汇流 41 atlassian-confluence-mcp
比特桶 44 atlassian-bitbucket-mcp

结构

atlassian/
├── jira-mcp-server/          # Issues, boards, sprints, workflows
├── confluence-mcp-server/    # Pages, spaces, blogs, search
└── bitbucket-mcp-server/     # Repos, PRs, branches, builds

安装

每个服务器都是一个独立的Python包。从服务器目录安装:

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+。

认证

所有三台服务器都支持多种身份验证模式,可从环境变量中自动检测。

Atlassian云

在您的电子邮件和电子邮件中使用基本身份验证 API令牌.

# Jira Cloud
export JIRA_MCP_URL=https://yoursite.atlassian.net
export JIRA_MCP_EMAIL=you@company.com
export JIRA_MCP_TOKEN=your-api-token

# Confluence Cloud
export CONFLUENCE_MCP_URL=https://yoursite.atlassian.net/wiki
export CONFLUENCE_MCP_EMAIL=you@company.com
export CONFLUENCE_MCP_TOKEN=your-api-token

# Bitbucket Cloud
export BITBUCKET_MCP_URL=https://api.bitbucket.org
export BITBUCKET_MCP_EMAIL=you@company.com
export BITBUCKET_MCP_TOKEN=your-app-password

自托管(数据中心)

使用承载身份验证 个人访问令牌.

# Jira Data Center
export JIRA_MCP_URL=https://jira.company.com
export JIRA_MCP_TOKEN=your-personal-access-token

# Confluence Data Center
export CONFLUENCE_MCP_URL=https://confluence.company.com
export CONFLUENCE_MCP_TOKEN=your-personal-access-token

# Bitbucket Data Center
export BITBUCKET_MCP_URL=https://bitbucket.company.com
export BITBUCKET_MCP_TOKEN=your-personal-access-token

自托管(用户名+密码)

Jira服务器还支持旧服务器/数据中心实例的传统基本身份验证,包括用户名和密码:

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的承载身份验证)
  • 集 AUTH_TYPE=cloud, AUTH_TYPE=pat,或 AUTH_TYPE=basic 覆盖

MCP客户端配置

添加到您的 .mcp.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"
      }
    }
  }
}

发展

# Run tests (from any server directory)
pytest

# Lint
ruff check src/ tests/

# Type check
mypy src/

所有服务器都强制执行100%的测试覆盖率。

许可证

麻省理工学院