Atlassian Confluence
About
Integrates with Atlassian Confluence to provide direct access to spaces, pages, and content with tools for listing, retrieving, and searching using CQL while converting content to Markdown format
Details
- Author
- aashari
- Repository
- aashari/mcp-server-atlassian-confluence
- GitHub stars
- 3
- Downloads
- 8,218
- Categories
- Productivity, Other, Knowledge Base, Communication, Project Management, Developer Tools, Design, Workplace, AI, Search, Infrastructure
- Tags
- #integration
Jump to
- Five generic tools (conf_get, conf_post, conf_put, conf_patch, conf_delete) for any Confluence API endpoint
- Optional JMESPath (jq) filtering to extract only the needed fields and reduce token costs
- TOON (Token‑Oriented Object Notation) output format, which uses 30–60% fewer tokens than JSON
- Automatic truncation of responses larger than ~40,000 characters, with a notice
- Supports all common Confluence API paths: spaces, pages, comments, blog posts, and search
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Atlassian ConfluenceCommand (node, npx, python, etc.)npxArguments-
Argument 1
-y -
Argument 2
@aashari/mcp-server-atlassian-confluence
Environment-
ATLASSIAN_API_TOKEN
your_api_token -
ATLASSIAN_SITE_NAME
your-company -
ATLASSIAN_USER_EMAIL
your.email@company.com
Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
-
Argument 1
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Get up and running in 2 minutes:
Create ~/.mcp/configs.json for system-wide configuration:
{
"confluence": {
"environments": {
"ATLASSIAN_SITE_NAME": "your-company",
"ATLASSIAN_USER_EMAIL": "your.email@company.com",
"ATLASSIAN_API_TOKEN": "your_api_token"
}
}
}
Alternative config keys: The system also accepts "atlassian-confluence", "@aashari/mcp-server-atlassian-confluence", or "mcp-server-atlassian-confluence" instead of "confluence".
You can also configure credentials using environment variables or a .env file:
```bash
conf_get
GET any Confluence API endpoint (read data). Parameters: path (required), queryParams (optional), jq (optional), outputFormat (optional)
conf_post
POST to any endpoint (create resources). Parameters: path (required), body (required), queryParams (optional), jq (optional), outputFormat (optional)
conf_put
PUT to any endpoint (replace resources). Parameters: path (required), body (required), queryParams (optional), jq (optional), outputFormat (optional)
conf_patch
PATCH to any endpoint (partial updates). Parameters: path (required), body (required), queryParams (optional), jq (optional), outputFormat (optional)
conf_delete
DELETE from any endpoint (remove resources). Parameters: path (required), queryParams (optional), jq (optional), outputFormat (optional)
This MCP server provides 5 generic tools that can access any Confluence API endpoint:
| Tool | Description |
|------|-------------|
| conf_get | GET any Confluence API endpoint (read data) |
| conf_post | POST to any endpoint (create resources) |
| conf_put | PUT to any endpoint (replace resources) |
| conf_patch | PATCH to any endpoint (partial updates) |
| conf_delete | DELETE from any endpoint (remove resources) |
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"atlassian confluence": {
"env": {
"ATLASSIAN_API_TOKEN": "your_api_token",
"ATLASSIAN_SITE_NAME": "your-company",
"ATLASSIAN_USER_EMAIL": "your.email@company.com"
},
"args": [
"-y",
"@aashari/mcp-server-atlassian-confluence"
],
"command": "npx"
}
}
}
Linux
{
"env": {
"ATLASSIAN_API_TOKEN": "your_api_token",
"ATLASSIAN_SITE_NAME": "your-company",
"ATLASSIAN_USER_EMAIL": "your.email@company.com"
},
"args": [
"-y",
"@aashari/mcp-server-atlassian-confluence"
],
"command": "npx"
}
Macos
{
"env": {
"ATLASSIAN_API_TOKEN": "your_api_token",
"ATLASSIAN_SITE_NAME": "your-company",
"ATLASSIAN_USER_EMAIL": "your.email@company.com"
},
"args": [
"-y",
"@aashari/mcp-server-atlassian-confluence"
],
"command": "npx"
}
Windows
{
"env": {
"ATLASSIAN_API_TOKEN": "your_api_token",
"ATLASSIAN_SITE_NAME": "your-company",
"ATLASSIAN_USER_EMAIL": "your.email@company.com"
},
"args": [
"/c",
"npx",
"-y",
"@aashari/mcp-server-atlassian-confluence"
],
"command": "cmd"
}
Interact with Atlassian Confluence Cloud spaces, pages, and content in real-time.
Connect AI to Your Confluence Knowledge Base
Transform how you access and interact with your team's knowledge by connecting Claude, Cursor AI, and other AI assistants directly to your Confluence spaces, pages, and documentation. Get instant answers from your knowledge base, search across all your spaces, and streamline your documentation workflow.
- Ask AI about your documentation: "What's our API authentication process?"
- Search across all spaces: "Find all pages about security best practices"
- Get instant answers: "Show me the latest release notes from the Product space"
- Access team knowledge: "What are our HR policies for remote work?"
- Review page comments: "Show me the discussion on the architecture document"
- Create and update content: "Create a new page in the DEV space"
- Developerswho need quick access to technical documentation and API guides
- Product Managerssearching for requirements, specs, and project updates
- HR Teamsaccessing policy documents and employee resources quickly
- Support Teamsfinding troubleshooting guides and knowledge base articles
- Anyonewho wants to interact with Confluence using natural language
- Go toAtlassian API Tokens
- ClickCreate API token
- Give it a name like"AI Assistant"
- Copy the generated tokenimmediately (you won't see it again!)
# Set your credentials export ATLASSIAN_SITE_NAME="your-company" # for your-company.atlassian.net export ATLASSIAN_USER_EMAIL="your.email@company.com" export ATLASSIAN_API_TOKEN="your_api_token" # List your Confluence spaces (TOON format by default) npx -y @aashari/mcp-server-atlassian-confluence get --path "/wiki/api/v2/spaces" # Get details about a specific space with field filtering npx -y @aashari/mcp-server-atlassian-confluence get \ --path "/wiki/api/v2/spaces/123456" \ --jq "{id: id, key: key, name: name, type: type}" # Get a page with JMESPath filtering npx -y @aashari/mcp-server-atlassian-confluence get \ --path "/wiki/api/v2/pages/789" \ --jq "{id: id, title: title, status: status}" # Search for pages (using CQL) npx -y @aashari/mcp-server-atlassian-confluence get \ --path "/wiki/rest/api/search" \ --query-params '{"cql": "type=page AND space=DEV"}'
Add this to your Claude configuration file (~/.claude/claude_desktop_config.json):
{ "mcpServers": { "confluence": { "command": "npx", "args": ["-y", "@aashari/mcp-server-atlassian-confluence"], "env": { "ATLASSIAN_SITE_NAME": "your-company", "ATLASSIAN_USER_EMAIL": "your.email@company.com", "ATLASSIAN_API_TOKEN": "your_api_token" } } } }
Restart Claude Desktop, and you'll see the confluence server in the status bar.
Most AI assistants support MCP (Cursor AI, Continue.dev, and others). Install the server globally:
npm install -g @aashari/mcp-server-atlassian-confluence
Then configure your AI assistant to use the MCP server with STDIO transport. The binary is available asmcp-atlassian-confluenceafter global installation.
Create~/.mcp/configs.jsonfor system-wide configuration:
{ "confluence": { "environments": { "ATLASSIAN_SITE_NAME": "your-company", "ATLASSIAN_USER_EMAIL": "your.email@company.com", "ATLASSIAN_API_TOKEN": "your_api_token" } } }
Alternative config keys:The system also accepts"atlassian-confluence","@aashari/mcp-server-atlassian-confluence", or"mcp-server-atlassian-confluence"instead of"confluence".
You can also configure credentials using environment variables or a.envfile:
# Create a .env file in your project directory cat > .env << EOF ATLASSIAN_SITE_NAME=your-company ATLASSIAN_USER_EMAIL=your.email@company.com ATLASSIAN_API_TOKEN=your_api_token DEBUG=false EOF
The server will automatically load these values from:
- Environment variables
- .envfile in the current directory
- ~/.mcp/configs.json(as shown above)
This MCP server provides 5 generic tools that can access any Confluence API endpoint:
All tools share these common parameters:
- path(required): The API endpoint path (e.g.,/wiki/api/v2/spaces)
- queryParams(optional): Query parameters as key-value pairs (e.g.,{"limit": "25", "space-id": "123"})
- jq(optional): JMESPath expression to filter/transform the response (e.g.,results[].{id: id, title: title})
- outputFormat(optional): Output format -"toon"(default, 30-60% fewer tokens) or"json"
Tools that accept a request body (conf_post,conf_put,conf_patch):
- body(required): Request body as a JSON object
- /wiki/api/v2/spaces- List all spaces
- /wiki/api/v2/spaces/{id}- Get space details
- /wiki/api/v2/pages- List pages (usespace-idquery param to filter)
- /wiki/api/v2/pages/{id}- Get page details
- /wiki/api/v2/pages/{id}/body- Get page body (usebody-formatparam)
- /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 comment
- /wiki/api/v2/blogposts- List blog posts
- /wiki/api/v2/blogposts/{id}- Get blog post
- /wiki/rest/api/search- Search content (usecqlquery param)
What is TOON?TOON (Token-Oriented Object Notation) is a format optimized for LLM token efficiency, reducing token costs by 30-60% compared to JSON. It's the default output format for all tools.
- Tabular arrays use fewer tokens than JSON arrays
- Minimal syntax overhead (no quotes, brackets, commas where unnecessary)
- Still human-readable and parseable
- When you need standard JSON for other tools
- When debugging or manual inspection is needed
// JSON format (verbose) {"results": [{"id": "123", "title": "My Page"}, {"id": "456", "title": "Other Page"}]} // TOON format (efficient) results: - id: 123 title: My Page - id: 456 title: Other Page
To use JSON instead of TOON, setoutputFormat: "json"in your request.
All tools support optional JMESPath (jq) filtering to extract specific data and reduce token costs:
# Get just space names and keys npx -y @aashari/mcp-server-atlassian-confluence get \ --path "/wiki/api/v2/spaces" \ --jq "results[].{id: id, key: key, name: name}" # Get page title and status npx -y @aashari/mcp-server-atlassian-confluence get \ --path "/wiki/api/v2/pages/123456" \ --jq "{id: id, title: title, status: status}"
IMPORTANT:Always use thejqparameter to filter responses to only the fields you need. Unfiltered responses can be very large and expensive in token costs.
- Official docs:jmespath.org
- Common patterns:
- results[]- All items in results array
- results[0]- First item only
- results[].id- Just IDs from all items
- results[].{id: id, title: title}- Create objects with selected fields
- results[?status=='current']- Filter by condition
- "List all the spaces in our Confluence"
- "Show me details about the Engineering space"
- "What pages are in our Product space?"
- "Find the latest pages in the Marketing space"
- "Search for pages about API authentication"
- "Find all documentation with 'security' in the title"
- "Show me pages labeled with 'getting-started'"
- "Search for content in the DEV space about deployment"
- "Get the content of the API Authentication Guide page"
- "Show me the onboarding checklist document"
- "What's in our security policies page?"
- "Display the latest release notes"
- "Create a new page in the DEV space titled 'API Guide'"
- "Add a comment to the architecture document"
- "Update the page content with the new release info"
The CLI mirrors the MCP tools for direct terminal access. All commands support the same parameters as the tools.
- get- GET any Confluence endpoint
- post- POST to any endpoint
- put- PUT to any endpoint
- patch- PATCH any endpoint
- delete- DELETE from any endpoint
- -p, --path <path>(required) - API endpoint path
- -q, --query-params <json>(optional) - Query parameters as JSON
- --jq <expression>(optional) - JMESPath filter expression
- -o, --output-format <format>(optional) - Output format:toon(default) orjson
- -b, --body <json>(required) - Request body as JSON
# GET request npx -y @aashari/mcp-server-atlassian-confluence get --path "/wiki/api/v2/spaces" # GET with query parameters and JMESPath filter npx -y @aashari/mcp-server-atlassian-confluence get \ --path "/wiki/api/v2/pages" \ --query-params '{"space-id": "123456", "limit": "10"}' \ --jq "results[].{id: id, title: title}" # GET with JSON output format npx -y @aashari/mcp-server-atlassian-confluence get \ --path "/wiki/api/v2/spaces" \ --output-format json # POST request (create a page) npx -y @aashari/mcp-server-atlassian-confluence post \ --path "/wiki/api/v2/pages" \ --body '{"spaceId": "123456", "status": "current", "title": "New Page", "body": {"representation": "storage", "value": "<p>Content here</p>"}}' # POST request (add a comment) npx -y @aashari/mcp-server-atlassian-confluence post \ --path "/wiki/api/v2/pages/789/footer-comments" \ --body '{"body": {"representation": "storage", "value": "<p>My comment</p>"}}' # PUT request (update page - requires version increment) npx -y @aashari/mcp-server-atlassian-confluence put \ --path "/wiki/api/v2/pages/789" \ --body '{"id": "789", "status": "current", "title": "Updated Title", "spaceId": "123456", "body": {"representation": "storage", "value": "<p>Updated content</p>"}, "version": {"number": 2}}' # PATCH request (partial update) npx -y @aashari/mcp-server-atlassian-confluence patch \ --path "/wiki/api/v2/spaces/123456" \ --body '{"name": "New Space Name"}' # DELETE request npx -y @aashari/mcp-server-atlassian-confluence delete \ --path "/wiki/api/v2/pages/789"
When API responses exceed approximately 40,000 characters (~10,000 tokens), the server automatically truncates the response to stay within token limits. When this happens:
-
You'll see a truncation noticeat the end of the response showing:
- How much of the original response is shown
- The original response size
- Guidance on accessing the full data
The full raw response is savedto a temporary file in/tmp/mcp/(path provided in the truncation notice)
- Always use thejqparameterto filter responses to only needed fields
- Uselimitquery parameter to restrict result counts (e.g.,{"limit": "5"})
- Request specific resources by ID rather than listing all
- Use targeted CQL queries for searches
# Instead of getting all space data (can be huge): npx -y @aashari/mcp-server-atlassian-confluence get \ --path "/wiki/api/v2/spaces" # Get only the fields you need: npx -y @aashari/mcp-server-atlassian-confluence get \ --path "/wiki/api/v2/spaces" \ --query-params '{"limit": "10"}' \ --jq "results[].{id: id, key: key, name: name}"
Enable debug logging to see detailed request/response information:
# Set DEBUG environment variable export DEBUG=true # For MCP mode DEBUG=true npx -y @aashari/mcp-server-atlassian-confluence # For CLI mode DEBUG=true npx -y @aashari/mcp-server-atlassian-confluence get --path "/wiki/api/v2/spaces"
Debug logs are written to:~/.mcp/data/@aashari-mcp-server-atlassian-confluence.[session-id].log
The MCP Inspector provides a visual interface for testing tools:
# Install the server globally npm install -g @aashari/mcp-server-atlassian-confluence # Run with MCP Inspector npx @modelcontextprotocol/inspector node $(which mcp-atlassian-confluence)
Or use the built-in development command if you've cloned the repository:
This starts the server in HTTP mode and opens the inspector UI in your browser.
You can run the server in HTTP mode to test with curl or other HTTP clients:
# Start server in HTTP mode TRANSPORT_MODE=http npx -y @aashari/mcp-server-atlassian-confluence
The server will listen onhttp://localhost:3000/mcpby default. You can change the port:
PORT=8080 TRANSPORT_MODE=http npx -y @aashari/mcp-server-atlassian-confluence
# Initialize session curl -X POST http://localhost:3000/mcp \ -H "Content-Type: application/json" \ -H "Accept: application/json, text/event-stream" \ -d '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2024-11-05", "clientInfo": {"name": "curl-test", "version": "1.0.0"}, "capabilities": {}}}' # List available tools curl -X POST http://localhost:3000/mcp \ -H "Content-Type: application/json" \ -H "Accept: application/json, text/event-stream" \ -d '{"jsonrpc": "2.0", "id": 2, "method": "tools/list"}' # Call a tool curl -X POST http://localhost:3000/mcp \ -H "Content-Type: application/json" \ -H "Accept: application/json, text/event-stream" \ -d '{"jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": {"name": "conf_get", "arguments": {"path": "/wiki/api/v2/spaces", "queryParams": {"limit": "5"}}}}'
The response comes as Server-Sent Events (SSE) with format:
event: message data: {"jsonrpc": "2.0", "id": 1, "result": {...}}
"Authentication failed" or "403 Forbidden"
- Go toAtlassian API Tokens
- Make sure your token is still active and hasn't expired
- If your Confluence URL ishttps://mycompany.atlassian.net
- Your site name should be justmycompany
npx -y @aashari/mcp-server-atlassian-confluence get --path "/wiki/api/v2/spaces?limit=1"
"Resource not found" or "404"
- Paths are case-sensitive
- Use numeric IDs for spaces and pages (not keys)
- Verify the resource exists in your browser
- Make sure you have access to the space/page in your browser
- Some content may be restricted to certain users
"No results found" when searching
- Use CQL syntax for advanced searches
- Try broader search criteria
- Validate your CQL in Confluence's advanced search first
- Restart Claude Desktopafter updating the config file
- Verify config file location:
- macOS:~/.claude/claude_desktop_config.json
- Windows:%APPDATA%\Claude\claude_desktop_config.json
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





