Atlassian Confluence MCP server

Integrates with Atlassian Confluence to provide direct access to spaces, pages, and content with tools for listing, retrieving, and searching using CQL while converting content to Markdown format
Back to servers
Provider
Andi Ashari
Release date
Mar 23, 2025
Language
TypeScript
Package
Stats
7.6K downloads
9 stars

The Atlassian Confluence MCP Server is a Node.js/TypeScript implementation of the Model Context Protocol that allows AI systems to securely interact with your Confluence spaces, pages, and content in real time. It enables AI assistants to access and query your Confluence knowledge base with simple commands.

Prerequisites

Installation and Setup

Getting Your Atlassian API Token

  1. Visit https://id.atlassian.com/manage-profile/security/api-tokens
  2. Click Create API token
  3. Provide a descriptive Label (e.g., mcp-confluence-access)
  4. Click Create and copy the generated token immediately

Configuring Your Credentials

Option A: MCP Config File (Recommended)

Edit or create ~/.mcp/configs.json:

{
    "confluence": {
        "environments": {
            "ATLASSIAN_SITE_NAME": "<YOUR_SITE_NAME>",
            "ATLASSIAN_USER_EMAIL": "<YOUR_ATLASSIAN_EMAIL>",
            "ATLASSIAN_API_TOKEN": "<YOUR_COPIED_API_TOKEN>"
        }
    }
}
  • Replace <YOUR_SITE_NAME> with your site name (e.g., mycompany for mycompany.atlassian.net)
  • Replace <YOUR_ATLASSIAN_EMAIL> with your Atlassian account email
  • Replace <YOUR_COPIED_API_TOKEN> with the API token you generated

Option B: Environment Variables

export ATLASSIAN_SITE_NAME="<YOUR_SITE_NAME>"
export ATLASSIAN_USER_EMAIL="<YOUR_EMAIL>"
export ATLASSIAN_API_TOKEN="<YOUR_API_TOKEN>"

Installing and Running the Server

Quick Start with npx

npx -y @aashari/mcp-server-atlassian-confluence ls-spaces

Global Installation

npm install -g @aashari/mcp-server-atlassian-confluence
mcp-atlassian-confluence ls-spaces

Connecting to AI Assistant

Configure your MCP-compatible client (e.g., Claude, Cursor AI) with:

{
    "mcpServers": {
        "confluence": {
            "command": "npx",
            "args": ["-y", "@aashari/mcp-server-atlassian-confluence"]
        }
    }
}

Using MCP Tools

The MCP server provides several tools that use snake_case names, camelCase parameters, and return Markdown-formatted responses.

Available MCP Tools

  • conf_ls_spaces: Lists accessible Confluence spaces
  • conf_get_space: Gets detailed space information
  • conf_ls_pages: Lists pages with filtering
  • conf_get_page: Gets comprehensive page content
  • conf_ls_page_comments: Lists comments on a page
  • conf_search: Searches Confluence content

MCP Tool Examples

List Spaces

{ "type": "global", "status": "current", "limit": 10 }

Get Space Details

{ "spaceKey": "DEV" }

List Pages by Space and Title

{
    "spaceKeys": ["DEV"],
    "title": "API Documentation",
    "status": ["current"],
    "sort": "-modified-date"
}

Get Page Content

{ "pageId": "12345678" }

Search Content

{
    "query": "release notes Q1",
    "spaceKey": "PRODUCT",
    "contentType": "page",
    "limit": 5
}

Using CLI Commands

The server also provides CLI commands that use kebab-case names. You can run --help for details on any command.

Available CLI Commands

  • ls-spaces: Lists spaces
  • get-space: Gets space details
  • ls-pages: Lists pages
  • get-page: Gets page content
  • ls-page-comments: Lists comments
  • search: Searches content

CLI Command Examples

List Spaces

mcp-atlassian-confluence ls-spaces --type global --status current --limit 10

Get Space Details

mcp-atlassian-confluence get-space --space-key DEV

List Pages with Filtering

mcp-atlassian-confluence ls-pages --space-keys DEV HR MARKETING --limit 15 --sort "-modified-date"

Get Page Content

mcp-atlassian-confluence get-page --page-id 12345678

Search Content

mcp-atlassian-confluence search --query "security best practices" --space-key DOCS --type page --limit 5

Response Format

All responses are well-formatted in Markdown and typically include:

  • Content title and type
  • Full page content or search results
  • Metadata (creator, date, labels)
  • Pagination information when applicable
  • Links to related resources

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later