[BUG] Figma MCP OAuth Token Not Persisting After Authentication

Resolved 💬 3 comments Opened Mar 18, 2026 by nicodavdesign Closed Apr 15, 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?

Summary

After successfully completing OAuth authentication for the Figma MCP server, Claude Code fails to persist the access token to the configuration. The authentication flow completes successfully (confirmed by Figma), but the server remains in "Needs authentication" state with no token stored.

Environment

  • Claude Code Version: 2.0.25
  • OS: macOS (Darwin 24.6.0)
  • Date: March 18, 2026
  • MCP Server: Figma (https://mcp.figma.com/mcp)
  • Transport: HTTP

Related Issues

This issue is related to but distinct from #10250 ("OAuth Authentication Succeeds but MCP Reconnection Fails - Requires Restart").

Key difference:

  • Issue #10250: OAuth tokens ARE successfully saved to ~/.claude/.credentials.json, but reconnection fails until restart
  • This issue: OAuth authentication completes successfully, but no token is saved at all (neither to configuration file nor credentials file)

This appears to be a more severe variant where the token persistence step fails entirely, rather than just the reconnection step.

Steps to Reproduce

  1. Add Figma MCP server:

``bash
claude mcp add --transport http figma https://mcp.figma.com/mcp
``

  1. Verify server shows "Needs authentication":

``bash
claude mcp list
# Output: figma: https://mcp.figma.com/mcp (HTTP) - ⚠ Needs authentication
``

  1. Initiate authentication:

``bash
/mcp
``

  • Select Figma server
  • Click "Authenticate"
  1. Complete OAuth flow in browser:
  • Click "Agree & Allow Access" on Figma authorization page
  • See "Authentication Successful" message
  • OAuth callback received at localhost:55616/callback?code=...
  1. Return to Claude Code and see message:

``
Authentication successful, but server reconnection failed.
You may need to manually restart Claude Code for the changes to take effect.
``

  1. Restart Claude Code
  1. Check server status:

``bash
claude mcp get figma
``

Expected Behavior

After successful OAuth authentication:

  1. Access token should be stored in the MCP configuration
  2. Configuration should show Authorization: Bearer <token> header
  3. Server status should change from "Needs authentication" to "Connected" or similar
  4. MCP tools from Figma should be available

Actual Behavior

After successful OAuth authentication:

  1. No access token is stored in the configuration
  2. No Authorization header appears in claude mcp get figma output
  3. Server status remains "⚠ Needs authentication"
  4. MCP tools are not available

Before authentication:

figma:
  Scope: Local config (private to you in this project)
  Status: ⚠ Needs authentication
  Type: http
  URL: https://mcp.figma.com/mcp
  Headers:
    Authorization: Bearer figd_Cfzi... (old/expired token)

After authentication (expected to have new token, but doesn't):

figma:
  Scope: Local config (private to you in this project)
  Status: ⚠ Needs authentication
  Type: http
  URL: https://mcp.figma.com/mcp

  # No Authorization header present!

Additional Context

  • Figma confirms authentication was successful (see screenshots)
  • OAuth callback is received by Claude Code (localhost callback URL shows in browser)
  • The token is simply not being persisted to the configuration file
  • Multiple restarts don't resolve the issue
  • Removing and re-adding the server doesn't help
  • Checked ~/.claude.json - no token stored
  • Checked ~/.claude/.credentials.json - file doesn't exist or no Figma credentials present
  • Checked macOS keychain - no Figma MCP credentials found

Screenshots

  1. Figma OAuth Authorization Screen: Successfully clicked "Agree & Allow Access"
  2. Authentication Successful Page: Confirmed by Figma with "You can close this window. Return to Claude Code."

Workaround Attempts

  • ✗ Restarting Claude Code after authentication
  • ✗ Removing and re-adding the MCP server
  • ✗ Running authentication flow multiple times
  • ✗ Checking macOS keychain for stored credentials

Impact

Unable to use Figma MCP integration with Claude Code. OAuth flow appears to work correctly, but token persistence is broken, making the feature unusable.

Potential Root Cause

The OAuth callback handler successfully receives the authorization code and exchanges it for an access token with Figma, but fails to write the token to the MCP configuration file (~/.claude.json).

Suggested Fix

Investigate the OAuth token persistence logic for HTTP-based MCP servers. The token should be:

  1. Retrieved from the OAuth callback
  2. Exchanged for an access token
  3. Written to the configuration file with proper Authorization header
  4. Used for subsequent MCP server connections

What Should Happen?

See question 1

Error Messages/Logs

See question 1

Steps to Reproduce

See question 1

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.0.25

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 ↗