Purpose
mcp-server-atlassian-confluence is an MCP (Model Context Protocol) server implemented in Node.js/TypeScript, used to connect AI assistants (such as Claude, Cursor AI, etc.) to the Atlassian Confluence Cloud knowledge base. Through the standard MCP interface, AI systems can list and retrieve spaces and pages (content formatted as Markdown), and search via CQL, thereby allowing users to access team documents, technical guides, policy documents, etc. in natural language.
Main Capabilities
- List and retrieve spaces and pages: Supports listing all spaces, retrieving space details, listing pages (filterable by space-id), retrieving page details, page body (body-format can be specified), child pages, labels, footer comments, inline comments, etc.
- Search: Search content in Confluence via CQL query parameters, supporting cross-space search.
- Content creation and update: Supports operations such as creating new pages, adding comments, and updating page content.
- ADF to Markdown conversion: Page content is automatically converted to Markdown format for easier AI processing.
- TOON output format: Uses TOON (Token-Oriented Object Notation) format by default, which can reduce token consumption by 30-60% compared to JSON while remaining human-readable and parseable. It can also be switched to JSON via the outputFormat parameter.
- JMESPath filtering: All tools support optional JMESPath (jq) expressions for extracting specific fields and reducing token costs.
- Response truncation handling: When an API response exceeds approximately 40,000 characters (about 10,000 tokens), the server automatically truncates it and displays a truncation notice at the end of the response, with the complete raw response saved to a temporary file in /tmp/mcp/.
- CLI direct access: Provides a command-line interface corresponding to the MCP tools, supporting get, post, put, patch, and delete commands, allowing direct testing and operation in the terminal.
- Dual transport modes: Supports STDIO (for Claude Desktop) and HTTP (for web integration) transport methods.
- Debug logging: Verbose request/response logging can be enabled, with logs written to ~/.mcp/data/@aashari-mcp-server-atlassian-confluence.[session-id].log.
Usage
Obtaining credentials
- Visit the Atlassian API Tokens page, click Create API token, name it, and immediately copy the generated token.
- The site name is the first part of the Confluence URL, for example https://mycompany.atlassian.net The site name is mycompany.
Connecting AI Assistants
- Claude Desktop: Add the server configuration in the config file ~/.claude/claude_desktop_config.json, and after restarting Claude Desktop, the status bar will show the confluence server.
- Other AI Assistants: Install the server globally (npm install -g @aashari/mcp-server-atlassian-confluence), then configure the AI assistant to use STDIO transport, with the binary name mcp-atlassian-confluence.
- Config File Method: Create ~/.mcp/configs.json for system-level configuration. The config key can use "confluence", "atlassian-confluence", "@aashari/mcp-server-atlassian-confluence", or "mcp-server-atlassian-confluence".
- Environment Variables: Credentials can be configured via environment variables or a .env file. The server will automatically load from environment variables, the .env file in the current directory, or ~/.mcp/configs.json.
Available Tools
Provides 5 general-purpose tools that can access any Confluence API endpoint:
- conf_get, conf_post, conf_put, conf_patch, conf_delete
General parameters:
- path (required): API endpoint path, such as /wiki/api/v2/spaces
- queryParams (optional): Query parameter key-value pairs, such as {"limit": "25", "space-id": "123"}
- jq (optional): JMESPath expression used to filter/transform the response
- outputFormat (optional): Output format, "toon" (default) or "json"
Tools with a request body (conf_post, conf_put, conf_patch) additionally require:
- body (required): Request body in JSON object format
Common API paths
- /wiki/api/v2/spaces - List all spaces
- /wiki/api/v2/spaces/{id} - Get space details
- /wiki/api/v2/pages - List pages (filter using the space-id query parameter)
- /wiki/api/v2/pages/{id} - Get page details
- /wiki/api/v2/pages/{id}/body - Get page body (using the body-format parameter)
- /wiki/api/v2/pages/{id}/children - Get child pages
- /wiki/api/v2/pages/{id}/labels - Get page labels
- /wiki/api/v2/pages/{id}/footer-comments - List/add footer comments
- /wiki/api/v2/pages/{id}/inline-comments - List/add inline comments
- /wiki/api/v2/footer-comments/{comment-id} - Get/update/delete a comment
- /wiki/api/v2/blogposts - List blog posts
- /wiki/api/v2/blogposts/{id} - Get a blog post
- /wiki/rest/api/search - Search content (using the cql query parameter)
CLI Commands
- get - GET any Confluence endpoint
- post - POST to any endpoint
- put - PUT to any endpoint
- patch - PATCH any endpoint
- delete - DELETE any endpoint
Parameters:
- -p, --path <path> (required): API endpoint path
- -q, --query-params <json> (optional): Query parameters JSON
- --jq <expression> (optional): JMESPath filter expression
- -o, --output-format <format> (optional): Output format toon (default) or json
- Commands with a request body (post, put, patch): -b, --body <json> (required)
Testing and Development
- Use MCP Inspector to provide a visual testing interface
- Can run in HTTP mode, listening by default on http://localhost:3000/mcp,响应为 Server-Sent Events (SSE) Format
Use Cases
- Developers quickly accessing technical documentation and API guides
- Product managers searching for requirements, specifications, and project updates
- HR teams quickly accessing policy documents and employee resources
- Support teams finding troubleshooting guides and knowledge base articles
- Any user who wants to interact with Confluence through natural language
Limitations
- Only Confluence Cloud is supported; Confluence Server/Data Center is not supported (may be added in a future version).
- Requires Node.js 18.0.0 or later.
- Requires an Atlassian account with the corresponding space permissions, and the API token must be valid.
- When using JMESPath filtering, pay attention to syntax; unfiltered responses may be very large and costly in tokens.
- Large responses are automatically truncated; complete data must be obtained from temporary files in /tmp/mcp/.
- Searches must use CQL syntax; it is recommended to verify in Confluence advanced search first.
- Paths are case-sensitive, and spaces and pages must use numeric IDs (not keys).
Version Notes
- v3.2.1 (current): Added raw response logging and truncation handling, improved dependency compatibility, upgraded MCP SDK to v1.23.0, added TOON output format.
- v3.0.0 (breaking changes): Replaced 8+ domain-specific tools with 5 generic HTTP method tools. Migration examples: conf_ls_spaces -> conf_get path /wiki/api/v2/spaces; conf_get_space -> conf_get path /wiki/api/v2/spaces/{id}; conf_ls_pages -> conf_get path /wiki/api/v2/pages?space-id={id}; conf_get_page -> conf_get path /wiki/api/v2/pages/{id}; conf_search -> conf_get path /wiki/rest/api/search?cql=...; conf_add_comment -> conf_post path /wiki/api/v2/pages/{id}/footer-comments。