START.md•2.53 kB
# How to Start the Jira MCP Server
## Prerequisites
1. **Set up environment variables** - Create a `.env` file:
```bash
cp .env.example .env
```
Edit `.env` with your Jira credentials:
```
JIRA_BASE_URL=https://your-domain.atlassian.net
JIRA_EMAIL=your-email@example.com
JIRA_API_TOKEN=your-api-token
```
## Method 1: Run Locally (Python)
1. **Install dependencies:**
```bash
pip install -r requirements.txt
```
2. **Set environment variables:**
```bash
export JIRA_BASE_URL=https://your-domain.atlassian.net
export JIRA_EMAIL=your-email@example.com
export JIRA_API_TOKEN=your-api-token
```
3. **Start the server:**
```bash
python server.py
```
The server will run and wait for MCP client connections via stdio.
## Method 2: Run with Docker
1. **Set up `.env` file** (as shown above)
2. **Build and run with Docker Compose:**
```bash
docker-compose up --build
```
Or run in detached mode:
```bash
docker-compose up -d --build
```
3. **Or build and run with Docker directly:**
```bash
docker build -t jira-mcp-server .
docker run --env-file .env -i jira-mcp-server
```
## Method 3: Run as MCP Server for Claude Desktop
To use with Claude Desktop, add this to your Claude Desktop config:
**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
**Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
```json
{
"mcpServers": {
"jira": {
"command": "python",
"args": ["/absolute/path/to/MCPJira/server.py"],
"env": {
"JIRA_BASE_URL": "https://your-domain.atlassian.net",
"JIRA_EMAIL": "your-email@example.com",
"JIRA_API_TOKEN": "your-api-token"
}
}
}
}
```
Or with Docker:
```json
{
"mcpServers": {
"jira": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"--env-file", "/absolute/path/to/MCPJira/.env",
"jira-mcp-server"
]
}
}
}
```
## Testing the Server
The MCP server communicates via stdio (standard input/output). To test it, you can:
1. **Use an MCP client** that supports stdio communication
2. **Connect from Claude Desktop** using the configuration above
3. **Use a test script** that sends MCP protocol messages via stdio
## Notes
- The server runs continuously and waits for MCP protocol messages
- It communicates via stdio, not HTTP
- Make sure all environment variables are set before starting
- The server will exit if credentials are invalid or missing