atlassian-mcp-server
Enables AI agents to manage Jira issues and Confluence pages via natural language, including creating, updating, searching, and uploading file attachments using API token authentication.
README
Atlassian MCP Server
A Model Context Protocol (MCP) server for Atlassian Jira and Confluence integration using API token authentication.
Features
- Long-lived Authentication: Uses API tokens instead of OAuth for persistent access
- Jira Integration: Create, update, search, and manage Jira issues (including file attachments)
- Confluence Integration: Read, create, and update Confluence pages
- Custom Field Mapping: Use friendly names (e.g., "sprint") instead of cryptic field IDs (e.g., "customfield_10560")
- TypeScript: Fully typed for better development experience
- MCP Compatible: Works with Claude Code CLI and Claude Desktop
Prerequisites
- Node.js 20.x or later
- An Atlassian Cloud account (e.g., yoursite.atlassian.net)
- An Atlassian API token
Installation
- Clone or download this repository:
cd /Users/dongood/SourceCode/Repos/_dongood/atlassian-mcp-server
- Install dependencies:
npm install
- Build the TypeScript code:
npm run build
Creating an Atlassian API Token
- Visit https://id.atlassian.com/manage-profile/security/api-tokens
- Click Create API token
- Give it a descriptive name (e.g., "MCP Server")
- Copy the token (you won't be able to see it again)
- Store it securely
Configuration
Environment Variables
The server requires these environment variables:
ATLASSIAN_SITE_URL: Your Atlassian site URL (e.g.,https://avetta.atlassian.net)ATLASSIAN_USER_EMAIL: Your email address associated with your Atlassian accountATLASSIAN_API_TOKEN: The API token you created aboveATLASSIAN_FIELD_MAPPINGS_PATH(optional): Path to custom field mappings JSON file
For Claude Code CLI
Global Configuration (recommended): Edit ~/.claude.json and add the server under the mcpServers key. This makes the server available in all projects without per-project approval prompts:
{
"mcpServers": {
"atlassian": {
"type": "stdio",
"command": "node",
"args": ["/path/to/atlassian-mcp-server/build/index.js"],
"env": {
"ATLASSIAN_SITE_URL": "https://yoursite.atlassian.net",
"ATLASSIAN_USER_EMAIL": "your.email@example.com",
"ATLASSIAN_API_TOKEN": "YOUR_API_TOKEN_HERE"
}
}
}
}
Project-specific Configuration: Create .mcp.json in your project root. Note that servers defined in .mcp.json files require per-project approval when Claude Code starts:
{
"mcpServers": {
"atlassian": {
"command": "node",
"args": ["/path/to/atlassian-mcp-server/build/index.js"],
"env": {
"ATLASSIAN_SITE_URL": "https://yoursite.atlassian.net",
"ATLASSIAN_USER_EMAIL": "your.email@example.com",
"ATLASSIAN_API_TOKEN": "YOUR_API_TOKEN_HERE"
}
}
}
}
Important: Replace the placeholders with your actual values.
For Claude Desktop
Edit the Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Add this configuration:
{
"mcpServers": {
"atlassian": {
"command": "node",
"args": ["/Users/dongood/SourceCode/Repos/_dongood/atlassian-mcp-server/build/index.js"],
"env": {
"ATLASSIAN_SITE_URL": "https://avetta.atlassian.net",
"ATLASSIAN_USER_EMAIL": "your.email@example.com",
"ATLASSIAN_API_TOKEN": "YOUR_API_TOKEN_HERE"
}
}
}
}
Custom Field Mapping
Jira custom fields have cryptic IDs like customfield_10560. This server allows you to map them to friendly names.
Configuring Field Mappings
- Edit
config/field-mappings.json:
{
"sprint": "customfield_10560",
"story_points": "customfield_10016",
"epic_link": "customfield_10014",
"team": "customfield_10100"
}
- The server will automatically load this file from the
config/directory - You can now use
"sprint"instead of"customfield_10560"in MCP tool calls
Finding Custom Field IDs
To find the actual field ID for a custom field:
-
Via Jira UI:
- Go to Jira Settings → Issues → Custom fields
- Find your field and note its ID
-
Via API:
- Get any issue that has the field populated
- Look at the raw JSON response - custom fields appear as
customfield_XXXXX
-
Example using the MCP server:
Use atlassian_get_jira_issue with issueKey "PROJ-123" Look in the fields object for customfield_* entries
Using Field Mappings
When creating or editing issues, you can use either:
- Friendly names:
{ "sprint": "Sprint 42" } - Actual field IDs:
{ "customfield_10560": "Sprint 42" }
Both formats work - the server handles the translation.
Available Tools
Utility Tools
atlassian_health_check- Test connectivity and authenticationatlassian_get_user_info- Get current user information
Jira Tools
atlassian_get_jira_issue- Get issue by key or IDatlassian_create_jira_issue- Create a new issueatlassian_edit_jira_issue- Update issue fieldsatlassian_search_jira_issues- Search using JQLatlassian_add_jira_comment- Add a comment to an issueatlassian_transition_jira_issue- Change issue statusatlassian_get_jira_transitions- Get available transitionsatlassian_get_jira_projects- List projectsatlassian_get_project_issue_types- Get issue types for a projectatlassian_add_jira_attachment- Upload a file attachment to an issueatlassian_get_jira_attachments- List attachments on an issueatlassian_delete_jira_attachment- Delete an attachment by IDatlassian_lookup_jira_user- Find users by name/email
Confluence Tools
atlassian_get_confluence_page- Get page by IDatlassian_search_confluence_cql- Search using CQLatlassian_get_confluence_spaces- List spacesatlassian_get_space_pages- Get pages in a spaceatlassian_create_confluence_page- Create a new pageatlassian_update_confluence_page- Update an existing pageatlassian_get_page_children- Get child pages
File Attachments
The attachment tools allow uploading files from the local filesystem to Jira issues. This works because the MCP server runs as a local process on the same machine as the AI agent (Claude Code), giving it direct filesystem access.
Claude Code --MCP (JSON: file path as string)--> MCP Server --HTTP (multipart/form-data)--> Jira API
The MCP protocol itself only passes JSON (strings, numbers, objects). It has no native binary or multipart support. The trick is that the AI agent passes a file path as a string argument, and the MCP server handles the rest: reading the file from disk, constructing the multipart/form-data request, and uploading it to Jira's REST API v3 attachment endpoint.
This approach requires the MCP server to be running locally (same filesystem as the files being attached). If the MCP server were running remotely, the file path would be meaningless on the remote host, and you'd need an alternative approach like base64-encoded content or a shared storage URL.
Jira Attachment API Requirements
The Jira REST API v3 attachment endpoint (POST /rest/api/3/issue/{key}/attachments) requires:
X-Atlassian-Token: no-checkheader (CSRF protection bypass, required by Jira for this endpoint)Content-Type: multipart/form-datawith the file in thefileform field- Standard Basic Auth (same as all other Jira API calls)
Usage Examples
"Attach /Users/me/docs/report.pdf to BI-10341"
"List all attachments on PROJ-123"
"Delete attachment 12345 from the issue"
Testing
You can test the server using the MCP Inspector:
npx @modelcontextprotocol/inspector node build/index.js
Set environment variables before running:
export ATLASSIAN_SITE_URL="https://avetta.atlassian.net"
export ATLASSIAN_USER_EMAIL="your.email@example.com"
export ATLASSIAN_API_TOKEN="your-api-token"
npx @modelcontextprotocol/inspector node build/index.js
Example Usage
Once configured in Claude Code or Claude Desktop, you can interact with Jira and Confluence naturally:
Jira Examples:
- "Get details for issue BI-9956"
- "Create a new bug in project PROJ with summary 'Login page is broken'"
- "Search for all open bugs assigned to me"
- "Add a comment to PROJ-123 saying 'Fixed in latest build'"
- "Move PROJ-456 to In Progress"
Confluence Examples:
- "Get the content of Confluence page 123456789"
- "Search Confluence for pages about 'architecture'"
- "List all pages in the ENG space"
- "Create a new page in space 12345 titled 'Sprint Retrospective'"
Development
Build
npm run build
Run
npm start
Development mode (build + run)
npm run dev
API Documentation
- Jira REST API v3: https://developer.atlassian.com/cloud/jira/platform/rest/v3/
- Confluence REST API v2: https://developer.atlassian.com/cloud/confluence/rest/v2/
Troubleshooting
Authentication Errors
If you get 401 errors:
- Verify your email and API token are correct
- Make sure the API token hasn't expired
- Check that your user has access to the Jira/Confluence site
Permission Errors
If you get 403 errors:
- Verify you have permission to access the project/space
- Check that your user has the required permissions (e.g., Create Issues, Edit Pages)
Field Not Found Errors
If custom fields aren't working:
- Verify the field ID in your
field-mappings.jsonis correct - Make sure the field exists in the project/issue type
- Check that the field is not hidden or restricted
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.