A proof-of-concept project demonstrating integration between Confluence and MCP (Model Context Protocol) compatible AI agents. This project provides a Docker-based setup with a Confluence instance and an MCP adapter service for AI-driven document discovery and interaction.
- Confluence Server: Full Atlassian Confluence instance with PostgreSQL backend
- MCP Adapter: REST API adapter for MCP-compatible AI agents
- Data Seeding: Automated population of sample spaces, pages, comments, and attachments
- Docker Compose: Complete containerized environment for easy setup
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ AI Agent │ │ MCP Adapter │ │ Confluence │
│ │◄──►│ │◄──►│ │
│ │ │ (Port 4000) │ │ (Port 8090) │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ │
│ ▼
│ ┌─────────────────┐
│ │ PostgreSQL │
│ │ │
│ └─────────────────┘
▼
┌─────────────────┐
│ Seed Script │
│ │
└─────────────────┘
- Docker and Docker Compose
- At least 4GB RAM available for containers
- Ports 4000, 8090, and 8091 available on your system
git clone <repository-url>
cd confluence-mcp-testCopy the example environment file and update with your credentials:
cp .env.example .envEdit .env file:
CONFLUENCE_BASE_URL=http://localhost:8090
CONFLUENCE_USER=admin
CONFLUENCE_PASS=your_secure_passworddocker-compose up -dThis will start:
- PostgreSQL database
- Confluence Server
- MCP Adapter service
- Wait for Confluence to start (this may take 5-10 minutes)
- Visit
http://localhost:8090 - Complete the Confluence setup wizard:
- Choose "Production Installation"
- Select "My own database" and configure PostgreSQL:
- Database type: PostgreSQL
- Hostname:
confluence-db - Port:
5432 - Database name:
confluence - Username:
confluence - Password:
confluence
- Create an admin user with the credentials from your
.envfile - Complete the setup
Once Confluence is fully configured, seed it with sample data:
docker exec -it mcp-adapter node seed.jsThe MCP Adapter provides the following REST endpoints:
GET http://localhost:4000/spacesGET http://localhost:4000/pagesGET http://localhost:4000/search?q=your_search_termconfluence-mcp-test/
├── docker-compose.yml # Docker services configuration
├── .env.example # Environment variables template
├── .gitignore # Git ignore rules
├── README.md # This file
└── mcp-adapter/ # MCP Adapter service
├── Dockerfile # Docker build instructions
├── package.json # Node.js dependencies
├── index.js # Main MCP adapter server
└── seed.js # Data seeding script
The seed script creates:
- AI Research and Projects space
- Sample pages:
- MCP Protocol Overview
- Project Atlas
- Integration Guide
- Comments on each page
- Text file attachments
- Confluence requires significant resources. Ensure Docker has at least 4GB RAM allocated
- Initial startup can take 10-15 minutes
- Verify credentials in
.envfile match your Confluence admin user - Ensure Confluence setup is complete before running seed script
- If ports 4000, 8090, or 8091 are in use, update the port mappings in
docker-compose.yml
- Ensure PostgreSQL container is running:
docker-compose ps - Check logs:
docker-compose logs confluence-db
To stop and remove all containers:
docker-compose downTo also remove volumes (
docker-compose down -vThis is a proof-of-concept project. Feel free to fork and modify for your needs.
This project is for demonstration purposes. Please check Atlassian's licensing terms for Confluence usage.
- This setup uses default credentials and is intended for development/testing only
- For production use, implement proper security measures:
- Strong passwords
- HTTPS/TLS encryption
- Network security
- Regular updates