Atlassian Confluence MCP Server

Atlassian Confluence MCP Server

一个模型上下文协议(Model Context Protocol)服务器,使像 Claude 这样的人工智能助手能够访问和搜索 Atlassian Confluence 内容,从而实现与您组织知识库的集成。

Category
访问服务器

Tools

list-spaces

List Confluence spaces with optional filtering capabilities. PURPOSE: Discovers available spaces in your Confluence instance with their keys, names, types, and URLs. WHEN TO USE: - When you need to discover what spaces exist in your Confluence instance - When you want to find spaces by type (global, personal, archived) - When you need to browse available spaces before accessing specific pages - When you need space keys for use with other Confluence tools WHEN NOT TO USE: - When you already know the specific space key/ID (use get-space instead) - When you need detailed information about a specific space (use get-space instead) - When you need to find content across multiple spaces (use search instead) - When you need to list pages within a specific space (use list-pages instead) RETURNS: Formatted list of spaces with IDs, keys, names, types, and URLs, plus pagination info. EXAMPLES: - List all spaces: {} - Filter by type: {type: "global"} - With pagination: {limit: 10, cursor: "next-page-token"} ERRORS: - Authentication failures: Check your Confluence credentials - No spaces found: Verify your permissions in Confluence - Rate limiting: Use pagination and reduce query frequency

get-space

Get detailed information about a specific Confluence space by ID or key. PURPOSE: Retrieves comprehensive space metadata including description, homepage, permissions, and more. WHEN TO USE: - When you need detailed information about a specific space - When you need to find the homepage or key pages within a space - When you need to verify space permissions or settings - After using list-spaces to identify the relevant space WHEN NOT TO USE: - When you don't know which space to look for (use list-spaces first) - When you need to browse multiple spaces (use list-spaces instead) - When you need to find specific content (use search or list-pages instead) RETURNS: Detailed space information including key, name, description, type, homepage, and metadata. EXAMPLES: - By key: {idOrKey: "DEV"} - By ID: {idOrKey: "123456"} ERRORS: - Space not found: Verify the space key or ID is correct - Permission errors: Ensure you have access to the requested space - Rate limiting: Cache space information when possible

list-pages

List Confluence pages with optional filtering by space and status. PURPOSE: Finds pages within Confluence spaces with their IDs, titles, and locations to help you discover available content. WHEN TO USE: - When you need to find pages within a specific space - When you want to list the most recently updated content - When you need to browse available pages before accessing specific content - When you need page IDs for use with other Confluence tools - When looking for pages with specific statuses (current, draft, trashed) WHEN NOT TO USE: - When you already know the specific page ID (use get-page instead) - When you need the actual content of a page (use get-page instead) - When you need to search across multiple spaces (use search instead) - When you need to find spaces rather than pages (use list-spaces instead) RETURNS: Formatted list of pages with IDs, titles, space information, and URLs, plus pagination info. EXAMPLES: - Pages in a space: {spaceId: "DEV"} - With status filter: {spaceId: "DEV", status: "current"} - With pagination: {spaceId: "DEV", limit: 10, cursor: "next-page-token"} ERRORS: - Space not found: Verify the space ID is correct - Authentication failures: Check your Confluence credentials - No pages found: The space might be empty or you lack permissions - Rate limiting: Use pagination and reduce query frequency

get-page

Get detailed information and content of a specific Confluence page by ID. PURPOSE: Retrieves the full content of a page in Markdown format along with comprehensive metadata. WHEN TO USE: - When you need to read the actual content of a page - When you need detailed page metadata (author, dates, versions) - When you need to extract specific information from a page - After using list-pages or search to identify relevant page IDs WHEN NOT TO USE: - When you don't know which page to look for (use list-pages or search first) - When you only need basic page information without content (use list-pages instead) - When you need to find content across multiple pages (use search instead) RETURNS: Complete page content in Markdown format with metadata including title, author, version, space, and creation/modification dates. EXAMPLES: - By ID: {id: "123456"} ERRORS: - Page not found: Verify the page ID is correct - Permission errors: Ensure you have access to the requested page - Rate limiting: Cache page content when possible for frequently accessed pages

search

Search for content across Confluence using Confluence Query Language (CQL). PURPOSE: Finds content matching specific criteria with excerpts showing matches, helping you discover relevant information across spaces. WHEN TO USE: - When you need to find specific content across multiple spaces - When you want to search by various criteria (text, title, labels, content type) - When you need to gather information scattered across different pages - When you're unfamiliar with the structure of Confluence and need discovery - When looking for content with specific labels or within specific date ranges WHEN NOT TO USE: - When you already know the exact space and page (use get-page instead) - When you want to list all spaces or pages systematically (use list-spaces/list-pages) - When performing many rapid, consecutive searches (consider rate limits) - When you need to retrieve complete page content (use get-page after search) RETURNS: Search results with titles, excerpts showing matches, content types, spaces, and URLs, plus pagination info. EXAMPLES: - Simple text search: {cql: "text~documentation"} - Space-specific search: {cql: "space=DEV AND text~API"} - Title search: {cql: "title~Project Plan"} - Content type filter: {cql: "type=page AND label=important"} - With pagination: {cql: "text~API", limit: 10, cursor: "next-page-token"} ERRORS: - Invalid CQL syntax: Check CQL syntax (example: "type=page AND space=DEV") - No results: Try broader search terms or check different spaces - Authentication failures: Check your Confluence credentials - Rate limiting: Use more specific queries and pagination

README

Atlassian Confluence MCP 服务器

本项目提供了一个模型上下文协议 (MCP) 服务器,它充当 AI 助手(如 Anthropic 的 Claude、Cursor AI 或其他 MCP 兼容客户端)和您的 Atlassian Confluence 实例之间的桥梁。它允许 AI 安全地访问和实时地与您的 Confluence 空间和页面进行交互。


概述

什么是 MCP?

模型上下文协议 (MCP) 是一个开放标准,允许 AI 系统安全地、有上下文地连接到外部工具和数据源。

此服务器专门为 Confluence Cloud 实现了 MCP,将您的 Confluence 数据与 AI 助手连接起来。

为什么要使用此服务器?

  • 最小输入,最大输出理念:您只需要简单的标识符,如 spaceKeypageId。每个工具都会返回全面的详细信息,而无需额外的标志。

  • 完整的知识库访问:让您的 AI 助手可以实时完全访问您的文档、维基和知识库内容。

  • 丰富的内容格式:所有页面内容都会自动从 Atlassian 文档格式转换为 Markdown,并带有正确的标题、表格、列表和其他格式元素。

  • 安全的本地身份验证:凭据永远不会存储在服务器中。服务器在本地运行,因此您的令牌永远不会离开您的机器,并且您可以仅请求您需要的权限。

  • 直观的 Markdown 响应:所有响应都使用结构良好的 Markdown,具有一致的格式和导航链接,以提高可读性。


开始使用

前提条件

  • Node.js (>=18.x): 下载
  • 具有 Confluence Cloud 访问权限的 Atlassian 帐户

步骤 1:获取您的 Atlassian API 令牌

  1. 转到您的 Atlassian API 令牌管理页面: https://id.atlassian.com/manage-profile/security/api-tokens
  2. 单击创建 API 令牌
  3. 给它一个描述性的标签(例如,mcp-confluence-access)。
  4. 单击创建
  5. 立即复制生成的 API 令牌。您将无法再次看到它。

步骤 2:配置凭据

方法 A:MCP 配置文件(推荐)

创建或编辑 ~/.mcp/configs.json

{
	"@aashari/mcp-server-atlassian-confluence": {
		"environments": {
			"ATLASSIAN_SITE_NAME": "<YOUR_SITE_NAME>",
			"ATLASSIAN_USER_EMAIL": "<YOUR_ATLASSIAN_EMAIL>",
			"ATLASSIAN_API_TOKEN": "<YOUR_COPIED_API_TOKEN>"
		}
	}
}
  • <YOUR_SITE_NAME>:您的 Confluence 站点名称(例如,mycompany 对于 mycompany.atlassian.net)。
  • <YOUR_ATLASSIAN_EMAIL>:您的 Atlassian 帐户电子邮件。
  • <YOUR_COPIED_API_TOKEN>:来自步骤 1 的 API 令牌。

方法 B:环境变量

在运行服务器时直接传递凭据:

ATLASSIAN_SITE_NAME="<YOUR_SITE_NAME>" \
ATLASSIAN_USER_EMAIL="<YOUR_EMAIL>" \
ATLASSIAN_API_TOKEN="<YOUR_API_TOKEN>" \
npx -y @aashari/mcp-server-atlassian-confluence

步骤 3:连接您的 AI 助手

配置您的 MCP 兼容客户端以启动此服务器。

Claude / Cursor 配置:

{
	"mcpServers": {
		"aashari/mcp-server-atlassian-confluence": {
			"command": "npx",
			"args": ["-y", "@aashari/mcp-server-atlassian-confluence"]
		}
	}
}

此配置在运行时自动启动服务器。


工具

本节介绍将此服务器与 AI 助手一起使用时可用的 MCP 工具。请注意,MCP 工具对工具名称使用 snake_case,对参数使用 camelCase

list_spaces

列出可用的 Confluence 空间,并可选择进行过滤。

{}

或者:

{ "type": "global", "status": "current" }

"显示所有 Confluence 空间。"


get_space

获取特定空间的完整详细信息,包括主页信息。

{ "spaceKey": "DEV" }

"告诉我关于 Confluence 中的 DEV 空间。"


list_pages

列出一个或多个空间中的页面,并可选择进行过滤。

{ "spaceId": ["123456"] }

或者:

{ "status": ["current"], "query": "Project Plan" }

"显示空间 123456 中的当前页面。"


get_page

获取特定页面的完整内容和元数据。

{ "pageId": "12345678" }

"获取 Confluence 页面 12345678 的内容。"


search

使用 CQL(Confluence 查询语言)搜索 Confluence 内容。

{ "cql": "text ~ 'project plan'" }

或者:

{ "cql": "space = DEV AND label = api AND created >= '2023-01-01'" }

"在 Confluence 中搜索关于项目计划的页面。"


命令行界面 (CLI)

CLI 对命令(例如,list-spaces)和选项(例如,--space-key)使用 kebab-case。

使用 npx 快速使用

npx -y @aashari/mcp-server-atlassian-confluence list-spaces
npx -y @aashari/mcp-server-atlassian-confluence get-page --page 12345678

全局安装

npm install -g @aashari/mcp-server-atlassian-confluence

然后直接运行:

mcp-atlassian-confluence list-spaces

发现更多 CLI 选项

使用 --help 查看所有可用命令的标志和用法:

mcp-atlassian-confluence --help

或者获取特定命令的详细帮助:

mcp-atlassian-confluence get-space --help
mcp-atlassian-confluence search --help
mcp-atlassian-confluence list-pages --help

许可证

ISC 许可证

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选