- Atlassian Confluence Data Center MCP Server (Go)
Atlassian Confluence Data Center MCP Server (Go)
Atlassian Confluence Data Center MCP Server (Go)
A Model Context Protocol (MCP) server implementation in Go for interacting with Atlassian Confluence Data Center edition. This server enables AI assistants and other MCP clients to read, search, create, and update Confluence content programmatically.
Note: This is a Go rewrite of the original TypeScript implementation. Special thanks to b1ff/atlassian-dc-mcp for the original implementation that inspired this project.
Features
- Search & Retrieve: Search for content using CQL (Confluence Query Language) and retrieve content by ID
- Content Management: Create new pages and blog posts, update existing content
- Space Management: List and search Confluence spaces
- Secure Authentication: Bearer token authentication support
- High Performance: Built with Go for speed and efficiency
- Zero Dependencies: Minimal external dependencies, uses standard library where possible
Tools
The server provides the following MCP tools:
confluence_get_content
Get Confluence content by ID from the Confluence Data Center edition instance.
Arguments:
contentId(string, required): Confluence Data Center content IDexpand(string, optional): Comma-separated list of properties to expand
confluence_search_content
Search for content in Confluence Data Center edition instance using CQL.
Arguments:
cql(string, required): Confluence Query Language (CQL) search string for Confluence Data Centerlimit(number, optional): Maximum number of results to return (default: 25)start(number, optional): The starting index of the results to returnexpand(string, optional): Comma-separated list of properties to expand
confluence_create_content
Create new content in Confluence Data Center edition instance.
Arguments:
title(string, required): The title of the new contentspaceKey(string, required): The key of the space where content will be createdcontent(string, required): The content of the page in Confluence storage formattype(string, optional): The type of content (page or blogpost)parentId(string, optional): The ID of the parent content
confluence_update_content
Update existing content in Confluence Data Center edition instance.
Arguments:
contentId(string, required): The ID of the content to updateversion(number, optional): The new version number (defaults to current version + 1)title(string, optional): New title for the contentcontent(string, optional): New content in storage formatversionComment(string, optional): A comment for the new version
confluence_list_spaces
List and search for spaces in Confluence Data Center edition instance.
Arguments:
searchText(string, optional): Text to search for in space names or descriptions (returns all spaces if omitted)limit(number, optional): Maximum number of spaces to returnstart(number, optional): The starting index of the results to returnexpand(string, optional): Comma-separated list of properties to expand
Installation
Prerequisites
- Go 1.25.5 or higher
- Access to a Confluence Data Center instance
- Confluence API token
Download Binaries
Download the latest pre-built binaries for your system from the Releases page.
From Source
# Clone the repository
git clone https://github.com/anudeepd/atlassian-confluence-dc-go-mcp.git
cd atlassian-confluence-dc-go-mcp
# Build the binary
go build .
# Or build for a specific platform (e.g., linux-amd64, windows-amd64, macos-arm64)
./build.sh linux-amd64
# Or install directly to your GOPATH
go install
Using Go Install
go install github.com/anudeepd/atlassian-confluence-dc-go-mcp@latest
Configuration
The server requires the following environment variables:
Required Variables
CONFLUENCE_API_TOKEN: Your Confluence API token (Bearer token)CONFLUENCE_BASE_URL: The base URL of your Confluence instance (e.g.,https://confluence.example.com)
Alternative URL Variables
You can also use one of these instead of CONFLUENCE_BASE_URL:
CONFLUENCE_API_BASE_PATH: Full API pathCONFLUENCE_HOST: Just the hostname (will be prefixed withhttps://)
The server will automatically append /rest/api to the base URL if not present.
Example Configuration
export CONFLUENCE_API_TOKEN="your-api-token-here"
export CONFLUENCE_BASE_URL="https://confluence.example.com"
Usage
Using with Claude Desktop / Claude Code
Add the following to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"confluence": {
"command": "/path/to/atlassian-confluence-dc-go-mcp",
"env": {
"CONFLUENCE_API_TOKEN": "your-api-token",
"CONFLUENCE_BASE_URL": "https://confluence.example.com"
}
}
}
}
Using with Other MCP Clients
The server communicates via stdio using the MCP protocol. Any MCP-compatible client can connect to it by spawning the process and communicating over stdin/stdout.
Development
Running Tests
# Run all tests
go test -v
# Run tests with coverage
go test -v -cover
# Generate coverage report
go test -coverprofile=coverage.out
go tool cover -html=coverage.out
Building
# Build for current platform
go build .
# Build for multiple platforms
./build.sh
The build.sh script creates binaries for:
- Linux (amd64, arm64)
- macOS (amd64, arm64)
- Windows (amd64, arm64)
Project Structure
.
├── main.go # Main server implementation
├── main_test.go # Comprehensive test suite
├── go.mod # Go module dependencies
├── go.sum # Dependency checksums
├── build.sh # Multi-platform build script
└── README.md # This file
API Reference
Confluence REST API
This server uses the Confluence Data Center REST API v1. For more information about the API endpoints and CQL syntax, see:
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Original TypeScript implementation: b1ff/atlassian-dc-mcp
- MCP Go SDK: mark3labs/mcp-go
- Model Context Protocol: Anthropic MCP
Support
For issues, questions, or contributions, please open an issue on GitHub.
Changelog
v1.0.0 (Initial Release)
- Complete Go rewrite of the TypeScript implementation
- Support for all core Confluence operations
- Multi-platform build support
- MCP protocol compliance
Server Config
{
"mcpServers": {
"confluence": {
"command": "/path/to/atlassian-confluence-dc-go-mcp",
"env": {
"CONFLUENCE_API_TOKEN": "your-api-token",
"CONFLUENCE_BASE_URL": "https://confluence.example.com"
}
}
}
}