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
Setup instructions
Provider
Andi Ashari
Release date
Mar 23, 2025
Language
TypeScript
Package
Stats
9.3K downloads
23 stars

A Node.js/TypeScript Model Context Protocol (MCP) server for Atlassian Confluence Cloud that enables AI systems to securely interact with your Confluence spaces, pages, and content in real time. This server provides a standardized way for AI assistants to access and search your Confluence knowledge base with minimal configuration.

Prerequisites

  • Node.js (>=18.x): Download
  • Atlassian Account with access to Confluence Cloud

Installation and Setup

Get Your Atlassian API Token

  1. Go to your Atlassian API token management page: https://id.atlassian.com/manage-profile/security/api-tokens
  2. Click Create API token
  3. Give it a descriptive Label (e.g., mcp-confluence-access)
  4. Click Create
  5. Copy the generated API token immediately (you won't be able to see it again)

Configure Credentials

Using 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>"
		}
	}
}
  • <YOUR_SITE_NAME>: Your Confluence site name (e.g., mycompany for mycompany.atlassian.net)
  • <YOUR_ATLASSIAN_EMAIL>: Your Atlassian account email
  • <YOUR_COPIED_API_TOKEN>: The API token from the previous step

Using Environment Variables

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

Install and Run

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

Usage

Connect to AI Assistant

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

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

Available MCP Tools

The following tools are available for AI assistants to interact with your Confluence content:

  • 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
}

CLI Commands

You can also use command-line commands directly:

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

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

Transport Modes

This server supports two transport modes:

STDIO Transport (Default for MCP Clients)

# Run with STDIO transport (default for AI assistants)
TRANSPORT_MODE=stdio npx @aashari/mcp-server-atlassian-confluence

HTTP Transport (Default for Server Mode)

# Run with HTTP transport (default when no CLI args)
TRANSPORT_MODE=http npx @aashari/mcp-server-atlassian-confluence

Environment Variables

  • TRANSPORT_MODE: Set to stdio or http
  • PORT: HTTP server port (default: 3000)
  • DEBUG: Enable debug logging (default: false)
  • ATLASSIAN_SITE_NAME: Your Confluence site name
  • ATLASSIAN_USER_EMAIL: Your Atlassian account email
  • ATLASSIAN_API_TOKEN: Your Atlassian API token

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "confluence" '{"command":"npx","args":["-y","@aashari/mcp-server-atlassian-confluence"]}'

See the official Claude Code MCP documentation for more details.

For 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 > Tools & Integrations and click "New MCP Server".

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

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

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 explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

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

3. Restart Claude Desktop for the changes to take effect

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