Confluence MCP Server
by aaronsb
Confluence MCP Server
A Model Context Protocol (MCP) server that provides tools for interacting with Confluence Cloud. This server enables AI assistants to manage Confluence spaces, pages, and content through a standardized interface.
Features
- Space Management
- List spaces
- Get space details
- Page Operations
- Create, read, update pages
- List pages in a space
- Search & Labels
- Search content using CQL
- Manage page labels
Setup
- Install dependencies:
Copy
npm install
- Configure environment variables:
Create a
.env
file with your Confluence credentials:
Copy
CONFLUENCE_HOST=your-domain.atlassian.net
CONFLUENCE_USERNAME=your-email@domain.com
CONFLUENCE_API_TOKEN=your-api-token
- Build the project:
Copy
npm run build
Usage
The server can be integrated with MCP-compatible AI assistants by adding it to their MCP configuration:
Copy
{
"mcpServers": {
"confluence": {
"command": "node",
"args": ["path/to/build/index.js"],
"env": {
"CONFLUENCE_HOST": "your-domain.atlassian.net",
"CONFLUENCE_USERNAME": "your-email@domain.com",
"CONFLUENCE_API_TOKEN": "your-api-token"
}
}
}
}
Available Tools
Space Tools
list_spaces
: List all spaces in Confluenceget_space
: Get details about a specific space
Page Tools
list_pages
: List pages in a spaceget_page
: Get a specific page with its contentcreate_page
: Create a new page in a spaceupdate_page
: Update an existing page
Search & Label Tools
search_content
: Search Confluence content using CQLget_labels
: Get labels for a pageadd_label
: Add a label to a pageremove_label
: Remove a label from a page
Development
This project is written in TypeScript and follows the MCP SDK conventions for implementing server capabilities. The codebase is organized into:
src/client/
- Confluence API client implementationsrc/handlers/
- MCP tool request handlerssrc/schemas/
- JSON schemas for tool inputssrc/types/
- TypeScript type definitions
License
MIT
Enables AI assistants to interact with Confluence Cloud for managing spaces, pages, and content via the Model Context Protocol (MCP).