Confluence MCP Server
Integrates with Atlassian Confluence via the Confluence REST API, enabling tools to search, read, create, update pages, manage labels, list spaces, and attachments.
Provides tools for searching Confluence content using CQL, reading pages by ID or title, creating and updating pages, managing labels, and listing spaces and attachments via the Confluence REST API.
Click on "Install 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 MCP Serverfind pages about API documentation"
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 MCP Server
Model Context Protocol (MCP) server for Atlassian Confluence integration with Claude Code.
Features
🔍 Search across Confluence pages using CQL (Confluence Query Language)
📄 Read pages by ID or title
✏️ Create and update pages
🏷️ Manage labels and metadata
📁 List spaces and attachments
🔐 Secure Basic Auth with API tokens
Installation
Prerequisites
Node.js 18+ and npm
Atlassian Confluence Cloud account
API token (see Configuration below)
Setup
git clone https://github.com/gkrauchunas-arlo/confluence-mcp.git
cd confluence-mcp
npm installConfiguration
Copy
.env.exampleto.env:cp .env.example .envFill in your Atlassian credentials in
.env:ATLASSIAN_SITE=your-domain.atlassian.net ATLASSIAN_EMAIL=your-email@example.com ATLASSIAN_API_TOKEN=your-token
Getting an API token:
Go to https://id.atlassian.com/manage-profile/security/api-tokens
Click "Create API token"
Give it a name (e.g., "Claude Code MCP") and copy the token to
.env
Testing
# Test Confluence API connectivity
node test-confluence.js
# Test MCP protocol (via stdio)
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"0.1.0","capabilities":{},"clientInfo":{"name":"test","version":"1.0.0"}}}' | node index.jsConnecting to Claude Code
Option 1: CLI (Recommended)
claude mcp add --transport stdio confluence \
--env ATLASSIAN_SITE="your-domain.atlassian.net" \
--env ATLASSIAN_EMAIL="your-email@example.com" \
--env ATLASSIAN_API_TOKEN="your-token" \
-- node /absolute/path/to/confluence-mcp/index.jsReplace /absolute/path/to/ with your actual installation path (e.g., /home/username/confluence-mcp).
Option 2: Configuration File
Add to your Claude Code MCP configuration file:
{
"mcpServers": {
"confluence": {
"command": "node",
"args": ["/absolute/path/to/confluence-mcp/index.js"],
"env": {
"ATLASSIAN_SITE": "your-domain.atlassian.net",
"ATLASSIAN_EMAIL": "your-email@example.com",
"ATLASSIAN_API_TOKEN": "your-token"
}
}
}
}Configuration file locations:
Linux:
~/.config/claude-code/mcp_servers.jsonor~/.claude/config/mcp_servers.jsonmacOS:
~/Library/Application Support/claude-code/mcp_servers.jsonWindows:
%APPDATA%\claude-code\mcp_servers.json
After configuration, restart Claude Code to activate the MCP server.
Available Tools
Search & Navigation
confluence_search- CQL search across all contentParameters:
query(string),limit(number, optional),spaceKey(string, optional)Example: Search for pages with "API" in title within a specific space
confluence_list_spaces- List all spacesParameters:
limit(number, optional, default: 25)Returns: List of all Confluence spaces accessible to your account
Read Content
confluence_get_page- Get page by IDParameters:
pageId(string)Returns: Complete page data including content, version, and metadata
confluence_get_page_by_title- Find page by title and spaceParameters:
title(string),spaceKey(string)Returns: Page matching the exact title in the specified space
confluence_get_space- Get space informationParameters:
spaceKey(string)Returns: Space metadata and configuration
confluence_get_attachments- List page attachmentsParameters:
pageId(string)Returns: List of all attachments on a page
Create & Edit
confluence_create_page- Create a new pageParameters:
title(string),spaceKey(string),content(HTML string),parentId(string, optional)Creates a new page in the specified space, optionally as a child of another page
confluence_update_page- Update existing pageParameters:
pageId(string),title(string),content(HTML string),version(number)Updates a page with new content. Version number must match the current page version.
Metadata
confluence_add_labels- Add labels to a pageParameters:
pageId(string),labels(array of strings)Adds one or more labels/tags to a page for categorization
Usage Examples
Once connected to Claude Code, you can use natural language to interact with Confluence:
Search for pages
Find all pages about "API documentation" in ConfluenceRead a page
Read the contents of Confluence page with ID 12345Create a new page
Create a new page in the DEV space titled "API Guidelines" with this content:
<h1>API Guidelines</h1>
<p>This document describes our API design principles.</p>Update a page
Update Confluence page 12345 to add a new section about authenticationAdd labels
Add labels "documentation" and "api" to Confluence page 12345CQL Query Examples
The confluence_search tool supports Confluence Query Language (CQL):
type=page AND title~"API"
type=page AND space=DEV
type=page ORDER BY lastmodified DESC
type=page AND label=documentation
type=page AND creator=currentUser()API Reference
This MCP server uses the Confluence REST API:
Base URL:
https://{site}.atlassian.net/wiki/rest/apiAuthentication: Basic Auth with email + API token
API Version: Cloud REST API (stable)
Troubleshooting
"Authentication failed"
Verify your email and API token in
.envEnsure the token hasn't expired (API tokens don't expire but can be revoked)
Check you're using an API token, not your Atlassian account password
"MCP tools not showing up"
Restart Claude Code completely (close and reopen)
Check server logs for errors by running
node index.jsdirectlyVerify configuration with
claude mcp listEnsure the full absolute path is used in the configuration
"Permission denied" errors
Ensure your Atlassian account has access to the requested spaces/pages
Some operations require specific permissions (e.g., space admin for creating pages)
Check space permissions in Confluence web UI
"Page version conflict"
When updating a page, you must provide the current version number
Get the current version with
confluence_get_pagefirstThe server will automatically increment the version by 1
Content Format
Confluence pages use Storage Format (HTML with Confluence macros). For simple pages, standard HTML works:
<h1>Heading</h1>
<p>Paragraph with <strong>bold</strong> and <em>italic</em> text.</p>
<ul>
<li>Bullet point 1</li>
<li>Bullet point 2</li>
</ul>
<pre><code>Code block</code></pre>For advanced features, see Confluence Storage Format documentation.
Architecture
Built on:
@modelcontextprotocol/sdk - MCP protocol implementation
axios - HTTP client for Confluence REST API
dotenv - Configuration management
The server runs as a stdio-based MCP server, communicating with Claude Code via JSON-RPC 2.0 over standard input/output.
Development
Project Structure
confluence-mcp/
├── index.js # Main MCP server implementation
├── package.json # Dependencies and scripts
├── test-confluence.js # Confluence API connectivity tests
├── test-mcp.js # MCP protocol tests (WIP)
├── .env.example # Example configuration
├── .env # Your configuration (gitignored)
└── README.md # This fileRunning Tests
# Test Confluence API directly
node test-confluence.js
# Test MCP server via stdio
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"0.1.0","capabilities":{},"clientInfo":{"name":"test","version":"1.0.0"}}}' | node index.jsContributing
Contributions welcome! Please:
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Make your changes with tests
Commit your changes (
git commit -m 'feat: add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
Known Limitations
Attachment uploads - Not yet implemented (requires multipart/form-data encoding)
Rich text formatting - Only basic HTML supported, Confluence macros can be complex
Pagination - Large result sets are limited by the
limitparameterPermissions - API returns only content accessible to the authenticated user
License
ISC
Acknowledgments
Architecture inspired by rovo-mcp
Built for Claude Code
Uses the Model Context Protocol
Support
Issues: https://github.com/gkrauchunas-arlo/confluence-mcp/issues
Atlassian API Docs: https://developer.atlassian.com/cloud/confluence/rest/
MCP Specification: https://modelcontextprotocol.io/specification
Created by: gkrauchunas-arlo
Status: Stable v1.0.0 - All core features implemented and tested
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/gkrauchunas-arlo/confluence-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server