Jira MCP Server
Provides tools for interacting with Bitbucket repositories and pull requests: listing repositories with caching, retrieving pull requests for Jira issues, fetching PR diffs, adding pull request comments, and testing connectivity.
Provides tools for interacting with Jira Cloud: searching issues via JQL, retrieving and summarizing issue details, adding comments, updating issues with comprehensive field-type support, and managing custom field mappings.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Jira MCP Server show me all open Jira issues assigned to me"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Jira MCP Server
A Model Context Protocol (MCP) server that provides tools for interacting with Jira Cloud REST API and Bitbucket repositories.
β¨ Recently Updated: Simplified tool architecture by prioritizing
get_pull_requests_for_issueas the primary tool for PR queries and removing redundant Bitbucket API-based tools to improve reliability and reduce authentication issues.
Features
Search Jira issues using JQL (Jira Query Language)
Get detailed information about specific issues
π Enhanced Unified Issue Updates with comprehensive field type support
Add comments to issues (with automatic markdown-to-HTML conversion)
Add comments to Bitbucket pull requests (with markdown support)
β Get pull requests for Jira issues (Primary tool:
get_pull_requests_for_issue)List Bitbucket repositories with caching
Comprehensive Jira ticket summarization
Cache management for performance optimization
Related MCP server: Jira MCP Server
Prerequisites
Node.js 18+
A Jira Cloud instance
Jira API token
Setup
π One-Click Installation
For macOS/Linux:
git clone https://github.com/NivethithaJM/jira-bitbucket-mcp.git
cd jira-bitbucket-mcp
chmod +x install.sh
./install.shFor Windows:
git clone https://github.com/NivethithaJM/jira-bitbucket-mcp.git
cd jira-bitbucket-mcp
install.batNote: The installation scripts will generate the MCP configuration and display it in the console. You'll need to copy and paste this configuration into your mcp.json file at your desired location.
π Updating the MCP Server
To update the MCP server to the latest version:
./update_and_restart.shThis script will:
Pull the latest changes from git
Install any new dependencies
Rebuild the project
Stop any running MCP servers
Ask you to restart your IDE (MCP server will start automatically)
π Manual Setup
Clone the repository:
git clone https://github.com/NivethithaJM/jira-bitbucket-mcp.git cd jira-bitbucket-mcpInstall dependencies:
npm installGenerate API Tokens:
For Jira: Click "Create API token"
Name: "Jira MCP Server"
Expires: 1 year
App: Jira
Scopes: All scopes except delete actions
Generate and copy the token as
JIRA_API_TOKEN
For Bitbucket: Click "Create API token" again
Name: "Bitbucket MCP Server"
Expires: 1 year
App: Bitbucket
Scopes: All scopes except delete actions
Generate and copy the token as
BITBUCKET_API_TOKEN
Build the project:
npm run build
π Updating the MCP Server
To update to the latest version and restart the server:
./update_and_restart.shThis script will automatically:
β Pull the latest changes from git
β Install any new dependencies
β Rebuild the project
β Stop any running MCP servers
β Display update information
β Prompt you to restart your IDE (MCP server will start automatically)
Note: The script will handle uncommitted changes by offering to stash them before updating.
MCP Server Configuration
What is MCP?
The Model Context Protocol (MCP) is a standard for connecting AI assistants to external data sources and tools. This Jira MCP server allows AI assistants to interact with your Jira instance through a standardized interface.
Configuration Files
1. Environment Variables
Environment variables are configured directly in the MCP configuration within Cursor IDE. No separate .env file is needed.
Required Environment Variables:
JIRA_BASE_URL- Your Jira Cloud instance URLJIRA_EMAIL- Your Jira Cloud email addressJIRA_API_TOKEN- Your Jira Cloud API tokenBITBUCKET_WORKSPACE- Your Bitbucket workspace nameBITBUCKET_API_TOKEN- Your Bitbucket API token
2. MCP Configuration File
Run the installation script to generate the configuration, or manually create an mcp.json file in your project root or user directory:
{
"mcpServers": {
"jira-bitbucket-mcp": {
"command": "node",
"args": ["/absolute/path/to/your/mcp/dist/index.js"],
"env": {
"JIRA_BASE_URL": "https://your-domain.atlassian.net",
"JIRA_EMAIL": "your-email@example.com",
"JIRA_API_TOKEN": "your-jira-api-token",
"BITBUCKET_WORKSPACE": "your-workspace-name",
"BITBUCKET_API_TOKEN": "your-bitbucket-api-token"
}
}
}
}File Locations:
Project-specific: Place
mcp.jsonin your project root directoryGlobal: Place
mcp.jsonin your home directory (~/.mcp.jsonon Unix systems)
Configuration Steps
Build the MCP Server:
npm run buildGet the Absolute Path:
# On macOS/Linux pwd # Copy the full path to your project directoryCreate MCP Configuration:
Create
mcp.jsonfile in your project root or home directoryReplace
/absolute/path/to/your/mcpwith your actual project pathAdd your Jira credentials in the
envsection
Restart Cursor IDE:
Close Cursor IDE completely
Reopen Cursor IDE
The Jira MCP server will be available in your AI assistant
Test the Connection:
Open a chat with your AI assistant in Cursor
Try asking: "Search for Jira issues in project PROJ"
The assistant should be able to use the Jira and Bitbucket tools
Security Considerations
API Token Security: Never commit your Jira API token to version control
Environment Variables: Environment variables are securely stored in the
mcp.jsonconfiguration fileConfiguration Security: Keep your
mcp.jsonfile secure and don't commit it to version controlNetwork Security: Use HTTPS for Jira API communication (already configured)
Available Tools
β Tool Prioritization
For Pull Request Queries:
Primary Tool:
get_pull_requests_for_issue- Use this for all PR-related queriesWhy: Uses Jira's integrated dev-status API, more reliable, better error handling
For Issue Updates:
Primary Tool:
enhanced_jira_update- Use this for all issue updatesWhy: Comprehensive field type support, intelligent formatting, smart field detection
For Issue Management:
Primary Tool:
get_issue- Get basic issue detailsAdvanced:
summarize_jira_ticket- Get comprehensive analysis with comments, custom fields, etc.
π Complete Tool List
Core Jira Tools:
search_issues- Search issues using JQLget_issue- Get detailed issue informationsummarize_jira_ticket- Comprehensive ticket analysisadd_comment- Add comments to issues (with markdown support)
Enhanced Update Function:
5. enhanced_jira_update - β PRIMARY: Comprehensive update function with field type support
Pull Request Tools:
6. get_bitbucket_repositories - List Bitbucket repositories (with caching)
7. get_pull_requests_for_issue - β PRIMARY: Get PRs for Jira issues
8. get_pr_diff - Get PR diff information from Bitbucket URL
9. add_bitbucket_comment - Add comments to Bitbucket pull requests
Cache Management:
10. reset_mcp_server_cache - Reset MCP server cache (clear all caches and get statistics)
Custom Field Management:
11. get_custom_field_mappings - Get all custom field mappings with caching
12. get_custom_field_by_name - Find a custom field by name (case-insensitive search)
13. get_custom_field_by_id - Get custom field information by its ID
14. list_custom_fields - List all custom fields with their names and types
15. clear_custom_field_cache - Clear the custom field mapping cache
Connection Testing:
16. test_bitbucket_connection - Test Bitbucket API connection and list repositories
Total Tools: 16
Enhanced Jira Update Function
The enhanced_jira_update function provides comprehensive field type support for updating Jira issues with intelligent formatting and validation.
Key Features:
Universal Field Support: Handles all Jira field types automatically
Intelligent Formatting: Applies correct API format for each field type
Smart Field Detection: Identifies field types from Jira metadata
Dropdown Validation: Validates dropdown values against available options
Non-Custom Field Handling: Automatically converts non-custom fields to comments
Dry Run Support: Test field formatting without making changes
Partial Updates: Continue with valid fields even if some fail
Usage Examples:
{
"issueKey": "NFD-38469",
"summary": "Updated summary",
"priority": "High",
"customFields": {
"customfield_10405": "N/A"
},
"customFieldsByName": {
"DEV - Has Impact & Change been Unit tested?": "N/A"
},
"validateDropdowns": true,
"addComment": true,
"dryRun": false
}Parameters:
issueKey(required): The Jira issue keysummary,description,priority,assignee,status,labels,components,fixVersions(optional): Direct standard field parametersfields(optional): Legacy standard Jira fields objectcustomFields(optional): Custom fields by field IDcustomFieldsByName(optional): Custom fields by field name (automatically resolved to IDs)validateDropdowns(optional, default: true): Validate dropdown valuesaddComment(optional, default: true): Add documentation commentdryRun(optional, default: false): Test formatting without making updatesallowPartialUpdates(optional, default: false): Continue with valid fields if some fail
π For comprehensive implementation details and field type mappings, see COMPREHENSIVE_FIELD_TYPE_SUPPORT.md
π For comprehensive field type support details, see COMPREHENSIVE_FIELD_TYPE_SUPPORT.md
Enhanced Custom Field Cache
The custom field cache now includes comprehensive information:
Cache Information Includes:
Field Name: Human-readable field name
Field ID: Technical field identifier (e.g., customfield_10405)
Field Type: Technical field type information
Dropdown Detection: Automatically identifies dropdown fields
Dropdown Options: For dropdown fields, stores all available options with IDs and values
Multi-value Support: Identifies fields that support multiple values
Dropdown Field Support
The server now includes specialized support for dropdown custom fields with:
Automatic option discovery - Gets available dropdown options from Jira
Value validation - Validates values against available options before updating
Error handling - Comprehensive error messages for invalid values
Field metadata - Detailed field information including type and properties
Quick Example
// Get dropdown options
const options = await getDropdownFieldOptions("customfield_10405");
// Validate a value
const validation = await validateDropdownValue("customfield_10405", "N/A");
// Update the field
const result = await updateDropdownField("NFD-38469", "customfield_10405", "N/A");For detailed documentation, see Dropdown Field Support.
Documentation
For detailed information about tool implementations and usage examples, see:
Tool Details - Complete tool documentation with examples and parameters
Implementation Guidelines - Development and implementation details
License
MIT
Contributing
Fork the repository
Create a feature branch
Make your changes
Add tests if applicable
Submit a pull request
Troubleshooting
Common Issues:
"Command not found" error:
Ensure Node.js is installed and in your PATH
Verify the path to
dist/index.jsis correct
"Missing environment variables" error:
Check that all required environment variables are set in the
mcp.jsonconfigurationVerify the
mcp.jsonfile exists and is properly formatted
"Authentication failed" error:
Verify your Jira API token is correct
Ensure your email address matches your Jira account
Check that your Jira instance URL is correct
"Permission denied" error:
Ensure the
dist/index.jsfile has execute permissionsCheck file ownership and permissions
Debug Mode:
To run the MCP server in debug mode:
DEBUG=* npm run devThis will show detailed logs about the MCP server's operation.
Available Tools
15 toolsadd_bitbucket_commentA
Add a comment to a Bitbucket pull request. Markdown input will be automatically converted to HTML.
Inputs: prUrl (required), comment (required).
add_commentB
Add a comment to a Jira issue. Markdown input will be automatically converted to HTML.
Inputs: comment (required), issueKey (required).
clear_custom_field_cacheA
Clear the custom field mapping cache to force refresh from Jira API
Inputs: no named parameters.
enhanced_jira_updateC
Enhanced unified function to update Jira issues with comprehensive field validation, smart dropdown handling, and flexible input formats
Inputs: issueKey (required), dryRun, fields, labels, +12 more.
get_bitbucket_repositoriesB
List all repositories in the configured Bitbucket workspace
Inputs: maxResults.
get_custom_field_by_idC
Get custom field information by its ID (e.g., customfield_10199)
Inputs: fieldId (required).
get_custom_field_by_nameB
Find a custom field by name (case-insensitive search)
Inputs: fieldName (required).
get_custom_field_mappingsB
Get all custom field mappings with caching (field ID to name mapping)
Inputs: no named parameters.
get_issueB
Get details of a specific Jira issue by key
Inputs: issueKey (required).
get_pr_diffC
Get pull request diff information from a Bitbucket URL
Inputs: prUrl (required).
get_pull_requests_for_issueC
Search all Bitbucket repositories for pull requests that reference a specific Jira issue key
Inputs: issueKey (required).
list_custom_fieldsA
List all custom fields with their names and types
Inputs: no named parameters.
reset_mcp_server_cacheB
Reset MCP server cache - clear all caches and return statistics
Inputs: clearAll, issueKey, workspace, clearIssueCache, +1 more.
search_issuesC
Search for Jira issues using JQL (Jira Query Language)
Inputs: jql (required), startAt, maxResults.
summarize_jira_ticketB
Get a comprehensive summary of a Jira ticket including all information, comments, custom fields, attachments, and structured analysis
Inputs: issueKey (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 15 tools
Most tools have clearly distinct purposes (get_issue vs search_issues vs add_comment vs get_pr_diff), but the custom-field cluster is fuzzy: get_custom_field_mappings, list_custom_fields, get_custom_field_by_name, and get_custom_field_by_id all return overlapping metadata about the same resource. summarize_jira_ticket vs get_issue also overlap somewhat, though the summary/raw distinction is stated.
Nearly everything follows a clean verb_noun snake_case pattern (get_issue, add_comment, list_custom_fields, search_issues). The main deviation is enhanced_jira_update, which leads with an adjective and puts the verb last, breaking the predictable pattern; the cache tools also mix 'reset'/'clear' semantics but readably.
15 tools is at the upper end of a well-scoped set and each broadly maps to a real operation. However, four custom-field lookup tools plus two separate cache-clearing tools (reset_mcp_server_cache, clear_custom_field_cache) suggest a bit of redundancy that could be consolidated.
The surface covers read/search/update/comment/summarize for Jira plus read-only Bitbucket PR access, which is a reasonable core. But there is no issue creation, no status transition/workflow tool, no assignment, and no project/board listing, leaving notable lifecycle gaps; Bitbucket is read-only apart from commenting.
Maintenance
Related MCP Connectors
Connect to Atlassian Jira, Confluence, Loom, and more to search, create, and manage your work.
Connect assistants to your workspace knowledge, skills, and work tools.
Search 16,000+ API operations and 95 built tools by need, then call any of them by name
Use your connected apps from your agent: search synced data, act in apps and set up automations.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI assistants to interact with Jira Cloud instances for comprehensive issue management including creating, updating, searching issues, managing comments, workflow transitions, and project metadata discovery. Supports JQL queries, user search, and custom field operations with secure API token authentication.12798 npm8MIT
- AlicenseAqualityNot gradedmaintenanceEnables AI assistants to interact with Atlassian Jira Cloud, allowing users to manage projects, issues, comments, and workflows through natural language commands.61,667 npm3-
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to search, create, update, and transition Jira issues and Confluence pages, add comments, and manage Atlassian content across Cloud and Server/Data Center deployments.MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with Jira and Confluence on Atlassian Cloud, supporting issue search, creation, updates, transitions, project listing, content search, page management, and comments.1-