claude-code - 💡(How to fix) Fix [BUG] Figma MCP OAuth token not recognized on restart — re-authentication required every session [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#54742Fetched 2026-04-30 06:37:17
View on GitHub
Comments
1
Participants
2
Timeline
8
Reactions
0
Timeline (top)
labeled ×6commented ×1unlabeled ×1

Error Message

Error Messages/Logs

Code Example

claude mcp list shows:
figma: https://mcp.figma.com/mcp (HTTP) - ! Needs authentication
(shown after every restart, even when .credentials.json contains a valid mcpOAuth.figma token)
RAW_BUFFERClick to expand / collapse

Preflight Checklist

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

What's Wrong?

After completing Figma MCP OAuth authentication, the token is saved in ~/.claude/.credentials.json (mcpOAuth.figma entry with valid accessToken exists), but mcp-needs-auth-cache.json is overwritten on every restart, flagging Figma as "Needs authentication". Re-authentication is required on every new Claude Code session.

Related to #54727 but different symptom: occurs on every restart even with a single Claude Code process.

What Should Happen?

After OAuth authentication, the Figma MCP server should remain authenticated across sessions. The token stored in .credentials.json should be recognized on restart without requiring re-authentication.

Error Messages/Logs

claude mcp list shows:
figma: https://mcp.figma.com/mcp (HTTP) - ! Needs authentication
(shown after every restart, even when .credentials.json contains a valid mcpOAuth.figma token)

Steps to Reproduce

  1. Add Figma MCP server via Claude Code marketplace
  2. Authenticate with OAuth (complete the browser flow successfully)
  3. Confirm ~/.claude/.credentials.json contains mcpOAuth.figma with valid accessToken and refreshToken
  4. Restart Claude Code
  5. Run claude mcp list → Figma shows "Needs authentication" again

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.123

Platform

Other

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

No response

extent analysis

TL;DR

The issue can be addressed by investigating the mcp-needs-auth-cache.json overwrite mechanism and ensuring the Figma MCP authentication token is properly persisted across Claude Code sessions.

Guidance

  • Verify that the mcpOAuth.figma entry in ~/.claude/.credentials.json is correctly formatted and contains a valid accessToken and refreshToken after authentication.
  • Check the Claude Code documentation or source code to understand how the mcp-needs-auth-cache.json file is updated and why it might be overwritten on every restart.
  • Investigate potential issues with the OAuth token refresh mechanism, as the presence of a refreshToken suggests that the token should be refreshed automatically when it expires.
  • Consider adding logging or debugging statements to the Claude Code authentication flow to better understand the authentication process and why the Figma MCP server is flagged as "Needs authentication" after every restart.

Notes

The issue may be related to a bug in the Claude Code authentication mechanism or a misconfiguration of the Figma MCP server integration. Further investigation is needed to determine the root cause.

Recommendation

Apply workaround: Modify the Claude Code configuration or authentication flow to properly persist the Figma MCP authentication token across sessions, potentially by updating the mcp-needs-auth-cache.json file or implementing a custom token refresh mechanism.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] Figma MCP OAuth token not recognized on restart — re-authentication required every session [1 comments, 2 participants]