Jira MCP Server for Cursor
by GMBruno
README.md
# Jira MCP Server for Cursor
> Model Context Protocol (MCP) Server for Jira integration with Cursor IDE.
> Built with Clean Architecture, SOLID principles, and Test-Driven Development.
## ๐๏ธ Architecture
This project follows **Clean Architecture** principles with 4 distinct layers:
```
Presentation Layer (MCP Tools)
โ depends on
Application Layer (Use Cases)
โ depends on
Domain Layer (Entities, Interfaces) โ CORE
โ implemented by
Infrastructure Layer (Jira API)
```
### Key Principles Applied
- โ
**SOLID Principles**: Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, Dependency Inversion
- โ
**Clean Code**: Meaningful names, small functions, self-documenting code
- โ
**TDD**: Test-Driven Development with >= 80% coverage
- โ
**DDD**: Domain-Driven Design with clear separation of concerns
## ๐ Features
- โ
**create_jira_issue**: Create new Jira issues
- โ
**list_my_issues**: List issues assigned to you
- โ
**list_projects**: List all accessible Jira projects
- โ
**get_issue_details**: Get full details of an issue
- โ
**add_comment**: Add comments to issues
## ๐ฆ Installation
### ๐ Quick Install (Recommended)
Use the automated installation script:
```bash
cd ~/Projects/mcp-jira-cursor # or wherever you cloned the project
./install.sh
```
The script will:
- โ
Check for Node.js and npm
- โ
Install dependencies
- โ
Build the project
- โ
Prompt for Jira credentials
- โ
Configure Cursor automatically (`~/.cursor/mcp.json`)
- โ
Validate the configuration
**After running the script:**
1. Close Cursor completely (Cmd+Q on macOS)
2. Reopen Cursor
3. Open a new chat and test: `"List my open Jira issues"`
---
### ๐ Manual Installation
If you prefer to install manually:
#### 1. Clone/Navigate to Project
```bash
cd ~/Projects/mcp-jira-cursor
```
#### 2. Install Dependencies
```bash
npm install
```
#### 3. Get Jira API Token
1. Go to: https://id.atlassian.com/manage-profile/security/api-tokens
2. Click "Create API token"
3. Give it a name: "Cursor MCP Jira"
4. Copy the token
#### 4. Build the Project
```bash
npm run build
```
#### 5. Configure Cursor MCP
Edit or create `~/.cursor/mcp.json`:
```json
{
"mcpServers": {
"jira": {
"command": "node",
"args": ["/Users/YOUR_USERNAME/Projects/mcp-jira-cursor/dist/index.js"],
"env": {
"JIRA_URL": "https://your-domain.atlassian.net",
"JIRA_EMAIL": "your-email@example.com",
"JIRA_API_TOKEN": "your_api_token_here"
}
}
}
}
```
**โ ๏ธ Important**: Replace `YOUR_USERNAME`, `your-domain`, `your-email`, and `your_api_token_here` with your actual values.
#### 6. Restart Cursor
Close and reopen Cursor completely to load the MCP server.
## ๐ฏ Usage Examples
Once configured, you can use natural language in Cursor's AI chat:
**Create Issue:**
```
"Create a new bug in project SUP about login failure"
```
**List Projects:**
```
"List all my Jira projects"
"Show me available projects"
```
**List Issues:**
```
"List my open issues"
"Show me all my issues with high priority"
```
**Get Details:**
```
"Show me details of issue SUP-123"
```
**Add Comment:**
```
"Add comment to SUP-123: Fixed in branch feature/auth"
```
## ๐งช Development
### Run Tests
```bash
npm test
```
### Run Tests with Coverage
```bash
npm run test:coverage
```
### Lint Code
```bash
npm run lint
```
### Format Code
```bash
npm run format
```
### Dev Mode (for testing)
```bash
npm run dev
```
## ๐ Project Structure
```
src/
โโโ domain/ # Domain Layer (Core)
โ โโโ entities/ # Business entities
โ โโโ interfaces/ # Repository contracts
โ โโโ types/ # DTOs and types
โโโ application/ # Application Layer
โ โโโ use-cases/ # Business logic use cases
โโโ infrastructure/ # Infrastructure Layer
โ โโโ jira/ # Jira API implementation
โโโ presentation/ # Presentation Layer
โ โโโ tools/ # MCP Tools handlers
โโโ index.ts # Entry point
tests/
โโโ unit/ # Unit tests
โโโ integration/ # Integration tests
docs/
โโโ architecture.md # Architecture documentation
โโโ adr/ # Architecture Decision Records
```
## ๐ Documentation
- [Architecture Overview](docs/architecture.md)
- [ADR 001: Clean Architecture](docs/adr/001-clean-architecture.md)
## ๐ง Scripts
| Script | Description |
|--------|-------------|
| `npm run build` | Build TypeScript to dist/ |
| `npm run dev` | Run in development mode |
| `npm test` | Run all tests |
| `npm run test:watch` | Run tests in watch mode |
| `npm run test:coverage` | Run tests with coverage report |
| `npm run lint` | Lint code with ESLint |
| `npm run lint:fix` | Fix linting issues |
| `npm run format` | Format code with Prettier |
## ๐ค Contributing
This project follows:
- **Clean Architecture** by Robert C. Martin
- **Clean Code** principles
- **SOLID** design principles
- **TDD** (Test-Driven Development)
## ๐ License
MIT
This server cannot be deployed
Maintenance
ActivityInactive
ResponsivenessNo recent community issues