[Enhancement]: Separate OBO authentication state from interactive MCP OAuth
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- authentication, authorization, backend
Research direction
Start with usesObo and the discovery fallback in packages/api/src/mcp/MCPConnectionFactory.ts (around lines 405-425), then detectOAuth() in MCPServerInspector. The generic OAuth-URL message is in api/server/services/MCP.js (around lines 1463-1485), and the health-check versus tool-call recovery split is in MCPManager.callTool and isConnected. Done means OBO-configured servers are not classified as interactive OAuth, OBO errors no longer point to an OAuth sign-in URL, and tool-call and health-check recovery behave consistently.
Written by the indexing model from the issue text.
Description
What features would you like to see added?
Follow-up to #18920, which reproduces OBO servers being classified as interactive OAuth during startup detection.
LibreChat currently makes two distinct decisions that can conflict for an OBO-configured MCP server:
- How to connect:
MCPConnectionFactory.usesOboselects OBO token exchange using the signed-in user's existing identity. OBO has its own connection path and retries once with a forced token re-exchange when a tool request is rejected. - Whether interactive MCP OAuth is required:
MCPServerInspector.detectOAuth()can inferrequiresOAuth: truefrom an unauthenticated Bearer challenge and protected-resource metadata. That challenge indicates the server requires a bearer token; it does not establish that the user should sign in to the MCP server interactively.
These are not two implementations of OBO. OBO intentionally shares OAuth-related connection and token plumbing: requiresOAuthMachinery() returns true for OBO so the OBO resolver is passed through. That shared plumbing should remain. The inconsistency is that some classification, discovery, and recovery paths also interpret OBO as interactive OAuth.
More details
At upstream commit 4700c44eb77c142b4f9f8b87476924f22890eb39, code review identifies these related paths:
MCPConnectionFactorydiscovery marks an OBO token-resolution failure asoauthRequiredand falls back to unauthenticated tool listing (MCPConnectionFactory.ts).- Some auth failures reach a generic message that asks the user to check for an OAuth authentication URL (MCP.js), although OBO has no separate interactive MCP sign-in URL.
- Health-check recovery differs from tool-call recovery. If
isConnected()detects an auth failure and the server is classified as OAuth,MCPManager.callToolcan enter the shared interactive OAuth recovery path. If it is not classified that way, the tool call returns “Connection is not active” without a forced OBO refresh. The tool-request 401 path has a separate OBO re-exchange/retry. This is based on code review, not a live health-check reproduction.
The request is to keep OBO's shared token plumbing while making discovery results, user-facing errors, and recovery behavior accurately reflect whether the configured mode is OBO or interactive OAuth. The startup detection behavior and controlled inspector A/B are described in #18920; the additional paths above have not been tested end-to-end.
Which components are impacted by your request?
Other — MCP server authentication.
Pictures
N/A.
Code of Conduct
- I agree to follow this project's Code of Conduct
- Dominant language
- TypeScript
- Stars
- 45.6k
- Forks
- 9.4k
- Avg merge
- 16h 24m
- Merged PRs (30d)
- 825
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from LibreChat-AI/LibreChat
-
🐛 bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
LibreChat-AI/LibreChat#19286 ·
Maintainers usually reply within 1 day
-
[Bug]: Assistants title generation hardcodes gpt-3.5-turbo, which OpenAI shut down on 23 Oct 2026Possibly taken A pull request linked to this issue is open or already merged. Open🐛 bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
LibreChat-AI/LibreChat#19201 ·
Maintainers usually reply within 1 day
-
[Bug]: New agent has no provider/model preselected when only one provider is allowedPossibly taken A pull request linked to this issue is open or already merged. Open🐛 bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
LibreChat-AI/LibreChat#19198 ·
Maintainers usually reply within 1 day
-
[Bug]: Root `color-scheme` only set in high-contrast mode, so a custom `logo.svg` ignores the app's dark themePossibly taken @fahm-codes claimed this 1 day ago. Open🐛 bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
LibreChat-AI/LibreChat#19185 · 1 comment ·
Maintainers usually reply within 1 day
-
[Bug]: E2E tests use outdated UI selectors in keys.spec.ts, popup.spec.ts and messages.spec.tsPossibly taken A pull request linked to this issue is open or already merged. Open🐛 bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
LibreChat-AI/LibreChat#19091 ·
Maintainers usually reply within 1 day
All issues in LibreChat-AI/LibreChat
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
platform:windows provider:antigravity-cli providers setup triaged wontfix
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
can1357/oh-my-pi#21349 · 1 comment ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ohcnetwork/care_fe#17474 ·
Maintainers usually reply within 1 day
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 90/100