[BUG] MCP Atlassian OAuth tokens stored but not retrieved for SSE connection (400 error)

Resolved 💬 3 comments Opened Feb 12, 2026 by ogierpaulmck Closed Feb 16, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Description:

After completing OAuth authentication with the Atlassian MCP server, Claude Code successfully stores the tokens but fails to retrieve them when establishing the SSE connection, resulting in a 400 error.

Environment:

Steps to Reproduce:

  1. Configure Atlassian MCP server in ~/.claude/.mcp.json:

{
"mcpServers": {
"atlassian": {
"type": "sse",
"url": "https://mcp.atlassian.com/v1/mcp",
"displayName": "Atlassian"
}
}
}

  1. Run /mcp command
  2. Complete OAuth flow in browser (authentication succeeds)
  3. See message: "Authentication successful, but server reconnection failed"

Expected Behavior:
After OAuth completes, Claude Code should use the stored tokens to establish SSE connection.

Actual Behavior:
Tokens are stored but not retrieved. Connection fails with 400 error.

Debug Log Evidence:

The debug log shows tokens ARE stored successfully:
14:39:30.045Z [DEBUG] MCP server "atlassian": Returning tokens
14:39:30.045Z [DEBUG] MCP server "atlassian": Token length: 74
14:39:30.045Z [DEBUG] MCP server "atlassian": Has refresh token: true
14:39:30.045Z [DEBUG] MCP server "atlassian": Expires in: 3159s

But immediately after, a different code path reports no token:
14:39:30.330Z [DEBUG] [claudeai-mcp] No access token
14:39:30.339Z [DEBUG] MCP server "atlassian": SSE Connection failed after 329ms:
{"url":"https://mcp.atlassian.com/v1/mcp","error":"SSE error: Non-200 status code (400)"}
14:39:30.339Z [ERROR] MCP server "atlassian" Connection failed: SSE error: Non-200 status code (400)

Analysis:
The token storage mechanism works (logs show token length, refresh token exists, expiry time), but the SSE connection code path uses a different retrieval mechanism that fails to find the stored tokens.

Related Issues:

  • #10439 - MCP OAuth using wrong redirect_uri
  • #2521 - Atlassian MCP Sign In does not work

Workarounds Attempted:

  • Restarting Claude Code
  • Re-authenticating multiple times
  • Clearing and reconfiguring MCP settings

None resolved the issue.

What Should Happen?

After OAuth completes, Claude Code should use the stored tokens to establish SSE connection.

Error Messages/Logs

The debug log shows tokens ARE stored successfully:
  14:39:30.045Z [DEBUG] MCP server "atlassian": Returning tokens
  14:39:30.045Z [DEBUG] MCP server "atlassian": Token length: 74
  14:39:30.045Z [DEBUG] MCP server "atlassian": Has refresh token: true
  14:39:30.045Z [DEBUG] MCP server "atlassian": Expires in: 3159s

  But immediately after, a different code path reports no token:
  14:39:30.330Z [DEBUG] [claudeai-mcp] No access token
  14:39:30.339Z [DEBUG] MCP server "atlassian": SSE Connection failed after 329ms:
    {"url":"https://mcp.atlassian.com/v1/mcp","error":"SSE error: Non-200 status code (400)"}
  14:39:30.339Z [ERROR] MCP server "atlassian" Connection failed: SSE error: Non-200 status code (400)

Steps to Reproduce

  1. Configure Atlassian MCP server in ~/.claude/.mcp.json:

{
"mcpServers": {
"atlassian": {
"type": "sse",
"url": "https://mcp.atlassian.com/v1/mcp",
"displayName": "Atlassian"
}
}
}

  1. Run /mcp command
  2. Complete OAuth flow in browser (authentication succeeds)
  3. See message: "Authentication successful, but server reconnection failed"

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.39

Claude Code Version

2.1.39

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗