Skip to content

feat(atlassian): add Jira and Confluence integration - #3

Merged
cloudbridgeuy merged 6 commits into
mainfrom
feat/jira-command
Oct 18, 2025
Merged

cloudbridgeuy merged 6 commits into
mainfrom
feat/jira-command

Conversation

@cloudbridgeuy

Copy link
Copy Markdown
Owner

Summary

This pull request adds comprehensive Atlassian integration to mcptools, enabling seamless interaction with Jira and Confluence through both CLI and MCP interfaces.

Features Added

Jira Integration:

  • Search and list Jira issues using JQL (Jira Query Language)
  • View issue details: key, summary, description, status, and assignee
  • Configurable result limits
  • JSON and human-readable table output

Confluence Integration:

  • Search Confluence pages using CQL (Confluence Query Language)
  • View page details: title, type, URL, and converted plain-text content
  • Automatic HTML-to-plain-text conversion
  • JSON and human-readable table output

Authentication:

  • API Token-based authentication (Basic Auth)
  • Environment variable configuration (ATLASSIAN_BASE_URL, ATLASSIAN_EMAIL, ATLASSIAN_API_TOKEN)
  • Support for CLI argument overrides

MCP Tools:

  • jira_list - Search Jira issues programmatically
  • confluence_search - Search Confluence pages programmatically
  • Properly formatted JSON responses for LLM consumption

Implementation Details

New Files:

  • crates/mcptools/src/atlassian/mod.rs - Core module with authentication
  • crates/mcptools/src/atlassian/jira.rs - Jira operations
  • crates/mcptools/src/atlassian/confluence.rs - Confluence operations
  • crates/mcptools/src/mcp/tools/atlassian.rs - MCP tool handlers
  • ATLASSIAN_SETUP.md - Comprehensive setup and configuration guide
  • ATLASSIAN_QUICK_START.md - Quick reference guide with examples

Modified Files:

  • crates/mcptools/src/main.rs - Added Atlassian module integration
  • crates/mcptools/src/mcp/tools/mod.rs - Registered MCP tools
  • CLAUDE.md - Updated project documentation
  • Cargo.toml - Added dependencies (base64, html-escape)

Dependencies Added:

  • base64 v0.21.7 - For Basic Authentication encoding
  • html-escape v0.2.13 - For HTML entity decoding

Commits

This PR includes 6 semantic commits:

  1. feat(atlassian): Core Jira and Confluence module with API integration
  2. feat(mcp): MCP tool handlers for Jira and Confluence
  3. feat(cli): Integration into main application and environment setup
  4. build: Dependencies for base64 and html-escape
  5. docs(atlassian): Comprehensive setup and quick start guides
  6. docs(claude): Update project documentation

Usage Examples

Search Jira Issues:

mcptools atlassian jira list "project = PROJ AND status = Open"
mcptools atlassian jira list "assignee = currentUser()" --limit 20
mcptools atlassian jira list "text ~ 'database'" --json

Search Confluence Pages:

mcptools atlassian confluence search "text ~ 'deployment'"
mcptools atlassian confluence search "space = WIKI" --limit 10
mcptools atlassian confluence search "text ~ 'api'" --json

Test Plan

  • Build succeeds with no errors or warnings
  • CLI help commands display correctly
  • Jira list command accepts JQL queries
  • Confluence search command accepts CQL queries
  • Environment variable configuration is recognized
  • JSON output formatting works as expected
  • MCP tool registration and routing works
  • Pre-commit hooks pass (rustfmt, cargo check, clippy)

Documentation

  • Detailed setup guide: ATLASSIAN_SETUP.md
  • Quick reference: ATLASSIAN_QUICK_START.md
  • Project documentation: Updated CLAUDE.md

Security Considerations

  • API tokens are loaded from environment variables (not hardcoded)
  • Basic Auth credentials are properly formatted
  • Follows security best practices for credential handling
  • Documentation includes security recommendations

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

guzmonne and others added 6 commits October 18, 2025 08:30
- Add atlassian module with support for Jira and Confluence APIs
- Implement Jira issue list command using JQL queries
- Implement Confluence page search command using CQL queries
- Support API Token authentication via environment variables
- Add Basic Auth HTTP client for Atlassian API requests
- Parse and convert HTML content to plain text for Confluence

The module provides:
- atlassian/mod.rs: Core authentication and HTTP client setup
- atlassian/jira/mod.rs: Jira operations (list/search issues)
- atlassian/confluence/mod.rs: Confluence operations (search pages)

Both CLI and MCP interfaces are supported with reusable data functions.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
- Add jira_list MCP tool for searching Jira issues via JQL
- Add confluence_search MCP tool for searching Confluence pages via CQL
- Implement proper MCP request/response handling
- Parse tool arguments and handle errors gracefully
- Return formatted JSON output for LLM consumption

Exposes Jira and Confluence functionality through the Model Context Protocol,
enabling Claude and other LLM agents to integrate with Atlassian systems.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
- Add atlassian module declaration and SubCommand variant
- Add Atlassian environment variables to Global config
  - ATLASSIAN_BASE_URL: Base URL for Atlassian instance
  - ATLASSIAN_EMAIL: User email for API authentication
  - ATLASSIAN_API_TOKEN: API token for authentication
- Register jira_list and confluence_search MCP tools
- Update tools list with Atlassian tool definitions and schemas
- Route tool calls to appropriate handlers

Enables full CLI and MCP integration of Atlassian functionality.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
Add to workspace and crate dependencies:
- base64 (v0.21.7): For Basic Authentication encoding
- html-escape (v0.2.13): For HTML entity decoding in Confluence content

These dependencies enable API authentication and content parsing required
by the Atlassian module for Jira and Confluence integration.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
Add two documentation files:

1. ATLASSIAN_SETUP.md:
   - Step-by-step guide for API token generation
   - 4 methods to configure environment variables
   - Verification and testing procedures
   - Usage examples for Jira and Confluence
   - Troubleshooting section with common errors
   - Security best practices
   - Links to official Atlassian documentation

2. ATLASSIAN_QUICK_START.md:
   - 5-minute setup checklist
   - 15+ common command examples
   - Query language reference (JQL and CQL)
   - jq filtering examples
   - Error troubleshooting table
   - Tips and tricks for power users

Provides users with both detailed and quick reference documentation for
configuring and using the Atlassian module with Jira and Confluence.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
Update CLAUDE.md with:
- Include Atlassian tools in project overview
- Document Atlassian module structure and files
- Add Atlassian configuration section with env vars
- Reference ATLASSIAN_SETUP.md for detailed instructions
- Update Code Architecture section with new module details

Ensures developers are aware of Atlassian functionality and know where
to find setup and configuration information.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
@cloudbridgeuy
cloudbridgeuy merged commit cba0472 into main Oct 18, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants