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 :)

4 answers

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

2 votes
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. 

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

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