Authentication, Authorization, and OAuth
Authentication versus authorization
- Authentication: Who is the caller?
- Authorization: What is the caller allowed to do?
For local stdio, the operating system/process boundary and configuration are important. Remote MCP servers generally operate as protected resources, and the current authorization specification defines OAuth-based discovery and token usage.
Rules
- Do not send bearer tokens in query strings.
- Validate that the token is intended for the correct audience/resource.
- Use short-lived, least-privilege scopes.
- Derive the tenant/user from server-side identity.
- Enforce authorization on every record-level access.
- Show a clear preview and obtain human approval before sensitive writes.
Confused-deputy risk
The server may possess a powerful upstream credential. If it accesses a caller-controlled resource without policy validation, the server can become an attacker's deputy. Tenant mapping, audience checks, explicit scopes, and resource ownership checks reduce this risk.
Can you explain it without the notes?
Authentication, Authorization, and OAuth
Use your own words. Explain an example and one limitation before checking the explanation.
Check your explanation
Authentication versus authorization
Turn this concept into a clear answer.
Practice this conceptAdapted from 20_MCP_SERVER.md · “11. Authentication, Authorization, and OAuth”. Examples are study fragments; framework behavior can depend on your version.