Skip to main content
Glama

Confluence MCP 服务器

一个模型上下文协议 (MCP) 服务器,用于通过 REST API 与 Confluence 数据中心交互。该服务器提供了一组工具,允许 AI 模型与 Confluence 内容交互。

特征

该 MCP 服务器为 Confluence 提供以下操作:

  • 执行 CQL(Confluence 查询语言)搜索

  • 通过ID获取页面内容

  • 获取带有 body 的页面内容

  • 通过空格键查找页面

  • 通过标题和空格键查找页面

  • 创建新页面(带有可选的父页面)

  • 更新现有页面

  • 删除页面

Related MCP server: Confluence MCP Server

安装

  1. 克隆此存储库

  2. 安装依赖项:

pip install -r requirements.txt

配置

在项目根目录中创建一个.env文件,其中包含以下变量:

CONFLUENCE_API_BASE=http://localhost:8090/rest/api
CONFLUENCE_USERNAME=your_username
CONFLUENCE_PASSWORD=your_password

调整值以匹配您的 Confluence 实例。

运行服务器

开发模式(推荐)

运行 MCP 服务器的正确方法是使用 MCP CLI 工具并开启开发模式。这将启动 MCP Inspector UI,方便您测试和调试服务器:

mcp dev confluence.py

这将默认在http://127.0.0.1:6274启动 MCP 检查器。

直接执行(不推荐)

MCP 服务器设计为使用 MCP CLI 工具运行或与 Claude Desktop 集成。直接使用 Python 执行并非运行 MCP 服务器的标准方式,但脚本包含一个用于测试的回退模式:

python confluence.py

但是,此模式的功能有限,仅适用于基本测试。

在 Claude Desktop 中安装

要在 Claude Desktop 中安装服务器:

mcp install confluence.py

API 参考

执行_cql_搜索

在 Confluence 上执行 CQL 查询来搜索页面。

参数:

  • cql :CQL 查询字符串

  • limit :返回的结果数(默认值:10)

获取页面内容

获取 Confluence 页面的内容。

参数:

  • pageId :Confluence 页面 ID

获取页面主体

获取包含其正文内容的页面。

参数:

  • pageId :Confluence 页面 ID

按空间查找页面

通过空格键查找页面。

参数:

  • spaceKey :Confluence 空间键

  • limit :返回的最大结果数(默认值:10)

  • expand :可选的以逗号分隔的要扩展的属性列表

按标题查找页面

通过标题和空格键查找页面。

参数:

  • title :页面标题

  • spaceKey :Confluence 空间键

创建页面

在 Confluence 中创建一个新页面。

参数:

  • title :页面标题

  • spaceKey :Confluence 空间键

  • content :存储格式的页面内容(HTML)

  • parentId :可选父页面 ID

更新页面

更新 Confluence 中的现有页面。

参数:

  • pageId :Confluence 页面 ID

  • content :存储格式的新页面内容(HTML)

  • title :页面的可选新标题

  • spaceKey :可选空格键(仅在更改空格时需要)

删除页面

根据 ID 删除页面。

参数:

  • pageId :Confluence 页面 ID

示例用法

一旦服务器运行并连接到 AI 模型,您就可以使用自然语言与 Confluence 进行交互。例如:

  • “查找 DOCS 空间中的所有页面”

  • “获取ID为123456的页面内容”

  • “在 TEAM 空间中创建一个名为‘会议记录’的新页面,内容为‘我们的会议记录’”

  • “更新 ID 为 123456 的页面,使其内容为‘更新的会议记录’”

  • “将第 123456 页的标题更新为‘修订后的会议记录’”

执照

麻省理工学院

Related MCP Connectors

  • The Remote MCP server acts as a standardized bridge between LLM applications (like Claude, ChatGPT, and Cursor) and external services, enabling AI agents to access external tools and resources. Its primary capability is providing a centralized search tool to discover other MCP servers and their respective tools. Unlike local implementations, it runs remotely with OAuth authentication and permission controls for security.

  • MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.

  • The HubSpot MCP Server acts as a bridge that enables AI assistants and Large Language Models to securely interact with HubSpot CRM data through natural conversation, without requiring users to understand complex API structures. It provides read-only access to standard CRM objects (contacts, companies, deals, tickets, products, invoices, and more) and their associations, secured via OAuth 2.0, allowing AI agents to perform tasks like summarizing deals, fetching company updates, and looking up record changes.

  • The Needle MCP server enables semantic search on documents stored in files like PDFs, DOCX, and XLSX by connecting AI applications to external data sources. It provides capabilities to create and manage document collections, perform natural language searches on stored content, and retrieve relevant information without requiring exact keyword matches.

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Integration server that connects AI assistants to Atlassian products (Confluence & Jira), enabling natural language interactions for searching content, managing issues, creating documents, and updating project information.
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server for Atlassian Jira and Confluence that supports both Cloud and On-Prem/Data Center deployments. It enables AI assistants to search, create, and manage issues and pages using secure authentication methods like PAT and OAuth.
    5
    MIT