[GH-ISSUE #7614] Better Auth MCP Server returning "Unauthorized" error #19485

Closed
opened 2026-04-15 18:38:14 -05:00 by GiteaMirror · 8 comments
Owner

Originally created by @carry0987 on GitHub (Jan 26, 2026).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/7614

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

Hi, I'm encountering an issue with the Better Auth MCP server while using it in VS Code with GitHub Copilot.

Whenever I try to call tools like mcp_better-auth-d_search or mcp_better-auth-d_list_files, the API returns an "Unauthorized" error (e.g., Search API error: Unauthorized). It seems like there might be an issue with the backend service for the MCP.

Current vs. Expected behavior

Current Behavior:
When calling any tool provided by the Better Auth MCP server (such as mcp_better-auth-d_search or mcp_better-auth-d_list_files), the server returns an error message: Search API error: Unauthorized or List files API error: Unauthorized. This occurs even when the request is properly formatted by the AI assistant (e.g., GitHub Copilot).

Expected Behavior:
The MCP server should successfully authenticate with the Better Auth knowledge base and return:

For Search: Relevant semantic search results or documentation excerpts matching the query.
For List Files: A list of available document IDs and names within the knowledge base.
It should provide actionable information instead of authentication errors.

What version of Better Auth are you using?

1.4.17

System info

Don't need here

Which area(s) are affected? (Select all that apply)

Backend

Auth config (if applicable)

import { betterAuth } from "better-auth"
export const auth = betterAuth({
  emailAndPassword: {  
    enabled: true
  },
});

Additional context

No response

Originally created by @carry0987 on GitHub (Jan 26, 2026). Original GitHub issue: https://github.com/better-auth/better-auth/issues/7614 ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce Hi, I'm encountering an issue with the Better Auth MCP server while using it in VS Code with GitHub Copilot. Whenever I try to call tools like `mcp_better-auth-d_search` or `mcp_better-auth-d_list_files`, the API returns an "Unauthorized" error (e.g., [Search API error: Unauthorized](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html)). It seems like there might be an issue with the backend service for the MCP. ### Current vs. Expected behavior Current Behavior: When calling any tool provided by the Better Auth MCP server (such as `mcp_better-auth-d_search `or `mcp_better-auth-d_list_files`), the server returns an error message: [Search API error: Unauthorized](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html) or List files API error: Unauthorized. This occurs even when the request is properly formatted by the AI assistant (e.g., GitHub Copilot). Expected Behavior: The MCP server should successfully authenticate with the Better Auth knowledge base and return: For Search: Relevant semantic search results or documentation excerpts matching the query. For List Files: A list of available document IDs and names within the knowledge base. It should provide actionable information instead of authentication errors. ### What version of Better Auth are you using? 1.4.17 ### System info ```bash Don't need here ``` ### Which area(s) are affected? (Select all that apply) Backend ### Auth config (if applicable) ```typescript import { betterAuth } from "better-auth" export const auth = betterAuth({ emailAndPassword: { enabled: true }, }); ``` ### Additional context _No response_
GiteaMirror added the lockedbug labels 2026-04-15 18:38:14 -05:00
Author
Owner

@better-auth-agent[bot] commented on GitHub (Jan 26, 2026):

It seems like you're facing an "Unauthorized" error while using the Better Auth MCP server in your application. This issue could stem from a few different factors. Here are some troubleshooting steps you can follow:

  1. Check Your Authentication Configuration: Ensure that your authentication configuration is set up correctly. Specifically, check that your email and password authentication is enabled in your configuration. Your existing code snippet looks correct, but verifying that your credentials are correctly handled is crucial.

  2. Verify Access Tokens: If you're using OAuth with the MCP server, make sure that the access tokens are issued correctly and not expired when making requests to the mcp_better-auth-d_search or mcp_better-auth-d_list_files tools. The MCP plugin handles token authentication, make sure it's accurately integrated.

  3. Logs and Debugging: Use server logs to get insights into the requests being made and the responses returned. This can help identify whether the requests are formatted correctly or if they're being denied for specific reasons.

  4. CORS Configuration: Sometimes, CORS issues can result in unauthorized errors. Ensure your CORS configurations are set properly to allow requests from your domains to the MCP server.

  5. Update and Migrate: Ensure you are running the latest version of Better Auth (1.4.17 in your case) and do any necessary migrations to ensure your database schema is up to date.

If the issue persists after attempting these troubleshooting steps, it might be beneficial to tag the Better Auth team members, Beka and Max (@bekacru and @ping__), for more personalized assistance.

Is there a particular part of this process where you would like more detailed guidance?

If you need more help, tag @better-auth-agent in a comment so I can respond.

DiagramDiscordGitHub

Diagram Join Star

<!-- gh-comment-id:3798468365 --> @better-auth-agent[bot] commented on GitHub (Jan 26, 2026): It seems like you're facing an "Unauthorized" error while using the Better Auth MCP server in your application. This issue could stem from a few different factors. Here are some troubleshooting steps you can follow: 1. **Check Your Authentication Configuration**: Ensure that your authentication configuration is set up correctly. Specifically, check that your email and password authentication is enabled in your configuration. Your existing code snippet looks correct, but verifying that your credentials are correctly handled is crucial. 2. **Verify Access Tokens**: If you're using OAuth with the MCP server, make sure that the access tokens are issued correctly and not expired when making requests to the `mcp_better-auth-d_search` or `mcp_better-auth-d_list_files` tools. The MCP plugin handles token authentication, make sure it's accurately integrated. 3. **Logs and Debugging**: Use server logs to get insights into the requests being made and the responses returned. This can help identify whether the requests are formatted correctly or if they're being denied for specific reasons. 4. **CORS Configuration**: Sometimes, CORS issues can result in unauthorized errors. Ensure your CORS configurations are set properly to allow requests from your domains to the MCP server. 5. **Update and Migrate**: Ensure you are running the latest version of Better Auth (1.4.17 in your case) and do any necessary migrations to ensure your database schema is up to date. If the issue persists after attempting these troubleshooting steps, it might be beneficial to tag the Better Auth team members, Beka and Max (@bekacru and @ping__), for more personalized assistance. Is there a particular part of this process where you would like more detailed guidance? _If you need more help, tag @better-auth-agent in a comment so I can respond._ <!-- bot:webhook reply v1 --> [Diagram](https://repodiagrams.s3.eu-north-1.amazonaws.com/better-auth_ultra_detailed_interactive.html) • [Discord](https://discord.gg/better-auth) • [GitHub](https://github.com/better-auth/better-auth) [![Diagram](https://img.shields.io/badge/Diagram-2b3137?style=flat-square)](https://repodiagrams.s3.eu-north-1.amazonaws.com/better-auth_ultra_detailed_interactive.html) [![Join](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&style=flat-square)](https://discord.gg/better-auth) [![Star](https://img.shields.io/badge/star-181717?logo=github&logoColor=white&style=flat-square)](https://github.com/better-auth/better-auth)
Author
Owner

@dosubot[bot] commented on GitHub (Jan 26, 2026):

Hi @carry0987! I'm Dosu and I’m helping the better-auth team.

The "Unauthorized" error from the Better Auth MCP server is usually caused by missing or improperly handled authentication context—most often session cookies or tokens. For server-side/API integrations like MCP, you need to ensure that after signing in (for example, with email/password), you extract the session cookies from the sign-in response and include them in the cookie header of all subsequent API requests. If these cookies are missing, the server will treat the request as unauthenticated and return a 401 error. This is a common pitfall in server-to-server or tool integrations, including VS Code extensions and Copilot workflows [source].

Double-check that your MCP server setup includes a database adapter (like Prisma or Drizzle) and that the database is running and accessible. Missing or misconfigured database connections can also cause authentication failures [source]. Make sure the required environment variables, especially BETTER_AUTH_SECRET, are set [source].

If you're using email/password authentication, users must verify their email before sign-in will succeed; otherwise, you'll get a 401 error with code EMAIL_NOT_VERIFIED [source].

For MCP integrations, there is also a known bug in the OAuth metadata endpoint that can break discovery for clients, so if you're using OAuth flows, check that the authorization_servers field in your metadata returns the correct issuer URL (not an endpoint path) [source].

If you need to perform privileged actions immediately after signup, consider using the API Key plugin and authenticating with an API key in the headers instead of relying on the user's session [source].

To debug, enable detailed logging on your MCP server and inspect incoming requests for missing cookies or tokens. If you’re still stuck, try to reproduce the issue with a minimal setup and check each step of the authentication flow for missing context.

Let me know if you need more specific troubleshooting steps for your framework or integration!

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

<!-- gh-comment-id:3798483294 --> @dosubot[bot] commented on GitHub (Jan 26, 2026): <!-- Greeting --> Hi @carry0987! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the better-auth team. <!-- Answer --> The "Unauthorized" error from the Better Auth MCP server is usually caused by missing or improperly handled authentication context—most often session cookies or tokens. For server-side/API integrations like MCP, you need to ensure that after signing in (for example, with email/password), you extract the session cookies from the sign-in response and include them in the `cookie` header of all subsequent API requests. If these cookies are missing, the server will treat the request as unauthenticated and return a 401 error. This is a common pitfall in server-to-server or tool integrations, including VS Code extensions and Copilot workflows [[source](https://github.com/better-auth/better-auth/issues/4945)]. Double-check that your MCP server setup includes a database adapter (like Prisma or Drizzle) and that the database is running and accessible. Missing or misconfigured database connections can also cause authentication failures [[source](https://github.com/better-auth/better-auth/issues/6728)]. Make sure the required environment variables, especially `BETTER_AUTH_SECRET`, are set [[source](https://github.com/better-auth/better-auth/blob/d1602ef0ae9822e462a5a42497072a0a1756e804/packages/mcp/src/lib/generator.ts#L78-L416)]. If you're using email/password authentication, users must verify their email before sign-in will succeed; otherwise, you'll get a 401 error with code `EMAIL_NOT_VERIFIED` [[source](https://github.com/better-auth/better-auth/issues/1130)]. For MCP integrations, there is also a known bug in the OAuth metadata endpoint that can break discovery for clients, so if you're using OAuth flows, check that the `authorization_servers` field in your metadata returns the correct issuer URL (not an endpoint path) [[source](https://github.com/better-auth/better-auth/issues/6394)]. If you need to perform privileged actions immediately after signup, consider using the API Key plugin and authenticating with an API key in the headers instead of relying on the user's session [[source](https://github.com/better-auth/better-auth/issues/4080)]. To debug, enable detailed logging on your MCP server and inspect incoming requests for missing cookies or tokens. If you’re still stuck, try to reproduce the issue with a minimal setup and check each step of the authentication flow for missing context. Let me know if you need more specific troubleshooting steps for your framework or integration! <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/5c6b65f5-7165-4522-b11c-d71ba2ccce43?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/5c6b65f5-7165-4522-b11c-d71ba2ccce43?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/5c6b65f5-7165-4522-b11c-d71ba2ccce43?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/5c6b65f5-7165-4522-b11c-d71ba2ccce43?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/5c6b65f5-7165-4522-b11c-d71ba2ccce43?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/5c6b65f5-7165-4522-b11c-d71ba2ccce43?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/5c6b65f5-7165-4522-b11c-d71ba2ccce43?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/cdda13d9-dd27-4d31-b09a-5d8bec92de21/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=The%20%22Unauthorized%22%20error%20from%20the%20Better%20Auth%20MCP%20server%20is%20usually%20caused%20by%20missing%20or%20improperly%20handled%20authentication%20context%E2%80%94most%20often%20session%20cookies%20or%20tokens.%20For%20server-side/API%20integrations%20like%20MCP%2C%20you%20need%20to%20ensure%20that%20after%20signing%20in%20%28for%20example%2C%20with%20email/password%29%2C%20you%20extract%20the%20session%20cookies%20from%20the%20sign-in%20response%20and%20include%20them%20in%20the%20%60cookie%60%20header%20of%20all%20subsequent%20API%20requests.%20If%20these%20cookies%20are%20missing%2C%20the%20server%20will%20treat%20the%20request%20as%20unauthenticated%20and%20return%20a%20401%20error.%20This%20is%20a%20common%20pitfall%20in%20server-to-server%20or%20tool%20integrations%2C%20including%20VS%20Code%20extensions%20and%20Copilot%20workflows%20%5B%5Bsource%5D%28https%3A//github.com/better-auth/better-auth/issues/4945%29%5D.%0A%0ADouble-check%20that%20your%20MCP%20server%20setup%20includes%20a%20database%20adapter%20%28like%20Prisma%20or%20Drizzle%29%20and%20that%20the%20database%20is%20running%20and%20accessible.%20Missing%20or%20misconfigured%20database%20connections%20can%20also%20cause%20authentication%20failures%20%5B%5Bsource%5D%28https%3A//github.com/better-auth/better-auth/issues/6728%29%5D.%20Make%20sure%20the%20required%20environment%20variables%2C%20especially%20%60BETTER_AUTH_SECRET%60%2C%20are%20set%20%5B%5Bsource%5D%28https%3A//github.com/better-auth/better-auth/blob/d1602ef0ae9822e462a5a42497072a0a1756e804/packages/mcp/src/lib/generator.ts%23L78-L416%29%5D.%0A%0AIf%20you%27re%20using%20email/password%20authentication%2C%20users%20must%20verify%20their%20email%20before%20sign-in%20will%20succeed%3B%20otherwise%2C%20you%27ll%20get%20a%20401%20error%20with%20code%20%60EMAIL_NOT_VERIFIED%60%20%5B%5Bsource%5D%28https%3A//github.com/better-auth/better-auth/issues/1130%29%5D.%0A%0AFor%20MCP%20integrations%2C%20there%20is%20also%20a%20known%20bug%20in%20the%20OAuth%20metadata%20endpoint%20that%20can%20break%20discovery%20for%20clients%2C%20so%20if%20you%27re%20using%20OAuth%20flows%2C%20check%20that%20the%20%60authorization_servers%60%20field%20in%20your%20metadata%20returns%20the%20correct%20issuer%20URL%20%28not%20an%20endpoint%20path%29%20%5B%5Bsource%5D%28https%3A//github.com/better-auth/better-auth/issues/6394%29%5D.%0A%0AIf%20you%20need%20to%20perform%20privileged%20actions%20immediately%20after%20signup%2C%20consider%20using%20the%20API%20Key%20plugin%20and%20authenticating%20with%20an%20API%20key%20in%20the%20headers%20instead%20of%20relying%20on%20the%20user%27s%20session%20%5B%5Bsource%5D%28https%3A//github.com/better-auth/better-auth/issues/4080%29%5D.%0A%0ATo%20debug%2C%20enable%20detailed%20logging%20on%20your%20MCP%20server%20and%20inspect%20incoming%20requests%20for%20missing%20cookies%20or%20tokens.%20If%20you%E2%80%99re%20still%20stuck%2C%20try%20to%20reproduce%20the%20issue%20with%20a%20minimal%20setup%20and%20check%20each%20step%20of%20the%20authentication%20flow%20for%20missing%20context.%0A%0ALet%20me%20know%20if%20you%20need%20more%20specific%20troubleshooting%20steps%20for%20your%20framework%20or%20integration%21)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/better-auth/better-auth/issues/7614)
Author
Owner

@carry0987 commented on GitHub (Jan 26, 2026):

@dosu No, you got it wrong. What I mean is, the Better-Auth official MCP server is down."

Image
<!-- gh-comment-id:3798560204 --> @carry0987 commented on GitHub (Jan 26, 2026): @dosu No, you got it wrong. What I mean is, the Better-Auth official MCP server is down." <img width="560" height="342" alt="Image" src="https://github.com/user-attachments/assets/0632de0d-8044-48dc-9c89-4d8fabdfc67e" />
Author
Owner

@dosubot[bot] commented on GitHub (Jan 26, 2026):

You're right—there have been recent outages and major changes to the Better-Auth MCP server. The official website was reported as unreachable, and a workaround URL (https://better-auth.vercel.app/) was shared by the community as an alternative access point for docs and some services (source).

As of January 2026, the local MCP server was removed from the project, and all MCP flows (like Cursor, Claude Code, and Open Code) now use a remote-only endpoint. The current official remote MCP server endpoint is https://mcp.inkeep.com/better-auth/mcp (source). If you previously used a local MCP server, you need to update your configuration to point to this remote endpoint.

If the remote endpoint is also down or unreachable, there’s no public status page, but you can monitor the relevant GitHub issues or try the Vercel workaround above. Let me know if you need help updating your MCP client config or want more details on migration steps.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

<!-- gh-comment-id:3798571905 --> @dosubot[bot] commented on GitHub (Jan 26, 2026): <!-- Answer --> You're right—there have been recent outages and major changes to the Better-Auth MCP server. The official website was reported as unreachable, and a workaround URL (https://better-auth.vercel.app/) was shared by the community as an alternative access point for docs and some services [(source)](https://github.com/better-auth/better-auth/issues/2045). As of January 2026, the local MCP server was removed from the project, and all MCP flows (like Cursor, Claude Code, and Open Code) now use a remote-only endpoint. The current official remote MCP server endpoint is https://mcp.inkeep.com/better-auth/mcp [(source)](https://github.com/better-auth/better-auth/pull/7574). If you previously used a local MCP server, you need to update your configuration to point to this remote endpoint. If the remote endpoint is also down or unreachable, there’s no public status page, but you can monitor the relevant GitHub issues or try the Vercel workaround above. Let me know if you need help updating your MCP client config or want more details on migration steps. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/4f21d64f-275f-4be8-ab5f-d7998d21e8b2?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/4f21d64f-275f-4be8-ab5f-d7998d21e8b2?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/4f21d64f-275f-4be8-ab5f-d7998d21e8b2?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/4f21d64f-275f-4be8-ab5f-d7998d21e8b2?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/4f21d64f-275f-4be8-ab5f-d7998d21e8b2?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/4f21d64f-275f-4be8-ab5f-d7998d21e8b2?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/4f21d64f-275f-4be8-ab5f-d7998d21e8b2?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/cdda13d9-dd27-4d31-b09a-5d8bec92de21/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=You%27re%20right%E2%80%94there%20have%20been%20recent%20outages%20and%20major%20changes%20to%20the%20Better-Auth%20MCP%20server.%20The%20official%20website%20was%20reported%20as%20unreachable%2C%20and%20a%20workaround%20URL%20%28https%3A//better-auth.vercel.app/%29%20was%20shared%20by%20the%20community%20as%20an%20alternative%20access%20point%20for%20docs%20and%20some%20services%20%5B%28source%29%5D%28https%3A//github.com/better-auth/better-auth/issues/2045%29.%0A%0AAs%20of%20January%202026%2C%20the%20local%20MCP%20server%20was%20removed%20from%20the%20project%2C%20and%20all%20MCP%20flows%20%28like%20Cursor%2C%20Claude%20Code%2C%20and%20Open%20Code%29%20now%20use%20a%20remote-only%20endpoint.%20The%20current%20official%20remote%20MCP%20server%20endpoint%20is%20https%3A//mcp.inkeep.com/better-auth/mcp%20%5B%28source%29%5D%28https%3A//github.com/better-auth/better-auth/pull/7574%29.%20If%20you%20previously%20used%20a%20local%20MCP%20server%2C%20you%20need%20to%20update%20your%20configuration%20to%20point%20to%20this%20remote%20endpoint.%0A%0AIf%20the%20remote%20endpoint%20is%20also%20down%20or%20unreachable%2C%20there%E2%80%99s%20no%20public%20status%20page%2C%20but%20you%20can%20monitor%20the%20relevant%20GitHub%20issues%20or%20try%20the%20Vercel%20workaround%20above.%20Let%20me%20know%20if%20you%20need%20help%20updating%20your%20MCP%20client%20config%20or%20want%20more%20details%20on%20migration%20steps.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/better-auth/better-auth/issues/7614)
Author
Owner

@carry0987 commented on GitHub (Jan 26, 2026):

@dosu My goodness, it turns out that MCP has already moved to Inkeep, from this issue: #7574 . So the current problem is that the official website's section on MCP setup has not been updated yet.

<!-- gh-comment-id:3798658987 --> @carry0987 commented on GitHub (Jan 26, 2026): @dosu My goodness, it turns out that MCP has already moved to Inkeep, from this issue: #7574 . So the current problem is that the official website's section on [MCP](https://www.better-auth.com/docs/introduction#mcp) setup has not been updated yet.
Author
Owner

@dosubot[bot] commented on GitHub (Jan 26, 2026):

You're correct—the official Better Auth docs for MCP setup are outdated and don't reflect the migration to Inkeep. As of January 2026, the local MCP server was removed and all MCP flows (Cursor, Claude Code, Open Code, etc.) now use the remote endpoint at https://mcp.inkeep.com/better-auth/mcp. If you previously used a local MCP server, you should remove it from your configs and use the CLI to add the remote server (for example: better-auth mcp --cursor, --claude-code, --open-code, or --manual). Update any local "better-auth" entries to "better-auth-docs" and point to the new remote URL. The --local-only and --remote-only flags have been dropped, and all flows now add only the remote server. The official docs haven't been updated yet, so for now, the most reliable source for migration steps is the merged PR and CLI output itself citation.

Also, the MCP plugin is being deprecated in favor of the oidcProvider plugin. If you're using OAuth, migrate your endpoints from /mcp/* to /oauth2/* and update your OAuth client config accordingly citation.

If you need more details on the migration or config changes, let me know!

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

<!-- gh-comment-id:3798666893 --> @dosubot[bot] commented on GitHub (Jan 26, 2026): <!-- Answer --> You're correct—the official Better Auth docs for MCP setup are outdated and don't reflect the migration to Inkeep. As of January 2026, the local MCP server was removed and all MCP flows (Cursor, Claude Code, Open Code, etc.) now use the remote endpoint at https://mcp.inkeep.com/better-auth/mcp. If you previously used a local MCP server, you should remove it from your configs and use the CLI to add the remote server (for example: better-auth mcp --cursor, --claude-code, --open-code, or --manual). Update any local "better-auth" entries to "better-auth-docs" and point to the new remote URL. The --local-only and --remote-only flags have been dropped, and all flows now add only the remote server. The official docs haven't been updated yet, so for now, the most reliable source for migration steps is the merged PR and CLI output itself [citation](https://github.com/better-auth/better-auth/pull/7574). Also, the MCP plugin is being deprecated in favor of the oidcProvider plugin. If you're using OAuth, migrate your endpoints from /mcp/* to /oauth2/* and update your OAuth client config accordingly [citation](https://github.com/better-auth/better-auth/issues/7041). If you need more details on the migration or config changes, let me know! <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/5dc86de2-2839-4d69-b4d6-0b01480fb527?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/5dc86de2-2839-4d69-b4d6-0b01480fb527?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/5dc86de2-2839-4d69-b4d6-0b01480fb527?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/5dc86de2-2839-4d69-b4d6-0b01480fb527?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/5dc86de2-2839-4d69-b4d6-0b01480fb527?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/5dc86de2-2839-4d69-b4d6-0b01480fb527?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/5dc86de2-2839-4d69-b4d6-0b01480fb527?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/cdda13d9-dd27-4d31-b09a-5d8bec92de21/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=You%27re%20correct%E2%80%94the%20official%20Better%20Auth%20docs%20for%20MCP%20setup%20are%20outdated%20and%20don%27t%20reflect%20the%20migration%20to%20Inkeep.%20As%20of%20January%202026%2C%20the%20local%20MCP%20server%20was%20removed%20and%20all%20MCP%20flows%20%28Cursor%2C%20Claude%20Code%2C%20Open%20Code%2C%20etc.%29%20now%20use%20the%20remote%20endpoint%20at%20https%3A//mcp.inkeep.com/better-auth/mcp.%20If%20you%20previously%20used%20a%20local%20MCP%20server%2C%20you%20should%20remove%20it%20from%20your%20configs%20and%20use%20the%20CLI%20to%20add%20the%20remote%20server%20%28for%20example%3A%20better-auth%20mcp%20--cursor%2C%20--claude-code%2C%20--open-code%2C%20or%20--manual%29.%20Update%20any%20local%20%22better-auth%22%20entries%20to%20%22better-auth-docs%22%20and%20point%20to%20the%20new%20remote%20URL.%20The%20--local-only%20and%20--remote-only%20flags%20have%20been%20dropped%2C%20and%20all%20flows%20now%20add%20only%20the%20remote%20server.%20The%20official%20docs%20haven%27t%20been%20updated%20yet%2C%20so%20for%20now%2C%20the%20most%20reliable%20source%20for%20migration%20steps%20is%20the%20merged%20PR%20and%20CLI%20output%20itself%E2%80%AF%5Bcitation%5D%28https%3A//github.com/better-auth/better-auth/pull/7574%29.%0A%0AAlso%2C%20the%20MCP%20plugin%20is%20being%20deprecated%20in%20favor%20of%20the%20oidcProvider%20plugin.%20If%20you%27re%20using%20OAuth%2C%20migrate%20your%20endpoints%20from%20/mcp/%2A%20to%20/oauth2/%2A%20and%20update%20your%20OAuth%20client%20config%20accordingly%E2%80%AF%5Bcitation%5D%28https%3A//github.com/better-auth/better-auth/issues/7041%29.%0A%0AIf%20you%20need%20more%20details%20on%20the%20migration%20or%20config%20changes%2C%20let%20me%20know%21)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/better-auth/better-auth/issues/7614)
Author
Owner

@amankumarhq commented on GitHub (Jan 26, 2026):

Working on this.

Will raise a PR to update the docs to match the new remote-only implementation (Inkeep) and remove mentions of the deprecated CLI flags, aligning them with the changes in #7574.

Edit: This fix is already in the merge queue with PR #7585

<!-- gh-comment-id:3799610000 --> @amankumarhq commented on GitHub (Jan 26, 2026): Working on this. Will raise a PR to update the docs to match the new remote-only implementation (Inkeep) and remove mentions of the deprecated CLI flags, aligning them with the changes in #7574. > Edit: This fix is already in the merge queue with PR #7585
Author
Owner

@bytaesu commented on GitHub (Jan 26, 2026):

<!-- gh-comment-id:3801090130 --> @bytaesu commented on GitHub (Jan 26, 2026): - Related to https://github.com/better-auth/better-auth/pull/7616#issuecomment-3800695836
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#19485