Confluence MCP Server

Confluence MCP Server

An MCP server for integrating Confluence with AI applications, enabling listing spaces, browsing and searching pages, and retrieving Confluence instance info.

Category
Visit Server

README

Confluence MCP Server

A Model Context Protocol (MCP) server for integrating Confluence with AI applications like Claude.

Overview

This MCP server provides tools to interact with Confluence spaces and pages, enabling AI applications to:

  • List and search Confluence spaces
  • Browse pages and page content
  • Search across Confluence
  • Get Confluence instance information

Features

The server exposes the following tools:

  • list_spaces: List all Confluence spaces
  • get_space_details: Get detailed information about a specific space
  • list_pages: List pages in a specific space
  • get_page_content: Get the content of a page by title
  • search_pages: Search for pages using CQL (Confluence Query Language)
  • get_confluence_info: Get information about the Confluence instance

Installation

Prerequisites

  • Python 3.10 or higher
  • uv (recommended) or pip for package management

Setup

  1. Clone or create the project directory
  2. Install dependencies using uv:

\\bash uv sync \\

Or with pip:

\\bash pip install -r requirements.txt \\

Configuration

  1. Copy the example configuration:

\\bash cp .env.example .env \\

  1. Edit .env and add your Confluence credentials:

For Confluence Cloud:

\\env CONFLUENCE_URL=https://your-domain.atlassian.net CONFLUENCE_USERNAME=your-email@example.com CONFLUENCE_TOKEN=your-api-token \\

Get your API token from: https://id.atlassian.com/manage-profile/security/api-tokens

For Confluence Server/Data Center:

\\env CONFLUENCE_URL=https://confluence.company.com CONFLUENCE_USERNAME=your-username CONFLUENCE_PASSWORD=your-password \\

Running the Server

With uv:

\\bash uv run confluence_server.py \\

With Python directly:

\\bash python confluence_server.py \\

With MCP Inspector (for testing):

\\bash

Terminal 1: Start the server

uv run confluence_server.py

Terminal 2: Run the inspector

npx -y @modelcontextprotocol/inspector \\

Then connect to http://localhost:8000/mcp in the inspector.

Integration with Claude Desktop

macOS/Linux:

  1. Edit your Claude Desktop config:

\\bash code ~/Library/Application Support/Claude/claude_desktop_config.json \\

  1. Add the server configuration:

\\json { "mcpServers": { "confluence": { "command": "uv", "args": [ "--directory", "/ABSOLUTE/PATH/TO/python-mcp-server", "run", "confluence_server.py" ] } } } \\

  1. Restart Claude Desktop

Windows:

  1. Edit your Claude Desktop config:

\
code %APPDATA%\Claude\claude_desktop_config.json \\

  1. Add the server configuration with forward slashes:

\\json { "mcpServers": { "confluence": { "command": "uv", "args": [ "--directory", "C:/Dev/Confluence MCP Hackathon/python-mcp-server", "run", "confluence_server.py" ] } } } \\

  1. Restart Claude Desktop

Example Usage

Once integrated with Claude Desktop, you can ask:

  • "What spaces do we have in Confluence?"
  • "Show me the pages in the Engineering space"
  • "Search for documentation about API"
  • "Get the content of the Getting Started page in our main space"
  • "What Confluence version are we running?"

Architecture

The server uses:

  • mcp[cli]: The official Python MCP SDK with FastMCP
  • atlassian-python-api: Python library for Confluence API interaction
  • FastMCP: Simplified MCP server framework with automatic tool discovery

Tool Details

list_spaces(limit: int = 25)

Lists Confluence spaces with pagination support.

get_space_details(space_key: str)

Returns detailed information about a space including name, key, type, and description.

list_pages(space_key: str, limit: int = 10)

Lists pages in a specific space with pagination.

get_page_content(space_key: str, page_title: str)

Retrieves the content of a specific page by its title.

search_pages(query: str, limit: int = 10)

Searches for pages using CQL (Confluence Query Language). Example queries:

  • \ ext ~ "keyword"\
  • \space = KEY AND type = page\
  • \created <= -1d\

get_confluence_info()

Returns information about the Confluence instance including version and URL.

Error Handling

The server handles common errors gracefully:

  • Missing credentials
  • Connection failures
  • Invalid space keys or page titles
  • API rate limiting

All errors are returned as readable messages to the AI client.

Troubleshooting

Connection Issues

  1. Verify CONFLUENCE_URL is correct
  2. Check credentials are valid
  3. Ensure your Confluence instance is accessible from your machine
  4. For Cloud, verify your API token hasn't expired

Tool Not Showing Up in Claude

  1. Restart Claude Desktop
  2. Check the logs in Claude Server > Server Logs
  3. Verify the .env file contains valid credentials

Security

Important: Never commit your .env file to version control. The .env.example file shows the required variables without sensitive data.

For production deployments:

  • Use environment variables or secure credential management
  • Consider using OAuth2 authentication
  • Restrict API token permissions to minimum required

Development

To extend the server with additional Confluence functionality:

  1. Edit confluence_server.py
  2. Add new tools using the @mcp.tool() decorator
  3. Test with the MCP Inspector
  4. Restart Claude Desktop to reload changes

References

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured