Atlassian MCP Setup
This guide provides step-by-step instructions for configuring the Atlassian MCP (Model Context Protocol) server to enable Claude to interact with Jira and Confluence.
Table of Contents
Section titled “Table of Contents”- Prerequisites
- Getting API Tokens
- Environment Setup
- MCP Configuration
- Verification
- Troubleshooting
- Security Considerations
Prerequisites
Section titled “Prerequisites”Before setting up the Atlassian MCP server, ensure you have:
-
Docker installed and running
- Verify with:
docker --version - Docker must be able to pull images from
ghcr.io
- Verify with:
-
Atlassian account access
- For Cloud: Account with access to your organization’s Jira and Confluence
- For Server/Data Center: Administrative access to generate personal access tokens
-
Claude Code CLI installed
- The MCP server integrates with Claude Code for AI-assisted workflows
Getting API Tokens
Section titled “Getting API Tokens”Atlassian Cloud (Recommended)
Section titled “Atlassian Cloud (Recommended)”API tokens are the standard authentication method for Atlassian Cloud products.
Step 1: Navigate to API Token Management
- Go to https://id.atlassian.com/manage-profile/security/api-tokens
- Sign in with your Atlassian account
Step 2: Create a New API Token
- Click Create API token
- Enter a descriptive label (e.g., “Claude MCP Integration”)
- Click Create
- Copy the token immediately - it will not be shown again
Step 3: Note Your Credentials
You will need:
- Email address: The email associated with your Atlassian account
- API token: The token you just created
- Instance URL: Your Atlassian Cloud URL (e.g.,
https://yourcompany.atlassian.net)
Important: The same API token works for both Jira and Confluence if they are on the same Atlassian Cloud instance.
Atlassian Server / Data Center
Section titled “Atlassian Server / Data Center”For self-hosted Atlassian products, use Personal Access Tokens (PATs).
Jira Server/Data Center:
- Navigate to your Jira instance
- Click your profile icon > Profile
- Go to Personal Access Tokens
- Click Create token
- Set token name and expiry
- Copy the generated token
Confluence Server/Data Center:
- Navigate to your Confluence instance
- Click your profile icon > Settings
- Go to Personal Access Tokens
- Click Create token
- Set token name and expiry
- Copy the generated token
Environment Setup
Section titled “Environment Setup”Step 1: Create Environment File
Section titled “Step 1: Create Environment File”Create a .env.local file in your project root (or the directory where you will run Claude Code):
touch .env.localStep 2: Configure Environment Variables
Section titled “Step 2: Configure Environment Variables”Add the following variables to .env.local based on your setup:
For Atlassian Cloud:
# Confluence Cloud ConfigurationCONFLUENCE_URL=https://yourcompany.atlassian.net/wikiCONFLUENCE_USERNAME=your.email@company.comCONFLUENCE_API_TOKEN=your-api-token-here
# Jira Cloud ConfigurationJIRA_URL=https://yourcompany.atlassian.netJIRA_USERNAME=your.email@company.comJIRA_API_TOKEN=your-api-token-here
# Optional: Limit to specific spaces/projects# CONFLUENCE_SPACES_FILTER=DOCS,WIKI,ENG# JIRA_PROJECTS_FILTER=PROJ,DEV,OPS
# Optional: Enable read-only mode (disables all write operations)# READ_ONLY_MODE=trueFor Atlassian Server/Data Center:
# Confluence Server ConfigurationCONFLUENCE_URL=https://confluence.yourcompany.comCONFLUENCE_PERSONAL_TOKEN=your-personal-access-tokenCONFLUENCE_SSL_VERIFY=true # Set to "false" for self-signed certificates
# Jira Server ConfigurationJIRA_URL=https://jira.yourcompany.comJIRA_PERSONAL_TOKEN=your-personal-access-tokenJIRA_SSL_VERIFY=true # Set to "false" for self-signed certificates
# Optional: Limit to specific spaces/projects# CONFLUENCE_SPACES_FILTER=DOCS,WIKI# JIRA_PROJECTS_FILTER=PROJ,DEV
# Optional: Enable read-only mode# READ_ONLY_MODE=trueStep 3: Verify .gitignore
Section titled “Step 3: Verify .gitignore”Ensure .env.local is in your .gitignore to prevent accidental credential exposure:
# Check if .env.local is ignoredgrep -q "\.env\.local" .gitignore || echo ".env.local" >> .gitignoreMCP Configuration
Section titled “MCP Configuration”Step 1: Create MCP Configuration File
Section titled “Step 1: Create MCP Configuration File”Create or update .mcp.json in your project root:
{ "mcpServers": { "atlassian": { "command": "docker", "args": [ "run", "-i", "--rm", "--env-file", ".env.local", "ghcr.io/sooperset/mcp-atlassian:latest" ] } }}Step 2: Pull the Docker Image
Section titled “Step 2: Pull the Docker Image”Pre-pull the image to ensure it is available:
docker pull ghcr.io/sooperset/mcp-atlassian:latestConfiguration Options
Section titled “Configuration Options”Multiple Environment Files:
If you have separate environment files for different purposes:
{ "mcpServers": { "atlassian": { "command": "docker", "args": [ "run", "-i", "--rm", "--env-file", ".env.atlassian", "ghcr.io/sooperset/mcp-atlassian:latest" ] } }}Combining with Other MCP Servers:
{ "mcpServers": { "atlassian": { "command": "docker", "args": [ "run", "-i", "--rm", "--env-file", ".env.local", "ghcr.io/sooperset/mcp-atlassian:latest" ] }, "filesystem": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/dir"] } }}Verification
Section titled “Verification”Step 1: Test Docker Connectivity
Section titled “Step 1: Test Docker Connectivity”Verify the container can start and read your environment:
docker run --rm --env-file .env.local ghcr.io/sooperset/mcp-atlassian:latest --helpStep 2: Test with Claude Code
Section titled “Step 2: Test with Claude Code”Start Claude Code and verify the MCP server is recognized:
claudeThen ask Claude to list available MCP tools or perform a simple operation:
List the Jira projects I have access to.Or:
Show me the recent pages in Confluence.Step 3: Verify Specific Operations
Section titled “Step 3: Verify Specific Operations”Test Jira connectivity:
What issues are in project [YOUR_PROJECT_KEY]?Test Confluence connectivity:
List pages in the [YOUR_SPACE_KEY] Confluence space.Expected Behavior
Section titled “Expected Behavior”When working correctly:
- Claude can list Jira projects and issues
- Claude can read and create Confluence pages
- Claude can search across both platforms
- Claude reports any permission errors clearly
Troubleshooting
Section titled “Troubleshooting”Common Issues
Section titled “Common Issues”Issue: “Authentication failed” or “401 Unauthorized”
Causes and solutions:
- Invalid API token: Regenerate your API token from Atlassian
- Wrong username: For Cloud, use your email address, not username
- Token expired: Server/DC tokens may expire; create a new one
- Wrong URL format:
- Jira Cloud:
https://yourcompany.atlassian.net - Confluence Cloud:
https://yourcompany.atlassian.net/wiki
- Jira Cloud:
Issue: “Connection refused” or “Cannot reach host”
Causes and solutions:
- Docker networking: Ensure Docker can reach external URLs
- VPN required: Connect to VPN if accessing internal Atlassian Server
- Firewall blocking: Check corporate firewall rules
- Wrong URL: Verify the URL is accessible in your browser
Issue: “SSL certificate verify failed”
For self-signed certificates on Server/Data Center:
CONFLUENCE_SSL_VERIFY=falseJIRA_SSL_VERIFY=falseIssue: “Permission denied” when reading/writing
Causes and solutions:
- Insufficient permissions: Your Atlassian account needs appropriate project/space permissions
- Read-only mode enabled: Check if
READ_ONLY_MODE=trueis set - Space/project restrictions: Verify you have access to the specific space or project
Issue: Docker image not found
# Pull the latest imagedocker pull ghcr.io/sooperset/mcp-atlassian:latest
# Verify it existsdocker images | grep mcp-atlassianIssue: Environment file not found
Ensure the path in .mcp.json is correct:
- Use relative path from where Claude Code runs
- Or use absolute path:
/Users/yourname/project/.env.local
Debug Mode
Section titled “Debug Mode”To see detailed logs, run the container manually:
docker run -it --rm --env-file .env.local ghcr.io/sooperset/mcp-atlassian:latestVerifying Environment Variables
Section titled “Verifying Environment Variables”Check that your environment file is properly formatted:
# List all variables (redacted)grep -E "^[A-Z_]+" .env.local | sed 's/=.*/=***/'Expected output:
CONFLUENCE_URL=***CONFLUENCE_USERNAME=***CONFLUENCE_API_TOKEN=***JIRA_URL=***JIRA_USERNAME=***JIRA_API_TOKEN=***Security Considerations
Section titled “Security Considerations”Credential Protection
Section titled “Credential Protection”- Never commit credentials: Ensure
.env.localis in.gitignore - Use environment-specific files: Keep production and development credentials separate
- Rotate tokens regularly: Set calendar reminders to rotate API tokens
- Use minimal permissions: Only grant the Atlassian account permissions it needs
Read-Only Mode
Section titled “Read-Only Mode”For safer exploration or demo environments:
READ_ONLY_MODE=trueThis prevents any write operations to Jira or Confluence.
Space and Project Filtering
Section titled “Space and Project Filtering”Limit Claude’s access to specific areas:
# Only access these Confluence spacesCONFLUENCE_SPACES_FILTER=DOCS,PUBLIC
# Only access these Jira projectsJIRA_PROJECTS_FILTER=SUPPORT,DOCSAudit Trail
Section titled “Audit Trail”All operations performed through the MCP server are:
- Logged in Atlassian’s audit logs
- Associated with your Atlassian account
- Subject to your organization’s compliance policies
Token Revocation
Section titled “Token Revocation”If you suspect a token has been compromised:
- Go to Atlassian API Token Management
- Click Revoke next to the compromised token
- Create a new token
- Update your
.env.localfile
Environment Variable Reference
Section titled “Environment Variable Reference”Confluence Variables
Section titled “Confluence Variables”| Variable | Required | Description |
|---|---|---|
CONFLUENCE_URL | Yes | Confluence instance URL |
CONFLUENCE_USERNAME | Cloud only | Email address for authentication |
CONFLUENCE_API_TOKEN | Cloud only | API token from Atlassian |
CONFLUENCE_PERSONAL_TOKEN | Server only | Personal access token |
CONFLUENCE_SSL_VERIFY | No | Set to false for self-signed certs |
CONFLUENCE_SPACES_FILTER | No | Comma-separated space keys to limit access |
Jira Variables
Section titled “Jira Variables”| Variable | Required | Description |
|---|---|---|
JIRA_URL | Yes | Jira instance URL |
JIRA_USERNAME | Cloud only | Email address for authentication |
JIRA_API_TOKEN | Cloud only | API token from Atlassian |
JIRA_PERSONAL_TOKEN | Server only | Personal access token |
JIRA_SSL_VERIFY | No | Set to false for self-signed certs |
JIRA_PROJECTS_FILTER | No | Comma-separated project keys to limit access |
Global Variables
Section titled “Global Variables”| Variable | Required | Description |
|---|---|---|
READ_ONLY_MODE | No | Set to true to disable all write operations |
Quick Start Checklist
Section titled “Quick Start Checklist”- Docker installed and running
- API token created at Atlassian
-
.env.localcreated with credentials -
.env.localadded to.gitignore -
.mcp.jsoncreated with Atlassian configuration - Docker image pulled:
docker pull ghcr.io/sooperset/mcp-atlassian:latest - Connection tested with Claude Code
Additional Resources
Section titled “Additional Resources”- Atlassian API Token Documentation
- MCP Atlassian GitHub Repository
- Workflow Commands Reference - Commands that use Atlassian integration