This documentation covers the Better Auth OAuth Provider plugin (
@better-auth/oauth-provider).If you are using the older Better Auth MCP plugin, note that it is deprecated in favor of the OAuth Provider approach. For legacy MCP adapter users, Better Auth provides a dedicated mcp-use adapter.Install
Setup
1. Configure Better Auth
Create anauth.ts file that initializes Better Auth with the OAuth Provider plugin and the JWT plugin (required for token signing):