Confluence MCP Server
π Confluence MCP Server
β¨ Features
π New in v0.3.0 - Optimized Architecture
9 Strategic MCP Tools - Optimized from 8 tools with enhanced workflow capabilities
Domain-Based Architecture - Clean separation into 3 domains: Spaces, Pages, and Search
Enhanced Navigation - New tools for space lookup, page hierarchy, and content discovery
Improved Performance - 1871 tests passing with optimized build process
π Access Confluence Directly From Your Editor
Browse your Confluence spaces without leaving your IDE
Get detailed page information with formatted content
Navigate page hierarchies with child page discovery
Create, update, and manage Confluence content directly
π Powerful Search Capabilities
Search pages using text queries or advanced CQL (Confluence Query Language)
Support for space filtering, content type filtering, and result ordering
Rich markdown formatting with page previews and direct links
Renamed
confluence_search_pagestoconfluence_searchfor simplicity
π Smart Content Processing
Automatic conversion of Confluence's storage format to readable markdown
Support for formatted text, tables, macros, and attachments
Full CRUD operations for page management
Strategic workflow tools for better user experience
π Quick Start
Installation
The easiest way to use this MCP server is to install it directly via npm/bunx. No local setup required!
For Claude Desktop
Add this configuration to your Claude Desktop MCP settings:
{
"mcpServers": {
"Confluence Tools": {
"command": "bunx",
"args": ["-y", "@dsazz/mcp-confluence@latest"],
"env": {
"CONFLUENCE_HOST_URL": "https://your-domain.atlassian.net",
"CONFLUENCE_USER_EMAIL": "your-email@example.com",
"CONFLUENCE_API_TOKEN": "your-confluence-api-token"
}
}
}
}For Cursor IDE
Add this configuration to your Cursor IDE MCP settings:
{
"mcpServers": {
"Confluence Tools": {
"command": "bunx",
"args": ["-y", "@dsazz/mcp-confluence@latest"],
"env": {
"CONFLUENCE_HOST_URL": "https://your-domain.atlassian.net",
"CONFLUENCE_USER_EMAIL": "your-email@example.com",
"CONFLUENCE_API_TOKEN": "your-confluence-api-token"
}
}
}
}For Any MCP Client
Use this configuration pattern for any MCP-compatible client:
{
"mcpServers": {
"Confluence Tools": {
"command": "bunx",
"args": ["-y", "@dsazz/mcp-confluence@latest"],
"env": {
"CONFLUENCE_HOST_URL": "https://your-domain.atlassian.net",
"CONFLUENCE_USER_EMAIL": "your-email@example.com",
"CONFLUENCE_API_TOKEN": "your-confluence-api-token"
}
}
}
}π Getting Your Confluence API Token
Go to Atlassian API Tokens
Click "Create API token"
Give it a name (e.g., "MCP Confluence")
Copy the token and use it in your configuration
Important: Use the token exactly as provided (no quotes needed in the env section)
Alternative: Using npx instead of bunx
If you prefer npx over bunx, you can also use:
{
"mcpServers": {
"Confluence Tools": {
"command": "npx",
"args": ["-y", "@dsazz/mcp-confluence@latest"],
"env": {
"CONFLUENCE_HOST_URL": "https://your-domain.atlassian.net",
"CONFLUENCE_USER_EMAIL": "your-email@example.com",
"CONFLUENCE_API_TOKEN": "your-confluence-api-token"
}
}
}
}Testing Your Setup
After adding the configuration:
Restart your MCP client (Claude Desktop, Cursor, etc.)
Try this command to test the connection:
Show me my Confluence spaces.
That's it! You're ready to use Confluence directly from your MCP client.
π οΈ Development Setup
Development Installation
For development or customization:
# Clone the repository
git clone https://github.com/Dsazz/mcp-confluence.git
cd mcp-confluence
# Install dependencies
bun install
# Build the project
bun run build
# Set up environment variables
cp .env.example .env
# Edit .env with your Confluence credentialsConfiguration
Create a .env file with the following variables:
CONFLUENCE_HOST_URL=https://your-domain.atlassian.net
CONFLUENCE_USER_EMAIL=your-email@example.com
CONFLUENCE_API_TOKEN=your-confluence-api-token
NODE_ENV=developmentDevelopment Tools
Code Quality Tools
The project uses Biome for code formatting and linting, replacing the previous ESLint setup. Biome provides:
Fast, unified formatting and linting
TypeScript-first tooling
Zero configuration needed
Consistent code style enforcement
To format and lint your code:
# Format code
bun format
# Check code for issues
bun check
# Type check
bun typecheckMCP Inspector
The MCP Inspector is a powerful tool for testing and debugging your MCP server.
# Run the inspector (no separate build step needed)
bun run inspectThe inspector automatically:
Loads environment variables from
.envCleans up occupied ports (5175, 3002)
Builds the project when needed
Starts the MCP server with your configuration
Launches the inspector UI
Visit the inspector at http://localhost:5175?proxyPort=3002
The inspector UI allows you to:
View all available MCP capabilities
Execute tools and examine responses
Analyze the JSON communication
Test with different parameters
For more details, see the MCP Inspector GitHub repository.
π§° Available Tools
π Strategic Workflow Tools
Tool | Description | Parameters | Returns |
| List accessible Confluence spaces with optional filtering | See space parameters below | Markdown-formatted list of spaces |
| Get specific space information by space key |
| Markdown-formatted space details |
| Get all pages within a specific space |
| Markdown-formatted page list |
| Get detailed information about a specific page with content |
| Markdown-formatted page details |
| Get child pages of a specific page for hierarchy navigation |
| Markdown-formatted child pages |
| Search pages using text queries or CQL (renamed from search_pages) | See search parameters below | Markdown-formatted search results |
| Create a new page in Confluence | See page creation parameters | Markdown-formatted page details |
| Update an existing page in Confluence | See page update parameters | Markdown-formatted page details |
| Delete a page from Confluence |
| Confirmation message |
Space Parameters
The confluence_get_spaces tool supports these parameters:
Basic Options:
type: String ("global"or"personal", optional) - Filter by space typelimit: Number (1-100, default: 25) - Maximum number of spaces to returnstart: Number (default: 0) - Pagination offset for large result sets
Examples:
# Basic usage - get all accessible spaces
confluence_get_spaces
# Get only global spaces
confluence_get_spaces type:"global" limit:10
# Pagination example
confluence_get_spaces start:25 limit:25Page Parameters
The confluence_get_page tool supports these parameters:
Required:
pageId: String - The ID of the page to retrieve
Content Options:
includeContent: Boolean (default: true) - Include full page contentincludeComments: Boolean (default: false) - Include comment countexpand: String (optional) - Additional fields to expand (comma-separated)
Examples:
# Basic usage with content
confluence_get_page 12345
# Get page without content
confluence_get_page 12345 includeContent:false
# Get page with comments and extra data
confluence_get_page 12345 includeComments:true expand:"version,space"Search Parameters
The confluence_search tool supports both simple and advanced search:
Basic Search:
query: String - Text search query (searches titles and content)spaceKey: String (optional) - Limit search to specific spacetype: String ("page"or"blogpost", optional) - Content type filter
Advanced Search (CQL):
query: String - Full CQL query for advanced searchesExamples:
text~"specific phrase",type=page AND space.key="DEV"
Result Options:
limit: Number (1-100, default: 25) - Maximum number of resultsstart: Number (default: 0) - Pagination offsetorderBy: String ("relevance","created","modified","title") - Sort order
Examples:
# Simple text search
confluence_search query:"project documentation"
# Search in specific space
confluence_search query:"API guide" spaceKey:"DEV"
# Advanced CQL search
confluence_search query:'text~"user guide" AND type=page'
# Search with custom ordering
confluence_search query:"meeting notes" orderBy:"modified" limit:10Page Management Parameters
Page Creation (confluence_create_page):
spaceId: String - The ID of the space where the page will be createdtitle: String - The title of the new pagecontent: String - The content of the page (supports Confluence storage format)parentPageId: String (optional) - The ID of the parent pagestatus: String ("current"or"draft", default:"current") - Page status
Page Update (confluence_update_page):
pageId: String - The ID of the page to updatetitle: String (optional) - New title for the pagecontent: String (optional) - New content for the pageversionNumber: Number - Current version number of the pageversionMessage: String (optional) - Message describing the changes
Examples:
# Create a new page
confluence_create_page spaceId:"123456" title:"New Documentation" content:"<p>Initial content</p>"
# Update an existing page
confluence_update_page pageId:"789012" title:"Updated Title" content:"<p>Updated content</p>" versionNumber:2
# Get child pages for navigation
confluence_get_child_pages pageId:"123456" limit:10π Project Structure (v0.3.0 - Optimized Architecture)
src/
βββ core/ # Core functionality and configurations
β βββ errors/ # Error handling utilities
β βββ logging/ # Logging infrastructure
β βββ responses/ # Response formatting
β βββ server/ # MCP server setup
β βββ tools/ # Base tool patterns
β βββ utils/ # General utilities
βββ features/ # Feature implementations
β βββ confluence/ # Confluence integration
β βββ client/ # HTTP client infrastructure
β β βββ config/ # Client configuration
β β βββ errors/ # Client-specific errors
β β βββ http/ # HTTP client implementations
β β β βββ utils/ # HTTP utilities
β β β βββ v1/ # V1 API client (search)
β β β βββ v2/ # V2 API client (CRUD)
β β βββ responses/ # Response models
β βββ domains/ # Domain-based architecture (NEW)
β β βββ spaces/ # Space management domain
β β β βββ handlers/ # Space operation handlers
β β β βββ models/ # Space data models
β β β βββ use-cases/ # Space business logic
β β β βββ validators/ # Space validation
β β β βββ formatters/ # Space response formatting
β β βββ pages/ # Page management domain
β β β βββ handlers/ # Page operation handlers
β β β βββ models/ # Page data models
β β β βββ use-cases/ # Page business logic
β β β βββ validators/ # Page validation
β β β βββ formatters/ # Page response formatting
β β βββ search/ # Search domain
β β βββ handlers/ # Search operation handlers
β β βββ models/ # Search data models
β β βββ use-cases/ # Search business logic
β β βββ validators/ # Search validation
β β βββ formatters/ # Search response formatting
β βββ shared/ # Shared utilities across domains
β β βββ formatters/ # Common formatters
β β βββ validators/ # Common validators
β βββ tools/ # MCP tool orchestration
β βββ handlers.ts # Unified tool handlers
β βββ mcp.ts # MCP tool definitions
β βββ routing.ts # Tool routing logic
βββ test/ # Test suite (1871 tests)
βββ integration/ # Integration tests
βββ unit/ # Unit tests (domain-organized)
β βββ core/ # Core functionality tests
β βββ features/ # Feature tests (by domain)
β βββ confluence/
β βββ domains/ # Domain-specific tests
β βββ spaces/ # Space domain tests
β βββ pages/ # Page domain tests
β βββ search/ # Search domain tests
βββ utils/ # Test utilitiesArchitecture Overview
The Confluence MCP Server uses a dual-client architecture for optimal API version management:
V1 Client (
http-client-v1.impl.ts): Handles search operations and CQL queriesV2 Client (
http-client-v2.impl.ts): Manages CRUD operations for spaces and pagesOperation Router (
operation.router.ts): Intelligently routes requests to the appropriate API versionFactory Pattern (
http-client.factory.ts): Provides clean dependency injection for clients
This architecture ensures:
Optimal Performance: Each operation uses the most suitable API version
Future Compatibility: Easy to add new API versions or deprecate old ones
Clean Separation: Clear boundaries between different API capabilities
Type Safety: Full TypeScript support across all client implementations
NPM Scripts
Command | Description |
| Run the server in development mode with hot reload |
| Build the project for production |
| Start the production server |
| Format code using Biome |
| Lint code using Biome |
| Run Biome checks on code |
| Run TypeScript type checking |
| Run tests |
| Start the MCP Inspector for debugging |
π§ Troubleshooting
NPM Installation Issues
Package Not Found
If you get a "package not found" error:
# Make sure you're using the correct scoped package name
bunx @dsazz/mcp-confluence@latest
# Or try with explicit npm registry
npm install -g @dsazz/mcp-confluence --registry https://registry.npmjs.orgEnvironment Variables Not Found
If the server fails to start with environment variable errors:
For bunx usage: Create a
.envfile in your working directory:# Create .env file in your current directory echo "CONFLUENCE_HOST_URL=https://your-domain.atlassian.net" > .env echo "CONFLUENCE_USER_EMAIL=your-email@example.com" >> .env echo "CONFLUENCE_API_TOKEN=your-api-token" >> .envFor MCP configuration: Set environment variables in your MCP config:
{ "mcpServers": { "Confluence Tools": { "command": "bunx", "args": ["-y", "@dsazz/mcp-confluence@latest"], "env": { "CONFLUENCE_HOST_URL": "https://your-domain.atlassian.net", "CONFLUENCE_USER_EMAIL": "your-email@example.com", "CONFLUENCE_API_TOKEN": "your-api-token" } } } }
API Connection Issues
Invalid Credentials
Verify your Confluence API token is correct
Ensure your email matches your Atlassian account
Check that your Confluence URL is correct (include https://)
Network/Firewall Issues
Ensure your network allows connections to your Confluence instance
Check if your organization requires VPN access
Verify firewall settings allow outbound HTTPS connections
Development Issues
Build Failures
# Clear dependencies and reinstall
rm -rf node_modules bun.lockb
bun install
# Clean build
rm -rf dist
bun run buildTypeScript Errors
# Run type checking
bun run typecheck
# Check for linting issues
bun run checkπ Contributing
We welcome contributions! Please see our Contributing Guide for details on:
Development workflow
Branching strategy
Commit message format
Pull request process
Code style guidelines
π Resources
π License
MIT Β© Stanislav Stepanenko
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/Dsazz/mcp-confluence'
If you have feedback or need assistance with the MCP directory API, please join our Discord server