Commit 9e79cdc3 authored by Md. Shahjahan's avatar Md. Shahjahan 🚦

Merge branch 'dev-shahidul' into 'development'

Dev shahidul

See merge request !3
parents 69f3e258 c2d3838c
File added
venv
__pycache__
\ No newline at end of file
__pycache__
*.egg-info/
dist/
build/
*.whl
*.tar.gz
.eggs/
*.egg
.pytest_cache/
.coverage
htmlcov/
jira_mcp.egg-info
dist
......@@ -2,6 +2,36 @@
All notable changes to this project will be documented in this file.
## [1.0.1] - 2026-03-11
### IMPROVEMENTS
**Simplified Installation** - Convert project to installable Python package for convenient pip-based installation and deployment.
**Enhanced Configuration** - Rebranding MCP server name to `dohatec-jira` and CLI command to `dohatec-jira-mcp` for consistency across platforms.
**Documentation Improvements** - Simplified README with clearer setup instructions, moved development-specific content to dedicated DEVELOPMENT.md file, and improved gitignore handling.
**Configuration Management** - Switched to JSON-only configuration approach for improved cross-platform compatibility and reduced environment variable complexity.
**Project Structure** - Reorganized installation and setup documentation for better clarity and easier onboarding.
### COMMITS
- 5adc016 - feat: Convert project to installable Python package
- ec09953 - docs: Add comprehensive installation guide
- 3c28d32 - feat: Separate development setup into dedicated file
- d9d4ffd - docs: Keep README simple and easy - move manual paths to DEVELOPMENT.md
- 278e405 - feat: Remove redundant environment variable documentation
- 81cd738 - feat: Remove environment variable configuration - JSON only approach
- 8e67bb6 - feat: Remove 'Running the Server' section - not needed
- 190e118 - feat: Update MCP server name to dohatec-jira in config examples
- 7c096e4 - feat: Rename CLI command from jira-mcp to dohatec-jira-mcp
- 1b514a6 - docs: Remove INSTALLATION.md and update .gitignore to include README.md
- c288d57 - fix: Update .gitignore to include additional directories and files
---
## [1.0.0] - 2026-03-08
### OVERVIEW
......
# Development Setup Guide
This guide is for developers who want to contribute to the Jira MCP Server project or run it locally during development.
## Manual Installation
If you prefer to clone the repository and set up a development environment instead of using `pip install git+...`:
### Mac / Linux
1. Clone the repository:
```bash
git clone https://repo.dohatec.com.bd/ai-solutions/mcp-server-jira.git
cd mcp-server-jira
```
2. Create a virtual environment:
```bash
python3 -m venv venv
source venv/bin/activate
```
3. Install in editable mode (with all dependencies):
```bash
pip install -e .
```
4. Verify installation:
```bash
dohatec-jira-mcp --help
# or
python -m jira_mcp
```
### Windows
1. Clone the repository:
```cmd
git clone https://repo.dohatec.com.bd/ai-solutions/mcp-server-jira.git
cd mcp-server-jira
```
2. Create a virtual environment:
```cmd
python -m venv venv
venv\Scripts\activate
```
3. Install in editable mode:
```cmd
pip install -e .
```
4. Verify installation:
```cmd
dohatec-jira-mcp --help
```
## Running Tests
The repository includes test files for development purposes:
```bash
# Test Jira connection
python test_jira.py
# Test MCP API
python test_mcp.py
# Test issue creation
python test_mcp_create.py
```
Before running tests, ensure environment variables are set:
```bash
export JIRA_SERVER="http://103.41.111.60:8085"
export JIRA_USERNAME="your-username"
export JIRA_PASSWORD="your-password"
```
## Building Distributions
To build wheel and source distributions:
```bash
# Install build tools
pip install build
# Build distributions
python -m build
# View built packages
ls -lh dist/
```
Output will be in the `dist/` directory:
- `jira_mcp-1.0.0-py3-none-any.whl` — Wheel package
- `jira_mcp-1.0.0.tar.gz` — Source distribution
## Project Structure
```
jira_mcp/
├── __init__.py # Package initialization & version
├── server.py # Main MCP server implementation
└── __main__.py # Module runner entry point
jira_mcp_server.py # Legacy file (now moved to jira_mcp/server.py)
pyproject.toml # Modern Python package configuration
MANIFEST.in # Distribution file includes
README.md # Package documentation
DEVELOPMENT.md # This file
INSTALLATION.md # Detailed installation guide
test_*.py # Test files for development
```
## Making Changes
1. **Edit code** in `jira_mcp/server.py` (or other files)
2. **No reinstall needed** — changes auto-apply in editable mode
3. **Run tests** to verify changes work
4. **Commit and push** when ready
Example:
```bash
# Make changes to jira_mcp/server.py
# Changes automatically available
python -m jira_mcp # Run with your changes
```
## Updating Dependencies
If you need to add new dependencies:
1. Add to `dependencies` list in `pyproject.toml`
2. Reinstall in editable mode:
```bash
pip install -e .
```
3. Commit `pyproject.toml` changes
## Creating a New Release
When ready to release a new version:
1. Update version in `pyproject.toml` (and `jira_mcp/__init__.py`)
2. Update CHANGELOG.md
3. Commit changes:
```bash
git commit -m "Release v1.1.0"
git tag v1.1.0
```
4. Build distributions:
```bash
python -m build
```
5. Optional: Publish to PyPI
```bash
pip install twine
twine upload dist/*
```
## Troubleshooting
### Changes not reflecting?
```bash
# Reinstall in editable mode
pip install -e .
```
### Tests fail with import errors?
```bash
# Ensure venv is activated
source venv/bin/activate # Mac/Linux
venv\Scripts\activate # Windows
# Reinstall dependencies
pip install -e .
```
### Jira connection errors in tests?
```bash
# Check environment variables
printenv | grep JIRA_
# Ensure Jira server is accessible
curl http://103.41.111.60:8085
```
## Advanced Configuration
If you've done manual installation with a custom virtual environment path, you may need to specify the full Python path in Claude Desktop or Cursor configurations.
### Claude Desktop with Custom Python Path
**Mac Example:**
```json
{
"mcpServers": {
"jira-mcp-dev": {
"command": "/Users/your-username/Documents/resource/jiramcp/venv/bin/python3",
"args": ["-m", "jira_mcp"],
"env": {
"JIRA_SERVER": "http://103.41.111.60:8085",
"JIRA_USERNAME": "your-username",
"JIRA_PASSWORD": "your-password",
"JIRA_DEFAULT_PROJECT": "PCM",
"JIRA_QA_TESTER": "Samia Islam"
}
}
}
}
```
**Windows Example:**
```json
{
"mcpServers": {
"jira-mcp-dev": {
"command": "C:\\Users\\your-username\\Documents\\resource\\jiramcp\\venv\\Scripts\\python.exe",
"args": ["-m", "jira_mcp"],
"env": {
"JIRA_SERVER": "http://103.41.111.60:8085",
"JIRA_USERNAME": "your-username",
"JIRA_PASSWORD": "your-password",
"JIRA_DEFAULT_PROJECT": "PCM",
"JIRA_QA_TESTER": "Samia Islam"
}
}
}
}
```
### Cursor with Custom Python Path
1. Set environment variables in your shell before launching Cursor:
```bash
export JIRA_MSERVER="/path/to/venv/bin/python3"
export JIRA_SERVER="http://103.41.111.60:8085"
export JIRA_USERNAME="your-username"
export JIRA_PASSWORD="your-password"
```
2. In Cursor Settings → MCP Servers, use:
```bash
/path/to/venv/bin/python3 -m jira_mcp
```
Replace `/path/to/venv` with your actual virtual environment path.
## For More Information
- See [README.md](README.md) for general usage
- See [INSTALLATION.md](INSTALLATION.md) for end-user installation
- Review `pyproject.toml` for package configuration details
include README.md
include CHANGELOG.md
include LICENSE
recursive-exclude * __pycache__
recursive-exclude * *.py[co]
recursive-exclude * .DS_Store
exclude test_*.py
......@@ -28,107 +28,66 @@ This repository contains a Model Context Protocol (MCP) server that connects you
## [CONFIG] How to Setup
### Prerequisites
Make sure you have Python installed on your system.
### Installation
#### Mac / Linux
1. Clone this repository or download the source code:
```bash
git clone <REPOSITORY_URL>
cd <REPOSITORY_DIRECTORY>
```
2. Set up a virtual environment and install dependencies:
```bash
python3 -m venv venv
source venv/bin/activate
pip install mcp jira
```
#### Windows
1. Clone this repository or download the source code:
```cmd
git clone <REPOSITORY_URL>
cd <REPOSITORY_DIRECTORY>
```
2. Set up a virtual environment and install dependencies:
```cmd
python -m venv venv
venv\Scripts\activate
pip install mcp jira
```
### 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.
Make sure you have Python 3.9+ installed on your system.
* **Mac:** `~/Library/Application Support/Claude/claude_desktop_config.json`
* **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
### Installation (Recommended)
```json
{
"mcpServers": {
"jira-mcp": {
"command": "<ABSOLUTE_PATH_TO_PYTHON_EXECUTABLE_IN_VENV>",
"args": ["<ABSOLUTE_PATH_TO_YOUR_REPOSITORY>/jira_mcp_server.py"],
"env": {
"JIRA_SERVER": "https://your-jira-domain.com",
"JIRA_USERNAME": "your_email_or_username",
"JIRA_PASSWORD": "your_api_token_or_password",
"JIRA_DEFAULT_PROJECT": "PROJ",
"JIRA_QA_TESTER": "tester_username"
}
}
}
}
```
Example for mac:
Install the Jira MCP server directly from the Git repository as a Python package:
```json
"dohatec-jira": {
"command": "/Users/mdshahidulislam/Documents/resource/jiramcp/venv/bin/python3",
"args": [
"/Users/mdshahidulislam/Documents/resource/jiramcp/jira_mcp_server.py"
],
"env": {
"JIRA_SERVER": "http://103.41.111.60:8085",
"JIRA_USERNAME": "shahidul",
"JIRA_PASSWORD": "[PASSWORD]",
"JIRA_DEFAULT_PROJECT": "PCM",
"JIRA_QA_TESTER": "Samia Islam"
}
}
```bash
pip install git+https://repo.dohatec.com.bd/ai-solutions/mcp-server-jira.git
```
Example for windows:
This will:
- Install the `jira-mcp` package with all dependencies
- Create a `dohatec-jira-mcp` command-line entry point
- Enable `python -m jira_mcp` execution
---
## Configuration
### Using with Claude Desktop
Edit your `claude_desktop_config.json`:
* **Mac:** `~/Library/Application Support/Claude/claude_desktop_config.json`
* **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
Add this configuration with your Jira credentials:
```json
{
"mcpServers": {
"dohatec-jira": {
"command": "C:\\Users\\mdshahidulislam\\Documents\\resource\\jiramcp\\venv\\Scripts\\python.exe",
"args": [
"C:\\Users\\mdshahidulislam\\Documents\\resource\\jiramcp\\jira_mcp_server.py"
],
"command": "dohatec-jira-mcp",
"env": {
"JIRA_SERVER": "http://103.41.111.60:8085",
"JIRA_USERNAME": "shahidul",
"JIRA_PASSWORD": "[PASSWORD]",
"JIRA_PASSWORD": "your-password",
"JIRA_DEFAULT_PROJECT": "PCM",
"JIRA_QA_TESTER": "Samia Islam"
}
}
}
}
```
That's it! The credentials are configured in the JSON file.
*(Note: You can remove `JIRA_DEFAULT_PROJECT` or `JIRA_QA_TESTER` if you don't need them).*
### Using with Cursor
### 2. Cursor Configuration
1. Open Cursor Settings -> Features -> **MCP Servers**
1. Open Cursor Settings → Features → **MCP Servers**
2. Click **+ Add New MCP Server**
3. **Name:** `Jira Server`
3. **Name:** `dohatec-jira`
4. **Type:** `command`
5. **Command:** `<ABSOLUTE_PATH_TO_PYTHON_EXECUTABLE_IN_VENV> <ABSOLUTE_PATH_TO_YOUR_REPOSITORY>/jira_mcp_server.py`
6. Click Save and make sure it has the green status circle indicating it's connected.
*(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).*
5. **Command:** `dohatec-jira-mcp`
6. **Environment Variables:** Set in the UI:
- `JIRA_SERVER`: `http://103.41.111.60:8085`
- `JIRA_USERNAME`: `your-username`
- `JIRA_PASSWORD`: `your-password`
- `JIRA_DEFAULT_PROJECT`: `PCM` (optional)
- `JIRA_QA_TESTER`: `Samia Islam` (optional)
---
......@@ -313,3 +272,17 @@ We welcome contributions from everyone! Whether you're fixing bugs, adding new f
Please ensure your code follows Python best practices and is well-documented. Include comments for complex logic and write clear commit messages.
Thank you for helping us build and improve this project!
<<<<<<< HEAD
---
## Manual Installation (For Development)
For developers who want to contribute or run the project locally, see [DEVELOPMENT.md](DEVELOPMENT.md) for:
- Step-by-step local setup instructions (Mac/Linux/Windows)
- Virtual environment configuration
- Running tests
- Building distributions
- Advanced configuration with custom Python paths
=======
>>>>>>> c288d570f06841645e0d2bce66b1afa9445e8f36
image.png

819 KB

"""
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]
dohatec-jira-mcp = "jira_mcp.server:main"
[tool.setuptools]
packages = ["jira_mcp"]
[tool.setuptools.package-data]
jira_mcp = []
......@@ -3,7 +3,7 @@ from jira import JIRA
JIRA_SERVER = os.environ.get("JIRA_SERVER", "http://103.41.111.60:8085")
JIRA_USERNAME = os.environ.get("JIRA_USERNAME", "shahidul")
JIRA_PASSWORD = os.environ.get("JIRA_PASSWORD", "Shahidul@Jira#2024")
JIRA_PASSWORD = os.environ.get("JIRA_PASSWORD", "[]")
jira = JIRA(server=JIRA_SERVER, basic_auth=(JIRA_USERNAME, JIRA_PASSWORD))
......
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