Skip to main content

MCP server for downloading Jira and Confluence Cloud attachments

Project description

MCP Atlassian Attachments

A Model Context Protocol (MCP) server for downloading Jira Cloud attachments by attachment ID to local disk.

Supplement to the official Atlassian MCP server. The official Atlassian MCP server covers search, issue management, and content operations but does not support downloading attachment files to disk. This server fills that gap.

Requirements: Python 3.13+, an Atlassian Cloud account, and an API token with at least the read:jira-work scope.

Authentication

Scoped tokens are recommended to limit access to exactly the permissions needed.

Note: The granular read:attachment:jira scope is not sufficient — Jira's attachment metadata endpoint (/rest/api/3/attachment/{id}) requires read:jira-work to resolve issue-level permissions. A classic (unscoped) API token also works.

Create an API token

  1. Go to id.atlassian.com/manage-profile/security/api-tokens
  2. Click Create API token
  3. Choose "Create API token with scopes" and select the read:jira-work scope, or choose "Classic API token" for full access
  4. Copy the generated token

Quick start

The fastest way to try the server is with the MCP Inspector. Set the three required environment variables and run:

From the published package (no clone needed):

ATLASSIAN_SITE_URL=https://yourorg.atlassian.net \
ATLASSIAN_EMAIL=your.email@example.com \
ATLASSIAN_API_TOKEN=your-api-token \
npx -y @modelcontextprotocol/inspector uvx mcp-atlassian-attachments

From a local clone:

ATLASSIAN_SITE_URL=https://yourorg.atlassian.net \
ATLASSIAN_EMAIL=your.email@example.com \
ATLASSIAN_API_TOKEN=your-api-token \
npx -y @modelcontextprotocol/inspector uv run mcp-atlassian-attachments

Configuration

Set environment variables or create a config file. Environment variables take priority.

Environment variables:

export ATLASSIAN_SITE_URL="https://yourorg.atlassian.net"
export ATLASSIAN_EMAIL="your.email@example.com"
export ATLASSIAN_API_TOKEN="your-api-token"

Config file (~/.config/mcp-atlassian-attachments/config.json):

{
  "site_url": "https://yourorg.atlassian.net",
  "email": "your.email@example.com",
  "api_token": "your-api-token"
}

Tools

Tool Description Required params
download_jira_attachment Download a Jira attachment by ID. attachment_id, output_dir

Common parameters

Parameter Type Description
attachment_id string Jira attachment ID
output_dir string Local directory for the saved file. Created automatically if it does not exist.
filename string (optional) Override filename. Uses metadata filename when omitted.
overwrite bool (optional) Replace an existing file. Defaults to false.

Output

The tool returns a JSON object:

{
  "product": "jira",
  "attachmentId": "439535",
  "filename": "screenshot.png",
  "mimeType": "image/png",
  "size": 496724,
  "path": "/your/output/dir/screenshot.png",
  "sourceUrl": "https://yourorg.atlassian.net/rest/api/3/attachment/content/439535"
}

MCP host configuration

Add the following to your MCP host's config file. The JSON is the same for Cursor (.cursor/mcp.json), Claude Desktop (claude_desktop_config.json), and Claude Code (.claude.json).

{
  "mcpServers": {
    "atlassian": {
      "command": "uvx",
      "args": ["mcp-atlassian-attachments"],
      "env": {
        "ATLASSIAN_SITE_URL": "https://yourorg.atlassian.net",
        "ATLASSIAN_EMAIL": "your.email@example.com",
        "ATLASSIAN_API_TOKEN": "your-api-token"
      }
    }
  }
}

Security

  • ATLASSIAN_API_TOKEN is never logged or included in error messages.
  • The computed Authorization header is never exposed in tool output or errors.
  • File writes are confined to the provided output_dir.
  • Filenames are sanitized to prevent path traversal.

Tests

uv run pytest tests/ -v

Roadmap

  • download_confluence_attachment_tool — Confluence Cloud uses a different API (/wiki/api/v2/) and a different identifier model. Planned for a future release.

License

MIT. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_atlassian_attachments-0.2.0.tar.gz (48.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_atlassian_attachments-0.2.0-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file mcp_atlassian_attachments-0.2.0.tar.gz.

File metadata

File hashes

Hashes for mcp_atlassian_attachments-0.2.0.tar.gz
Algorithm Hash digest
SHA256 94ae9e605fb23adeed01e1ec400b43e8007dc6c563c7ee693ea899e2c0af0279
MD5 5ddf24a82dfd4849bd224a8a80fab8b0
BLAKE2b-256 9fde6b5b38a9fd514821a08921f9dccf8a4478d5a6bc0daac89384d8dcad71c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_atlassian_attachments-0.2.0.tar.gz:

Publisher: ci.yml on alyiox/mcp-atlassian-attachments

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_atlassian_attachments-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_atlassian_attachments-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 82a250ffba0d2afac2ee7c864bfa42823cec787c8c0a97b58e7c832c369b0ab9
MD5 ce1bbe27bb3bcc87b3adc60f97eacdc3
BLAKE2b-256 cebd0977f537d850fc55fdf2c56560b9eb002a7b0c75ada5ca856872038a5ee3

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_atlassian_attachments-0.2.0-py3-none-any.whl:

Publisher: ci.yml on alyiox/mcp-atlassian-attachments

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page