# Confluence Cloud attachment download 401 through the Atlassian MCP server

**TL;DR:** Set CONFLUENCE_ATTACHMENT_DOWNLOAD_USE_V1=true in the server env. The v2 download path rejects the MCP auth on some tenants; the v1 path accepts it. Restart the client and retry the attachment download.

## The error

```
401 Unauthorized downloading a Confluence Cloud attachment via /wiki/download/attachments/... through the MCP server
```

## Fix it

1. Confirm other Confluence MCP calls (pages, search) work.
   Expected: Only attachment downloads 401.
2. Set CONFLUENCE_ATTACHMENT_DOWNLOAD_USE_V1=true in the server env.
   Expected: The flag is saved.
3. Restart the MCP client.
   Expected: Attachment downloads succeed.

## When this applies

Confluence attachment downloads 401 through mcp-atlassian while the rest of Confluence works fine.

## When this does NOT apply

If all Confluence calls 401, the token or base URL is wrong; fix auth first.

## Tool compatibility

sooperset/mcp-atlassian, Confluence Cloud

## Also seen as

- Confluence MCP attachment unauthorized
- wiki download attachments 401 MCP
- CONFLUENCE_ATTACHMENT_DOWNLOAD_USE_V1

## Why it happens

Attachment binaries are served on a different path with different auth handling than the REST API. On some Cloud tenants the v2 path rejects the MCP credential while v1 accepts it; the flag switches the download path.

## Edge cases

- Very large attachments may still time out; retry or fetch in ranges.
- The flag only affects downloads, not page content.
- Server/DC instances do not need this flag.