Atlassian MCP Server

Atlassian MCP Server

Enables AI assistants to search and retrieve data from Jira and Confluence directly within MCP-compatible IDEs. It provides tools for managing Jira tickets and Confluence pages using OAuth 2.0 authentication and Hexagonal Architecture.

Category
访问服务器

README

Atlassian MCP Server

Search Jira and Confluence directly from your IDE — no browser needed.

Status: 416 tests passing | Hexagonal Architecture (DDD) | Jira v3 + Confluence v2


What Does This Do?

Talk to your AI assistant and get Atlassian data:

You: "What tickets are assigned to me?"
AI:  Shows your Jira tickets

You: "Find our deployment documentation"
AI:  Shows Confluence pages about deployment

Works with Cursor, Claude Code, or any MCP-compatible client.


Quick Start

1. Get Atlassian OAuth Credentials

  1. Go to https://developer.atlassian.com/console/myapps/
  2. Click Create > OAuth 2.0 integration
  3. Name it: MCP Server
  4. Callback URL: http://localhost:8084/auth/callback
  5. Add permissions:
    • Jira: read:jira-work, read:jira-user
    • Confluence: read:confluence-content.all, search:confluence, read:confluence-space.summary
  6. Copy your Client ID and Client Secret

2. Configure

cp env.example .env

Edit .env:

ATLASSIAN_SITE=yourcompany.atlassian.net   # no https://
OAUTH_CLIENT_ID=your_client_id
OAUTH_CLIENT_SECRET=your_client_secret

# Generate these:
TOKEN_ENCRYPTION_KEY=$(node -e "console.log(require('crypto').randomBytes(32).toString('hex'))")
REDIS_PASSWORD=$(node -e "console.log(require('crypto').randomBytes(16).toString('hex'))")

3. Start

docker-compose up -d

4. Authenticate

open http://localhost:8084/auth/login

Click "Accept" when Atlassian asks for permission.

5. Connect Your IDE

Cursor — edit ~/.cursor/mcp.json:

{
  "mcpServers": {
    "atlassian": {
      "url": "http://localhost:8084/mcp",
      "type": "http"
    }
  }
}

Claude Code — edit ~/.claude/claude_desktop_config.json:

{
  "mcpServers": {
    "atlassian": {
      "url": "http://localhost:8084/mcp"
    }
  }
}

Restart your IDE after adding the config.

6. Test It

  • "What Jira tickets are assigned to me?"
  • "Find deployment documentation in Confluence"
  • "Show me ticket ENG-123"

Available Tools

Tool Description
search_jira Search Jira with JQL filters
get_jira_ticket Get full ticket details
list_my_tickets List your assigned tickets
search_confluence Search Confluence with CQL
get_confluence_page Get full page content

Architecture

                              MCP Protocol (HTTP)
  IDE / AI Client ──────────── http://localhost:8084/mcp
                                        │
  ┌─────────────────────────────────────┼─────────────────────────────┐
  │  Atlassian MCP Server               │                             │
  │                                     │                             │
  │  ┌──────────────┐   ┌───────────────┼────────────┐                │
  │  │ Domain       │   │ Application   │            │                │
  │  │              │   │               ▼            │                │
  │  │ Models       │◄──│ Use Cases (5)              │                │
  │  │ Services     │   │ Ports (interfaces)         │                │
  │  │ Value Objects│   │ DTOs (Zod validated)       │                │
  │  └──────────────┘   └──────────────┬─────────────┘                │
  │                                    │                              │
  │  ┌─────────────────────────────────┼────────────────────────────┐ │
  │  │ Infrastructure                  │                            │ │
  │  │                                 ▼                            │ │
  │  │ Adapters:  JiraRestAdapter, ConfluenceRestAdapter            │ │
  │  │ Auth:      OAuthAdapter, RedisTokenAdapter                   │ │
  │  │ Cache:     RedisCacheAdapter                                 │ │
  │  │ MCP:       McpToolRouter, toolDefinitions                    │ │
  │  │ Server:    Express routes, middleware                        │ │
  │  └──────┬──────────────┬───────────────────┬────────────────────┘ │
  └─────────┼──────────────┼───────────────────┼──────────────────────┘
            │              │                   │
   ┌────────▼────────┐ ┌──▼────────────┐ ┌────▼──────┐
   │ Jira REST API   │ │ Confluence    │ │ Redis     │
   │ v3 (search/JQL) │ │ v1 (search)   │ │ Cache +   │
   │                 │ │ v2 (pages)    │ │ Tokens    │
   └─────────────────┘ └───────────────┘ └───────────┘

Key design decisions:

  • Hexagonal / DDD — Domain has zero infrastructure imports. Application layer defines port interfaces. Infrastructure implements adapters.
  • Strangler Fig migration — Confluence v1 /content/{id} migrated to v2 /pages/{id}. v1 search (/content/search) stays (not deprecated).
  • ESLint enforced layer boundariesimport-x/no-restricted-paths prevents domain from importing infrastructure.
  • Composition Root — All wiring in compositionRoot.ts. Use cases receive ports via constructor injection.

Project Structure

src/
  domain/           # Models, value objects, domain services (zero deps)
  application/      # Use cases, ports (interfaces), DTOs
  infrastructure/   # Adapters (Atlassian, auth, cache, MCP, logging)
  server/           # Express routes, middleware, MCP setup
  services/         # REST clients, OAuth, token storage, cache
  common/           # Config, logger, shared errors
  compositionRoot.ts
  index.ts
tests/              # Mirrors src/ structure, 416 tests

Development

Run Without Docker

npm install
npm run build
npm run dev       # development mode with auto-reload
npm start         # production build

Tests

npm test                  # Run all 416 tests
npm run test:watch        # Watch mode
npm run test:coverage     # With coverage report

Code Quality

npm run lint              # ESLint with DDD boundary checks
npm run typecheck         # TypeScript strict mode
npm run validate          # All checks (lint + typecheck + test)

Configuration

Required (.env)

ATLASSIAN_SITE=yourcompany.atlassian.net    # no https://
OAUTH_CLIENT_ID=your_client_id
OAUTH_CLIENT_SECRET=your_client_secret
TOKEN_ENCRYPTION_KEY=<64-char hex string>   # node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
REDIS_PASSWORD=<random string>              # node -e "console.log(require('crypto').randomBytes(16).toString('hex'))"

Optional

PORT=8084                 # Server port
LOG_LEVEL=info            # error | warn | info | debug
CACHE_TTL=3600            # Cache TTL in seconds (default: 1 hour)
ENABLE_CACHE=true         # Redis caching

Docker Commands

docker-compose up -d                      # Start all services
docker-compose stop                       # Stop
docker-compose logs -f atlassian-mcp      # View logs
docker-compose build && docker-compose up -d  # Rebuild after code changes

Security

  • OAuth 2.1 tokens encrypted at rest via TOKEN_ENCRYPTION_KEY
  • Automatic token refresh on expiry
  • Redis authenticated with REDIS_PASSWORD (--requirepass)
  • Ports bound to 127.0.0.1 only (localhost)
  • Non-root container user (atlassian:1001)
  • Multi-stage Docker build (no build tools in production image)
  • No curl in production image (healthcheck uses Node.js native fetch)
  • .dockerignore excludes .env, .git, node_modules
  • All Atlassian permissions respected (read-only scopes)
  • Never commit .env to git

Troubleshooting

"Not authenticated" — Visit http://localhost:8084/auth/login and re-authorize.

Tools don't appear in IDE — Fully quit and restart your IDE (not just reload).

Server not starting — Check docker-compose logs -f atlassian-mcp and verify .env is configured.

Health check — Visit http://localhost:8084/health or http://localhost:8084/ready.


API References

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选