Skip to main content
Glama

confluence-mcp

Fast, surgical Confluence MCP server for AI agents.

What makes this different

Unlike generic Atlassian MCP servers, this one is Confluence-only and optimized for how AI agents actually work with documentation:

  • Surgical section edits — Update a single section by heading name without touching the rest of the page

  • Fast page tree download — Get an entire page hierarchy in one call

  • Smart image handling — Upload images as attachments and auto-embed them in pages

  • Markdown in/out — Read and write in markdown; storage format conversion is automatic

  • Find & replace — Simple text replacement preserving all HTML structure

  • Section-aware reading — Fetch just the section you need, not the whole page

Related MCP server: confluence-mcp-server

Installation

uvx --from git+https://github.com/1vecera/confluence-mcp confluence-mcp

Via pip

pip install git+https://github.com/1vecera/confluence-mcp

Configuration

Set these environment variables:

CONFLUENCE_URL=https://yoursite.atlassian.net
CONFLUENCE_USERNAME=you@company.com
CONFLUENCE_API_TOKEN=your-api-token

Get your API token at: https://id.atlassian.com/manage-profile/security/api-tokens

Claude Code config

Add to ~/.claude.json:

{
  "mcpServers": {
    "confluence": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/1vecera/confluence-mcp", "confluence-mcp"],
      "env": {
        "CONFLUENCE_URL": "https://yoursite.atlassian.net",
        "CONFLUENCE_USERNAME": "you@company.com",
        "CONFLUENCE_API_TOKEN": "your-token"
      }
    }
  }
}

Tools

Reading

Tool

Description

get_page

Get page content in markdown or storage format

get_page_tree

Download entire page hierarchy at once

get_page_sections

List all sections with their content

get_section

Get a specific section by heading name

search_pages

Search via CQL or simple text

list_page_images

List all image references in a page

Writing (surgical)

Tool

Description

update_page

Update entire page content

update_section

Replace only a specific section — the key surgical edit tool

append_to_section

Add content to end of a section

find_replace_in_page

Find and replace text preserving HTML

create_page

Create a new page

Attachments & Images

Tool

Description

list_attachments

List all attachments on a page

download_attachment

Download an attachment by filename

upload_attachment

Upload a file attachment

upload_image_and_embed

Upload image + optionally rewrite page to embed it

Labels

Tool

Description

get_labels

Get labels on a page

add_label

Add a label to a page

Examples

Surgical section update

Instead of downloading and re-uploading an entire page:

update_section(page_id="123456", heading="Status", new_content="Project is **on track** for Q2 delivery.")

Download entire doc tree

get_page_tree(page_id="123456", include_body=True)

Upload and embed an image

upload_image_and_embed(page_id="123456", filename="arch.png", image_base64="...", replace_url="https://old-host.com/arch.png")

Development

uv sync --extra dev
uv run pytest --cov=confluence_mcp --cov-report=term-missing

License

MIT

Available Tools

17 tools
add_labelC

Add a label to a page.

Args: page_id: The page ID. label: The label text.

Inputs: label (required), page_id (required). Returns: result

append_to_sectionA

Append content to the end of a specific section.

Args: page_id: The page ID. heading: The heading text identifying the section. content: Content to append (ignored if input_file is provided). content_format: "markdown" or "storage". version_message: Optional commit message. input_file: Path to a file whose content will be appended.

Inputs: heading (required), page_id (required), content, input_file, +2 more. Returns: result

create_pageA

Create a new Confluence page.

Args: space_id: The space ID (numeric). title: Page title. body: Page content (ignored if input_file is provided). parent_id: Optional parent page ID. body_format: "markdown" or "storage" (default: markdown). input_file: Path to a file whose content becomes the page body.

Inputs: title (required), space_id (required), body, parent_id, +2 more. Returns: result

download_attachmentA

Download an attachment from a page by filename.

Args: page_id: The page ID. filename: The attachment filename. output_file: If provided, save the attachment to this file path instead of returning base64 in the response.

Inputs: page_id (required), filename (required), output_file. Returns: result

find_replace_in_pageB

Find and replace text within a page, preserving all HTML structure.

Args: page_id: The page ID. find_text: Text to search for. replace_text: Text to replace it with. version_message: Optional commit message.

Inputs: page_id (required), find_text (required), replace_text (required), version_message. Returns: result

get_labelsB

Get labels on a page.

Args: page_id: The page ID.

Inputs: page_id (required). Returns: result

get_pageA

Get a Confluence page by ID.

Args: page_id: The numeric page ID. include_body: Whether to include page content (default: True). body_format: Return body as "markdown", "storage", or "view" (default: markdown). output_file: If provided, write the page body to this file path instead of returning it in the response. Keeps the LLM context clean. include_images: If True and output_file is set, download images and rewrite URLs to local paths. images_dir: Directory to save images to. Defaults to pictures/ next to the output file. Set this to control where images land.

Inputs: page_id (required), images_dir, body_format, output_file, +2 more. Returns: result

get_page_sectionsA

List all sections (headings) of a page with their content.

Args: page_id: The page ID.

Inputs: page_id (required). Returns: result

get_page_treeA

Get a page and all its descendants as a flat list.

When output_dir is set, saves each page as a .md file and downloads all images — same as the fetch-confluence skill.

Args: page_id: The root page ID. include_body: If True, fetch each page's body in markdown (slower). output_dir: If provided, write each page as a separate .md file to this directory. Files are named by depth and title. include_images: If True and output_dir is set, download all image attachments and rewrite URLs in markdown. images_dir: Directory to save images to. Defaults to pictures/ inside output_dir. Set this to control where images land.

Inputs: page_id (required), images_dir, output_dir, include_body, +1 more. Returns: result

get_sectionA

Get content of a specific section by heading name.

Args: page_id: The page ID. heading: The exact heading text to find. body_format: "markdown" or "storage" (default: markdown). output_file: If provided, write section content to this file.

Inputs: heading (required), page_id (required), body_format, output_file. Returns: result

list_attachmentsC

List all attachments on a page.

Args: page_id: The page ID.

Inputs: page_id (required). Returns: result

list_page_imagesB

List all image references in a page.

Args: page_id: The page ID.

Inputs: page_id (required). Returns: result

search_pagesA

Search Confluence pages using CQL or simple text.

Args: query: CQL query or simple text. limit: Max results (1-50, default 10).

Inputs: query (required), limit. Returns: result

update_pageA

Update an entire page's content.

Content can come from the body parameter OR from a file via input_file. Using input_file avoids sending large content through the LLM.

Args: page_id: The page ID. body: The new page body (ignored if input_file is provided). title: New title (optional, keeps current if not provided). body_format: "markdown" or "storage" (default: markdown). version_message: Optional commit message for this version. input_file: Path to a file whose content will be used as the page body. The file format is determined by body_format.

Inputs: page_id (required), body, title, input_file, +2 more. Returns: result

update_sectionA

Surgically replace the content of a specific section by heading.

Only the section under the specified heading is changed; the rest of the page is untouched.

Args: page_id: The page ID. heading: The heading text identifying the section. new_content: The replacement content (ignored if input_file is provided). content_format: "markdown" or "storage" (default: markdown). version_message: Optional commit message. input_file: Path to a file whose content replaces the section.

Inputs: heading (required), page_id (required), input_file, new_content, +2 more. Returns: result

upload_attachmentA

Upload a file as an attachment to a page.

Can upload from a local file (input_file) or from base64 content.

Args: page_id: The page ID. filename: Name for the attachment (auto-detected from input_file if not given). content_base64: File content as base64 (ignored if input_file is provided). content_type: MIME type (auto-detected from filename if not given). comment: Optional comment for the attachment. input_file: Path to a local file to upload directly.

Inputs: page_id (required), comment, filename, input_file, +2 more. Returns: result

upload_image_and_embedA

Upload an image and optionally embed it in the page.

Can upload from a local file (input_file) or from base64 content.

Args: page_id: The page ID. filename: Name for the image file (auto-detected from input_file). image_base64: Image content as base64 (ignored if input_file is provided). content_type: MIME type (auto-detected from filename if not given). replace_url: If provided, replaces this external image URL in the page body with the new attachment reference. input_file: Path to a local image file to upload directly.

Inputs: page_id (required), filename, input_file, replace_url, +2 more. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 17 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes (page CRUD, section manipulation, attachments, labels). However, upload_attachment and upload_image_and_embed overlap in functionality, and get_page_sections vs get_section might cause confusion for agents.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern using snake_case (e.g., get_page, create_page, list_attachments, update_section). Verb choices are predictable and readable.

    Tool Count4/5

    At 17 tools, the server is slightly heavier than the ideal 3-15 range, but each tool addresses a distinct Confluence operation. The count is justified by the breadth of features (pages, sections, attachments, labels, images).

    Completeness3/5

    The tool set covers create, read, and update for pages, plus attachments and labels. However, there are no delete operations for pages, attachments, or labels, which is a notable gap in lifecycle coverage.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers