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 pagecreate_page: Create a new Confluence pageupdate_page: Update an existing Confluence pagedelete_page: Delete a Confluence pagesearch_content: Search Confluence content using CQLget_space: Get details about a Confluence spacelist_spaces: List all Confluence spacesadd_page_labels: Add labels to a Confluence pageget_page_labels: Get labels of a Confluence pageget_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 instanceCONFLUENCE_USERNAME: Your Confluence usernameCONFLUENCE_API_TOKEN: Your Confluence API token
Claude Desktop Configuration
There are two options to make the server available in Claude Desktop:
-
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.
-
Manual configuration:
- Location:
- MacOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%/Claude/claude_desktop_config.json
- MacOS:
{ "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" } } } }
- Location:
Cline Configuration
There are two options to make the server available in Cline:
-
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.
-
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
- MacOS:
{ "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" } } } }
- Location:
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
- Prepare development environment:
make prepare
- Build package:
make build
- Upload to CodeCommit:
make publish
Debugging
Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience:
- Use the MCP Inspector:
npx @modelcontextprotocol/inspector uvx hc-mcp-confluence
- 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:
-
Authentication Failed
- Verify CONFLUENCE_URL, CONFLUENCE_USERNAME, and CONFLUENCE_API_TOKEN are correct
- Ensure API token has required permissions
-
Rate Limiting
- Implement exponential backoff in requests
- Consider batching operations when possible
-
Permission Issues
- Verify user has required space permissions
- Check page-level restrictions
Contributing
- Fork the repository
- Create a feature branch
- 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8604508f4bb070a26677cfbf73f8f1a97751083b2fbec93ef20a9daea0faed2
|
|
| MD5 |
4a50bffb6afbc8e1c9f8f0a5a7555288
|
|
| BLAKE2b-256 |
d77787d20314c69e078fc4797032c6ef040db7aef32461a3830ecda2318413d3
|
File details
Details for the file hc_mcp_confluence-2025.4.1-py3-none-any.whl.
File metadata
- Download URL: hc_mcp_confluence-2025.4.1-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
afce3654baa42cb0a1666633e2b43ec13dae68486e3f8c25dd5cc794fa4c71e3
|
|
| MD5 |
1605635ece1dcbe29e0eb9aff724b5ec
|
|
| BLAKE2b-256 |
4f2b3e95c73bc3c72ab80b01d55bb0df2fd5a88aae1061decbc444529da5f760
|