Atlassian Confluence Integration
STDIONode.js server enabling AI systems to interact with Confluence spaces and content.
Node.js server enabling AI systems to interact with Confluence spaces and content.
A Node.js/TypeScript Model Context Protocol (MCP) server for Atlassian Confluence Cloud. Enables AI systems (e.g., LLMs like Claude or Cursor AI) to securely interact with your Confluence spaces, pages, and content in real time.
Model Context Protocol (MCP) is an open standard for securely connecting AI systems to external tools and data sources. This server implements MCP for Confluence Cloud, enabling AI assistants to interact with your Confluence content programmatically.
mcp-confluence-access
).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 Step 1.export ATLASSIAN_SITE_NAME="<YOUR_SITE_NAME>" export ATLASSIAN_USER_EMAIL="<YOUR_EMAIL>" export ATLASSIAN_API_TOKEN="<YOUR_API_TOKEN>"
npx
npx -y @aashari/mcp-server-atlassian-confluence ls-spaces
npm install -g @aashari/mcp-server-atlassian-confluence mcp-atlassian-confluence ls-spaces
Configure your MCP-compatible client (e.g., Claude, Cursor AI):
{ "mcpServers": { "confluence": { "command": "npx", "args": ["-y", "@aashari/mcp-server-atlassian-confluence"] } } }
MCP tools use snake_case
names, camelCase
parameters, and return Markdown-formatted responses.
type
: str opt, status
: str opt, limit
: num opt, cursor
: str opt). Use: View available spaces.spaceKey
: str req). Use: Access space content and metadata.spaceIds
: str[] opt, spaceKeys
: str[] opt, title
: str opt, status
: str[] opt, sort
: str opt, limit
: num opt, cursor
: str opt). Use: Find pages matching criteria.pageId
: str req). Use: View full page content as Markdown.pageId
: str req). Use: Read page discussions.cql
: str opt, query
: str opt, title
: str opt, spaceKey
: str opt, labels
: str[] opt, contentType
: str opt, limit
: num opt, cursor
: str opt). Use: Find specific content.conf_ls_spaces
List Global Spaces:
{ "type": "global", "status": "current", "limit": 10 }
conf_get_space
Get Space Details:
{ "spaceKey": "DEV" }
conf_ls_pages
List Pages by Space and Title:
{ "spaceKeys": ["DEV"], "title": "API Documentation", "status": ["current"], "sort": "-modified-date" }
List Pages from Multiple Spaces:
{ "spaceKeys": ["DEV", "HR", "MARKETING"], "limit": 15, "sort": "-modified-date" }
conf_get_page
Get Page Content:
{ "pageId": "12345678" }
conf_ls_page_comments
List Page Comments:
{ "pageId": "12345678" }
conf_search
Simple Search:
{ "query": "release notes Q1", "spaceKey": "PRODUCT", "contentType": "page", "limit": 5 }
Advanced CQL Search:
{ "cql": "space = DEV AND label = api AND created >= '2023-01-01'" }
CLI commands use kebab-case
. Run --help
for details (e.g., mcp-atlassian-confluence ls-spaces --help
).
--type
, --status
, --limit
, --cursor
). Ex: mcp-atlassian-confluence ls-spaces --type global
.--space-key
). Ex: mcp-atlassian-confluence get-space --space-key DEV
.--space-keys
, --title
, --status
, --sort
, --limit
, --cursor
). Ex: mcp-atlassian-confluence ls-pages --space-keys DEV
.--page-id
). Ex: mcp-atlassian-confluence get-page --page-id 12345678
.--page-id
). Ex: mcp-atlassian-confluence ls-page-comments --page-id 12345678
.--cql
, --query
, --space-key
, --label
, --type
, --limit
, --cursor
). Ex: mcp-atlassian-confluence search --query "security"
.List Global Spaces:
mcp-atlassian-confluence ls-spaces --type global --status current --limit 10
mcp-atlassian-confluence get-space --space-key DEV
By Multiple Space Keys:
mcp-atlassian-confluence ls-pages --space-keys DEV HR MARKETING --limit 15 --sort "-modified-date"
With Title Filter:
mcp-atlassian-confluence ls-pages --space-keys DEV --title "API Documentation" --status current
mcp-atlassian-confluence get-page --page-id 12345678
mcp-atlassian-confluence ls-page-comments --page-id 12345678
Simple Search:
mcp-atlassian-confluence search --query "security best practices" --space-key DOCS --type page --limit 5
CQL Search:
mcp-atlassian-confluence search --cql "label = official-docs AND creator = currentUser()"
All responses are Markdown-formatted, including:
# Confluence Spaces Showing **5** global spaces (current) | Key | Name | Description | |---|---|---| | [DEV](#) | Development | Engineering and development documentation | | [HR](#) | Human Resources | Employee policies and procedures | | [MARKETING](#) | Marketing | Brand guidelines and campaign materials | | [PRODUCT](#) | Product | Product specifications and roadmaps | | [SALES](#) | Sales | Sales processes and resources | *Retrieved from mycompany.atlassian.net on 2025-05-19 14:22 UTC* Use `cursor: "next-page-token-123"` to see more spaces.
# API Authentication Guide **Space:** [DEV](#) (Development) **Created by:** Jane Smith on 2025-04-01 **Last updated:** John Doe on 2025-05-15 **Labels:** api, security, authentication ## Overview This document outlines the authentication approaches supported by our API platform. ## Authentication Methods ### OAuth 2.0 We support the following OAuth 2.0 flows: 1. **Authorization Code Flow** - For web applications 2. **Client Credentials Flow** - For server-to-server 3. **Implicit Flow** - For legacy clients only ### API Keys Static API keys are supported but discouraged for production use due to security limitations: | Key Type | Use Case | Expiration | |---|---|---| | Development | Testing | 30 days | | Production | Live systems | 90 days | ## Implementation Examples import requests def get_oauth_token(): return requests.post( 'https://api.example.com/oauth/token', data={ 'client_id': 'YOUR_CLIENT_ID', 'client_secret': 'YOUR_CLIENT_SECRET', 'grant_type': 'client_credentials' } ).json()['access_token'] *Retrieved from mycompany.atlassian.net on 2025-05-19 14:25 UTC*
# Clone repository git clone https://github.com/aashari/mcp-server-atlassian-confluence.git cd mcp-server-atlassian-confluence # Install dependencies npm install # Run in development mode npm run dev:server # Run tests npm test
Contributions are welcome! Please:
git checkout -b feature/xyz
).git commit -m "Add xyz feature"
).git push origin feature/xyz
).See CONTRIBUTING.md for details.