confluence-mcp-server
An MCP server that connects AI assistants to Confluence, enabling search and fetch of pages in real time.
README
Confluence MCP Server
An MCP (Model Context Protocol) server that connects AI assistants to your Confluence instance. It exposes two tools — search and fetch — letting any MCP-compatible client (Claude Desktop, Cursor, Windsurf, etc.) query and read Confluence pages in real time.
Features
- 🔍 Fuzzy search — splits multi-word queries into parallel CQL searches and merges results by relevance
- 📄 Full page hydration — retrieves storage body, version info, labels, and ancestors as clean Markdown
- ⚡ Disk cache — search and content responses are cached locally to reduce API load
- 🔒 Read-only — all tools are annotated
readOnlyHint: true; nothing is ever written to Confluence - 🐳 Docker-ready — one-command deployment via
deploy_confluence_mcp.py
Prerequisites
- Python 3.11+ and uv or Docker
- A Confluence instance accessible over HTTP(S)
- A Confluence Personal Access Token
Quickstart
1. Configure credentials
cp .env.example .env
Edit .env:
CONFLUENCE_URL=https://confluence.example.com
CONFLUENCE_PERSONAL_ACCESS_TOKEN=your_token_here
2a. Run with uv (stdio — for Claude Desktop / Cursor)
uv sync
uv run python -m confluence_search.fastmcp_app
2b. Run with Docker (HTTP)
python deploy_confluence_mcp.py # builds image + starts container on :43043
Or manually:
docker build -t confluence-mcp-server .
docker run -d --name confluence-mcp-server \
--env-file .env \
-p 43043:43043 \
confluence-mcp-server
Connecting an MCP client
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"confluence": {
"command": "uv",
"args": ["run", "python", "-m", "confluence_search.fastmcp_app"],
"cwd": "/path/to/confluence-mcp-server",
"env": {
"CONFLUENCE_URL": "https://confluence.example.com",
"CONFLUENCE_PERSONAL_ACCESS_TOKEN": "your_token_here"
}
}
}
}
Cursor / Windsurf (HTTP transport)
Point your MCP client at http://127.0.0.1:43043/mcp after starting the Docker container.
MCP Tools
search_confluence
Execute a CQL search against Confluence.
| Parameter | Type | Default | Description |
|---|---|---|---|
query |
string | required | Natural language query (translated to CQL) |
limit |
int (1–25) | 5 |
Maximum results to return |
spaces |
string[] | null |
Filter by space keys (e.g. ["ENG", "OPS"]) |
labels |
string[] | null |
Filter by page labels |
titles_only |
bool | false |
Search titles only (faster, lower recall) |
fuzzy |
bool | true |
Parallel term-split search for better recall |
modified_after |
string | "2y" |
Recency filter. Shorthands: 1d 7d 30d 90d 6M 1y 2y 5y or ISO date. Set to null for all time |
created_after |
string | null |
Filter by creation date (same format) |
Returns a ranked list of matching pages with title, URL, space, excerpt, and matched labels.
fetch_confluence_page
Hydrate a single page by its Confluence content ID.
| Parameter | Type | Description |
|---|---|---|
content_id |
string | Numeric content ID returned by search_confluence |
Returns the page as a Markdown document including metadata header (URL, space, version, last-modified date, labels, ancestor breadcrumb) followed by the full page body.
Configuration reference
All settings are read from environment variables or .env:
| Variable | Default | Description |
|---|---|---|
CONFLUENCE_URL |
— | Base URL of your Confluence instance |
CONFLUENCE_PERSONAL_ACCESS_TOKEN |
— | Bearer token for authentication |
CONFLUENCE_VERIFY_TLS |
true |
Enforce TLS certificate validation |
CONFLUENCE_REQUEST_TIMEOUT |
20 |
HTTP timeout in seconds |
CONFLUENCE_MAX_RETRIES |
3 |
Retry attempts for transient failures |
CONFLUENCE_CACHE_ENABLED |
true |
Enable/disable disk cache |
CONFLUENCE_CACHE_DIR |
.cache/confluence_mcp |
Cache directory path |
CONFLUENCE_CACHE_TTL_SEARCH |
300 |
Search cache TTL (seconds) |
CONFLUENCE_CACHE_TTL_CONTENT |
900 |
Page content cache TTL (seconds) |
Transport variables (HTTP mode)
| Variable | Default | Description |
|---|---|---|
CONFLUENCE_MCP_TRANSPORT |
stdio |
stdio, http, sse, or streamable-http |
CONFLUENCE_MCP_HOST |
0.0.0.0 |
Bind address (HTTP mode) |
CONFLUENCE_MCP_PORT |
43043 |
Listen port (HTTP mode) |
Development
uv sync
uv run pytest -m unit --cov=confluence_search/ --cov-report=term-missing
uv run ruff check confluence_search/ tests/
uv run ruff format confluence_search/ tests/
The test suite requires 100% coverage — enforced in CI.
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。