MCP expects localhost as redirect_uri #641
Replies: 2 comments 1 reply
-
|
Hi @baltic-nomster - this issue is probably due to the fact that the MCP server and/or your Nextcloud instance are accessible to one another using a different hostname than what you use to connect via your MCP client, such as Claude Code. For this reason, it's important to set the NEXTCLOUD_PUBLIC_ISSUER_URL env var, which is the URL of your publically accessible Nextcloud instance for the OAuth flow to complete correctly. Let me know if this solves your issue, otherwise feel free to share more about your setup and I can try to help you connect to the MCP server via Claude |
Beta Was this translation helpful? Give feedback.
-
|
Hi @baltic-nomster a recent release of the MCP server has added support for more generic redirect URIs that use HTTPS. Can you try upgrading to a recent commit and test again? This was an oversight on my end, but should now be addressed |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I want to set up this mcp-server between my Nextcould and Open WebUI instances, both hosted via docker on the same machine. I'm using the oauth_single_audience mode and I'm able to register Open WebUI with Nextcloud as a client just fine. But when I try to go through the DCR flow as user I get "redirect_uri must be localhost for native clients" and I'm not redirected to the Nextcloud authentication page.
My env variables are:
MCP_DEPLOYMENT_MODE: 'oauth_single_audience' NEXTCLOUD_HOST: 'https://cloud.home.arpa' NEXTCLOUD_CA_BUNDLE: '/app/certs/ca-bundle.crt' NEXTCLOUD_MCP_SERVER_URL: 'http://192.168.188.3:8181' TOKEN_ENCRYPTION_KEY: 'key-here' TOKEN_STORAGE_DB: '/app/data/tokens.db'I read that it's also possible to use claude web with this mcp, so why do I get the restriction for localhost? What would be the right approach to mitigate this problem? Any further information needed?
Beta Was this translation helpful? Give feedback.
All reactions