Get the FREE Ultimate OpenClaw Setup Guide →

mcp-confluence

MCP server from masna-ai/mcp-confluence-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio masna-ai-mcp-confluence-server python confluence.py

How to use

This MCP server provides a Confluence integration, exposing a set of tools to interact with a Confluence Data Center instance via its REST API. You can execute CQL searches, fetch page content (with or without the body), find pages by space, locate pages by title within a space, and create, update, or delete pages. The server is designed to be used behind the MCP CLI in development mode for testing and debugging, with an interface suitable for AI models to query and modify Confluence content through natural language prompts. To begin, configure your Confluence connection in a .env file and run the server in development mode using the MCP CLI; the inspector UI will help you test commands and view results in real time.

Tools available:

  • execute_cql_search: Run a Confluence Query Language (CQL) query and return matching pages.
  • get_page_content: Retrieve the content of a page by its ID.
  • get_page_with_body: Retrieve a page including its body content.
  • find_pages_by_space: Find pages by a given space key with optional limits and expand properties.
  • find_page_by_title: Locate a page by its title within a specific space.
  • create_page: Create a new page with a title, space key, and content, with an optional parent page.
  • update_page: Update an existing page's content (and optional title/space/key changes).
  • delete_page: Delete a page by its ID.

To use these capabilities, issue natural language prompts like:

  • "Find all pages in the DOCS space";
  • "Get the content of page with ID 123456";
  • "Create a new page titled 'Meeting Notes' in the TEAM space with content '<p>Notes from our meeting</p>'";
  • "Update page with ID 123456 to have the content '<p>Updated meeting notes</p>'";
  • "Update the title of page 123456 to 'Revised Meeting Notes'". The MCP Inspector UI will present results and allow you to iterate on queries.

How to install

Prerequisites:

  • Python 3.8+ installed on your system
  • Access to install Python dependencies (pip)

Installation steps:

  1. Clone the repository: git clone https://github.com/masna-ai/mcp-confluence.git cd mcp-confluence

  2. Create and activate a Python virtual environment (optional but recommended): python -m venv venv

    On Windows:

    venv\Scripts\activate

    On macOS/Linux:

    source venv/bin/activate

  3. Install dependencies: pip install -r requirements.txt

  4. Configure Confluence connection (see environment variables section below).

Additional notes

Environment variables:

  • CONFLUENCE_API_BASE: Base URL for Confluence REST API (e.g., http://localhost:8090/rest/api)
  • CONFLUENCE_USERNAME: Confluence username with appropriate permissions
  • CONFLUENCE_PASSWORD: Password for the Confluence user

Tips:

  • The recommended workflow uses the MCP CLI in development mode to run the server and access the MCP Inspector UI for testing and debugging.
  • Ensure the Confluence user has permissions to read, create, update, and delete pages as required by your workflows.
  • If you encounter authentication issues, verify that the API base URL is correct and that the user has network access to the Confluence instance.
  • When testing, you can run python confluence.py directly, but for full MCP functionality and UI, prefer the MCP CLI in development mode as described in the README.

Related MCP Servers

Sponsor this space

Reach thousands of developers