Skip to main content

Confluence MCP Server

Create a powerful Model Context Protocol (MCP) server for Confluence in minutes with our AI Gateway. This guide walks you through setting up seamless Confluence integration with enterprise-grade security and instant OAuth authentication.

About Confluence API

Confluence is Atlassian's collaborative workspace where teams create, share, and collaborate on projects, documentation, and ideas. The Confluence API provides comprehensive access to:

  • Page Management: Create, read, update, and manage pages and blog posts
  • Space Organization: Manage spaces, permissions, and hierarchies
  • Content Operations: Rich text editing, attachments, and macros
  • Search Capabilities: Full-text search across all content
  • User Collaboration: Comments, mentions, and watches
  • Labels & Categories: Organize content with labels and categories
  • Templates: Create and manage page templates
  • Analytics: Track page views and engagement metrics
  • Custom Content: Create and manage custom content types
  • Whiteboards: Access and manage collaborative whiteboards
  • Smart Links: Manage and track smart link integrations
  • Data Policies: Configure and manage data governance policies
  • Classification Levels: Handle content classification and security levels
  • Content Properties: Manage metadata and custom properties
  • Version Control: Track and manage content versions and history
  • Admin Key: Enterprise admin key management for bypassing restrictions

Key Features

  • REST API v2: Modern API with enhanced capabilities
  • Cloud & Data Center: Support for both deployment types
  • CQL Search: Confluence Query Language for advanced search
  • Webhooks: Real-time notifications for content changes
  • Rate Limiting: 10 requests per second for cloud
  • Async Operations: Long-running operations support
  • Content Properties: Custom metadata storage
  • Expansions: Reduce API calls with nested data

What You Can Do with Confluence MCP Server

The MCP server transforms Confluence's API into a natural language interface, enabling AI agents to:

Page & Content Management

  • Smart Page Operations

    • "Create a new project documentation page in Engineering space"
    • "Update the API documentation with the latest endpoints"
    • "Find all pages modified in the last week by the dev team"
    • "Move all archived pages to the Archive space"
  • Content Organization

    • "Create a table of contents for the product documentation"
    • "Organize meeting notes by date and team"
    • "Build a knowledge base structure for customer support"
    • "Set up templates for different document types"
  • Bulk Content Processing

    • "Add a disclaimer to all policy pages"
    • "Update all links from old domain to new domain"
    • "Archive pages that haven't been viewed in 6 months"
    • "Export all technical documentation as PDFs"

Search & Discovery

  • Advanced Search

    • "Find all pages mentioning 'security' in the IT space"
    • "Search for documents with attachments larger than 5MB"
    • "Locate all pages created by John last quarter"
    • "Find pages with broken links or missing images"
  • Content Intelligence

    • "Show me the most viewed pages this month"
    • "Find documentation gaps in our knowledge base"
    • "List pages that need review or updates"
    • "Identify duplicate or similar content"
  • Knowledge Mining

    • "Extract all action items from meeting notes"
    • "Summarize key decisions from project pages"
    • "Find all mentioned deadlines across spaces"
    • "Compile FAQ from support documentation"

Custom Content & Whiteboards

  • Custom Content Management

    • "Create custom content types for project tracking"
    • "Manage custom content across spaces"
    • "Set up structured data templates"
    • "Configure custom content workflows"
  • Whiteboard Operations

    • "Create collaborative whiteboard for brainstorming"
    • "Share whiteboard with project team"
    • "Export whiteboard content to pages"
    • "Manage whiteboard permissions and access"

Advanced Content Features

  • Smart Link Integration

    • "Manage smart links to external tools"
    • "Track smart link usage and analytics"
    • "Configure smart link previews"
    • "Monitor smart link performance"
  • Classification & Security

    • "Apply classification levels to sensitive content"
    • "Manage data governance policies"
    • "Set content security restrictions"
    • "Audit classified content access"
  • Content Properties & Metadata

    • "Add custom metadata to documentation"
    • "Track content properties across spaces"
    • "Set up automated property management"
    • "Query content by custom properties"

Collaboration & Communication

  • Team Collaboration

    • "Notify team members about documentation updates"
    • "@mention stakeholders in requirement pages"
    • "Create collaborative editing sessions"
    • "Track who's working on what documentation"
  • Comment Management

    • "Find all unresolved comments on technical docs"
    • "Summarize feedback from page comments"
    • "Reply to questions in documentation"
    • "Escalate critical comments to page owners"
  • Review Workflows

    • "Set up approval workflows for policies"
    • "Track review status of documentation"
    • "Notify reviewers of pending approvals"
    • "Generate review reports for managers"

Space Management

  • Space Operations

    • "Create a new space for the Q1 project"
    • "Set up space permissions for external contractors"
    • "Clone space structure for new departments"
    • "Archive completed project spaces"
  • Permission Management

    • "Grant read-only access to client documentation"
    • "Set up hierarchical permissions for teams"
    • "Audit who has access to sensitive spaces"
    • "Remove access for departing employees"
  • Space Analytics

    • "Show space activity over time"
    • "Identify inactive spaces"
    • "Track space growth and usage"
    • "Generate space health reports"

Reporting & Analytics

  • Content Analytics

    • "Generate monthly documentation metrics"
    • "Track page view trends by category"
    • "Analyze engagement with knowledge base"
    • "Measure documentation completeness"
  • Team Productivity

    • "Show contribution statistics by team member"
    • "Track documentation velocity"
    • "Identify knowledge sharing patterns"
    • "Measure collaboration effectiveness"
  • Quality Metrics

    • "Find outdated pages needing updates"
    • "Check documentation coverage by topic"
    • "Analyze content freshness"
    • "Track template usage"

Automation & Integration

  • Content Automation

    • "Auto-generate release notes from Jira"
    • "Create weekly status reports from data"
    • "Build documentation from code comments"
    • "Sync content with external systems"
  • Workflow Integration

    • "Create Confluence pages from Slack discussions"
    • "Link Jira issues to documentation"
    • "Update pages when code changes"
    • "Trigger actions on page updates"
  • Template Management

    • "Create dynamic templates with variables"
    • "Apply templates based on page type"
    • "Update all pages using specific template"
    • "Track template effectiveness"

Prerequisites

  • Access to Cequence AI Gateway
  • Confluence Cloud or Data Center instance
  • Confluence administrator access
  • Atlassian account for OAuth setup

Step 1: Create Atlassian OAuth App

Before setting up the MCP server, you need to create an OAuth app in Atlassian.

1.1 Access Atlassian Developer Console

  1. Navigate to developer.atlassian.com
  2. Sign in with your Atlassian account
  3. Click Create OAuth 2.0 integration

1.2 Configure OAuth App

  1. Set basic information:

    • App name: "AI Gateway Confluence MCP"
    • App description: "MCP server for Confluence integration"
    • Company: Your organization name
  2. Configure OAuth 2.0:

    • Callback URL:
      https://auth.aigateway.cequence.ai/v1/outbound/oauth/callback
  3. Configure Permissions:

    • Go to Permissions tab
    • Add Confluence API scopes (see Available Scopes section)

1.3 Get OAuth Credentials

  1. Go to Settings tab
  2. Note down:
    • Client ID
    • Client Secret (click to reveal)

1.4 Configure App Details

  1. Add App logo (optional)
  2. Set Privacy policy URL
  3. Set Terms of service URL
  4. Configure Data residency if needed

Step 2: Access AI Gateway Apps

  1. Log in to your Cequence AI Gateway dashboard
  2. Navigate to Apps in the left sidebar
  3. You'll see the list of available third-party applications

Step 3: Find and Select Confluence API

  1. In the Apps section, browse through the Third-party category
  2. Look for Confluence or use the search function
  3. Click on the Confluence API card to view details

The Confluence API card shows:

  • Number of available endpoints
  • Integration capabilities
  • Quick description of functionality

Step 4: Create MCP Server

  1. Click the Create MCP Server button on the Confluence API card
  2. You'll be redirected to the MCP Server creation wizard

Step 5: Configure API Endpoints

In the App Configuration step:

  1. Base URL is pre-filled: https://api.atlassian.com/ex/confluence/{cloudid}
  2. Select API endpoints to expose to your MCP server based on your needs
  3. Click Next to proceed

Step 6: MCP Server Basic Setup

Configure your MCP server details:

  1. MCP Server Name: Enter a descriptive name

    • Example: "Confluence Knowledge Base"
    • This name will identify your server in the dashboard
  2. Description (Optional): Add details about the server's purpose

    • Example: "Automated documentation management and knowledge base operations"
  3. Production Mode: Toggle based on your needs

    • ON for production environments
    • OFF for development/testing
  4. Click Next to continue

Step 7: Configure Authentication

This is where you'll use your Atlassian OAuth credentials:

  1. Authentication Type: Select OAuth 2.0

  2. Fill in the OAuth configuration:

    • Authorization URL:
      https://auth.atlassian.com/authorize
    • Token URL:
      https://auth.atlassian.com/oauth/token
    • Client ID: Paste from Atlassian developer console
    • Client Secret: Paste from Atlassian developer console
    • Redirect URI:
      https://auth.aigateway.cequence.ai/v1/outbound/oauth/callback
  3. Scopes: Select from the available Confluence scopes (see next section)

Available Confluence OAuth Scopes

Configure the appropriate scopes based on your application needs:

Page and Content Access

  • read:page:confluence

    • View pages and blog posts
    • Access page content and metadata
    • Read page hierarchy and structure
    • View page history
  • write:page:confluence

    • Create and update pages
    • Delete pages and blog posts
    • Manage page properties
    • Update page hierarchy

Space Management

  • read:space:confluence

    • View spaces and their settings
    • Access space permissions
    • Read space content
    • View space analytics
  • write:space:confluence

    • Create and update spaces
    • Manage space permissions
    • Configure space settings
    • Archive spaces

Attachments and Media

  • read:attachment:confluence

    • View attachments
    • Download files
    • Access attachment metadata
    • Read attachment permissions
  • write:attachment:confluence

    • Upload attachments
    • Update attachment properties
    • Delete attachments
    • Manage attachment permissions

Comments and Collaboration

  • read:comment:confluence

    • View comments on pages
    • Read inline comments
    • Access comment history
    • View comment likes
  • write:comment:confluence

    • Create new comments
    • Edit and delete comments
    • Reply to comments
    • Like comments

For Documentation Management:

read:page:confluence
read:space:confluence
read:attachment:confluence
read:comment:confluence
write:page:confluence
write:attachment:confluence
write:comment:confluence

For Space Administration:

read:page:confluence
read:space:confluence
read:attachment:confluence
read:comment:confluence
write:page:confluence
write:space:confluence
write:attachment:confluence
write:comment:confluence

For Read-Only Access:

read:page:confluence
read:space:confluence
read:attachment:confluence
read:comment:confluence

Step 8: Configure Security

Set up API protection features:

  1. API Protection: Toggle ON to enable

    • Protects against bot attacks, DDoS, and threats
    • Monitors for suspicious activity
    • Rate limiting and anomaly detection
  2. Protection Features (when enabled):

    • Auto-scaling protection
    • Managed infrastructure
    • Built-in monitoring
    • Zero maintenance required
  3. Click Next to continue

Step 9: Choose Deployment Method

Select your deployment preference:

  • Fully managed deployment
  • Automatic scaling and monitoring
  • Built-in high availability
  • Features included:
    • Auto-scaling
    • Managed infrastructure
    • Built-in monitoring
    • Zero maintenance

Option B: Deploy with Helm Chart

  • Self-managed Kubernetes deployment
  • Full control over infrastructure
  • Requires:
    • Kubernetes cluster
    • Helm 3.x installed
    • Container registry access

Click Next after selecting your deployment method.

Step 10: Review and Deploy

Review your MCP server configuration:

  • MCP Server Name: Your chosen name
  • Base URL: https://api.atlassian.com/ex/confluence/{cloudid}
  • Selected Endpoints: Number of endpoints selected
  • Authentication: OAuth 2.0 (Configured)
  • API Protection: Enabled/Disabled
  • Deployment: Cequence Cloud or Helm

Click Create & Deploy to finalize the setup.

Step 11: Post-Deployment Setup

After successful deployment:

  1. Note the MCP Server URL provided

  2. Test the OAuth flow:

    • Click "Test Connection"
    • You'll be redirected to Atlassian authorization
    • Select Confluence site to authorize
    • Grant requested permissions
    • Confirm successful connection
  3. Configure AI Agents:

    • The MCP server is now available for AI agent connections
    • Use the provided server URL in your AI agent configuration

Using Your Confluence MCP Server

With Claude Desktop

  1. Open Claude Desktop settings

  2. Add your MCP server:

    {
    "servers": {
    "confluence": {
    "url": "your-mcp-server-url",
    "auth": {
    "type": "oauth2",
    "client_id": "your-client-id"
    }
    }
    }
    }
  3. Start using natural language commands:

    • "Create a new page for the API documentation"
    • "Find all pages about deployment procedures"
    • "Update the release notes with version 2.0 changes"
    • "Add a comment asking for review on the design doc"
    • "Generate a summary of all meeting notes from this week"

API Integration Example

// Initialize MCP client
const mcpClient = new MCPClient({
serverUrl: 'your-mcp-server-url',
auth: {
type: 'oauth2',
token: 'user-access-token'
}
});

// Search for pages
const searchResults = await mcpClient.confluence.search({
cql: 'type=page AND space=ENG AND text~"api documentation"',
limit: 20,
expand: ['content', 'version']
});

// Create a page
const newPage = await mcpClient.confluence.pages.create({
spaceId: 'space-id',
title: 'API Integration Guide',
body: {
storage: {
value: '<p>This guide covers API integration...</p>',
representation: 'storage'
}
},
ancestors: [{ id: 'parent-page-id' }]
});

// Update a page
await mcpClient.confluence.pages.update({
id: 'page-id',
version: {
number: currentVersion + 1,
message: 'Updated API endpoints'
},
title: 'Updated API Documentation',
body: {
storage: {
value: updatedContent,
representation: 'storage'
}
}
});

// Add a comment
await mcpClient.confluence.comments.create({
pageId: 'page-id',
body: {
storage: {
value: '<p>Please review the updated sections</p>',
representation: 'storage'
}
}
});

Common Use Cases

Documentation Management

  • Technical documentation maintenance
  • API reference generation
  • Release notes automation
  • Knowledge base organization

Team Collaboration

  • Meeting notes management
  • Project documentation
  • Decision logging
  • Team wikis

Process Documentation

  • Standard operating procedures
  • Onboarding guides
  • Training materials
  • Compliance documentation

Knowledge Sharing

  • Best practices library
  • Troubleshooting guides
  • FAQ management
  • Lessons learned

Security Best Practices

  1. OAuth Security:

    • Use minimum required scopes
    • Implement token rotation
    • Store credentials securely
    • Monitor OAuth usage
  2. API Rate Limits:

    • Respect 10 req/sec limit
    • Implement request queuing
    • Use batch operations
    • Cache frequently accessed content
  3. Content Security:

    • Validate content before posting
    • Sanitize HTML input
    • Respect space permissions
    • Audit content changes
  4. Access Control:

    • Use space-level permissions
    • Implement content restrictions
    • Regular permission audits
    • Monitor access patterns

Troubleshooting

Common Issues

  1. 401 Unauthorized

    • Verify OAuth token validity
    • Check Confluence site access
    • Ensure correct permissions
    • Re-authenticate if needed
  2. 403 Forbidden

    • Check space permissions
    • Verify page restrictions
    • Ensure app has access
    • Check content permissions
  3. 429 Rate Limited

    • Atlassian limit: 10 req/sec
    • Implement exponential backoff
    • Use expansions to reduce calls
    • Consider caching
  4. 400 Bad Request

    • Validate content format
    • Check required fields
    • Verify CQL syntax
    • Review API documentation

Getting Help