confluence-mcp-server

ennbou/confluence-mcp-server

3.2

If you are the rightful owner of confluence-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The Confluence MCP Server is designed to integrate seamlessly with the Confluence collaboration platform, enhancing context awareness and streamlining documentation workflows.

Tools
  1. get-confluence-spaces

    Retrieve a list of Confluence spaces, with optional pagination for managing large datasets.

  2. get-confluence-space-details

    Fetch detailed information about a specific Confluence space using its unique spaceKey.

  3. get-confluence-space-pages

    List all pages within a specific Confluence space, with options to expand details and support for pagination.

  4. get-confluence-page-details

    Obtain comprehensive details about a specific Confluence page, including metadata and content.

  5. search-confluence-using-cql

    Perform advanced searches on Confluence content using Confluence Query Language (CQL).

  6. get-confluence-attachments

    Retrieve all attachments associated with a specific Confluence page, identified by its pageId.

  7. download-confluence-image

    Download the binary data for a specific Confluence image.

  8. get-confluence-page-children

    Retrieve all child pages of a specific Confluence page, identified by its pageId.

Confluence MCP Server

This repository contains a MCP (Model Context Protocol) server designed for seamless integration with the Confluence collaboration platform. It provides a robust set of tools to enhance context awareness and streamline documentation workflows by leveraging the Model Context Protocol.

Overview

The Confluence MCP Server bridges the Confluence platform with Model Context Protocol capabilities, enabling users to interact with Confluence data programmatically. This server offers a variety of tools to retrieve, manage, and manipulate Confluence content efficiently. Below is a summary of the available tools:

  1. get-confluence-spaces: Retrieve a list of Confluence spaces, with optional pagination for managing large datasets.
  2. get-confluence-space-details: Fetch detailed information about a specific Confluence space using its unique spaceKey.
  3. get-confluence-space-pages: List all pages within a specific Confluence space, with options to expand details such as space or body.storage and support for pagination.
  4. get-confluence-page-details: Obtain comprehensive details about a specific Confluence page, including metadata and content, with optional expansion parameters.
  5. search-confluence-using-cql: Perform advanced searches on Confluence content using Confluence Query Language (CQL), with options to include additional details like body.storage.
  6. get-confluence-attachments: Retrieve all attachments associated with a specific Confluence page, identified by its pageId.
  7. download-confluence-image: Download the binary data for a specific Confluence image.
  8. download-confluence-image-and-save-it: Download and save a Confluence image locally, returning the file path. (Currently disabled)

I'm encountering issues with GitHub Copilot Chat in VS Code, and I'm also working on another MCP server for Confluence attachments using Python MCP SDK.

  1. get-confluence-page-children: Retrieve all child pages of a specific Confluence page, identified by its pageId.

Recommandtion

To benefit from this MCP server, add one or more prompt files under .github/prompts so the LLM receives richer context before each call. For example:

Add prompt files (e.g. space-overview.prompt.md, page-guidelines.prompt.md ...) with clear, domain-specific instructions:

# space-overview.md

You are an assistant that summarizes Confluence spaces. Given a space’s metadata and pages, provide a concise overview highlighting key sections and recent updates....

for more details read

Prerequisites

Before you begin, ensure you have the following installed:

Installation

  1. Clone the repository:
    git clone <repository-url>
    cd confluencemcpserver
    
  2. Install dependencies:
    npm install
    
  3. Build the project:
    npm run build
    

Configuration

Create a .env file in the root directory with the following environment variables:

CONFLUENCE_HOSTNAME="confluence.your-domain.com"
CONFLUENCE_AUTH_TOKEN="XXXXXXX+token+EYVzV"

Build the server

npm run build

Running the Server

There are two ways to run the server:

npm start

Inspector Mode

To run with the MCP inspector for debugging:

npm run inspector

For more details, see Model Context Protocol Inspector.

VS Code Integration

To add this MCP server to Visual Studio Code, the first way is recommended.

Command-line

code --add-mcp '{"name":"confmcpserver","envFile":"$CONFLUENCE_MCP_SERVER_PATH/.env","type":"stdio","command":"node","args":["$CONFLUENCE_MCP_SERVER_PATH/build/"]}'

Don’t forget to change $CONFLUENCE_MCP_SERVER_PATH

Via the UI

  1. Press Cmd+Shift+P
  2. Type MCP: List servers, press Enter
  3. Click on + add server
  4. Select Command (stdio)
  5. Enter:
    node "$CONFLUENCE_MCP_SERVER_PATH/build/index.js"
    

You still need Confluence server credentials. Add them to your environment, or edit your VS Code settings JSON:

{
  "mcp": {
    "servers": {
      "my-confluence-mcp-server": {
        "envFile": "PATH_OF_.env",
        "type": "stdio",
        "command": "node",
        "args": [
          "...../build/"
        ]
      }
    }
  }
}

License

This project is licensed under the MIT License. See the file for details.