[BUG] Netsuite oauth mcp server fails

Resolved 💬 3 comments Opened Nov 18, 2025 by offnertho Closed Jan 20, 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?

Environment

  • Claude Code Version: 2.0.44
  • OS: macOS Darwin 24.6.0
  • Platform: darwin (arm64)
  • Date: 2025-11-18

## Summary

HTTP-based NetSuite MCP server authentication fails in Claude Code with truncated error "SDK auth error: Le". The same MCP server authenticates successfully in Claude Desktop,
indicating this is a Claude Code-specific OAuth implementation issue.

## Description

When attempting to connect to a NetSuite MCP server (HTTP-based MCP with OAuth authentication), Claude Code fails during the OAuth flow before the browser window can open. The
authentication process fails with a cryptic truncated error message.

Key Issue: Claude Code reports "No client info found" when attempting to parse OAuth metadata from the NetSuite MCP server, even though the same server successfully provides
this information to Claude Desktop.

## Actual Behavior

  1. User runs /mcp command
  2. User selects NetSuite MCP server to authenticate
  3. Claude Code fetches OAuth metadata from the MCP server ✓
  4. Claude Code fails to extract client credentials ("No client info found") ✗
  5. Authentication fails with error: "SDK auth error: Le"
  6. Browser never opens
  7. Connection fails with message: "Failed to reconnect to netsuite"

## Comparison with Claude Desktop

Claude Desktop: ✓ Successfully authenticates with the same NetSuite MCP server
Claude Code: ✗ Fails with "No client info found"

This confirms the NetSuite MCP server is properly configured and the issue is specific to Claude Code's OAuth implementation.
### Key Observations

  1. OAuth metadata fetch succeeds - "Fetched OAuth metadata with scope: mcp"
  2. OAuth state generation succeeds - "Generated new OAuth state"
  3. Client info parsing fails - "No client info found" (appears twice)
  4. Truncated error message - "SDK auth error: Le" (incomplete error text)
  5. No authorization URL generated - Browser never opens because the flow fails before URL generation

## Root Cause Analysis

The issue appears to be in Claude Code's OAuth metadata parsing logic. Specifically:

  1. Claude Code successfully retrieves OAuth metadata from the NetSuite MCP server
  2. Claude Code fails to parse/extract OAuth client credentials from the metadata
  3. Without client credentials, the OAuth authorization URL cannot be generated
  4. The authentication flow aborts with a truncated error message

The fact that Claude Desktop successfully extracts client credentials from the same server proves:

  • The server is sending properly formatted OAuth metadata
  • Claude Desktop's parsing logic handles this format correctly
  • Claude Code's parsing logic has a bug or incompatibility

## Impact

  • Severity: High - Completely blocks NetSuite MCP usage in Claude Code
  • Workaround: Use Claude Desktop for NetSuite MCP access
  • User Experience: Poor - cryptic error messages, no actionable feedback

## Additional Notes

  • The error message "SDK auth error: Le" is truncated, making debugging difficult
  • The "No client info found" message appears twice in the flow, suggesting multiple failed attempts to parse the metadata
  • Browser launch is never attempted because the OAuth URL generation fails
  • The OAuth redirect port is successfully allocated (56387 in the example)

## Related Information

  • Issue occurs with HTTP-based MCP servers using OAuth authentication
  • Does not affect stdio-based MCP servers
  • May affect other OAuth-based HTTP MCP servers beyond NetSuite

What Should Happen?

  1. User runs /mcp command
  2. User selects NetSuite MCP server to connect
  3. Claude Code fetches OAuth metadata from the MCP server
  4. Claude Code extracts client credentials from metadata
  5. Claude Code generates OAuth authorization URL
  6. Browser opens with authorization URL
  7. User completes OAuth flow
  8. MCP server connects successfully

Error Messages/Logs

### Authentication Flow (from `~/.claude/debug/latest`)

    
    [DEBUG] MCP server "netsuite": Using redirect port: 56387
    [DEBUG] MCP server "netsuite": Fetched OAuth metadata with scope: mcp
    [DEBUG] MCP server "netsuite": Generated new OAuth state
    [DEBUG] MCP server "netsuite": Starting SDK auth
    [DEBUG] MCP server "netsuite": Server URL: https://[REDACTED]/services/mcp/v1/suiteapp/com.netsuite.mcpstandardtools
    [DEBUG] MCP server "netsuite": No client info found
    [DEBUG] MCP server "netsuite": Using scope from metadata: mcp
    [DEBUG] MCP server "netsuite": No client info found
    [DEBUG] MCP server "netsuite": Using scope from metadata: mcp
    [DEBUG] MCP server "netsuite": SDK auth error: Le
    [DEBUG] MCP server "netsuite": MCP OAuth server cleaned up

Steps to Reproduce

  1. Install NetSuite MCP server in Claude Code using claude mcp add --transport http netsuite <the url> with an HTTP-based NetSuite MCP endpoint
  2. Run /mcp command
  3. Attempt to authenticate to the NetSuite MCP server
  4. Observe authentication failure

Claude Model

Sonnet (default)

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.0.44

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 ↗