-
Notifications
You must be signed in to change notification settings - Fork 299
Open
Description
Hey @danny-avila , first of all huge thanks to your contributions to LibreChat! This helps us a lot in moving forward quickly.
While working with the Spotify MCP example, we ran into some unclear points:
registeredClientsis set in the code but never actually used anywhere else. Could you clarify its intended purpose and how/where it should be consumed? Right now, we worked around this by not using Dynamic Client Registration (and setting the OAuth settings inlibrechat.yaml)- The redirect URL pattern "/api/mcp//oauth/callback" from Authentication Server back to LibreChat does not seem to be documented anywhere, we had to debug it locally from the Spotify example to get OAuth working with LibreChat. Can you confirm if this is the intended callback path? If yes and you can help me spot the correct location, I can create a PR for the docs
- Following point 2, we are redirected into LibreChat successfully and
access_token/refresh_tokenare being stored successfully in the DB. Still, our MCP does not receive theaccess_tokenand does not seem to store it, I wasn't able to to spot how this works in the Spotify MCP. Could you give me a hint to work this out as well?
Right now, we connected LibreChat directly to the Authentication Server (not through the MCP):
mcpServers:
sf-mcp:
type: "streamable-http"
url: "https://mcp.example.com/mcp"
headers:
X-User-ID: "{{LIBRECHAT_USER_ID}}"
startup: true
oauth:
authorization_url: https://oauth-provider.example.com/services/oauth2/authorize
token_url: https://oauth-provider.example.com/services/oauth2/token
client_id: <clientId>
client_secret: <clientSecret>
redirect_uri: "https://librechat.example.com/api/mcp/sf-mcp/oauth/callback"
scope: "api refresh_token"This flow works until we are redirected to LibreChat, afterwards Prompts to the MCP fail due to missing authorisation (point 3 mentioned above). We previously tried to set respective MCP endpoints in this config and route everything through the MCP (like in the spotify example), which we couldn't get to work because we couldn't get the access_token from the MCP back to LibreChat.
Thanks in advance!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels