GitHub-Jira MCP Server
A comprehensive Model Context Protocol (MCP) server that provides secure integration between GitHub and Jira with proper permission controls and security enforcement.
🛠️ Installation
Prerequisites
- Python 3.11+
- GitHub Personal Access Token
- Jira OAuth App Credentials
Setup
-
Clone the repository
git clone <your-repo> cd mcp-servers -
Install dependencies
uv sync -
Configure environment variables
cp env.example .env # Edit .env with your actual credentials -
Set up credentials
GitHub:
- Go to GitHub Settings > Tokens
- Generate a new personal access token
- Required scopes:
repo(for private repos),public_repo(for public repos)
Jira:
- Go to Atlassian Developer Console
- Create a new OAuth app
- Set redirect URI to:
http://localhost:8080/callback - Note your Jira instance URL, client ID, and client secret
🔧 Configuration
Environment Variables
Create a .env file in your project root:
# GitHub Configuration
GITHUB_TOKEN=ghp_your_github_token_here
# Jira OAuth Configuration
JIRA_URL=https://your-domain.atlassian.net
JIRA_CLIENT_ID=your_jira_oauth_client_id_here
JIRA_CLIENT_SECRET=your_jira_oauth_client_secret_here
# Optional: Jira Access Tokens (will be obtained automatically via OAuth)
JIRA_ACCESS_TOKEN=
JIRA_REFRESH_TOKEN=
# Optional: Logging
LOG_LEVEL=INFO
MCP Client Configuration
Add this to your MCP client configuration:
{
"mcpServers": {
"github-jira": {
"command": "python",
"args": ["mcp_github_jira_server.py"],
"env": {
"GITHUB_TOKEN": "your_token_here",
"JIRA_URL": "https://your-domain.atlassian.net",
"JIRA_CLIENT_ID": "your_jira_oauth_client_id_here",
"JIRA_CLIENT_SECRET": "your_jira_oauth_client_secret_here"
}
}
}
}
📚 Usage
Starting the Server
python mcp_github_jira_server.py
Available Tools
GitHub Tools
github_read_file(owner, repo, path)- Read file content with security checksgithub_create_issue(owner, repo, title, body, labels)- Create issues in own reposgithub_create_pull_request(owner, repo, title, body, head, base)- Create PRs in own reposgithub_delete_file(owner, repo, path, message, sha)- Delete files from own reposcheck_github_permissions()- Check current GitHub permissions
Jira Tools
jira_create_issue(project_key, summary, description, issue_type)- Create issuesjira_search_issues(jql, max_results)- Search issues using JQLjira_update_issue(issue_key, updates)- Update issue fieldsjira_add_comment(issue_key, comment)- Add comments to issuesjira_transition_issue(issue_key, transition_id)- Move issues through workflowscheck_jira_permissions()- Check current Jira permissionssetup_jira_oauth()- Setup Jira OAuth authentication
Available Resources
GitHub Resources
github://{owner}/{repo}- Repository informationgithub://{owner}/{repo}/files/{path}- File content
Jira Resources
jira://projects/{project_key}- Project informationjira://issues/{issue_key}- Issue details
Available Prompts
check_repository_security_permissions- Check GitHub permissionsread_file_from_github_repo- Read files from GitHubcreate_jira_issue_in_project- Create Jira issuesupdate_jira_issue_workflow- Update workflow statesgithub_repository_management- Manage GitHub reposjira_project_workflow_management- Manage Jira projectssetup_jira_oauth_authentication- Setup Jira OAuth authentication
