Integrating Jira & Confluence with MCP Servers Explained in 5 Minutes
Welcome to this article. Here, we'll explore the Model Context Protocol (MCP) and demonstrate how you can integrate Atlassian's MCP server to manage tools like Jira and Confluence using simple prompts to execute actions on the cloud. Let's dive in.
What is the Model Context Protocol (MCP)?
MCP, or Model Context Protocol, offers a unified method for providing context to Large Language Models (LLMs). Imagine a setup with multiple, distinct MCP servers for various services like your calendar, email, Slack, and local data storage. These servers connect to an MCP client, which, with the help of an MCP host, executes specific actions.
The primary advantage of MCP over traditional APIs is its simplicity in complex scenarios. Without MCP, you would need to configure numerous APIs individually, making it incredibly difficult to provide unified context through a single interface. MCP solves this by standardizing the connection.
MCP vs. Traditional APIs: Key Differences
Here’s a breakdown of the advantages MCP brings compared to conventional API integrations:
- Unified Configuration: MCP provides a single, standardized way to connect various services, whereas traditional methods require configuring each API separately.
- Real-time Communication: MCP enables seamless, real-time communication between services.
- Dynamic Discovery: New tools and services can be dynamically discovered without manual reconfiguration.
- Scalability and Security: MCP is designed for better scalability and provides enhanced security and control over data access.
Core Features of MCP
Several key features make MCP a powerful solution: - Single Protocol: Simplifies interactions across different services. - Dynamic Tool Discovery: Automatically detects and integrates new tools. - Two-Way Communication: Allows for interactive and responsive workflows.
Understanding the MCP Architecture
The MCP architecture is designed for flexibility. It can access both local data sources and remote services through simple APIs. All these sources are consolidated into a single MCP server. This server is then utilized by clients that provide context to hosts, which in turn execute the required actions.
Integrating Atlassian's MCP Server: A Step-by-Step Guide
Now, let's walk through how to integrate the official Atlassian MCP server. The official MCP repository contains numerous official and community-built servers, including one for Atlassian products that we will use to connect Jira and Confluence.
The process involves prompting the system with the action you want to perform, such as creating or updating a task, and the server executes it automatically.
Step 1: Get Your Atlassian API Token
First, you'll need an API token from your Atlassian account. You can generate one by navigating to the Atlassian API tokens page in your account settings.
Step 2: Install the MCP Atlassian Library
Next, you need to install the necessary library. We'll use uv
, a modern package manager built in Rust that offers blazing-fast speeds for Python package management.
Install the module with the following command:
bash
uv pip install mcp-atlassian
Step 3: Configure Your Connection
Once the module is installed, you need to configure it.
If you are using Atlassian Cloud, your configuration will look like this. You'll need your company's name, your Atlassian URL, your email, and the API token you just created.
{
"type": "stdio",
"command": ["mcp-atlassian"],
"env": {
"MCP_ATLASSIAN_CONNECT_METHOD": "cloud",
"MCP_ATLASSIAN_URL": "https://<your-company>.atlassian.net",
"MCP_ATLASSIAN_USERNAME": "[email protected]",
"MCP_ATLASSIAN_API_TOKEN": "<your-api-token>"
}
}
For self-hosted Server and Data Center instances, you only need the API token.
Step 4: Understanding Transport Options
MCP offers two primary transport types:
- SSH Transport: Ideal for connecting to a cloud or remote server.
- stdio Transport: Used when you have a local setup and want to connect to it.
You can choose the option that best fits your environment.
Using the Atlassian MCP Server in VS Code with the Client
Now, let's see how to integrate the server in Visual Studio Code.
- Go to the Extensions marketplace and search for the Client extension and install it.
- After installation, you'll see a new Client icon in the VS Code activity bar. Open it.
- You can either log in to use free credits or enter your own OpenAI API key. The client supports multiple API providers and various local LLMs.
- To add your Atlassian MCP server, navigate to the MCP settings. Since we installed the server locally, we will add it as a local command.
- Click on
client-mcp-settings.json
and paste the configuration code we prepared earlier. Make sure to replace the placeholder values with your actual credentials. - Save and close the file.
Practical Examples: Managing Jira with Simple Prompts
With the server configured, you can now interact with Jira using natural language.
Creating a Jira Issue
Type a prompt describing the issue you want to create.
Create an issue in Jira for a project with project name Jira MCP Test and title 'Test issue for MCP'.
The client will process the request, identify the necessary information, and ask for your approval before proceeding. Once you approve, it will create the issue in your Jira project. You can then visit your Jira board to see the newly created ticket.
Deleting a Jira Issue
You can also delete issues just as easily.
Delete the issue with key 'JT-20' from project 'JT'.
Again, the client will ask for approval. After you confirm, the task will be completed, and the issue will be removed from your project.
There are numerous other actions you can perform, such as searching for issues, getting project details, and retrieving specific issue information. The more detail you provide in your prompt, the more accurate the action will be.
Integrating the MCP Server in Cursor IDE
The process is similar for Cursor, the AI-first IDE.
- Go to Cursor's settings and navigate to the MCP section.
- Click to add a global MCP server, which will open an
mcp.json
file. - Paste the same configuration code you used for the VS Code client, updating your credentials as needed.
- The IDE will indicate that the server is runnable.
You can now perform actions directly from the IDE.
Get the information of of issue 'JT-20'.
Cursor will identify the action, and you can click Run Tool to execute it.
Extending Functionality
If you want to add more custom functionality to the server, you can fork the GitHub repository and add your own code to the jira.py
file (or relevant module). Define your new functions, initialize the server from that directory, and you'll be able to perform your custom actions through the MCP server.
Join the 10xdev Community
Subscribe and get 8+ free PDFs that contain detailed roadmaps with recommended learning periods for each programming language or field, along with links to free resources such as books, YouTube tutorials, and courses with certificates.