Introduction
Model Context Protocol (MCP) is revolutionizing how AI assistants interact with external services. As a software engineer working with JIRA daily, I wanted to integrate JIRA functionality directly into my Cursor IDE workflow. This post chronicles my journey setting up JIRA MCP with custom scripts, the challenges I encountered, and the solutions that finally worked.
What is MCP and Why JIRA Integration Matters
Model Context Protocol (MCP) is an open standard that enables AI assistants to securely connect to various data sources and tools. For developers managing tickets, sprints, and project workflows in JIRA, having direct AI access to issue data can significantly streamline productivity.
Instead of constantly switching between Cursor and JIRA web interface, I can now:
- Query tickets directly from Cursor’s Composer
- Create and update issues without leaving my IDE
- Analyze sprint data and generate reports
The Challenge: Node.js Permission Issues
My initial attempt to use the standard @mcp-devtools/jira
package hit immediate roadblocks:
# This failed with permission errors
npx @mcp-devtools/jira
The error messages indicated Node.js permission issues that would require complex system-level fixes. Rather than fighting with npm permissions, I decided to create a custom wrapper script approach.
Solution 1: Shell Wrapper Script
My first working solution involved creating a custom shell script wrapper:
#!/bin/bash
# jira-mcp-wrapper.sh
export JIRA_URL="https://your-company.atlassian.net"
export JIRA_API_MAIL="your.email@company.com"
export JIRA_API_KEY="your_api_key_here"
# Install package globally if not present
if ! yarn global list | grep -q "@mcp-devtools/jira"; then
yarn global add @mcp-devtools/jira
fi
# Run the MCP server
exec yarn global bin mcp-jira
Setting Up the Shell Wrapper
-
Create the wrapper script:
touch ~/jira-mcp-wrapper.sh chmod +x ~/jira-mcp-wrapper.sh
-
Configure MCP settings in
mcp.json
:{ "mcpServers": { "jira": { "command": "/Users/yourusername/jira-mcp-wrapper.sh" } } }
Configuration and Authentication
Getting Your JIRA API Token
- Go to Atlassian Account Settings
- Click “Create API token”
- Give it a descriptive name (e.g., “Cursor MCP Integration”)
- Copy the generated token
Testing Your Credentials
Verify your setup with a simple curl test:
curl -s -u "your.email@company.com:your_api_token" \
-X GET "https://your-company.atlassian.net/rest/api/3/issue/PROJECT-123"
Troubleshooting Common Issues
1. Authentication Failures
Problem: 401 Unauthorized errors Solution:
- Verify your email address matches your Atlassian account exactly
- Ensure API token is correctly copied (they’re case-sensitive)
- Check if your account has necessary JIRA permissions
2. MCP Server Not Starting
Problem: Cursor doesn’t recognize the MCP server Solution:
- Restart Cursor completely after configuration changes
- Check
mcp.json
syntax is valid JSON - Verify script permissions and executability
Integration with Cursor Composer
Once configured, you can ask Cursor’s AI:
- “Show me all high-priority bugs assigned to me”
- “Create a new ticket for the authentication bug”
- “What’s the status of PROJ-123?”
- “Generate a summary of this sprint’s completed work”
Security Best Practices
- Never commit API keys to version control
- Use environment variables for all sensitive data
- Regularly rotate API tokens (set calendar reminders)
- Limit token permissions to only what you need
- Monitor API usage in Atlassian admin console
Conclusion
Setting up JIRA MCP integration transforms how you interact with project management tools within your development environment. While the initial setup has some technical hurdles, the productivity gains are substantial once everything is working.
The key lessons learned:
- Start simple with shell scripts, then evolve to more robust solutions
- Handle authentication carefully - small typos cause big headaches 3. No MCP server - don’t sweat it, build your own script
With this setup, I can now manage JIRA tickets without leaving my code editor, ask AI to analyze sprint progress, and automate repetitive ticket management tasks. The integration has become an essential part of my development workflow.