@atlassian-dc-mcp/confluence
v0.16.0
Published
Community-maintained MCP server for Atlassian Confluence Data Center. Not affiliated with Atlassian.
Maintainers
Readme
Atlassian Confluence Data Center MCP
This package provides a Machine Comprehension Protocol (MCP) server for interacting with Atlassian Confluence Data Center edition.
Features
- Get content by ID
- Search for content using CQL (Confluence Query Language)
- Create new content (pages, blog posts)
- Update existing content
Setup
Install dependencies:
npm installCreate a
.envfile in the packages/confluence directory, or put the same values in a shared dotenv file and setATLASSIAN_DC_MCP_CONFIG_FILEto its absolute path:# Either CONFLUENCE_HOST or CONFLUENCE_API_BASE_PATH must be set CONFLUENCE_HOST=your-confluence-instance.atlassian.net CONFLUENCE_API_TOKEN=your-personal-access-token # Optional: Use one of the following approaches: # 1. If your Confluence instance hosted on the subpath: # CONFLUENCE_API_BASE_PATH=https://your-confluence-instance.atlassian.net/sub-path # 2. Or continue using CONFLUENCE_HOST with the default API path (/rest): # CONFLUENCE_HOST=your-confluence-instance.atlassian.net # Optional: default page size for paginated search tools (fallback: 25) CONFLUENCE_DEFAULT_PAGE_SIZE=25Shared file example:
CONFLUENCE_HOST=your-confluence-instance.atlassian.net CONFLUENCE_API_TOKEN=your-personal-access-token CONFLUENCE_DEFAULT_PAGE_SIZE=25Start the server with:
ATLASSIAN_DC_MCP_CONFIG_FILE=/absolute/path/to/atlassian-dc-mcp.env npm run devWindows example:
set ATLASSIAN_DC_MCP_CONFIG_FILE=C:\Users\your-user\AppData\Roaming\atlassian-dc-mcp.env npm run devNote: You have two options for configuring the API URL:
Set
CONFLUENCE_API_BASE_PATHto the full API URL (e.g., "https://host.com/rest/api" or "https://host.com/wiki/rest/api"). When this is set, theCONFLUENCE_HOSTvariable is ignored.Set
CONFLUENCE_HOSTonly, which will use the default API path (/rest).Confluence uses
/restas a path part always, so it will be added automatically, no need to add it manually.
Direct environment variables override values loaded from
ATLASSIAN_DC_MCP_CONFIG_FILE.To create a personal access token:
- In Confluence, select your profile picture at the top right
- Select Settings > Personal Access Tokens
- Select Create token and give it a name
- Copy the token and store it securely (you won't be able to see it again)
Usage
Start the MCP server:
npm run build
npm startOr for development with auto-reload:
npm run devTesting
Run the test suite from the package directory:
npm run testOr from the repository root:
npm run test --workspace=@atlassian-dc-mcp/confluenceAvailable Tools
1. confluence_getContent
Get Confluence Data Center content by ID.
Parameters:
contentId(string, required): The ID of the content to retrieveexpand(string, optional): Comma-separated list of properties to expand (e.g., "body.storage,version")bodyMode(storage|text|none, optional): Response shape for the content body. Defaults tostoragefor backward compatibility.maxBodyChars(number, optional): Maximum number of characters to keep whenbodyMode=text
2. confluence_searchContent
Search for content in Confluence Data Center using CQL.
Parameters:
cql(string, required): Confluence Query Language search stringlimit(number, optional): Maximum number of results to return. Defaults toCONFLUENCE_DEFAULT_PAGE_SIZEor25.start(number, optional): Start index for paginationexpand(string, optional): Comma-separated list of properties to expandexcerpt(none|highlight, optional): Excerpt mode for search results. Defaults tonone.
3. confluence_createContent
Create new content in Confluence Data Center.
Parameters:
title(string, required): Title of the contentspaceKey(string, required): Space key where content will be createdtype(string, default: "page"): Content type (page, blogpost, etc)content(string, required): Content body in Confluence Data Center's storage format (XML-based storage format)parentId(string, optional): ID of the parent page (if creating a child page)output(ack|full, optional): Return a compact acknowledgement or the full API response. Defaults toack.
4. confluence_updateContent
Update existing content in Confluence Data Center.
Parameters:
contentId(string, required): ID of the content to updatetitle(string, optional): New title of the contentcontent(string, optional): New content body in Confluence Data Center's storage format (XML-based)version(number, required): New version number (must be incremented from current version)versionComment(string, optional): Comment for this versionoutput(ack|full, optional): Return a compact acknowledgement or the full API response. Defaults toack.
5. confluence_searchSpace
Search for Confluence spaces by name text.
Parameters:
searchText(string, required): Text to search for in space names or descriptionslimit(number, optional): Maximum number of results to return. Defaults toCONFLUENCE_DEFAULT_PAGE_SIZEor25.start(number, optional): Start index for paginationexpand(string, optional): Comma-separated list of properties to expandexcerpt(none|highlight, optional): Excerpt mode for search results. Defaults tonone.
