Skip to content

When no authorization is required dont fail on missing user scope 401 Unauthorized #615 #616

Closed as duplicate of#613
@yonigottesman

Description

@yonigottesman

While developing a mcp server that wil run locally I want to use the sse protocal and not stdio. Because im running local i dont need any authentication, but the default RequireAuthMiddleware will fail if if not isinstance(auth_user, AuthenticatedUser).

I want the solution to be
if not isinstance(auth_user, AuthenticatedUser) and self.required_scopes: so if there are no required scopes I wont have to do anything and i can just connect to the server withtou any autherization

I submitted a pr #615

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions