Confluence MCP 服务端是一个专为 Confluence 设计的模型上下文协议(MCP)服务器,它允许 AI 助手通过标准化接口与 Confluence 内容进行交互,为信息的检索、创建和更新等操作提供了便利。
ℹ️ 另有一个针对 Jira 的 独立 MCP 服务器
# 克隆仓库
git clone https://github.com/cosmix/confluence-mcp.git
cd confluence-mcp
# 安装依赖项
bun install
# 构建项目
bun run build
使用此 MCP 服务器,您需要设置以下环境变量:
CONFLUENCE_API_TOKEN=your_api_token
CONFLUENCE_BASE_URL=your_confluence_instance_url # 例如,https://your-domain.atlassian.net/wiki
CONFLUENCE_USER_EMAIL=your_email
将以下配置添加到您的设置文件中:
{
"mcpServers": {
"confluence": {
"command": "bun",
"args": ["/absolute/path/to/confluence-mcp/dist/index.js"],
"config": {
"developmentMode": true,
"apiEndpoint": "http://localhost:3000"
}
}
}
}
# 在开发模式下运行
bun run dev
# 运行测试
npm test
get_page)get_page({
space: string, // 空间名称,如 "MySpace"
title: string // 页面标题,如 "HomePage"
}): Promise<Page>
search_content)search_content(query: string): Promise<SearchResult[]>
create_page)create_page({
space: string,
title: string,
content: string // 支持 CommonMark 和 HTML 格式
}): Promise<Page>
update_page)update_page({
id: string,
version: number,
content: string
}): Promise<void>
delete_page)delete_page(id: string, version?: number): Promise<void>
本项目在 MIT License 下 licensed。