Confluence MCP Server
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=true3. 测试运行
# 直接运行看是否正常启动
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=12345LLM 会自动调用 get_confluence_page 获取内容,然后基于内容回答你的问题。
关于内网请求拦截
本工具在 HTTP 请求中使用了浏览器 User-Agent 和完整的浏览器请求头,以规避可能的非浏览器请求拦截。如果仍然被拦截,可能需要:
将请求源 IP 加入白名单
或者联系 IT 确认 REST API 是否需要额外配置
支持的 URL 格式
https://confluence.example.com/pages/viewpage.action?pageId=12345https://confluence.example.com/display/SPACE/Page+Titlehttps://confluence.example.com/spaces/SPACE/pages/12345/Page+Titlehttps://confluence.example.com/wiki/spaces/SPACE/pages/12345/...
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/OnClickListener2048/confluence-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server