[BUG] Netsuite oauth mcp server fails
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
- User runs
/mcpcommand - User selects NetSuite MCP server to authenticate
- Claude Code fetches OAuth metadata from the MCP server ✓
- Claude Code fails to extract client credentials ("No client info found") ✗
- Authentication fails with error: "SDK auth error: Le" ✗
- Browser never opens
- 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
- OAuth metadata fetch succeeds - "Fetched OAuth metadata with scope: mcp"
- OAuth state generation succeeds - "Generated new OAuth state"
- Client info parsing fails - "No client info found" (appears twice)
- Truncated error message - "SDK auth error: Le" (incomplete error text)
- 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:
- Claude Code successfully retrieves OAuth metadata from the NetSuite MCP server
- Claude Code fails to parse/extract OAuth client credentials from the metadata
- Without client credentials, the OAuth authorization URL cannot be generated
- 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?
- User runs
/mcpcommand - User selects NetSuite MCP server to connect
- Claude Code fetches OAuth metadata from the MCP server
- Claude Code extracts client credentials from metadata
- Claude Code generates OAuth authorization URL
- Browser opens with authorization URL
- User completes OAuth flow
- 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
- Install NetSuite MCP server in Claude Code using
claude mcp add --transport http netsuite <the url>with an HTTP-based NetSuite MCP endpoint - Run
/mcpcommand - Attempt to authenticate to the NetSuite MCP server
- 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_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗