OAuth Streamable HTTP MCP tools never injected into Claude context after tools/list - NetSuite #13720
Replies: 6 comments 4 replies
|
If you could provide the information required from the issue template, it would help troubleshoot:
https://github.com/danny-avila/LibreChat/blob/main/.github/ISSUE_TEMPLATE/BUG-REPORT.yml also more logs surrounding the actual chat request as indicated by the issue template would help, too |
|
Great! I will wait until 0.87 is released as I see it is in RC1 right now. Then I will test again. |
|
Still broken in v0.8.7 Upgraded from v0.8.6 to v0.8.7 and the issue persists unchanged. The fixes in #13669, #13672, and #13673 did not resolve this case. Root cause now clearly identified from debug logs: The timing sequence is: sql 19:42:12 [MCP Cache] Updated 17 tools for server netsuite ✅ 19:43:36 [initializeClient] Storing tool context: 0 tools, registry size: 0 ❌ toolSchemaTokens: 0 ❌ Expected behavior: initializeClient should either: Wait for the MCP cache to be populated before building tool context, OR LibreChat: v0.8.7 |
|
From the MCP-protocol side: after the OAuth handshake, the client must treat it as a fresh authenticated session and re-run discovery on it — Two things to capture to confirm:
If |
|
Any other thoughts on this one? @danny-avila |
|
After placing the Netsuite MCP configuration in the librechat.yaml file the authentication is now working! @danny-avila Thank you so much for your continued work and efforts on LibreChat. Such as wonderful product. |
Uh oh!
There was an error while loading. Please reload this page.
LibreChat Version: v0.8.6
Deployment: Docker Compose on GCP VM (Ubuntu)
MongoDB: 8.0.20
Transport: streamable-http
Auth: OAuth 2.0 Authorization Code Grant + PKCE
MCP Server: NetSuite AI Connector Service (native Oracle NetSuite MCP)
Model Tested: claude-sonnet-4-6 (Anthropic endpoint)
[Bug]: OAuth Streamable HTTP MCP — tools/list never called after successful OAuth, tools not injected into Claude context (NetSuite AI Connector)
Environment
yaml
LibreChat Version: v0.8.6
Deployment: Docker Compose on GCP VM (Ubuntu)
MongoDB: 8.0.20
Transport: streamable-http
Auth: OAuth 2.0 Authorization Code Grant + PKCE
MCP Server: NetSuite AI Connector Service (native Oracle NetSuite MCP)
Model Tested: claude-sonnet-4-6 (Anthropic endpoint)
Describe the Bug
After successful OAuth 2.0 + PKCE flow, LibreChat establishes a connection to the NetSuite MCP server but never calls tools/list. Tool definitions are never fetched and never injected into Claude's context. Claude sees only the server name and the serverInstructions value — not the actual callable tools.
As a result:
Claude hallucinates tool responses using memory instead of executing real tool calls
<tool_call> and <tool_response> appear as literal text in the chat (simulated, not executed)
Agent Builder shows "netsuite — A collection of tools from netsuite" with zero individual tools listed
Asking Claude for exact tool names returns "server instructions only contain 'false'" — no tools enumerated
What Should Happen
After OAuth completes:
initialize handshake sent with Bearer token ✅
Connection established ✅
tools/list called ← This never happens ❌
Tool definitions injected into Claude's context ← Never happens ❌
info: [MCP][netsuite] OAuth Required: true
info: [MCP][netsuite] Tools: undefined ← Never populated
info: [MCP] Initialized with 1 configured server and 0 tools.
info: [MCP OAuth] OAuth flow completed, tokens received ✅
info: [MCP][netsuite] Loaded OAuth tokens ✅
info: [MCP][netsuite] Connection successfully established ✅
← NO tools/list log line ever appears after this
The same NetSuite MCP server works perfectly with Claude.ai (Anthropic's native client), which returns all 14 tools with ns_ prefix and executes real queries returning verified NetSuite data.
mcpServers:
netsuite:
type: streamable-http
url: https://[accountid].suitetalk.api.netsuite.com/services/mcp/v1/all
requiresOAuth: true
startup: true
timeout: 30000
serverInstructions: false
oauth:
authorization_url: "https://[accountid].app.netsuite.com/app/login/oauth2/authorize.nl"
token_url: "https://[accountid].suitetalk.api.netsuite.com/services/rest/auth/oauth2/v1/token"
client_id: "[redacted]"
scope: "mcp"
redirect_uri: "https://[domain]/api/mcp/netsuite/oauth/callback"
pkce: true
This appears to be the same class of bug documented here:
github.com
More details about github.com
After a successful OAuth 2.1 + PKCE S256 authorization flow against a remote http-transport MCP server, the client silently fails to register the post-auth tool catalog. The cause is client-side, in the code path that should re-handshake an http-transport MCP server after a successful OAuth dance and call tools/list on it.
github.com
More details about github.com
Steps to Reproduce
Configure a streamable-http MCP server with OAuth in librechat.yaml
Start LibreChat and complete the OAuth consent flow
Confirm connection established in logs
Open Agent Builder → Tools → see server listed but 0 individual tools
Ask Claude the exact tool names → Claude says it cannot see them
Ask Claude to call a tool by exact name → Claude hallucinates a response using memory instead of executing
Expected Actual
After OAuth tools/list called, tools injected No tools/list, 0 tools
Agent Builder 14 tools listed 0 tools listed
Tool calls Real NetSuite data returned Claude hallucination
Chat area Tools executable Tools simulated as text
All reactions