Skip to main content

Confluence API

Manage Confluence spaces, pages, comments, and attachments through the ConstellationAPI.

Base Path

/confluence

Available MCP Tools

The Confluence integration provides 14 tools accessible via the MCP protocol.

ToolOperationDescription
get_spacesListList all Confluence spaces
get_spaceReadGet single space details
get_pagesListList pages with optional filters
get_pageReadGet single page with content
create_pageCreateCreate new page
update_pageUpdateUpdate existing page
delete_pageDeleteDelete page
get_page_commentsListList page comments
add_commentCreateAdd comment to page
get_attachmentsListList page attachments
searchSearchSearch content across Confluence
get_labelsListList page labels
add_labelsAddAdd labels to page
get_user_by_emailLookupFind user by email
get_my_confluence_workListGet user's open work

Space Operations

get_spaces

List all Confluence spaces accessible to the user.

Input Schema:

{
"type": "object",
"properties": {
"limit": {
"type": "integer",
"description": "Maximum number of results to return"
},
"offset": {
"type": "integer",
"description": "Number of results to skip"
}
},
"required": []
}

Example Request:

curl -X POST http://localhost:3007/mcp/confluence/execute \
-H "Content-Type: application/json" \
-H "X-JWT-Token: <your-jwt-token>" \
-d '{
"tool": "get_spaces",
"arguments": {
"limit": 10
}
}'

Example Response:

{
"success": true,
"data": {
"spaces": [
{
"id": "65537",
"key": "DOCS",
"name": "Documentation",
"type": "global",
"status": "current",
"description": "Main documentation space",
"_links": {
"webui": "/spaces/DOCS"
}
},
{
"id": "65538",
"key": "TEAM",
"name": "Team Space",
"type": "global",
"status": "current",
"description": "Team collaboration space"
}
],
"count": 2
}
}

get_space

Get details for a specific Confluence space.

Input Schema:

{
"type": "object",
"properties": {
"space_key": {
"type": "string",
"description": "Space key identifier (e.g., DOCS, TEAM)"
}
},
"required": ["space_key"]
}

Example Request:

curl -X POST http://localhost:3007/mcp/confluence/execute \
-H "Content-Type: application/json" \
-H "X-JWT-Token: <your-jwt-token>" \
-d '{
"tool": "get_space",
"arguments": {
"space_key": "DOCS"
}
}'

Example Response:

{
"success": true,
"data": {
"id": "65537",
"key": "DOCS",
"name": "Documentation",
"type": "global",
"status": "current",
"description": {
"plain": {
"value": "Main documentation space for all product docs"
}
},
"homepage": {
"id": "123456",
"title": "Documentation Home"
},
"_links": {
"webui": "/spaces/DOCS",
"self": "https://your-instance.atlassian.net/wiki/rest/api/space/DOCS"
}
}
}

Page Operations

get_pages

List Confluence pages with optional filters.

Input Schema:

{
"type": "object",
"properties": {
"space_key": {
"type": "string",
"description": "Space key to filter pages. Optional - if not provided, fetches from all accessible spaces"
},
"status": {
"type": "string",
"description": "Page status filter (e.g., 'current', 'archived')"
},
"limit": {
"type": "integer",
"description": "Maximum number of results to return"
},
"offset": {
"type": "integer",
"description": "Number of results to skip"
}
},
"required": []
}

Example Request:

curl -X POST http://localhost:3007/mcp/confluence/execute \
-H "Content-Type: application/json" \
-H "X-JWT-Token: <your-jwt-token>" \
-d '{
"tool": "get_pages",
"arguments": {
"space_key": "DOCS",
"limit": 20
}
}'

Example Response:

{
"success": true,
"data": {
"pages": [
{
"id": "123456",
"title": "Getting Started Guide",
"status": "current",
"space": {
"key": "DOCS",
"name": "Documentation"
},
"version": {
"number": 5,
"when": "2024-01-15T10:30:00.000Z"
},
"author": {
"accountId": "abc123",
"displayName": "John Doe"
},
"_links": {
"webui": "/spaces/DOCS/pages/123456"
}
},
{
"id": "123457",
"title": "API Reference",
"status": "current",
"space": {
"key": "DOCS",
"name": "Documentation"
},
"version": {
"number": 12,
"when": "2024-01-20T14:45:00.000Z"
}
}
],
"count": 2
}
}

get_page

Get a specific Confluence page with full content.

Input Schema:

{
"type": "object",
"properties": {
"page_id": {
"type": "string",
"description": "Page identifier"
},
"title": {
"type": "string",
"description": "Page title (alternative to page_id)"
},
"space_key": {
"type": "string",
"description": "Space key for disambiguation when using title"
}
},
"required": []
}

Example Request:

curl -X POST http://localhost:3007/mcp/confluence/execute \
-H "Content-Type: application/json" \
-H "X-JWT-Token: <your-jwt-token>" \
-d '{
"tool": "get_page",
"arguments": {
"page_id": "123456"
}
}'

Example Response:

{
"success": true,
"data": {
"id": "123456",
"title": "Getting Started Guide",
"status": "current",
"space": {
"key": "DOCS",
"name": "Documentation"
},
"body": {
"storage": {
"value": "<h1>Getting Started</h1><p>Welcome to our documentation...</p>",
"representation": "storage"
}
},
"version": {
"number": 5,
"when": "2024-01-15T10:30:00.000Z",
"by": {
"accountId": "abc123",
"displayName": "John Doe"
}
},
"ancestors": [
{
"id": "123400",
"title": "Documentation Home"
}
],
"_links": {
"webui": "/spaces/DOCS/pages/123456",
"self": "https://your-instance.atlassian.net/wiki/rest/api/content/123456"
}
}
}

create_page

Create a new Confluence page.

Input Schema:

{
"type": "object",
"properties": {
"space_key": {
"type": "string",
"description": "Space key where the page will be created"
},
"title": {
"type": "string",
"description": "Page title"
},
"body": {
"type": "object",
"description": "Page content body",
"properties": {
"representation": {
"type": "string",
"description": "Content format (e.g., 'storage', 'atlas_doc_format')"
},
"value": {
"type": "string",
"description": "Content value (HTML for storage format, JSON for ADF)"
}
}
},
"parent_id": {
"type": "string",
"description": "Parent page ID for hierarchical structure"
}
},
"required": ["space_key", "title", "body"]
}

Example Request:

curl -X POST http://localhost:3007/mcp/confluence/execute \
-H "Content-Type: application/json" \
-H "X-JWT-Token: <your-jwt-token>" \
-d '{
"tool": "create_page",
"arguments": {
"space_key": "DOCS",
"title": "New Feature Documentation",
"body": {
"representation": "storage",
"value": "<h1>New Feature</h1><p>This document describes the new feature...</p>"
},
"parent_id": "123456"
}
}'

Example Response:

{
"success": true,
"data": {
"id": "123500",
"title": "New Feature Documentation",
"status": "current",
"space": {
"key": "DOCS",
"name": "Documentation"
},
"version": {
"number": 1,
"when": "2024-01-25T09:00:00.000Z"
},
"_links": {
"webui": "/spaces/DOCS/pages/123500"
}
}
}

update_page

Update an existing Confluence page.

Input Schema:

{
"type": "object",
"properties": {
"page_id": {
"type": "string",
"description": "Page identifier"
},
"title": {
"type": "string",
"description": "New page title"
},
"body": {
"type": "object",
"description": "Updated page content body"
},
"version": {
"type": "integer",
"description": "Current page version number (for optimistic locking)"
},
"status": {
"type": "string",
"description": "Page status (e.g., 'current', 'archived')"
}
},
"required": ["page_id", "title", "body", "version"]
}

Example Request:

curl -X POST http://localhost:3007/mcp/confluence/execute \
-H "Content-Type: application/json" \
-H "X-JWT-Token: <your-jwt-token>" \
-d '{
"tool": "update_page",
"arguments": {
"page_id": "123456",
"title": "Getting Started Guide (Updated)",
"body": {
"representation": "storage",
"value": "<h1>Getting Started</h1><p>Updated content with new instructions...</p>"
},
"version": 5
}
}'

Example Response:

{
"success": true,
"data": {
"id": "123456",
"title": "Getting Started Guide (Updated)",
"status": "current",
"version": {
"number": 6,
"when": "2024-01-25T10:00:00.000Z"
}
}
}

delete_page

Delete a Confluence page.

Input Schema:

{
"type": "object",
"properties": {
"page_id": {
"type": "string",
"description": "Page identifier to delete"
}
},
"required": ["page_id"]
}

Example Request:

curl -X POST http://localhost:3007/mcp/confluence/execute \
-H "Content-Type: application/json" \
-H "X-JWT-Token: <your-jwt-token>" \
-d '{
"tool": "delete_page",
"arguments": {
"page_id": "123500"
}
}'

Example Response:

{
"success": true,
"data": {
"deleted": true,
"page_id": "123500"
}
}

Comment Operations

get_page_comments

List all comments on a Confluence page.

Input Schema:

{
"type": "object",
"properties": {
"page_id": {
"type": "string",
"description": "Page ID to get comments for"
},
"limit": {
"type": "integer",
"description": "Maximum number of results"
}
},
"required": ["page_id"]
}

Example Response:

{
"success": true,
"data": {
"comments": [
{
"id": "comment-789",
"body": {
"storage": {
"value": "<p>Great documentation! Very helpful.</p>"
}
},
"author": {
"accountId": "abc123",
"displayName": "Jane Smith"
},
"created": "2024-01-20T15:30:00.000Z"
}
],
"count": 1
}
}

add_comment

Add a comment to a Confluence page.

Input Schema:

{
"type": "object",
"properties": {
"page_id": {
"type": "string",
"description": "Page ID to add comment to"
},
"body": {
"type": "string",
"description": "Comment text content"
}
},
"required": ["page_id", "body"]
}

Example Request:

curl -X POST http://localhost:3007/mcp/confluence/execute \
-H "Content-Type: application/json" \
-H "X-JWT-Token: <your-jwt-token>" \
-d '{
"tool": "add_comment",
"arguments": {
"page_id": "123456",
"body": "This needs to be updated for the new release."
}
}'

Example Response:

{
"success": true,
"data": {
"id": "comment-790",
"body": {
"storage": {
"value": "<p>This needs to be updated for the new release.</p>"
}
},
"author": {
"accountId": "def456",
"displayName": "Current User"
},
"created": "2024-01-25T11:00:00.000Z"
}
}

Attachment Operations

get_attachments

List all attachments on a Confluence page.

Input Schema:

{
"type": "object",
"properties": {
"page_id": {
"type": "string",
"description": "Page ID to get attachments for"
},
"limit": {
"type": "integer",
"description": "Maximum number of results"
}
},
"required": ["page_id"]
}

Example Response:

{
"success": true,
"data": {
"attachments": [
{
"id": "att123",
"title": "architecture-diagram.png",
"mediaType": "image/png",
"fileSize": 245678,
"version": {
"number": 1,
"when": "2024-01-15T08:00:00.000Z"
},
"_links": {
"download": "/download/attachments/123456/architecture-diagram.png"
}
},
{
"id": "att124",
"title": "api-spec.json",
"mediaType": "application/json",
"fileSize": 12456
}
],
"count": 2
}
}

Search Operations

Search content across Confluence.

Input Schema:

{
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Search query text"
},
"space_key": {
"type": "string",
"description": "Limit search to specific space"
},
"limit": {
"type": "integer",
"description": "Maximum number of results"
}
},
"required": ["query"]
}

Example Request:

curl -X POST http://localhost:3007/mcp/confluence/execute \
-H "Content-Type: application/json" \
-H "X-JWT-Token: <your-jwt-token>" \
-d '{
"tool": "search",
"arguments": {
"query": "authentication API",
"space_key": "DOCS",
"limit": 10
}
}'

Example Response:

{
"success": true,
"data": {
"results": [
{
"content": {
"id": "123456",
"type": "page",
"title": "Authentication API Reference",
"space": {
"key": "DOCS"
}
},
"excerpt": "...configure <b>authentication</b> for the <b>API</b>...",
"lastModified": "2024-01-20T14:45:00.000Z"
}
],
"totalSize": 1
}
}

Label Operations

get_labels

List all labels on a Confluence page.

Input Schema:

{
"type": "object",
"properties": {
"page_id": {
"type": "string",
"description": "Page ID to get labels for"
}
},
"required": ["page_id"]
}

Example Response:

{
"success": true,
"data": {
"labels": [
{
"id": "label-1",
"name": "api",
"prefix": "global"
},
{
"id": "label-2",
"name": "documentation",
"prefix": "global"
}
],
"count": 2
}
}

add_labels

Add labels to a Confluence page.

Input Schema:

{
"type": "object",
"properties": {
"page_id": {
"type": "string",
"description": "Page ID to add labels to"
},
"labels": {
"type": "array",
"description": "List of label names to add",
"items": {
"type": "string"
}
}
},
"required": ["page_id", "labels"]
}

Example Request:

curl -X POST http://localhost:3007/mcp/confluence/execute \
-H "Content-Type: application/json" \
-H "X-JWT-Token: <your-jwt-token>" \
-d '{
"tool": "add_labels",
"arguments": {
"page_id": "123456",
"labels": ["api", "v2", "reference"]
}
}'

User Operations

get_user_by_email

Look up a Confluence user by email address.

Input Schema:

{
"type": "object",
"properties": {
"email": {
"type": "string",
"description": "User email address"
}
},
"required": ["email"]
}

Example Response:

{
"success": true,
"data": {
"accountId": "abc123def456",
"username": "john.doe",
"displayName": "John Doe",
"email": "john.doe@example.com",
"active": true
}
}

get_my_confluence_work

Get all open Confluence work for a user across all accessible spaces.

Input Schema:

{
"type": "object",
"properties": {
"user_identifier": {
"type": "string",
"description": "Email or account_id (defaults to authenticated user)"
}
},
"required": []
}

Example Response:

{
"success": true,
"data": {
"user": {
"email": "john.doe@example.com",
"accountId": "abc123"
},
"summary": {
"total_created": 5,
"total_modified": 12,
"total_drafts": 2,
"spaces_count": 3
},
"work_by_space": {
"DOCS": {
"space_name": "Documentation",
"created_pages": [
{
"id": "123456",
"title": "New API Guide",
"created": "2024-01-20T10:00:00.000Z"
}
],
"modified_pages": [
{
"id": "123400",
"title": "Getting Started",
"lastModified": "2024-01-22T15:30:00.000Z"
}
],
"draft_pages": []
}
}
}
}