Labsco
Dsazz logo

Confluence

β˜… 1

from Dsazz

Integrate with Atlassian Confluence to access spaces, search pages, and manage content from any MCP-compatible application.

πŸ”₯πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedAccount requiredAdvanced setup
<div align="center">

🌐 Confluence MCP Server

TypeScript Bun Confluence MIT License MCP

<p align="center"> <b>A powerful Model Context Protocol (MCP) server that brings Atlassian Confluence integration directly to any editor or application that supports MCP</b> </p> </div>

✨ 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_pages to confluence_search for 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

🧰 Available Tools

🌟 Strategic Workflow Tools

ToolDescriptionParametersReturns
confluence_get_spacesList accessible Confluence spaces with optional filteringSee space parameters belowMarkdown-formatted list of spaces
confluence_get_space_by_keyGet specific space information by space keyspaceKey, optional expand flagsMarkdown-formatted space details
confluence_get_pages_by_spaceGet all pages within a specific spacespaceId, optional paginationMarkdown-formatted page list
confluence_get_pageGet detailed information about a specific page with contentpageId, optional content flagsMarkdown-formatted page details
confluence_get_child_pagesGet child pages of a specific page for hierarchy navigationpageId, optional paginationMarkdown-formatted child pages
confluence_searchSearch pages using text queries or CQL (renamed from search_pages)See search parameters belowMarkdown-formatted search results
confluence_create_pageCreate a new page in ConfluenceSee page creation parametersMarkdown-formatted page details
confluence_update_pageUpdate an existing page in ConfluenceSee page update parametersMarkdown-formatted page details
confluence_delete_pageDelete a page from ConfluencepageIdConfirmation message

Space Parameters

The confluence_get_spaces tool supports these parameters:

Basic Options:

  • type: String ("global" or "personal", optional) - Filter by space type
  • limit: Number (1-100, default: 25) - Maximum number of spaces to return
  • start: 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:25

Page 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 content
  • includeComments: Boolean (default: false) - Include comment count
  • expand: 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 space
  • type: String ("page" or "blogpost", optional) - Content type filter

Advanced Search (CQL):

  • query: String - Full CQL query for advanced searches
  • Examples: text~"specific phrase", type=page AND space.key="DEV"

Result Options:

  • limit: Number (1-100, default: 25) - Maximum number of results
  • start: Number (default: 0) - Pagination offset
  • orderBy: 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:10

Page Management Parameters

Page Creation (confluence_create_page):

  • spaceId: String - The ID of the space where the page will be created
  • title: String - The title of the new page
  • content: String - The content of the page (supports Confluence storage format)
  • parentPageId: String (optional) - The ID of the parent page
  • status: String ("current" or "draft", default: "current") - Page status

Page Update (confluence_update_page):

  • pageId: String - The ID of the page to update
  • title: String (optional) - New title for the page
  • content: String (optional) - New content for the page
  • versionNumber: Number - Current version number of the page
  • versionMessage: 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 utilities

Architecture 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 queries
  • V2 Client (http-client-v2.impl.ts): Manages CRUD operations for spaces and pages
  • Operation Router (operation.router.ts): Intelligently routes requests to the appropriate API version
  • Factory 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

CommandDescription
bun devRun the server in development mode with hot reload
bun buildBuild the project for production
bun startStart the production server
bun formatFormat code using Biome
bun lintLint code using Biome
bun checkRun Biome checks on code
bun typecheckRun TypeScript type checking
bun testRun tests
bun inspectStart the MCP Inspector for debugging

πŸ“ 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


<div align="center"> <sub>Built with ❀️ for a better developer experience</sub> </div>