MCP server providing Confluence Server/Data Center integration: page management, search, spaces, and more.
Project description
www-confluence-mcp
MCP (Model Context Protocol) server providing Confluence Server/Data Center integration — page management, search, spaces, comments, labels, attachments, and more.
Gives AI assistants (Qoder, Claude Desktop, Cursor, etc.) the ability to read and write Confluence content through a single MCP server with 25 tools (24 tools + 1 prompt tool) and 2 built-in prompts.
Note: This server targets Confluence Server/Data Center only (v1 REST API). Confluence Cloud is not supported.
System Requirements
| Requirement | Version |
|---|---|
| uv | Install guide |
| Python | 3.10+ (managed automatically by uv) |
| Confluence | Server 5.6+ / Data Center 6.0+ |
Install uv
macOS / Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh
Windows (PowerShell):
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
macOS (Homebrew):
brew install uv
Installation
Option 1: From PyPI (recommended)
uvx — one-shot run, auto-updates on every launch:
uvx www-confluence-mcp
uv tool install — persistent global command:
# Install (or update to latest):
uv tool install --force www-confluence-mcp@latest
# Run:
www-confluence-mcp
# Update later:
uv tool install --force www-confluence-mcp@latest
Option 2: From source or wheel (development)
git clone https://github.com/naifs/www-confluence-mcp.git
cd www-confluence-mcp
uv sync
# Run directly:
uv run www-confluence-mcp
# Or build and install as a global command:
uv build
uv tool install --force dist/*.whl
# Update later:
git pull && uv sync
# or rebuild:
uv build && uv tool install --force dist/*.whl
MCP Client Config
All variants share the same env block. The only difference is command and args:
{
"mcpServers": {
"www-confluence-mcp": {
// Option 1a: uvx — ephemeral run from PyPI, auto-updates on each launch
"command": "uvx",
"args": ["www-confluence-mcp"],
// Option 1b: uv tool install — globally installed command, no args needed
// "command": "www-confluence-mcp",
// "args": [],
// Option 2: local source — run from a cloned repo (replace path)
// "command": "uv",
// "args": ["run", "--project", "/absolute/path/to/www-confluence-mcp", "www-confluence-mcp"],
"env": {
"CONFLUENCE_URL": "https://confluence.example.com",
"CONFLUENCE_PERSONAL_TOKEN": "your-pat-here"
}
}
}
}
How to use: uncomment exactly one of the command/args pairs above and delete the rest.
Authentication
The server supports two authentication methods for Confluence Server/Data Center:
| Method | Environment Variables |
|---|---|
| Personal Access Token (PAT) (recommended) | CONFLUENCE_PERSONAL_TOKEN |
| Basic Auth (username + password) | CONFLUENCE_USERNAME + CONFLUENCE_PASSWORD |
PAT takes priority if both are configured. CONFLUENCE_API_TOKEN is accepted as a legacy fallback for CONFLUENCE_PASSWORD.
Environment Variables
| Variable | Description | Default |
|---|---|---|
CONFLUENCE_URL |
Confluence Server/DC base URL (required) | — |
CONFLUENCE_PERSONAL_TOKEN |
Personal Access Token for PAT auth | — |
CONFLUENCE_USERNAME |
Username for Basic auth | — |
CONFLUENCE_PASSWORD |
Password for Basic auth | — |
CONFLUENCE_SSL_VERIFY |
Verify TLS certificates (system trust store via truststore) |
true |
CONFLUENCE_SSL_PATH |
Optional path to extra CA certs (PEM file or OpenSSL-hashed dir), loaded in addition to the system trust store | — |
CONFLUENCE_TIMEOUT |
HTTP request timeout in seconds | 30 |
CONFLUENCE_MAX_RESULTS |
Default max results per query (1..100) | 25 |
CONFLUENCE_READ_ONLY |
Disable write tools (true/false) |
true |
CONFLUENCE_SPACES_FILTER |
Comma-separated space keys to filter searches | — |
CONFLUENCE_HTTP_PROXY |
HTTP proxy URL | — |
CONFLUENCE_HTTPS_PROXY |
HTTPS proxy URL | — |
CONFLUENCE_DEBUG |
Enable debug logging (1/true/yes/on) |
false |
CONFLUENCE_PROMPTS_DIR |
Custom prompts directory for YAML prompts | — |
CONFLUENCE_RATE_LIMIT_TOKENS |
Rate limiter: tokens per second (client-side) | 10.0 |
CONFLUENCE_RATE_LIMIT_BURST |
Rate limiter: max burst tokens | 20 |
CONFLUENCE_MCP_TRANSPORT |
Transport mode: stdio (local) or http (remote) |
stdio |
CONFLUENCE_MCP_HOST |
HTTP server bind address (when TRANSPORT=http) |
127.0.0.1 |
CONFLUENCE_MCP_PORT |
HTTP server port (when TRANSPORT=http) |
8080 |
Provided Tools
Read Tools (14)
confluence_search— Search content by text or CQL queryconfluence_get_page— Get page by ID or URL (saves to{workspace}/tmp/page_{page_id}.md)confluence_get_page_ancestors— Get ancestor pages (breadcrumb)confluence_get_spaces— List all spaces or get one by keyconfluence_get_pages— Get pages from a space (tree) or children of a pageconfluence_get_page_comments— Get page commentsconfluence_get_page_labels— Get page labelsconfluence_get_page_attachments— List page attachmentsconfluence_download_attachments— Download attachments to disk (all or by IDs, saves to{workspace}/tmp/)confluence_get_page_history— Get page version historyconfluence_get_page_images— Get page images as base64confluence_get_user— Search for users by username, email, or display nameconfluence_validate_page— Validate Confluence page with XHTML validation and round-trip checkingconfluence_mcp_info— Get server configuration info (all environment variables, defaults, examples)confluence_mcp_health— Health check (server status, uptime, version, tool count, connection status)
Write Tools (10) — only when CONFLUENCE_READ_ONLY=false
confluence_new_page— Create a new pageconfluence_update_page— Update an existing pageconfluence_delete_pages— Delete multiple pages in batchconfluence_move_page— Move page to another space/parentconfluence_add_comment— Add a comment to a pageconfluence_add_labels— Add labels to a pageconfluence_delete_labels— Delete multiple labels from multiple pages in batchconfluence_upload_attachments— Upload one or more files as attachmentsconfluence_delete_attachments— Delete multiple attachments in batch
Prompt Tool (1)
confluence_mcp_prompts— List all loaded external prompt definitions, or get full prompt content by name
Built-in Prompts
The server includes 2 built-in prompts accessible via confluence_mcp_prompts:
update_page_from_template— Merge source content with a template (supports IN-PLACE update or NEW PAGE creation)how_to_write_prompts— Guide for creating YAML prompt definitions
Prompts are loaded from the builtin prompts directory and can be extended with custom prompts via CONFLUENCE_PROMPTS_DIR.
Remote Deployment (HTTP Mode)
The server supports running as a remote HTTP service, allowing multiple users to connect with their own Confluence credentials.
Quick Start
# Start in HTTP mode
CONFLUENCE_MCP_TRANSPORT=http \
CONFLUENCE_URL=https://confluence.example.com \
uvx www-confluence-mcp
The server listens on 127.0.0.1:8080 by default. Set CONFLUENCE_MCP_HOST=0.0.0.0 to expose externally.
Client Configuration
Users connect by passing their credentials as HTTP headers — the same env var names used locally:
{
"mcpServers": {
"confluence": {
"url": "https://mcp.example.com/mcp",
"headers": {
"CONFLUENCE_URL": "https://confluence.example.com",
"CONFLUENCE_PERSONAL_TOKEN": "user-pat-token"
}
}
}
}
This works identically to local mode — the only difference is credentials go in headers instead of env vars.
How It Works
- Local mode (stdio): Credentials come from environment variables → shared singleton HTTP client (unchanged behavior)
- Remote mode (HTTP): Credentials come from request headers → per-user cached HTTP client (1-hour TTL)
Each user gets their own isolated Confluence session. Clients are cached to avoid recreating connections on every request.
Production Deployment
# Run with uvicorn (recommended for production)
CONFLUENCE_MCP_TRANSPORT=http \
CONFLUENCE_MCP_HOST=0.0.0.0 \
CONFLUENCE_MCP_PORT=8080 \
uv run www-confluence-mcp
Behind a reverse proxy (nginx):
server {
listen 443 ssl;
server_name mcp.example.com;
location /mcp {
proxy_pass http://127.0.0.1:8080;
proxy_http_version 1.1;
proxy_set_header Connection '';
proxy_buffering off;
proxy_read_timeout 300s;
}
}
Troubleshooting
uv not found
Install uv and reopen your terminal. See System Requirements.
Dependencies missing
uv sync
MCP tools not appearing in client
- Check that the MCP client config JSON is valid.
- Ensure the
--projectpath is absolute and correct. - Reload the MCP client after config changes.
- Check
CONFLUENCE_DEBUG=truefor detailed logs.
Authentication error
- Verify
CONFLUENCE_URLpoints to your Server/DC instance (not*.atlassian.net). - For PAT: ensure the token is valid and not expired.
- For Basic auth: ensure both
CONFLUENCE_USERNAMEandCONFLUENCE_API_TOKENare set.
Wrong project path in config
The --project argument must point to the root directory of www-confluence-mcp (where pyproject.toml is located), not to the src/ subdirectory.
Rate limiting errors (429)
The server includes built-in client-side rate limiting to prevent hitting Confluence's limits. Defaults: 10 tokens/second, burst of 20. Tune with CONFLUENCE_RATE_LIMIT_TOKENS and CONFLUENCE_RATE_LIMIT_BURST.
License
MIT
Project details
Release history Release notifications | RSS feed
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 www_confluence_mcp-1.1.3.tar.gz.
File metadata
- Download URL: www_confluence_mcp-1.1.3.tar.gz
- Upload date:
- Size: 253.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7cbb9bd3fee6d4fbe02966443ce190daf59ae559a84573c1f782689e3d99b31
|
|
| MD5 |
5133b335c55d91913946acf1cd26b9e8
|
|
| BLAKE2b-256 |
0886e26f2512f819d806a2602e9b1a11e8ec2ef3f538e1bb4b305e71dfd71ed5
|
Provenance
The following attestation bundles were made for www_confluence_mcp-1.1.3.tar.gz:
Publisher:
ci-cd.yml on Naifs/www-confluence-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
www_confluence_mcp-1.1.3.tar.gz -
Subject digest:
b7cbb9bd3fee6d4fbe02966443ce190daf59ae559a84573c1f782689e3d99b31 - Sigstore transparency entry: 1594164329
- Sigstore integration time:
-
Permalink:
Naifs/www-confluence-mcp@225a0a11ba3d6819aab50fb57353bbda4c4578de -
Branch / Tag:
refs/tags/v1.1.3 - Owner: https://github.com/Naifs
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci-cd.yml@225a0a11ba3d6819aab50fb57353bbda4c4578de -
Trigger Event:
push
-
Statement type:
File details
Details for the file www_confluence_mcp-1.1.3-py3-none-any.whl.
File metadata
- Download URL: www_confluence_mcp-1.1.3-py3-none-any.whl
- Upload date:
- Size: 138.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca3aeee8abff3a133d7189002b29da546331a20b9762ddcfa65fa2a40ffa15b2
|
|
| MD5 |
821e3c22a709b42fed69f682b92e75ab
|
|
| BLAKE2b-256 |
0c58430827e3d5a67e67e39fae9721b2352739ab0d5fd867abee2d1476fedeac
|
Provenance
The following attestation bundles were made for www_confluence_mcp-1.1.3-py3-none-any.whl:
Publisher:
ci-cd.yml on Naifs/www-confluence-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
www_confluence_mcp-1.1.3-py3-none-any.whl -
Subject digest:
ca3aeee8abff3a133d7189002b29da546331a20b9762ddcfa65fa2a40ffa15b2 - Sigstore transparency entry: 1594164431
- Sigstore integration time:
-
Permalink:
Naifs/www-confluence-mcp@225a0a11ba3d6819aab50fb57353bbda4c4578de -
Branch / Tag:
refs/tags/v1.1.3 - Owner: https://github.com/Naifs
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci-cd.yml@225a0a11ba3d6819aab50fb57353bbda4c4578de -
Trigger Event:
push
-
Statement type: