Skip to main content
View the source code for this module on GitHub: https://github.com/mcp-use/mcp-use/blob/main/mcp_use/auth/bearer.py
Bearer token authentication support.

BearerAuth

from mcp_use.auth.bearer import BearerAuth

Attributes
token
pydantic.types.SecretStr
required
String value

method init

Create a new model by parsing and validating input data from keyword arguments.Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.self is explicitly positional-only to allow self as a field name.Parameters
data
Any
required
Parameter value
Signature
def __init__(data: Any):
I