Confluence MCP Server

by aaronsb
Verified

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Provides tools for interacting with Confluence Cloud, enabling management of spaces, pages, and content through features like listing spaces, creating/reading/updating pages, converting Confluence storage format to Markdown, searching content using CQL, and managing page labels.

Confluence 云 MCP 服务器

模型上下文协议 (MCP) 服务器,提供与 Confluence Cloud 交互的工具。该服务器使 AI 助手能够通过标准化界面管理 Confluence 空间、页面和内容。

特征

  • 空间管理
    • 列出空间
    • 获取空间详细信息
  • 页面操作
    • 创建、阅读、更新页面
    • 列出空间中的页面
    • 将页面内容从 Confluence 存储格式转换为 Markdown
  • 搜索和标签
    • 使用 CQL 搜索内容
    • 管理页面标签

设置

选项 1:使用 Docker(推荐)

使用此服务器的最简单方法是使用预先构建的 Docker 映像:

docker run --rm -i \ -e CONFLUENCE_API_TOKEN=your-api-token \ -e CONFLUENCE_EMAIL=your-email@domain.com \ -e CONFLUENCE_DOMAIN=your-domain.atlassian.net \ ghcr.io/aaronsb/confluence-cloud-mcp:latest

选项 2:本地构建

  1. 克隆存储库:
git clone https://github.com/aaronsb/confluence-cloud-mcp.git cd confluence-cloud-mcp
  1. 使用本地构建脚本构建并运行:
# Build the Docker image ./scripts/build-local.sh # Run the server CONFLUENCE_API_TOKEN=your-token CONFLUENCE_EMAIL=your-email ./scripts/run-local.sh

选项 3:从源头

  1. 安装依赖项:
npm install
  1. 配置环境变量:使用您的 Confluence 凭据创建一个.env文件:
CONFLUENCE_DOMAIN=your-domain.atlassian.net CONFLUENCE_EMAIL=your-email@domain.com CONFLUENCE_API_TOKEN=your-api-token
  1. 构建项目:
npm run build
  1. 运行服务器:
node build/index.js

用法

通过将服务器添加到 MCP 配置中,可以与兼容 MCP 的 AI 助手集成:

{ "mcpServers": { "confluence": { "command": "docker", "args": ["run", "--rm", "-i", "ghcr.io/aaronsb/confluence-cloud-mcp:latest"], "env": { "CONFLUENCE_DOMAIN": "your-domain.atlassian.net", "CONFLUENCE_EMAIL": "your-email@domain.com", "CONFLUENCE_API_TOKEN": "your-api-token" }, "disabled": false, "autoApprove": [] } } }

人工智能助手注意事项:如果您是像 Cline 这样的人工智能助手并尝试安装此 MCP 服务器,请参阅llms-install.md文件以获取详细的安装说明。

可用工具

太空工具

  • list_confluence_spaces :列出 Confluence 中的所有空间
  • get_confluence_space :获取有关特定空间的详细信息

页面工具

  • list_confluence_pages :列出空间中的页面
  • get_confluence_page :获取特定页面及其内容(现在包括 Markdown 转换)
  • create_confluence_page :在空间中创建新页面
  • update_confluence_page :更新现有页面

get_confluence_page工具现在会自动将 Confluence 存储格式的内容转换为 Markdown 格式,从而更轻松地处理页面内容。转换过程可处理:

  • 标题(h1-h6)
  • 列表(有序和无序)
  • 链接
  • 强调(粗体/斜体)
  • 代码块
  • 表格
  • 段落和换行符

搜索和标签工具

  • search_confluence_pages :使用 CQL 搜索 Confluence 内容
  • get_confluence_labels :获取页面的标签
  • add_confluence_label :向页面添加标签
  • remove_confluence_label :从页面中删除标签

注意:所有工具名称均遵循 [动词] confluence [名词] 命名约定,以保持一致性和清晰度。

发展

该项目使用 TypeScript 编写,并遵循 MCP SDK 规范来实现服务器功能。代码库组织如下:

  • src/client/ ——Confluence API 客户端实现
  • src/handlers/ - MCP 工具请求处理程序
  • src/schemas/ - 工具输入的 JSON 模式
  • src/types/ ——TypeScript 类型定义
  • src/utils/ - 实用函数,包括内容格式转换

CI/CD 管道

该项目使用 GitHub Actions 进行持续集成和部署:

  • 自动测试和检查拉取请求
  • 在主分支提交时自动构建 Docker 镜像
  • 多架构映像构建(amd64、arm64)
  • 容器发布到 GitHub Container Registry

本地开发

对于本地开发,请使用提供的脚本:

  • ./scripts/build-local.sh :构建项目并创建本地 Docker 镜像
  • ./scripts/run-local.sh :使用您的凭据运行本地 Docker 镜像

执照

麻省理工学院

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

使 AI 助手能够通过模型上下文协议 (MCP) 与 Confluence Cloud 交互以管理空间、页面和内容。

  1. Features
    1. Setup
      1. Option 1: Using Docker (Recommended)
      2. Option 2: Building Locally
      3. Option 3: From Source
    2. Usage
      1. Available Tools
        1. Space Tools
        2. Page Tools
        3. Search & Label Tools
      2. Development
        1. CI/CD Pipeline
        2. Local Development
      3. License
        ID: mp9zjz01wb