MCP authentication and authorization
TL;DR
MCP authentication verifies who is connecting to a remote server. Bearer tokens and OAuth are the common approaches. Authorization then decides what an authenticated caller may do, potentially down to individual tools and scopes.
Bearer tokens
A bearer token proves identity by possession. The client includes it in the request; the server validates it. Keep tokens out of logs, URLs, and tool arguments.
OAuth
OAuth adds a delegated flow with scopes that bound what the client may do. The MCP specification supports OAuth-based authorization for protected resources and remote endpoints.
Scopes and RBAC
Scopes and role-based access control bound a caller's reach. Restricting by scope limits what a compromised token or an over-eager agent can touch. Default-deny is safer than default-grant.