Confluence MCP Server

Confluence MCP Server

An MCP server that enables searching and retrieving content from Confluence documentation systems, providing capabilities for both document searches and full page content retrieval.

Category
Visit Server

README

Confluence MCP Server

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

功能特性

  • 文档搜索

    • 支持标题和全文搜索
    • 限制返回结果数量
    • 返回匹配内容片段和文档基本信息
  • 文档内容获取

    • 获取完整的页面内容
    • 包含元数据(标题、空间信息、版本等)
    • 创建和修改信息
    • 页面标签

快速开始

环境配置

创建 .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")

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured