Skip to content

upload_attachment / upload_attachments always fails on Confluence Data Center #1163

Description

@adrianbastholm

Bug Description

upload_attachment and upload_attachments tools always fail when uploading files to Confluence Data Center, regardless of file type (PNG, SVG) or file size.

Environment

  • MCP server: mcp-atlassian (installed via uvx mcp-atlassian)
  • Confluence: Data Center (not Cloud) at a private instance
  • uvx version: 0.9.22
  • VS Code with Copilot Chat (MCP integration)

Steps to Reproduce

  1. Connect to a Confluence Data Center instance using personal token auth
  2. Verify page access works (read, update pages all succeed)
  3. Try to upload a file:
    upload_attachment(content_id="<valid_page_id>", file_path="/path/to/image.png", comment="test")
    

Expected Behavior

File should be uploaded as an attachment to the specified page.

Actual Behavior

Always returns:

{
  "message": "Attachment uploaded successfully",
  "attachment": {
    "success": false,
    "error": "Failed to upload attachment <filename> to content <page_id>"
  }
}

Note the contradictory response: message says "successfully" but success is false.

What Works

  • get_page — works fine
  • update_page — works fine (both wiki and markdown formats)
  • get_attachments — lists existing attachments fine
  • search — works fine
  • Manual upload via Confluence UI — works fine (same user, same page)

What Was Tried

  • PNG files of various sizes (39KB to 175KB)
  • SVG files (4-10KB)
  • Single file via upload_attachment
  • Multiple files via upload_attachments
  • Different page IDs (multiple pages, all editable by the same user)

All fail with the same error. Since all other write operations (update_page) succeed with the same credentials, this appears to be a bug in the attachment upload implementation for Confluence Data Center (as opposed to Cloud).

Workaround

Upload attachments manually via the Confluence UI, then reference them in page content via the MCP update_page tool.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions