- Confluence MCP Server v2.0 - Selective Editing
Confluence MCP Server v2.0 - Selective Editing
Confluence MCP Server v2.0 - Selective Editing
Confluence MCP Server v2.0 introduces selective editing capabilities for AI assistants.
A MCP (Model Context Protocol) server that enables AI assistants to interact with Confluence. Beyond basic page management, v2.0 introduces targeted editing that allows AI to make specific modifications while preserving existing content, formatting, and macros.
✨ What's New in v2.0
🎯 Targeted Editing Capabilities
v2.0 enables selective modifications instead of full page replacement:
- Section Updates: Modify specific sections under headings without touching other content
- Pattern Replacement: Find and replace text while preserving XML structure and macros
- Table Cell Editing: Update individual table cells without affecting table structure
- Structure Preservation: Maintains all formatting, layouts, macros, and custom elements
🧠 XML-Aware Operations
- Confluence Storage Format Support: Understands and preserves Confluence's XML structure
- Macro Safety: Avoids breaking macros, layouts, or custom elements during edits
- Content Analysis: Identifies safe editing locations and content boundaries
- Rollback Capability: Automatic backup creation for safe editing operations
🛠️ 14 Tools Available
Standard Tools (10): Complete page, space, attachment, and comment management 🆕 Selective Editing Tools (4): Targeted editing capabilities
🚀 Selective Editing Tools
1. update_page_section - Section Replacement
Updates specific sections under headings without affecting surrounding content.
Example: Update project status without touching meeting notes
AI: "Update the 'Project Status' section to show completed milestones"
✅ Updates only that section, preserves all other content
Features:
- Heading detection (H1-H6) with hierarchy support
- Flexible matching: case-sensitive, exact match, or fuzzy search
- Nested heading support for complex document structures
- Preserves all macros, layouts, and formatting outside target section
2. replace_text_pattern - Find & Replace with Structure Preservation
Replaces text patterns throughout pages while preserving document structure.
Example: Update product version across documentation
AI: "Replace all instances of 'v1.2.3' with 'v2.0.0' in the API docs"
✅ Updates version numbers while preserving links, macros, and formatting
Features:
- Content detection distinguishes text from XML markup
- Case sensitivity and whole-word matching options
- Replacement limits for controlled changes
- Preserves macros, links, and formatting elements
3. update_table_cell - Table Cell Editing
Updates specific table cells while maintaining table structure and formatting.
Example: Update project metrics in status tables
AI: "Update the completion percentage in row 2, column 3 to 95%"
✅ Changes only that cell, preserves table formatting and other data
Features:
- Zero-based indexing for precise cell targeting
- Rich HTML content support within cells
- Table structure preservation (borders, styling, headers)
- Targeted modification - only specified cell is changed
4. add_section_at_end - Section Addition
Adds new content sections at the end of pages while preserving existing structure.
Example: Append new meeting notes without affecting existing content
AI: "Add a new section called 'Action Items' with today's tasks at the end"
✅ Adds new section, preserves all existing content and formatting
Features:
- Automatic heading level detection and assignment
- Document structure preservation during insertion
- Safe positioning at document end without content disruption
- Maintains all macros, layouts, and formatting in existing content
🌐 Universal Deployment Platform
🚀 Deployment Options
| Platform | Transport | Status | Tools Available |
|---|---|---|---|
| Claude Desktop | stdio | ✅ All 14 Tools | Local development, personal use |
| Smithery.ai | HTTP | ✅ All 14 Tools | Cloud deployment, team sharing |
| Docker | HTTP/stdio | ✅ All 14 Tools | Containerized deployment |
| Web Clients | HTTP | ✅ All 14 Tools | Browser-based AI tools |
| Cloud Platforms | HTTP | ✅ All 14 Tools | Railway, Heroku, AWS, etc. |
🛠️ Complete Tool Suite
📄 Standard Confluence Tools (10)
| Tool | Description | Example Usage |
|---|---|---|
get_confluence_page | Retrieve page content | "Show me the content of page ID 123456" |
create_confluence_page | Create new pages | "Create a meeting notes page in the PROJ space" |
update_confluence_page | Modify entire pages | "Replace all content in page 123456" |
delete_confluence_page | Remove pages | "Delete the outdated page 123456" |
search_confluence_pages | Search with CQL | "Find all pages in PROJ space modified this week" |
get_confluence_spaces | List available spaces | "What spaces do I have access to?" |
get_page_attachments | View page attachments | "Show attachments on page 123456" |
add_page_attachment | Upload files | "Upload this document to page 123456" |
delete_page_attachment | Remove files | "Delete the old attachment from page 123456" |
get_page_comments | Read page comments | "Show me comments on page 123456" |
🎯 Selective Editing Tools (4)
| Tool | Description | Key Capability |
|---|---|---|
update_page_section | Section replacement | Updates specific headings without touching other sections |
replace_text_pattern | Pattern replacement with structure preservation | Replaces text while preserving macros and formatting |
update_table_cell | Table cell editing | Modifies individual cells without affecting table structure |
add_section_at_end | Section addition | Adds new sections at the end of pages while preserving structure |
🚀 Quick Start
📚 New to Selective Editing?
👉 Complete Step-by-Step Tutorial - Learn selective editing with hands-on examples!
Option 1: Claude Desktop (stdio transport)
-
Install Dependencies:
pip install -r requirements.txt -
Configure Claude Desktop:
{ "mcpServers": { "confluence": { "command": "python", "args": ["-m", "confluence_mcp_server.main"], "env": { "CONFLUENCE_URL": "https://your-org.atlassian.net", "CONFLUENCE_USERNAME": "your-email@domain.com", "CONFLUENCE_API_TOKEN": "your-api-token" } } } } -
Restart Claude Desktop and look for the 🔨 hammer icon showing 14 tools
Option 2: HTTP Server
-
Install Dependencies:
pip install -r requirements.txt -
Set Environment Variables:
export CONFLUENCE_URL="https://your-org.atlassian.net" export CONFLUENCE_USERNAME="your-email@domain.com" export CONFLUENCE_API_TOKEN="your-api-token" -
Start HTTP Server:
python -m confluence_mcp_server.server_http_optimized -
Test the Server:
curl http://localhost:8000/mcp # Returns: 14 tools including selective editing capabilities
Option 3: Docker Deployment
-
Build Container:
docker build -f Dockerfile.smithery -t confluence-mcp-server-v2 . -
Run Container:
docker run -p 8000:8000 \ -e CONFLUENCE_URL="https://your-org.atlassian.net" \ -e CONFLUENCE_USERNAME="your-email@domain.com" \ -e CONFLUENCE_API_TOKEN="your-api-token" \ confluence-mcp-server-v2
Option 4: Smithery.ai Deployment
- Upload Files: Upload
smithery.yamland server code to Smithery.ai - Configure Credentials: Set Confluence URL, username, and API token
- Deploy: Smithery.ai automatically provides all 14 tools including selective editing
💬 AI Assistant Workflows
🎯 Selective Editing Examples
📚 Need Step-by-Step Guidance? 👉 Complete Selective Editing Tutorial - Hands-on guide with examples, workflows, and troubleshooting
Update Project Status Without Disrupting Meeting Notes:
You: Update the project status section to show we completed the API development milestone
AI: I'll update just the project status section while preserving all your meeting notes...
[Uses update_page_section tool]
✅ Updated "Project Status" section only - meeting notes, action items, and formatting preserved
Fix Typos Across Documentation:
You: Fix the typo "recieve" to "receive" throughout our API documentation pages
AI: I'll find and fix that typo while preserving all links and formatting...
[Uses replace_text_pattern tool]
✅ Fixed 12 instances across 5 pages - all macros, links, and formatting preserved
Update Metrics in Status Dashboard: