[MCP Plugin] Bearer resource_metadata hardcoded #1226

Closed
opened 2026-03-13 08:29:11 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @kziemski on GitHub (May 18, 2025).

ec51c4050c/packages/better-auth/src/plugins/mcp/index.ts (L882)

On the face should point to baseUrl from context.
but Wondering if it should be overiddable in plugin config so that

instead of https://example.com/api/auth/.well-known/oauth-authorization-server
you can set it to https://example.com/.well-known/oauth-authorization-server

make it a developer responsibility?

Originally created by @kziemski on GitHub (May 18, 2025). https://github.com/better-auth/better-auth/blob/ec51c4050ce8f58c05bbbd685968798938639b71/packages/better-auth/src/plugins/mcp/index.ts#L882 On the face should point to baseUrl from context. but Wondering if it should be overiddable in plugin config so that instead of https://example.com/api/auth/.well-known/oauth-authorization-server you can set it to https://example.com/.well-known/oauth-authorization-server make it a developer responsibility?
Author
Owner

@dosubot[bot] commented on GitHub (Aug 17, 2025):

Hi, @kziemski. I'm Dosu, and I'm helping the better-auth team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You identified that the Bearer resource_metadata URL in the MCP plugin is currently hardcoded.
  • You suggested it should use the baseUrl from the context instead.
  • You proposed making this URL configurable within the plugin settings for flexibility.
  • There has been no further activity or comments on this issue since your initial report.

Next Steps:

  • Please let me know if this issue is still relevant with the latest version of better-auth by commenting here.
  • If I don’t hear back within 7 days, this issue will be automatically closed.

Thanks for your understanding and contribution!

@dosubot[bot] commented on GitHub (Aug 17, 2025): Hi, @kziemski. I'm [Dosu](https://dosu.dev), and I'm helping the better-auth team manage their backlog and am marking this issue as stale. **Issue Summary:** - You identified that the Bearer `resource_metadata` URL in the MCP plugin is currently hardcoded. - You suggested it should use the `baseUrl` from the context instead. - You proposed making this URL configurable within the plugin settings for flexibility. - There has been no further activity or comments on this issue since your initial report. **Next Steps:** - Please let me know if this issue is still relevant with the latest version of better-auth by commenting here. - If I don’t hear back within 7 days, this issue will be automatically closed. Thanks for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#1226