OnClickListener2048

Confluence MCP Server

Updated

confluence-mcp

Confluence MCP Server

读取和分析 Confluence 文档内容的 MCP Server。支持文字、表格、代码块、图片等内容的提取和转换。

功能

  • get_confluence_page — 获取页面完整内容(Markdown 格式),用于问答和分析
  • get_page_structure — 获取页面结构概览(目录、是否有表格/代码/图片)
  • get_child_pages — 获取子页面列表
  • get_page_attachments — 获取附件列表

安装

1. 创建虚拟环境并安装

cd confluence-mcp
python -m venv .venv

# Windows
.venv\Scripts\activate

# Linux/Mac
source .venv/bin/activate

pip install -e .

2. 配置环境变量

复制 .env.example.env 并编辑:

cp .env.example .env
# Confluence Server 地址(不要尾部斜杠)
CONFLUENCE_BASE_URL=https://confluence.yourcompany.com

# Personal Access Token
# 获取方式: Confluence → 右上角头像 → 设置 → Personal Access Tokens → 创建
CONFLUENCE_PAT=your_token_here

# 内网自签证书时设为 false
CONFLUENCE_VERIFY_SSL=true

3. 测试运行

# 直接运行看是否正常启动
python -m confluence_mcp.server

# 或使用 mcp dev 工具调试
mcp dev confluence_mcp/server.py

集成到 VS Code / Copilot Chat

在 VS Code 的 settings.json 中添加:

{
  "mcp": {
    "servers": {
      "confluence": {
        "command": "python",
        "args": ["-m", "confluence_mcp.server"],
        "cwd": "C:\\Users\\wang2\\mcp\\confluence-mcp",
        "env": {
          "CONFLUENCE_BASE_URL": "https://confluence.yourcompany.com",
          "CONFLUENCE_PAT": "your_token_here",
          "CONFLUENCE_VERIFY_SSL": "true"
        }
      }
    }
  }
}

也可以不在 settings.json 里写 env,而是让 server 从 .env 文件读取。

集成到 Claude Desktop

claude_desktop_config.json 中添加:

{
  "mcpServers": {
    "confluence": {
      "command": "C:\\Users\\wang2\\mcp\\confluence-mcp\\.venv\\Scripts\\python.exe",
      "args": ["-m", "confluence_mcp.server"],
      "cwd": "C:\\Users\\wang2\\mcp\\confluence-mcp",
      "env": {
        "CONFLUENCE_BASE_URL": "https://confluence.yourcompany.com",
        "CONFLUENCE_PAT": "your_token_here"
      }
    }
  }
}

使用方式

配置完成后,在 Copilot Chat 或 Claude 对话中直接发送:

帮我看一下这个文档的内容:https://confluence.yourcompany.com/display/TEAM/Some+Page

这个文档里关于部署流程是怎么写的?

总结一下这个页面:https://confluence.yourcompany.com/pages/viewpage.action?pageId=12345

LLM 会自动调用 get_confluence_page 获取内容,然后基于内容回答你的问题。

关于内网请求拦截

本工具在 HTTP 请求中使用了浏览器 User-Agent 和完整的浏览器请求头,以规避可能的非浏览器请求拦截。如果仍然被拦截,可能需要:

  1. 将请求源 IP 加入白名单
  2. 或者联系 IT 确认 REST API 是否需要额外配置

支持的 URL 格式

  • https://confluence.example.com/pages/viewpage.action?pageId=12345
  • https://confluence.example.com/display/SPACE/Page+Title
  • https://confluence.example.com/spaces/SPACE/pages/12345/Page+Title
  • https://confluence.example.com/wiki/spaces/SPACE/pages/12345/...

MCP Server · Populars

MCP Server · New

    xmpuspus

    Cloudwright

    AI-powered cloud architecture - describe infrastructure in natural language, get Terraform, cost estimates, and compliance reports

    Community xmpuspus
    wallneradam

    Claude Auto-Approve MCP

    An MCP server to inject auto-approve MCP functionality into Claude Desktop

    Community wallneradam
    YV17labs

    ghostdesk

    Give any AI agent a full desktop — it sees the screen, clicks, types, and runs apps like a human. Automate anything with a UI: browsers, legacy software, internal tools. No API needed. One Docker command.

    Community YV17labs
    remotebrowser

    mcp

    Free your data

    Community remotebrowser
    Decodo

    Decodo MCP Server

    The Decodo MCP server which enables MCP clients to interface with services.

    Community Decodo