> ## Documentation Index
> Fetch the complete documentation index at: https://jira.xaviercollantes.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Claude Code

> Configure Claude Code CLI to use Jira MCP

Set up Jira MCP with Claude Code to manage Jira tickets directly from the command line using natural language.

## Prerequisites

* Claude Code CLI installed (`npm install -g @anthropic-ai/claude-code`)
* Active Claude subscription (Pro, Max, or API access)
* Jira MCP installed (see [Quickstart](/quickstart))
* jira-cli configured and authenticated

## Configuration

<Steps>
  <Step title="Locate Claude Code config">
    Claude Code stores its MCP configuration in `~/.claude/claude_desktop_config.json` or a similar location depending on your setup.
  </Step>

  <Step title="Add Jira MCP server">
    Add the following to your Claude Code MCP configuration:

    <Tabs>
      <Tab title="Binary installation">
        ```json theme={null}
        {
          "mcpServers": {
            "jira": {
              "command": "/usr/local/bin/jira-mcp",
              "env": {
                "JIRA_API_TOKEN": "your-api-token",
                "JIRA_AUTH_TYPE": "basic"
              }
            }
          }
        }
        ```

        <Note>
          Replace `/usr/local/bin/jira-mcp` with the actual path to your jira-mcp binary.
        </Note>
      </Tab>

      <Tab title="Development setup (uv)">
        ```json theme={null}
        {
          "mcpServers": {
            "jira": {
              "command": "uv",
              "args": ["--directory", "/ABSOLUTE/PATH/TO/jira-mcp", "run", "python", "-m", "src.main"],
              "env": {
                "JIRA_API_TOKEN": "your-api-token",
                "JIRA_AUTH_TYPE": "basic"
              }
            }
          }
        }
        ```

        <Note>
          Replace `/ABSOLUTE/PATH/TO/jira-mcp` with the actual path to your cloned repository.
        </Note>
      </Tab>
    </Tabs>
  </Step>

  <Step title="Restart Claude Code">
    Restart Claude Code to apply the changes.
  </Step>
</Steps>

## Usage examples

Once configured, you can interact with Jira using natural language:

* "Show me my assigned tickets"
* "Create a bug ticket for the login page issue"
* "Move PROJ-123 to In Progress"
* "Add a comment to PROJ-456 explaining the fix"
* "What tickets are in the current sprint?"

## Troubleshooting

<AccordionGroup>
  <Accordion title="MCP server not connecting">
    1. Verify the path to your jira-mcp binary is correct.
    2. Make sure jira-cli is properly configured by running `jira issue list` in your terminal.
    3. Check Claude Code's logs for error messages.
  </Accordion>

  <Accordion title="Authentication errors">
    Ensure your Jira credentials are set in the MCP configuration's `env` field:

    ```json theme={null}
    {
      "mcpServers": {
        "jira": {
          "command": "/usr/local/bin/jira-mcp",
          "env": {
            "JIRA_API_TOKEN": "your-api-token",
            "JIRA_AUTH_TYPE": "basic"
          }
        }
      }
    }
    ```

    <Note>
      GUI applications and CLI tools may not inherit shell environment variables from `.bashrc` or `.zshrc`. Using the `env` field in the MCP configuration is the recommended approach.
    </Note>
  </Accordion>
</AccordionGroup>
