Skip to main content

HC MCP server for Confluence integration

Project description

hc-mcp-confluence

MCP server for Confluence integration, providing tools to interact with Confluence through the Model Context Protocol (MCP).

Overview

This server enables seamless integration with Confluence, allowing you to perform common content management operations through MCP tools. It supports comprehensive page management, space exploration, and content organization.

Features

The server provides the following Confluence integration tools:

  • get_page: Get content of a specific Confluence page
  • create_page: Create a new Confluence page
  • update_page: Update an existing Confluence page
  • delete_page: Delete a Confluence page
  • search_content: Search Confluence content using CQL
  • get_space: Get details about a Confluence space
  • list_spaces: List all Confluence spaces
  • add_page_labels: Add labels to a Confluence page
  • get_page_labels: Get labels of a Confluence page
  • get_page_attachments: Get attachments of a Confluence page

Installation

The package supports multiple installation methods:

Using uvx (Recommended)

uvx hc-mcp-confluence

Using pip

pip install hc-mcp-confluence

Configuration

Required Environment Variables

  • CONFLUENCE_URL: The URL of your Confluence instance
  • CONFLUENCE_USERNAME: Your Confluence username
  • CONFLUENCE_API_TOKEN: Your Confluence API token

Claude Desktop Configuration

There are two options to make the server available in Claude Desktop:

  1. Using the CLI:

    uvx hc-mcp-confluence --add-to-claude
    

    If environment variables are not already set, you can specify them:

    uvx hc-mcp-confluence --add-to-claude --env CONFLUENCE_URL=your-confluence-url --env CONFLUENCE_USERNAME=your-username --env CONFLUENCE_API_TOKEN=your-api-token
    

    Any environment variables not explicitly set in the command will be taken from the current environment.

  2. Manual configuration:

    • Location:
      • MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
      • Windows: %APPDATA%/Claude/claude_desktop_config.json
    {
      "mcpServers": {
        "hc-mcp-confluence": {
          "command": "uvx",
          "args": ["hc-mcp-confluence"],
          "env": {
            "CONFLUENCE_URL": "your-confluence-url",
            "CONFLUENCE_USERNAME": "your-username",
            "CONFLUENCE_API_TOKEN": "your-api-token"
          }
        }
      }
    }
    

Cline Configuration

There are two options to make the server available in Cline:

  1. Using the CLI:

    uvx hc-mcp-confluence --add-to-cline
    

    If environment variables are not already set, you can specify them:

    uvx hc-mcp-confluence --add-to-cline --env CONFLUENCE_URL=your-confluence-url --env CONFLUENCE_USERNAME=your-username --env CONFLUENCE_API_TOKEN=your-api-token
    

    Any environment variables not explicitly set in the command will be taken from the current environment.

  2. Manual configuration:

    • Location:
      • MacOS: ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
      • Cloud9: ~/.vscode-server/data/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
    {
      "mcpServers": {
        "hc-mcp-confluence": {
          "command": "uvx",
          "args": ["hc-mcp-confluence"],
          "env": {
            "CONFLUENCE_URL": "your-confluence-url",
            "CONFLUENCE_USERNAME": "your-username",
            "CONFLUENCE_API_TOKEN": "your-api-token"
          }
        }
      }
    }
    

Usage Examples

Here are common usage patterns for the available tools:

Page Management

1. Create a page:
   "Create a Confluence page titled 'Project Overview' in space 'AWS'"

2. Update a page:
   "Update page 123456 with new content about deployment procedures"

3. Search content:
   "Find all pages in space 'AWS' containing 'AWS configuration'"

4. Manage labels:
   "Add labels 'documentation' and 'aws' to page 123456"

Space Management

1. List spaces:
   "Show me all Confluence spaces I have access to"

2. Get space details:
   "Get information about the 'TEAM' space"

Development

Building and Publishing

  1. Prepare development environment:
make prepare
  1. Build package:
make build
  1. Upload to CodeCommit:
make publish

Debugging

Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience:

  1. Use the MCP Inspector:
npx @modelcontextprotocol/inspector uvx hc-mcp-confluence
  1. Enable debug logging:
export MCP_DEBUG=1
uvx hc-mcp-confluence

Error Handling

The server implements comprehensive error handling:

  • Authentication errors: Validates credentials before operations
  • API errors: Provides detailed error messages from Confluence API
  • Input validation: Verifies required fields and formats
  • Rate limiting: Handles Confluence API rate limits gracefully

Troubleshooting

Common issues and solutions:

  1. Authentication Failed

    • Verify CONFLUENCE_URL, CONFLUENCE_USERNAME, and CONFLUENCE_API_TOKEN are correct
    • Ensure API token has required permissions
  2. Rate Limiting

    • Implement exponential backoff in requests
    • Consider batching operations when possible
  3. Permission Issues

    • Verify user has required space permissions
    • Check page-level restrictions

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Submit a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hc_mcp_confluence-2025.4.1.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hc_mcp_confluence-2025.4.1-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file hc_mcp_confluence-2025.4.1.tar.gz.

File metadata

  • Download URL: hc_mcp_confluence-2025.4.1.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for hc_mcp_confluence-2025.4.1.tar.gz
Algorithm Hash digest
SHA256 e8604508f4bb070a26677cfbf73f8f1a97751083b2fbec93ef20a9daea0faed2
MD5 4a50bffb6afbc8e1c9f8f0a5a7555288
BLAKE2b-256 d77787d20314c69e078fc4797032c6ef040db7aef32461a3830ecda2318413d3

See more details on using hashes here.

File details

Details for the file hc_mcp_confluence-2025.4.1-py3-none-any.whl.

File metadata

File hashes

Hashes for hc_mcp_confluence-2025.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 afce3654baa42cb0a1666633e2b43ec13dae68486e3f8c25dd5cc794fa4c71e3
MD5 1605635ece1dcbe29e0eb9aff724b5ec
BLAKE2b-256 4f2b3e95c73bc3c72ab80b01d55bb0df2fd5a88aae1061decbc444529da5f760

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page