Confluence MCP 服务器是一个基于 FastMCP 的服务器,它提供了与 Confluence REST API 的无缝集成,让用户能够以程序化的方式访问 Confluence 空间、页面和使用内容搜索功能。
Confluence MCP 服务器可助力你实现对 Confluence 空间、页面和内容搜索功能的程序化访问。以下为你介绍如何快速开启使用之旅。
你可以通过 Smithery 为 Claude Desktop 自动安装 confluence-mcp-server:
npx -y @smithery/cli install @MahithChigurupati/confluence-mcp-server --client claude
git clone https://github.com/yourusername/confluence-mcp.git
cd confluence-mcp
pip install -r requirements.txt
python server.py
.env 文件并添加以下内容:CONFLUENCE_BASE_URL=your_confluence_url
USERNAME=your_atlassian_email
API_TOKEN=your_api_token
export CONFLUENCE_BASE_URL="https://yourcompany.atlassian.net/wiki"
export USERNAME="user@example.com"
export API_TOKEN="your_api_token_here"
python server.py
response = requests.get("http://localhost:5000/api/confluence/spaces")
data = {
"title": "New Page",
"parent_id": "12345"
}
response = requests.post("http://localhost:5000/api/confluence/pages", json=data)
{
"server_url": "http://localhost:5000",
"api_key": "your_api_key_here"
}
{
"confluence_server": "https://yourcompany.atlassian.net/wiki",
"username": "user@example.com",
"api_token": "your_api_token_here"
}
常见错误代码及其含义:
| 错误代码 | 含义 |
|---|---|
401 |
无效的 API 令牌或凭据 |
403 |
权限不足 |
404 |
资源未找到 |
429 |
超出速率限制 |
如需报告问题或功能请求,请在仓库的问题跟踪器中创建问题。
本项目采用 MIT License。详见 LICENSE 文件以获取完整条款。