Enables AI-driven management of Confluence Cloud instances, including creating, updating, and deleting pages, searching content, managing spaces, querying child pages and page history, and generating Confluence code macros in storage format.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Confluence Node MCP Servercreate a new page titled 'Project Kickoff Meeting Notes' in the Engineering space"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Confluence (KMS) MCP Server
一个 Confluence MCP(Model Context Protocol)服务器:让 AI 在 Cursor 里通过自然语言创建、更新、删除、搜索 Confluence(公司内部也称 KMS)页面。
✨ 特性
页面管理:创建、更新、删除、获取页面(支持 title / pageId)
搜索能力:按关键词搜索、获取子页面、查看页面历史
Space 管理:列出当前账号可访问的 Spaces
宏辅助:生成 Confluence Code Macro(storage format),安全插入代码块(规避
InvalidValueException)
⚠️ 注意事项(必读)
必须使用 Cursor 的 Agent 模式,才能调用
confluence_*这组 MCP 工具Cursor
📦 项目结构(以仓库现状为准)
🚀 快速开始
1) 安装依赖
2) 配置环境变量
复制 env-example.txt 为 .env,并填入你的配置:
说明:本项目通过 Confluence REST API + Basic Auth(用户名 +
CONF_PASSWORD)访问。
Atlassian Cloud:
CONF_PASSWORD通常是 API Token内部 KMS:以你们实际认证方式为准(可能是 Token 或密码)
3) 构建(生成 dist/)
4) 配置 Cursor MCP
编辑 ~/.cursor/mcp.json(可参考 mcp-config-example.json),将 args 指向 本仓库的 :
5) 重启 Cursor 并在 Agent 模式使用
完全退出并重启 Cursor
切换到 Agent 模式后再使用(否则 MCP 工具可能不可用)
6) 验证(在 Cursor 里直接问)
🛠️ 可用工具
类别 | 工具 | 说明 |
Space |
| 列出可访问的 Spaces |
页面操作 |
| 创建页面 |
| 更新页面(支持 | |
| 创建或更新(存在则更新,否则创建) | |
| 获取页面详情(含 storage HTML) | |
| 删除页面 | |
搜索 |
| 搜索页面 |
| 获取子页面 | |
| 查看页面历史 | |
附件 |
| 上传附件到指定页面(filePath 或 base64) |
宏 |
| 生成 Code Macro(storage format HTML) |
🔧 开发与调试
运行 MCP Server(本地)
测试连通性(推荐先跑)
使用 MCP Inspector 调试
Cursor MCP 日志位置
macOS:
~/Library/Logs/Cursor/Windows:
%APPDATA%\\Cursor\\logs\\
🐛 故障排查
Cursor 里看不到 confluence_* 工具
确认在 Agent 模式下使用
检查
~/.cursor/mcp.json的args是否为 绝对路径,并指向dist/mcp-server.js运行
npm run mcp看是否能正常启动(无语法/依赖错误)完全重启 Cursor,并查看日志
认证失败(401/403)
检查
CONF_USERNAME / CONF_PASSWORD是否正确Atlassian Cloud 请使用 API Token;内部 KMS 以实际策略为准
确认账号对目标 Space 有权限,可用
confluence_list_spaces验证
Space Key 不确定
先执行:
📚 相关文档
KMS 别名说明:
./KMS_ALIAS_README.mdConfluence REST API:
https://developer.atlassian.com/cloud/confluence/rest/v1/intro/MCP 协议:
https://modelcontextprotocol.io
📄 许可证
MIT
This server cannot be installed