[BUG] [BUG] HTTP MCP connector to Atlassian /v1/mcp/authv2 fails with "Invalid context provided" while /v1/sse works with the same account
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?
I have searched existing issues and this hasn't been reported yet
This is a single bug report
I am using the latest version of Claude Code
What's wrong?
Authenticating an HTTP MCP server pointed at the Atlassian Rovo MCP authv2 endpoint (https://mcp.atlassian.com/v1/mcp/authv2) fails. When I run the OAuth flow via /mcp → Authenticate, the browser opens on the Atlassian authorization page and immediately shows:
Something went wrong
Invalid context provided. Please try authorizing again.
No token is ever issued. The same Atlassian account, on the same machine, authenticates successfully when the server is configured against the legacy SSE endpoint (https://mcp.atlassian.com/v1/sse). So the account, the browser session, and network connectivity are all fine — the failure is specific to the authv2 HTTP flow.
References:
MCP Authorization spec — resource MUST be on authorization and token requests (RFC 8707): https://modelcontextprotocol.io/specification/2025-11-25/basic/authorization
Atlassian community thread describing the same "Invalid context provided" error caused by the missing resource parameter on authv2.
Environment
Claude Code version: 2.1.179
OS: Windows (Windows 11)
Transport: HTTP (--transport http)
Endpoint: https://mcp.atlassian.com/v1/mcp/authv2
Config location: project-scoped (.claude.json)
Things I already ruled out
Correct, single Atlassian account, logged into the target Jira site in the browser.
Removed the stale mcpOAuth entry for this server from ~/.claude/.credentials.json and retried — no change.
Cleared cached MCP auth state and re-authenticated — no change.
Updated Claude Code to the latest version (2.1.179) — no change.
Tried re-adding the server under a different name (fresh OAuth client registration) — no change.
SSE endpoint authenticates fine with the same account, confirming the issue is specific to the authv2 HTTP flow.
What Should Happen?
Claude correctly connect to mcp using new standard authv2
Error Messages/Logs
Steps to Reproduce
Add the server using the HTTP transport against the authv2 endpoint:
bash claude mcp add --transport http atlassian https://mcp.atlassian.com/v1/mcp/authv2
In Claude Code, run /mcp, select the server, choose Authenticate.
Browser opens the Atlassian authorize page → "Invalid context provided. Please try authorizing again." No consent screen, no token.
Control case that works
Same account, same machine, legacy SSE endpoint:
bashclaude mcp add --transport sse atlassian-sse https://mcp.atlassian.com/v1/sse
/mcp → Authenticate → consent screen appears → token issued → tools load correctly.
Expected behavior
Authenticating against /v1/mcp/authv2 should reach the Atlassian consent screen and issue a token, the same way the SSE endpoint does. This matters because Atlassian has announced that /v1/sse will stop being supported after 30 June 2026, and /v1/mcp/authv2 is the documented replacement. Once SSE is retired, this leaves no working path to the Atlassian MCP server from Claude Code.
Likely cause (for the maintainers)
The Atlassian authv2 endpoint follows the MCP Authorization spec, which requires the OAuth resource parameter (RFC 8707 Resource Indicators) to be included on both the /authorize request and the /token request, identifying the canonical MCP server URI. Reports from the Atlassian community indicate that Atlassian raises exactly this "Invalid context provided" error at the consent step when the resource parameter is missing or doesn't match. The legacy SSE flow doesn't enforce this, which is consistent with SSE working and authv2 failing.
This points to Claude Code not sending (or not correctly populating) the resource parameter for the authv2 HTTP flow.
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.179
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗