Skip to main content
Join the
FastMCP community
!
FastMCP home page
FastMCP Cloud
Discord
jlowin/fastmcp
jlowin/fastmcp
Search...
Navigation
auth
middleware
Search the docs...
⌘K
SDK Reference
Python SDK
exceptions
mcp_config
settings
fastmcp.cli
__init__
cli
install
run
fastmcp.client
__init__
auth
client
elicitation
logging
messages
oauth_callback
progress
roots
sampling
transports
fastmcp.prompts
__init__
prompt
prompt_manager
fastmcp.resources
__init__
resource
resource_manager
template
types
fastmcp.server
__init__
auth
__init__
auth
jwt_issuer
middleware
oauth_proxy
oidc_proxy
providers
redirect_validation
context
dependencies
elicitation
http
low_level
middleware
openapi
proxy
server
fastmcp.tools
__init__
tool
tool_manager
tool_transform
fastmcp.utilities
__init__
auth
cli
components
exceptions
http
inspect
json_schema
json_schema_type
logging
mcp_config
mcp_server_config
openapi
tests
types
ui
On this page
fastmcp.server.auth.middleware
Classes
RequireAuthMiddleware
auth
middleware
Copy page
Copy page
fastmcp.server.auth.middleware
Enhanced authentication middleware with better error messages.
This module provides enhanced versions of MCP SDK authentication middleware that return more helpful error messages for developers troubleshooting authentication issues.
Classes
RequireAuthMiddleware
Enhanced authentication middleware with detailed error messages.
Extends the SDK’s RequireAuthMiddleware to provide more actionable error messages when authentication fails. This helps developers understand what went wrong and how to fix it.
jwt_issuer
Previous
oauth_proxy
Next
⌘I