JWT-Protected MCP Server with a Scoped whoami Tool

Asked at Okta · Coding Questions · Difficulty: Medium · Last asked Nov 22, 2025

Build a Model Context Protocol (MCP) server that is protected by Auth0-issued access tokens and exposes a single tool, `whoami`. Every request must carry a valid bearer token, and the tool must only run for callers whose token grants the right scope.

Loading the problem…