Commit 5adc0162 authored by MD. SHAHIDUL ISLAM's avatar MD. SHAHIDUL ISLAM

Convert project to installable Python package

- Create jira_mcp package directory with server.py, __init__.py, and __main__.py
- Add modern pyproject.toml with pip install from git support
- Add entry points: 'jira-mcp' CLI command and 'python -m jira_mcp' module runner
- Create MANIFEST.in for distribution includes
- Update .gitignore for build artifacts (dist, build, *.egg-info)
- Update README with new installation instructions and simplified configs
- Package now installable via: pip install git+https://repo.dohatec.com.bd/ai-solutions/mcp-server-jira.git
parent 7f887542
venv venv
__pycache__ __pycache__
*.egg-info/
dist/
build/
*.whl
*.tar.gz
.eggs/
*.egg
.pytest_cache/
.coverage
htmlcov/
\ No newline at end of file
include README.md
include CHANGELOG.md
include LICENSE
recursive-exclude * __pycache__
recursive-exclude * *.py[co]
recursive-exclude * .DS_Store
exclude test_*.py
...@@ -33,67 +33,110 @@ This repository contains a Model Context Protocol (MCP) server that connects you ...@@ -33,67 +33,110 @@ This repository contains a Model Context Protocol (MCP) server that connects you
## [CONFIG] How to Setup ## [CONFIG] How to Setup
### Prerequisites ### Prerequisites
Make sure you have Python installed on your system. Make sure you have Python 3.9+ installed on your system.
### Installation ### Installation (Recommended)
Install the Jira MCP server directly from the Git repository as a Python package:
```bash
pip install git+https://repo.dohatec.com.bd/ai-solutions/mcp-server-jira.git
```
This will:
- Install the `jira-mcp` package with all dependencies
- Create a `jira-mcp` command-line entry point
- Enable `python -m jira_mcp` execution
### Manual Installation (Alternative)
If you prefer to clone and run locally:
#### Mac / Linux #### Mac / Linux
1. Clone this repository or download the source code: 1. Clone this repository:
```bash ```bash
git clone <REPOSITORY_URL> git clone https://repo.dohatec.com.bd/ai-solutions/mcp-server-jira.git
cd <REPOSITORY_DIRECTORY> cd mcp-server-jira
``` ```
2. Set up a virtual environment and install dependencies: 2. Set up a virtual environment and install:
```bash ```bash
python3 -m venv venv python3 -m venv venv
source venv/bin/activate source venv/bin/activate
pip install mcp jira pip install -e .
``` ```
#### Windows #### Windows
1. Clone this repository or download the source code: 1. Clone this repository:
```cmd ```cmd
git clone <REPOSITORY_URL> git clone https://repo.dohatec.com.bd/ai-solutions/mcp-server-jira.git
cd <REPOSITORY_DIRECTORY> cd mcp-server-jira
``` ```
2. Set up a virtual environment and install dependencies: 2. Set up a virtual environment and install:
```cmd ```cmd
python -m venv venv python -m venv venv
venv\Scripts\activate venv\Scripts\activate
pip install mcp jira pip install -e .
``` ```
### 1. Claude Desktop Configuration ---
Edit your `claude_desktop_config.json` file to include the server. Replace the placeholder paths with your actual absolute paths, and fill in your Jira credentials.
## Configuration
### Environment Variables
Before running the MCP server, set these environment variables:
```bash
export JIRA_SERVER="https://your-jira-domain.com"
export JIRA_USERNAME="your_email_or_username"
export JIRA_PASSWORD="your_api_token_or_password"
export JIRA_DEFAULT_PROJECT="PROJ" # Optional
export JIRA_QA_TESTER="tester_username" # Optional
```
Example for Dohatec Jira:
```bash
export JIRA_SERVER="http://103.41.111.60:8085"
export JIRA_USERNAME="shahidul"
export JIRA_PASSWORD="your-password-or-token"
export JIRA_DEFAULT_PROJECT="PCM"
export JIRA_QA_TESTER="Samia Islam"
```
### Using with Claude Desktop
Edit your `claude_desktop_config.json`:
* **Mac:** `~/Library/Application Support/Claude/claude_desktop_config.json` * **Mac:** `~/Library/Application Support/Claude/claude_desktop_config.json`
* **Windows:** `%APPDATA%\Claude\claude_desktop_config.json` * **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
**After installing via pip**, use this simple configuration:
```json ```json
{ {
"mcpServers": { "mcpServers": {
"jira-mcp": { "jira-mcp": {
"command": "<ABSOLUTE_PATH_TO_PYTHON_EXECUTABLE_IN_VENV>", "command": "jira-mcp",
"args": ["<ABSOLUTE_PATH_TO_YOUR_REPOSITORY>/jira_mcp_server.py"],
"env": { "env": {
"JIRA_SERVER": "https://your-jira-domain.com", "JIRA_SERVER": "http://103.41.111.60:8085",
"JIRA_USERNAME": "your_email_or_username", "JIRA_USERNAME": "shahidul",
"JIRA_PASSWORD": "your_api_token_or_password", "JIRA_PASSWORD": "your-password",
"JIRA_DEFAULT_PROJECT": "PROJ", "JIRA_DEFAULT_PROJECT": "PCM",
"JIRA_QA_TESTER": "tester_username" "JIRA_QA_TESTER": "Samia Islam"
} }
} }
} }
} }
``` ```
Example for mac:
Alternatively, if you need Python path or used manual installation:
**Mac Example:**
```json ```json
{
"mcpServers": {
"dohatec-jira": { "dohatec-jira": {
"command": "/Users/mdshahidulislam/Documents/resource/jiramcp/venv/bin/python3", "command": "/Users/mdshahidulislam/Documents/resource/jiramcp/venv/bin/python3",
"args": [ "args": ["-m", "jira_mcp"],
"/Users/mdshahidulislam/Documents/resource/jiramcp/jira_mcp_server.py"
],
"env": { "env": {
"JIRA_SERVER": "http://103.41.111.60:8085", "JIRA_SERVER": "http://103.41.111.60:8085",
"JIRA_USERNAME": "shahidul", "JIRA_USERNAME": "shahidul",
...@@ -102,16 +145,17 @@ Example for mac: ...@@ -102,16 +145,17 @@ Example for mac:
"JIRA_QA_TESTER": "Samia Islam" "JIRA_QA_TESTER": "Samia Islam"
} }
} }
}
}
``` ```
Example for windows: **Windows Example:**
```json ```json
{
"mcpServers": {
"dohatec-jira": { "dohatec-jira": {
"command": "C:\\Users\\mdshahidulislam\\Documents\\resource\\jiramcp\\venv\\Scripts\\python.exe", "command": "C:\\Users\\mdshahidulislam\\Documents\\resource\\jiramcp\\venv\\Scripts\\python.exe",
"args": [ "args": ["-m", "jira_mcp"],
"C:\\Users\\mdshahidulislam\\Documents\\resource\\jiramcp\\jira_mcp_server.py"
],
"env": { "env": {
"JIRA_SERVER": "http://103.41.111.60:8085", "JIRA_SERVER": "http://103.41.111.60:8085",
"JIRA_USERNAME": "shahidul", "JIRA_USERNAME": "shahidul",
...@@ -120,20 +164,37 @@ Example for windows: ...@@ -120,20 +164,37 @@ Example for windows:
"JIRA_QA_TESTER": "Samia Islam" "JIRA_QA_TESTER": "Samia Islam"
} }
} }
}
}
``` ```
### Using with Cursor
*(Note: You can remove `JIRA_DEFAULT_PROJECT` or `JIRA_QA_TESTER` if you don't need them).* 1. Open Cursor Settings → Features → **MCP Servers**
### 2. Cursor Configuration
1. Open Cursor Settings -> Features -> **MCP Servers**
2. Click **+ Add New MCP Server** 2. Click **+ Add New MCP Server**
3. **Name:** `Jira Server` 3. **Name:** `Jira Server`
4. **Type:** `command` 4. **Type:** `command`
5. **Command:** `<ABSOLUTE_PATH_TO_PYTHON_EXECUTABLE_IN_VENV> <ABSOLUTE_PATH_TO_YOUR_REPOSITORY>/jira_mcp_server.py` 5. **Command:** `jira-mcp` (if installed via pip) or `python -m jira_mcp` (if using manual installation)
6. Click Save and make sure it has the green status circle indicating it's connected. 6. Set environment variables in your shell before launching Cursor:
```bash
export JIRA_SERVER="http://103.41.111.60:8085"
export JIRA_USERNAME="your-username"
export JIRA_PASSWORD="your-password"
```
---
*(Note: In Cursor, environment variables are typically inherited from your shell. If you find Cursor isn't passing environment variables correctly, you can also inject them by prefixing the command with `env JIRA_SERVER=... JIRA_USERNAME=... JIRA_PASSWORD=... <command>` on Mac/Linux, or fallback to setting them safely if you know how).* ## Running the Server
### Using the Command Entry Point
```bash
jira-mcp
```
### Using Python Module Runner
```bash
python -m jira_mcp
```
--- ---
......
"""
Dohatec Jira MCP Server
A Model Context Protocol (MCP) server that connects AI assistants to a
self-hosted Dohatec Jira instance.
"""
__version__ = "1.0.0"
__author__ = "Md Shahidul Islam"
__description__ = "Jira MCP Server for Dohatec"
__all__ = ["__version__", "__author__", "__description__"]
"""
Entry point for running the Jira MCP server as a module.
Enables execution with: python -m jira_mcp
"""
from jira_mcp.server import main
if __name__ == "__main__":
main()
This diff is collapsed.
[build-system]
requires = ["setuptools>=65.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "jira-mcp"
version = "1.0.0"
description = "A Model Context Protocol (MCP) server that connects AI assistants to a self-hosted Dohatec Jira instance"
readme = "README.md"
license = {text = "MIT"}
authors = [
{name = "Md Shahidul Islam", email = "shahidul@dohatec.com.bd"}
]
keywords = ["jira", "mcp", "model-context-protocol", "ai", "dohatec"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Internet",
]
requires-python = ">=3.9"
dependencies = [
"mcp>=0.1.0",
"jira>=3.0.0",
]
[project.urls]
Repository = "https://repo.dohatec.com.bd/ai-solutions/mcp-server-jira.git"
Documentation = "https://repo.dohatec.com.bd/ai-solutions/mcp-server-jira"
Issues = "https://repo.dohatec.com.bd/ai-solutions/mcp-server-jira/-/issues"
[project.scripts]
jira-mcp = "jira_mcp.server:main"
[tool.setuptools]
packages = ["jira_mcp"]
[tool.setuptools.package-data]
jira_mcp = []
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment