Skip to main content
Glama
xiandan-erizo

Confluence MCP Server

Confluence MCP Server

基于 Model Context Protocol (MCP) 的 Confluence 文档访问服务,提供文档搜索和内容获取功能。

功能特性

  • 文档搜索

    • 支持标题和全文搜索

    • 限制返回结果数量

    • 返回匹配内容片段和文档基本信息

  • 文档内容获取

    • 获取完整的页面内容

    • 包含元数据(标题、空间信息、版本等)

    • 创建和修改信息

    • 页面标签

Related MCP server: confluence-mcp-server

快速开始

环境配置

创建 .env 文件配置 Confluence 访问信息:

CONFLUENCE_URL="your-confluence-url"
CONFLUENCE_USERNAME="your-username"
CONFLUENCE_PASSWORD="your-password"
# 或者使用 Token 认证
CONFLUENCE_TOKEN="your-api-token"

安装依赖

# 安装项目依赖
uv pip install -e .

# 或者直接安装依赖包
uv pip install "mcp[cli]>=1.5.0" "atlassian-python-api>=3.41.4" "typer>=0.9.0"

运行服务

# 使用 uvx
/Users/hose/.local/bin/uvx --directory /Users/hose/code/ops/ops-mcp mcp main.py

# 或者使用 uv run
uv run --with mcp mcp run main.py

MCP 接口说明

Tools (工具)

  1. search_confluence

    # 搜索 Confluence 内容
    Input:
    - query: str       # 搜索关键词
    - limit: int = 10  # 返回结果数量限制
    
    Output:
    {
      "success": true,
      "query": "搜索词",
      "total": 5,
      "results": [
        {
          "id": "12345",
          "title": "页面标题",
          "type": "page",
          "url": "页面URL",
          "excerpt": "匹配内容片段"
        }
      ]
    }
  2. get_confluence_page

    # 获取页面详细信息
    Input:
    - page_id: str  # 页面ID
    
    Output:
    {
      "success": true,
      "page": {
        "id": "12345",
        "title": "页面标题",
        "space": {
          "key": "SPACE",
          "name": "空间名称"
        },
        "version": 1,
        "content": "页面内容",
        "url": "页面URL",
        "created": {
          "date": "创建时间",
          "by": "创建者"
        },
        "modified": {
          "date": "修改时间",
          "by": "修改者"
        },
        "labels": ["标签1", "标签2"]
      }
    }

Resources (资源)

  1. confluence://pages/{page_id}

    • 通过页面ID直接获取页面内容和元数据

    • 返回 JSON 格式数据

  2. confluence://search/{query}

    • 通过关键词直接搜索内容

    • 返回 JSON 格式的搜索结果

错误处理

所有接口在出错时返回统一格式:

{
  "success": false,
  "error": "错误信息描述"
}

使用示例

  1. 搜索文档

result = await mcp.use_tool("search_confluence", {
    "query": "Python",
    "limit": 5
})
  1. 获取页面内容

page = await mcp.use_tool("get_confluence_page", {
    "page_id": "12345"
})
  1. 使用资源URI

content = await mcp.access_resource("confluence://pages/12345")
search_results = await mcp.access_resource("confluence://search/Python")

Available Tools

2 tools
get_confluence_pageC
    获取 Confluence 页面详细信息

    Args:
        page_id: 页面ID
        ctx: MCP 上下文

    Returns:
        Dict: 包含页面信息的字典
    
ParametersJSON Schema
NameRequiredDescriptionDefault
page_idYes

TDQS

C2.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. While '获取' (get) implies a read operation, the description doesn't address authentication requirements, rate limits, error conditions, or what happens with invalid page IDs. It mentions returning a dictionary but provides no details about its structure or content.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is reasonably concise with three brief sections, but the structure is somewhat inefficient. The 'Args' and 'Returns' sections use valuable space to state what's already evident from the parameter names and return type declaration, rather than providing meaningful additional information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no annotations, no output schema, and 0% schema description coverage, the description is inadequate. It doesn't explain what information the returned dictionary contains, how to handle different page ID formats, authentication requirements, or error scenarios. The agent would struggle to use this tool effectively without trial and error.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It mentions 'page_id: 页面ID' (page ID) and 'ctx: MCP 上下文' (MCP context), but provides no meaningful semantic information about what constitutes a valid page ID, format expectations, or how the context parameter should be used. The description adds minimal value beyond what's obvious from parameter names.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose as '获取 Confluence 页面详细信息' (Get Confluence page details), which is a specific verb+resource combination. However, it doesn't explicitly differentiate from its sibling tool 'search_confluence', which likely searches for pages rather than retrieving details of a specific page.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. There's no mention of when to use 'get_confluence_page' versus 'search_confluence', nor any context about prerequisites or appropriate use cases. The agent must infer usage from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_confluenceC
    搜索 Confluence 页面内容

    Args:
        query: 搜索关键词(支持字符串、数字等格式,会自动转换为字符串)
        limit: 返回结果数量限制,默认10条
        ctx: MCP 上下文

    Returns:
        Dict: 包含搜索结果的字典
    
ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes
limitNo

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the return type ('Dict: 包含搜索结果的字典') but lacks details on permissions, rate limits, error handling, or what the search covers (e.g., titles only, full text). This leaves significant gaps for a search operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized with a clear purpose statement followed by parameter and return details in a structured format. It's front-loaded with the main function, though the formatting includes extra whitespace that slightly reduces efficiency.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and low schema coverage, the description is incomplete. It covers basic purpose and parameters but lacks crucial context like search scope, result format details, authentication needs, or error cases, making it inadequate for a search tool with two parameters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It adds basic semantics for 'query' (search keywords, auto-converted to string) and 'limit' (result count limit, default 10), which helps beyond the bare schema. However, it doesn't fully explain parameter constraints or interactions, leaving some ambiguity.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose as '搜索 Confluence 页面内容' (search Confluence page content), which is a specific verb+resource combination. However, it doesn't explicitly differentiate from the sibling tool 'get_confluence_page', which might retrieve specific pages rather than search across content.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like the sibling 'get_confluence_page'. It mentions parameters but doesn't explain the context or scenarios where searching is appropriate versus direct retrieval.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 2 tool updatesv0.1.0
    • First observedget_confluence_page
    • First observedsearch_confluence

TDQS

C2.9/5.0
Disambiguation5/5

The two tools have clearly distinct purposes: get_confluence_page retrieves a specific page by ID, while search_confluence performs a broader content search. There is no overlap in functionality, making it easy for an agent to select the appropriate tool based on whether it needs a known page or wants to find pages matching a query.

Naming Consistency5/5

Both tools follow a consistent verb_noun pattern (get_confluence_page and search_confluence) with snake_case naming. The verbs 'get' and 'search' are appropriate and distinct, and the naming scheme is predictable across the set.

Tool Count2/5

With only 2 tools, this server feels severely under-scoped for a Confluence integration. A typical Confluence server would need tools for creating, updating, deleting pages, managing spaces, and handling attachments, among others. This minimal set limits agents to read-only operations, which is inadequate for most workflows.

Completeness2/5

The tool surface is significantly incomplete for a Confluence domain. It only supports retrieving and searching pages, missing essential CRUD operations (create, update, delete), space management, user operations, and content manipulation. Agents will face dead ends when trying to perform basic tasks like editing or organizing content.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

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/xiandan-erizo/ops-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server