Forums

Articles
Create
cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 

MCP Server - Confluence Image upload/insert to docs

Scott Melhop
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 24, 2026

It would be amazing if I could have Claude etc generate diagrams (say SVGs) and upload/insert them into generated documentation using the MCP server. At the moment I have to manually copy and paste them in which breaks down the amazing benefits from using confluence and the mcp server for docs. I love the connector btw :)

5 answers

1 accepted

2 votes
Answer accepted
Viswanathan Ramachandran
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
July 24, 2026

Hi @Scott Melhop 

I believe current Confluence MCP servers rely on standard REST API v2 endpoints for reading and writing Confluence Storage Format (XML/HTML) text content.
Uploading and displaying visuals involves a two-step process that most standard MCP implementations don't combine into a single tool yet. 

Looks like a feature request is open for this https://jira.atlassian.com/browse/ECO-1265

  • To serve your requests Mermaid plugin might help. You can instruct Claude to output standard Mermaid syntax directly inside the Confluence page body. 
  • If you are running the MCP server locally, you can add a simple tool definition for attachment uploads. Like a quick Python wrapper requests which can take an SVG string generated by Claude, write to a temp file, and POST it to Confluence

GitHub reference specifically requests tools (getConfluencePageAttachments, uploadConfluenceAttachment) to fetch and upload media natively without needing external scripts. 

Dr Valeri Colon _Connect Centric_
Community Champion
August 8, 2026

@Scott Melhop welcome to the community. This isn’t currently supported natively by the Rovo MCP server. Atlassian is tracking file uploads to Confluence/Jira via MCP under ECO-1361. ECO-1265, mentioned above, is specifically for attachment downloads. Confluence’s REST API does support uploading attachments, so a custom tool/integration can bridge the gap today. I’d watch ECO-1361 for native MCP support.

2 votes
Tomislav Tobijas
Community Champion
July 26, 2026

I've been struggling with this whole week... šŸ˜…
I mean, it's not that bad, but it can get quite annoying when you have to add/copy attachments manually.

Anyhow, as Viswanathan said, ECO-1265 is a place to look at > I'd recommend setting yourself as a watcher. I do believe they've mentioned somewhere that this should be shipped this or next quarter, but we'll see. šŸ‘€
It will definitelly save a lot of time in some cases.

Cheers,
Tobi

1 vote
Ron Votazz
Atlassian Partner
July 26, 2026

Hi Scott — the missing half probably isn't your config: Confluence Cloud REST v2 has no "create attachment" operation at all. /wiki/api/v2/pages/{id}/attachments is read-only, so an MCP server built purely on v2 can write the page text but has nowhere to put the file. Uploading still lives on the older v1 endpoint, which is why it tends to be absent from MCP tool sets.

 

While ECO-1265 is open you can close the loop yourself with two calls, and they wrap neatly into one custom MCP tool:

 

1) Upload the file (v1, multipart)

POST /wiki/rest/api/content/{pageId}/child/attachment

header: X-Atlassian-Token: nocheck

form fields: file=@diagram.svg and minorEdit=true

Scope: write:confluence-file on a classic-scope app, or the granular attachment-write scope. Worth checking first — a read-only token here tends to fail quietly rather than loudly.

 

2) Reference it from the page body (v2 update)

PUT /wiki/api/v2/pages/{id} with body.representation = "storage" and the markup

<ac:image><ri:attachment ri:filename="diagram.svg"/></ac:image>

That request also needs id, status, title and version.number = current + 1. Keeping the body in storage rather than ADF is what makes the image reference a one-liner.

 

Two things that cost me time: attach first and update the body second, otherwise the reference renders as a broken image; and if a model-generated SVG looks wrong on the page (they often carry foreignObject or system fonts), re-export it as PNG once to confirm you're looking at an SVG problem and not an API problem.

 

Disclosure: I work on Diagram.now, a Confluence diagramming app, so I'm biased on this last part. It may still be worth weighing the other shape of the problem: an attachment is a flat picture, so every "move that one box" means regenerating and re-uploading the whole file. Keeping it as an editable diagram on the page — importing the Mermaid your model already emits, or describing it in text and adjusting it in the editor afterwards — avoids that round trip. https://marketplace.atlassian.com/apps/523472243/diagram-now-diagram-editor-for-confluence?utm_source=atlassian-community&utm_content=mcp-image-insert

 

The two REST calls above are worth having either way.

 

1 vote
Rahul_RVS
Atlassian Partner
July 24, 2026

Hi @Scott Melhop 

Welcome to the community !!

As Vishwa suggest a mktplace app can help to render mermaid diagrams directly in Confluence. If you are open to try out one, take a look at 

Mermaid Diagrams & Charts for Confluence

The app has more than 15 diagramming templates and also integrates with your code repositories like GitHub/Bitbucket.

Disclaimer : I am part of the app dev team

Mermaid Diagrams.png Mermaid Diagrams Templates.png Mermaid Diagrams GIT.png

0 votes
sam lee
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 18, 2026

The v1-then-v2 split already in the thread is the real constraint: Cloud v2 can list attachments but cannot create them, so an MCP server built only on v2 will write the page body and leave the image as a broken reference.

What has been working:

1. POST the file to /wiki/rest/api/content/{pageId}/child/attachment with X-Atlassian-Token: nocheck and write:confluence-file (or the granular attachment-write scope). Attach first.
2. Then PUT /wiki/api/v2/pages/{id} with storage markup that references that filename, bumping version.number. Body-first will 404 the image.
3. For diagrams you will edit again, keep Mermaid (or another in-page diagram) in storage. A PNG attachment is a one-shot picture; every ā€œmove that boxā€ means regenerate + re-upload.
4. If the model SVG looks empty on the page, it is often foreignObject / fonts. Re-export a PNG only to confirm that — don’t treat PNG as the long-term source of truth.

If that PNG later leaves Confluence (download, campaign pack, Instagram), the attachment store does not rewrite C2PA / XMP the generator wrote into the bytes. Keep the Confluence master, and check the exact still you will post. A Confluence-friendly pre-upload stills check is enough for that copy; it does not replace MCP, the v1 upload, or Atlassian’s own AI disclosure.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events