atlassian-mcp

ylchen07/atlassian-mcp

3.2

If you are the rightful owner of atlassian-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

The Atlassian MCP server is a Go implementation of the Model Context Protocol, enabling AI copilots and other MCP-aware clients to automate Atlassian workflows.

Tools
5
Resources
0
Prompts
0

Atlassian MCP Server

A Go implementation of the Model Context Protocol (MCP) that exposes Jira and Confluence operations as tools for AI assistants and automation clients.

Features

  • Jira Tools: Projects, issues, search (JQL) - more tools coming soon
  • Confluence Tools: Spaces, pages, search (CQL), content management
  • Flexible Configuration: YAML files, environment variables, or hybrid approach
  • Smart Caching: Session-based project caching to minimize API calls
  • Dual Authentication: OAuth or Basic Auth (email + API token)
  • Self-Hosted Support: Works with Jira/Confluence Data Center (with context paths)

Quick Start

1. Install Dependencies

git clone https://github.com/ylchen07/atlassian-mcp.git
cd atlassian-mcp
make deps

2. Configure

Option A: Environment Variables (Recommended)

export ATLASSIAN_JIRA_SITE=https://your-domain.atlassian.net
export ATLASSIAN_JIRA_EMAIL=user@example.com
export ATLASSIAN_JIRA_API_TOKEN=your_api_token

export ATLASSIAN_CONFLUENCE_SITE=https://your-domain.atlassian.net
export ATLASSIAN_CONFLUENCE_EMAIL=user@example.com
export ATLASSIAN_CONFLUENCE_API_TOKEN=your_api_token

Option B: Configuration File

cp config.example.yaml config.yaml
# Edit config.yaml with your credentials

See Configuration for all options.

3. Build & Run

Option A: Install to PATH (Recommended)

make install
# Installs to ~/.local/bin/atlassian-mcp

# Run from anywhere
atlassian-mcp

Option B: Build Only

make build
./bin/atlassian-mcp

Option C: Run Directly (Development)

make run

The server communicates over stdio and can be connected to any MCP-compatible client.

Available Tools

Jira

ToolDescription
jira.list_projectsList accessible projects (cached)
jira.search_issuesExecute JQL queries
jira.create_issueCreate new issues
jira.update_issueUpdate issue fields
jira.add_commentAdd comments to issues
jira.list_transitionsGet available workflow transitions
jira.transition_issueMove issues through workflow
jira.add_attachmentUpload file attachments

Confluence

ToolDescription
confluence.list_spacesList accessible spaces
confluence.search_pagesExecute CQL queries
confluence.create_pageCreate new pages
confluence.update_pageUpdate existing pages
confluence.get_pageRetrieve page with full content

Configuration

Configuration Sources

The server loads configuration from multiple sources (in precedence order):

  1. Environment variables - Highest priority, always override other sources
  2. config.yaml - Searched in: --config flag path → current directory → ~/.config/atlassian-mcp/
  3. .netrc file - Automatic credential loading from ~/.netrc or $NETRC path
  4. Defaults - Built-in fallback values (e.g., log_level: info)

Required Settings

Per Service (Jira and Confluence):

  • Site URL: ATLASSIAN_JIRA_SITE / ATLASSIAN_CONFLUENCE_SITE
  • Authentication (choose one):
    • Basic Auth: *_EMAIL + *_API_TOKEN
    • OAuth: *_OAUTH_TOKEN

Example 1: Using .netrc for credentials (recommended for security)

# ~/.netrc (chmod 600)
machine your-domain.atlassian.net
  login user@example.com
  password your_api_token
# config.yaml (only site URLs needed)
atlassian:
  jira:
    site: https://your-domain.atlassian.net
  confluence:
    site: https://your-domain.atlassian.net

Example 2: Using environment variables

export ATLASSIAN_JIRA_SITE=https://your-domain.atlassian.net
export ATLASSIAN_JIRA_EMAIL=user@example.com
export ATLASSIAN_JIRA_API_TOKEN=secret_token
export ATLASSIAN_CONFLUENCE_SITE=https://your-domain.atlassian.net
export ATLASSIAN_CONFLUENCE_EMAIL=user@example.com
export ATLASSIAN_CONFLUENCE_API_TOKEN=secret_token

Environment Variables Reference

VariableDescriptionRequired
ATLASSIAN_JIRA_SITEJira base URLYes
ATLASSIAN_JIRA_EMAILEmail for basic authIf not using OAuth
ATLASSIAN_JIRA_API_TOKENAPI token for basic authIf not using OAuth
ATLASSIAN_JIRA_OAUTH_TOKENOAuth tokenIf not using basic auth
ATLASSIAN_CONFLUENCE_SITEConfluence base URLYes
ATLASSIAN_CONFLUENCE_EMAILEmail for basic authIf not using OAuth
ATLASSIAN_CONFLUENCE_API_TOKENAPI tokenIf not using OAuth
ATLASSIAN_CONFLUENCE_OAUTH_TOKENOAuth tokenIf not using basic auth
SERVER_LOG_LEVELLog level (debug/info/warn/error)No (default: info)

Advanced Options:

  • ATLASSIAN_JIRA_API_BASE - Override REST API base URL
  • ATLASSIAN_CONFLUENCE_API_BASE - Override REST API base URL
  • ATLASSIAN_SITE - Legacy shared hostname fallback
  • NETRC - Custom path to .netrc file (default: ~/.netrc)

Mapping: YAML keys map to uppercase with underscores: atlassian.jira.siteATLASSIAN_JIRA_SITE

Using .netrc for Credentials

The server automatically reads credentials from .netrc file if email/api_token are not provided via config or environment variables.

Format:

machine your-domain.atlassian.net
  login user@example.com
  password your_api_token

Benefits:

  • ✅ Standard Unix credential storage (used by curl, git, etc.)
  • ✅ Keeps secrets out of config files and environment variables
  • ✅ One credential file for multiple tools
  • ✅ Supports multiple machines in one file

Security: Ensure .netrc has proper permissions: chmod 600 ~/.netrc

See for complete schema with inline documentation.

Development

Build Commands

make deps          # Install dependencies
make fmt           # Format code
make lint          # Run linters (requires golangci-lint v1.55+)
make test          # Run unit tests
make test-coverage # Generate test coverage report
make build         # Build binary to bin/atlassian-mcp
make run           # Run server directly
make clean         # Remove build artifacts and cache

Testing

Unit Tests:

make test

Test Coverage:

make test-coverage  # Generates coverage.out and coverage.html

Opens coverage.html in your browser to see detailed line-by-line coverage visualization.

Integration Tests (requires real Atlassian credentials):

MCP_INTEGRATION=1 go test -tags=integration ./integration

Integration tests use the same environment variables as the server and skip when credentials are missing.

Project Structure

cmd/server          → CLI entry point
internal/
  atlassian/       → Shared HTTP client for Atlassian APIs
  config/          → Viper-based configuration
  jira/            → Jira client & service layer
  confluence/      → Confluence client & service layer
  mcp/             → MCP server & tool registration
  state/           → Thread-safe session cache
pkg/logging/       → Structured logging (slog)

See for detailed design documentation.

Prerequisites

CI/CD

GitHub Actions runs linting and testing on every push and pull request. See .

Documentation

  • - Design patterns and layered architecture
  • - Development guide and project overview
  • - Session cache documentation

External References

License

MIT