MCP Atlassian

repository·main·Indexed 26 days ago

https://github.com/sooperset/mcp-atlassian

An open-source Model Context Protocol (MCP) server that bridges Atlassian products, specifically Jira and Confluence, with AI language models. It supports Cloud and Server/Data Center deployments, providing 98 tools for searching, creating, and updating issues and pages. The integration supports multiple transport protocols (stdio, sse, streamable-http) and authentication modes, including API tokens, OAuth, and external proxies. It can be deployed via Helm, Docker, Docker Compose, or configured for use in Claude Desktop and Cursor.

Tokens
39K
Snippets
122
Records
223
Agent score
90%

What's inside mcp-atlassian

  1. Overview of MCP Atlassian

    main
    MCP Atlassian is a Model Context Protocol (MCP) server that connects AI assistants to Atlassian products, specifically Jira and Confluence. It allows AI agents to search, create, and update issues and pages. The server supports both Atlassian Cloud and Server/Data Center deployments.
  2. Install the MCP Atlassian Helm Chart (Cloud with API Tokens)

    main

    To deploy the MCP Atlassian server to Kubernetes using Atlassian Cloud API tokens, create a values.yaml file containing your Confluence and Jira credentials, then install the chart using Helm.

    # Create values file
    cat > my-values.yaml <<YAML
    confluence:
      url: "https://your-company.atlassian.net/wiki"
      username: "your.email@company.com"
      apiToken: "your_confluence_api_token"
    
    jira:
      url: "https://your-company.atlassian.net"
      username: "your.email@company.com"
      apiToken: "your_jira_api_token"
    YAML
    
    # Install the chart
    helm install mcp-atlassian ./mcp-atlassian -f my-values.yaml
  3. Configure Server/Data Center with mTLS

    main

    For Atlassian Server or Data Center instances requiring mTLS, use Personal Access Tokens (PAT) and client certificates.

    Important: Encrypted private keys are not supported. You must decrypt your private key before use. Use the following command to decrypt:

    openssl rsa -in encrypted.key -out decrypted.key

    For mTLS, you can provide a combined PEM file to *_CLIENT_CERT, or provide separate files using *_CLIENT_CERT and *_CLIENT_KEY.

    {
      "mcpServers": {
        "mcp-atlassian": {
          "command": "uvx",
          "args": ["mcp-atlassian"],
          "env": {
            "JIRA_URL": "https://jira.your-company.com",
            "JIRA_CLIENT_CERT": "/etc/mcp-atlassian/jira-client-cert.pem",
            "JIRA_CLIENT_KEY": "/etc/mcp-atlassian/jira-client-key.pem",
            "CONFLUENCE_URL": "https://confluence.your-company.com/wiki",
            "CONFLUENCE_CLIENT_CERT": "/etc/mcp-atlassian/confluence-client-combined.pem"
          }
        }
      }
    }
  4. Enable Multi-Cloud Support

    main

    For multi-tenant applications where each user connects to their own Atlassian cloud instance, enable minimal OAuth mode and have users provide authentication via HTTP headers.

    ```bash
    # 1. Enable minimal OAuth mode
    # Using uvx
    ATLASSIAN_OAUTH_ENABLE=true uvx mcp-atlassian --transport streamable-http --port 9000
    
    # Or using Docker
    docker run -e ATLASSIAN_OAUTH_ENABLE=true -p 9000:9000 \
      ghcr.io/sooperset/mcp-atlassian:latest \
      --transport streamable-http --port 9000

    User Authentication Headers:

    • Authorization: Bearer <user_oauth_token>
    • X-Atlassian-Cloud-Id: <user_cloud_id>
  5. Set up Streamable-HTTP Transport

    main

    To run the server using streamable-http transport, use the following commands and configure your IDE with the /mcp endpoint.

    # Using uvx
    uvx mcp-atlassian --transport streamable-http --port 9000 -vv
    
    # Or using Docker
    docker run --rm -p 9000:9000 \
      --env-file /path/to/your/.env \
      ghcr.io/sooperset/mcp-atlassian:latest \
      --transport streamable-http --port 9000 -vv

    IDE Configuration:

    {
      "mcpServers": {
        "mcp-atlassian-service": {
          "url": "http://localhost:9000/mcp"
        }
      }
    }
  6. Install MCP Atlassian using uvx (Recommended)

    main

    The recommended way to run MCP Atlassian without a permanent installation is using uvx. This downloads the tool on first use and caches it for subsequent runs.

    To run the help command directly:

    uvx mcp-atlassian --help

    To run with a specific Python version:

    uvx --python=3.12 mcp-atlassian --help
    uvx mcp-atlassian --help
  7. Use siteSearch for simple text or relevance-ranked queries

    main

    If you don't want to write CQL, you can use confluence_search in two ways:

    1. Simple Text Search: Pass plain text (e.g., project documentation architecture). confluence_search will automatically use siteSearch to mimic the Confluence web UI search.
    2. Relevance-Ranked Search: Explicitly use siteSearch with the ~ operator for relevance-ranked results (e.g., siteSearch ~ "important concept").
  8. Test Configuration with MCP Inspector

    main

    You can test your mcp-atlassian configuration interactively using the MCP Inspector.

    Using uvx:

    npx @modelcontextprotocol/inspector uvx mcp-atlassian

    Using a local development version:

    npx @modelcontextprotocol/inspector uv --directory /path/to/mcp-atlassian run mcp-atlassian
  9. Configure IDE Integration for MCP Atlassian

    main

    To use MCP Atlassian with an IDE, you must add it to the IDE's MCP configuration.

    Claude Desktop Configuration Locations:

    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Linux: ~/.config/Claude/claude_desktop_config.json

    Cursor: Navigate to SettingsMCP+ Add new global MCP server.

  10. Best Practices for JQL Queries

    main

    When writing JQL for jira_search:

    • Deterministic Results: Always include ORDER BY in your queries to ensure predictable results.
    • Relative Dates: Use relative date strings like "-7d", "-1w", or "-1M" instead of absolute dates to make queries reusable.
    • Function Compatibility: Be aware that some functions (e.g., issueHistory()) may be Cloud-only. Verify support with your specific Jira version.
  11. Create Confluence Documentation Structure

    main

    Organize Confluence content using a hierarchy:

    1. Create a parent page: Use confluence_create_page with a space_key, title, and content.
    2. Create child pages: Use confluence_create_page and provide the parent_id of the parent page.
    3. Organize with labels: Use confluence_add_label to attach metadata to a page via its page_id.