confluence-dc-mcp
Provides tools for interacting with a self-hosted Confluence Data Center REST API, enabling CQL search, page retrieval by ID or space/title, listing child pages, and creating or updating pages with storage-format XHTML bodies.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@confluence-dc-mcpFind pages about vacation policy in the HR space"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
confluence-dc-mcp
Minimal MCP server for a self-hosted Confluence Data Center REST API.
Tools
Reading:
confluence_search— CQL search, withstartfor pagingconfluence_get_page— by id or(space_key, title);vieworstoragebody, and the page's attachmentsconfluence_get_children— child pagesconfluence_get_attachments— a page's attachments: filename, media type, size, download URLconfluence_get_attachment— one attachment by id or(page_id, filename); images come back viewable, text files as text
Writing, unless the server is in read-only mode:
confluence_create_page— needsspace_key,title,body_storage(XHTML)confluence_update_page— needspage_id, theversionyou read, andbody_storage(XHTML)
Related MCP server: confluence-mcp
Install
Needs Node 18 or newer.
npm installConfig
Both values are required. Either config.json next to index.js:
{
"baseUrl": "https://confluence.example.com",
"pat": "<personal access token>"
}or the environment, which keeps the token out of the project folder:
CONFLUENCE_DC_BASE_URL
CONFLUENCE_DC_PATconfig.json wins over the environment, and it is gitignored. A value left at the example placeholder counts as absent, so a half-filled config.json falls through to the environment instead of sending the placeholder to Confluence and failing as a 401.
Mint the token at <baseUrl>/plugins/personalaccesstokens/usertokens.action. It inherits your permissions: the server sees exactly the spaces you see in the browser.
Register it with your MCP client as a stdio server — command node, argument the full path to index.js.
Read-only mode
Set CONFLUENCE_DC_READONLY=1, or "readOnly": true in config.json, and the two write tools are not offered at all. Worth doing if you only ever read, since a tool that is not listed cannot be called by mistake.
Writing safely
An update replaces the whole body. Anything you leave out of the XHTML is gone, macros included. Two guards sit in front of that:
You pass the version you read. If the page has moved on since, the write is refused and tells you both numbers. Read it again, merge your change onto the current body, and retry. Without this an edit made between your read and your write is overwritten in silence.
Macros are counted. If the body you pass drops a macro the page currently has, the write is refused and names the macros. Set
allow_macro_removalwhen that is deliberate.
Neither guard helps with content you simply forgot to carry over, so read the page in storage format first and edit that string.
Notes
Body format is Confluence storage XHTML, not markdown. Storage is the canonical persisted form and includes
<ac:structured-macro>and friends. Simple<p>/<h1>/<ul>work.Attachments over 4 MB, and anything that is not an image or a text-ish file, come back as a download URL rather than bytes.
Errors include the raw response body, first 500 characters, so failed writes are debuggable.
Behind TLS inspection, start node with
--use-system-caso it trusts the OS certificate store. If your node rejects the flag, it is too old for it.
Tests
npm testCovers the placeholder handling and the macro accounting — the parts where being wrong is quiet rather than loud.
This server cannot be deployed
Maintenance
Related MCP Connectors
Confluence MCP — wraps the Confluence Cloud REST API v2 (OAuth)
Connect to Atlassian Jira, Confluence, Loom, and more to search, create, and manage your work.
Connect to your MediaWiki using simple credentials and manage content without OAuth. Search, read,…
- OneOAuthai.withone
Search, document and execute authenticated API calls across 700+ apps via one MCP server
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI assistants to interact with Atlassian Confluence Cloud by providing tools to create, update, search, and delete pages. It facilitates seamless content management within Confluence spaces using Markdown and the Confluence REST API.6MIT
- FlicenseNot gradedqualityDmaintenanceProvides read access to Confluence Server/Data Center pages, sections, tables, and search via the Confluence REST API v1.-
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Atlassian Confluence through MCP, allowing retrieval of pages by ID and searching with CQL queries.132 npmMIT
- FlicenseNot gradedqualityBmaintenanceEnables searching and retrieving Confluence pages, listing children, and updating pages as drafts, integrating Confluence documentation as context in Claude Code.-